bitsnap-react 1.7.1 → 1.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.
- package/README.md +130 -0
- package/dist/CartProvider-XWTLBIZ5.js +2 -0
- package/dist/CartProvider-XWTLBIZ5.js.map +1 -0
- package/dist/CartProvider-ZURLJNBW.mjs +2 -0
- package/dist/analytics.d.mts +28 -0
- package/dist/analytics.d.ts +28 -0
- package/dist/analytics.js +2 -0
- package/dist/analytics.js.map +1 -0
- package/dist/analytics.mjs +2 -0
- package/dist/catalog.d.mts +14 -1
- package/dist/catalog.d.ts +14 -1
- package/dist/catalog.js +1 -1
- package/dist/catalog.js.map +1 -1
- package/dist/catalog.mjs +1 -1
- package/dist/chunk-3IMJALBX.js +2 -0
- package/dist/chunk-3IMJALBX.js.map +1 -0
- package/dist/chunk-3UHPJ6NK.js +2 -0
- package/dist/chunk-3UHPJ6NK.js.map +1 -0
- package/dist/chunk-CO2P4FR5.js +2 -0
- package/dist/chunk-CO2P4FR5.js.map +1 -0
- package/dist/chunk-E6QVQEGZ.mjs +2 -0
- package/dist/chunk-E6QVQEGZ.mjs.map +1 -0
- package/dist/chunk-FHDFLSPW.js +2 -0
- package/dist/chunk-FHDFLSPW.js.map +1 -0
- package/dist/{chunk-6KQBDN7M.mjs → chunk-GN63ITLA.mjs} +2 -2
- package/dist/chunk-HKVMSMDF.mjs +2 -0
- package/dist/chunk-HKVMSMDF.mjs.map +1 -0
- package/dist/chunk-JSDGZ4NY.js +2 -0
- package/dist/chunk-JSDGZ4NY.js.map +1 -0
- package/dist/chunk-KG6RU37U.js +4 -0
- package/dist/chunk-KG6RU37U.js.map +1 -0
- package/dist/chunk-KOVKUJAW.mjs +2 -0
- package/dist/chunk-KOVKUJAW.mjs.map +1 -0
- package/dist/chunk-KOYBZORL.js +2 -0
- package/dist/chunk-KOYBZORL.js.map +1 -0
- package/dist/chunk-LJWS6ZRJ.mjs +2 -0
- package/dist/chunk-LJWS6ZRJ.mjs.map +1 -0
- package/dist/chunk-LZE2E4TE.mjs +4 -0
- package/dist/chunk-LZE2E4TE.mjs.map +1 -0
- package/dist/chunk-QZJGNLCZ.js +2 -0
- package/dist/chunk-QZJGNLCZ.js.map +1 -0
- package/dist/chunk-RA452LXZ.mjs +2 -0
- package/dist/chunk-RA452LXZ.mjs.map +1 -0
- package/dist/chunk-SLLBTQTW.mjs +2 -0
- package/dist/chunk-SLLBTQTW.mjs.map +1 -0
- package/dist/chunk-SZ256RCC.mjs +2 -0
- package/dist/chunk-SZ256RCC.mjs.map +1 -0
- package/dist/chunk-V4U2PTKN.js +2 -0
- package/dist/chunk-V4U2PTKN.js.map +1 -0
- package/dist/chunk-VM6JEJFZ.js +2 -0
- package/dist/chunk-VM6JEJFZ.js.map +1 -0
- package/dist/chunk-VXB7LA4E.js +2 -0
- package/dist/chunk-VXB7LA4E.js.map +1 -0
- package/dist/chunk-XVQKEGPO.mjs +2 -0
- package/dist/chunk-XVQKEGPO.mjs.map +1 -0
- package/dist/consent.d.mts +158 -0
- package/dist/consent.d.ts +158 -0
- package/dist/consent.js +75 -0
- package/dist/consent.js.map +1 -0
- package/dist/consent.mjs +75 -0
- package/dist/consent.mjs.map +1 -0
- package/dist/course.d.mts +1882 -0
- package/dist/course.d.ts +1882 -0
- package/dist/course.js +2 -0
- package/dist/course.js.map +1 -0
- package/dist/course.mjs +2 -0
- package/dist/course.mjs.map +1 -0
- package/dist/embed/analytics.js +1 -0
- package/dist/embed/consent.js +74 -0
- package/dist/errors.js +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +56 -40
- package/dist/index.d.ts +56 -40
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/instrument-C_abZLHk.d.mts +912 -0
- package/dist/instrument-C_abZLHk.d.ts +912 -0
- package/dist/internal.js +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/methods-CYARZTYL.mjs +2 -0
- package/dist/methods-CYARZTYL.mjs.map +1 -0
- package/dist/methods-DAPEWVI6.js +2 -0
- package/dist/methods-DAPEWVI6.js.map +1 -0
- package/dist/models.js +1 -1
- package/dist/models.js.map +1 -1
- package/dist/returns.d.mts +14 -196
- package/dist/returns.d.ts +14 -196
- package/dist/returns.js +1 -1
- package/dist/returns.js.map +1 -1
- package/dist/returns.mjs +1 -1
- package/dist/texts-CIEFbJTN.d.ts +196 -0
- package/dist/texts-tQtAGJCT.d.mts +196 -0
- package/dist/types-BaqLJYuq.d.ts +53 -0
- package/dist/types-D_WnqwR_.d.mts +53 -0
- package/package.json +41 -5
- package/dist/CartProvider-F2VH7WFO.mjs +0 -2
- package/dist/chunk-3TENJTY4.mjs +0 -2
- package/dist/chunk-3TENJTY4.mjs.map +0 -1
- package/dist/chunk-4HOZFM6V.mjs +0 -2
- package/dist/chunk-4HOZFM6V.mjs.map +0 -1
- package/dist/chunk-FTYJTO6O.mjs +0 -2
- package/dist/chunk-FTYJTO6O.mjs.map +0 -1
- package/dist/chunk-RATFYRKZ.mjs +0 -4
- package/dist/chunk-RATFYRKZ.mjs.map +0 -1
- package/dist/methods-PFZSMZFU.mjs +0 -2
- /package/dist/{CartProvider-F2VH7WFO.mjs.map → CartProvider-ZURLJNBW.mjs.map} +0 -0
- /package/dist/{methods-PFZSMZFU.mjs.map → analytics.mjs.map} +0 -0
- /package/dist/{chunk-6KQBDN7M.mjs.map → chunk-GN63ITLA.mjs.map} +0 -0
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/gen/proto/common/v1/address_pb.ts","../src/gen/proto/common/v1/gateway_pb.ts","../src/gen/proto/common/v1/push_notifications_pb.ts","../src/gen/proto/dashboard/v1/audiobooks_pb.ts","../src/gen/proto/public/v1/public_api_pb.ts","../src/public.api.client.ts","../src/lib/utils.ts","../src/components/checkout/constants.ts","../src/gen/proto/dashboard/v1/product_pb.ts","../src/gen/proto/dashboard/v1/notifications_pb.ts","../src/gen/proto/dashboard/v1/notifications-NotificationsService_connectquery.ts","../src/gen/proto/public/v1/public_api-PublicApiService_connectquery.ts","../src/gen/proto/common/v1/environment_pb.ts","../src/gen/proto/public/v1/returns_pb.ts","../src/gen/proto/public/v1/returns-ReturnsService_connectquery.ts","../src/rpc-provider.tsx","../src/ui/button.tsx","../src/ui/card.tsx","../src/ui/input.tsx","../src/ui/input-otp.tsx","../src/ui/label.tsx","../src/panel/LoadingIndicator.tsx","../src/panel/config.ts","../src/panel/PanelProvider.tsx","../src/panel/return-url.ts","../src/panel/session-storage.ts","../src/panel/components/PanelLogin.tsx","../src/panel/hooks/useUrlSearchParams.ts","../src/components/returns/color.ts","../src/panel/returns-appearance.ts","../src/ui/switch.tsx","../src/panel/components/PanelNotifications.tsx","../src/ui/pagination.tsx","../src/ui/skeleton.tsx","../src/panel/components/PanelOrderHistory.tsx","../src/panel/components/PanelPlans.tsx","../src/ui/spinner.tsx","../src/ui/textarea.tsx","../src/lib/appearance-core.ts","../src/components/returns/appearance.ts","../src/components/returns/appearance.context.tsx","../src/components/returns/errors.ts","../src/components/returns/idempotency.ts","../src/components/returns/legacy.ts","../src/components/returns/session-storage.ts","../src/lib/texts.ts","../src/components/checkout/texts.ts","../src/components/checkout/locale.ts","../src/components/returns/texts.ts","../src/components/returns/texts.context.tsx","../src/components/returns/ReturnsProvider.tsx","../src/components/returns/hooks.ts","../src/components/returns/internal.tsx","../src/components/returns/AuthSteps.tsx","../src/components/returns/date.ts","../src/components/returns/money.ts","../src/components/returns/selection.ts","../src/components/returns/OrderSteps.tsx","../src/components/returns/MyReturns.tsx","../src/panel/components/PanelReturns.tsx","../src/lib/render.text.tsx","../src/panel/audio-player/media.session.coordinator.ts","../src/panel/audio-player/audio-player.css","../src/panel/audio-player/AudioPlayer.tsx","../src/panel/components/ProgressBar.tsx","../src/panel/components/PanelProductDetails.tsx","../src/panel/components/PanelProductGrid.tsx","../src/panel/texts.ts","../src/panel/components/PanelProductHeader.tsx","../src/panel/components/PanelProfile.tsx","../src/panel/components/PublicOrderPage.tsx","../src/panel/components/PanelPage.tsx","../src/panel/index.ts","../src/components/checkout/lib/round.number.ts","../src/components/checkout/frontent.analytics.ts","../src/components/checkout/google.pay.mapper.ts","../src/components/checkout/helper.methods.ts","../src/components/checkout/lib/err.ts","../src/components/checkout/cart-items.ts","../src/components/checkout/state.ts","../src/components/checkout/methods.ts","../src/components/checkout/CartProvider.tsx","../src/index.ts","../src/components/checkout/ApplePay.tsx","../src/components/checkout/BitsnapCart.tsx","../src/components/checkout/CartComponent.tsx","../src/components/checkout/appearance.context.tsx","../src/components/checkout/appearance.ts","../src/components/checkout/CartComponentContent.tsx","../src/components/checkout/CountrySelector.tsx","../src/ui/select.tsx","../src/components/checkout/SingleProduct.tsx","../src/ui/button-group.tsx","../src/components/checkout/ProductPrice.tsx","../src/components/checkout/Skeleton.tsx","../src/components/checkout/texts.context.tsx","../src/components/products/ProductList.tsx","../src/components/products/add-to-cart.ts","../src/components/products/fetch.ts","../src/components/products/cart-target.ts","../src/components/products/appearance.ts","../src/components/products/format.ts","../src/components/products/texts.ts","../src/components/products/useProducts.ts","../src/components/returns/BitsnapReturns.tsx","../src/components/returns/state-machine.ts","../src/components/index.ts","../src/components/checkout/GooglePay.tsx","../src/components/notifications/NotificationsComponentPublic.tsx","../src/components/notifications/constants.tsx","../src/components/notifications/NotificationHeader.tsx","../src/components/notifications/NotificationGroupsList.tsx","../src/ui/popover.tsx","../src/components/notifications/HowOftenComponent.tsx","../src/components/notifications/QRCodeSection.tsx","../src/components/notifications/AddUserToGroups.tsx","../src/components/notifications/FormInput.tsx","../src/components/notifications/ManageMyData.tsx","../src/components/notifications/UnsubscribeDialog.tsx","../src/components/notifications/LoginScreen.tsx","../src/ui/dialog.tsx"],"sourcesContent":["// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts\"\n// @generated from file common/v1/address.proto (package common.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file common/v1/address.proto.\n */\nexport const file_common_v1_address: GenFile = /*@__PURE__*/\n fileDesc(\"Chdjb21tb24vdjEvYWRkcmVzcy5wcm90bxIJY29tbW9uLnYxIocBCgdBZGRyZXNzEgwKBG5hbWUYASABKAkSDQoFbGluZTEYAiABKAkSEgoFbGluZTIYAyABKAlIAIgBARIMCgRjaXR5GAQgASgJEg8KB2NvdW50cnkYBSABKAkSFQoIemlwX2NvZGUYBiABKAlIAYgBAUIICgZfbGluZTJCCwoJX3ppcF9jb2RlIq4BCg5CaWxsaW5nQWRkcmVzcxIMCgRuYW1lGAEgASgJEg0KBWxpbmUxGAIgASgJEhIKBWxpbmUyGAMgASgJSACIAQESDAoEY2l0eRgEIAEoCRIPCgdjb3VudHJ5GAUgASgJEhUKCHppcF9jb2RlGAYgASgJSAGIAQESEwoGdGF4X2lkGAcgASgJSAKIAQFCCAoGX2xpbmUyQgsKCV96aXBfY29kZUIJCgdfdGF4X2lkQk5aTGdpdGh1Yi5jb20vZW1tZW1zL3N1cGVyLWNhcnQvYXBwcy9zcnYtd29ya2VyL3V0aWxzL21vZGVscy9jb21tb24vdjE7Y29tbW9udjFiBnByb3RvMw\");\n\n/**\n * @generated from message common.v1.Address\n */\nexport type Address = Message<\"common.v1.Address\"> & {\n /**\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * @generated from field: string line1 = 2;\n */\n line1: string;\n\n /**\n * @generated from field: optional string line2 = 3;\n */\n line2?: string;\n\n /**\n * @generated from field: string city = 4;\n */\n city: string;\n\n /**\n * @generated from field: string country = 5;\n */\n country: string;\n\n /**\n * @generated from field: optional string zip_code = 6;\n */\n zipCode?: string;\n};\n\n/**\n * Describes the message common.v1.Address.\n * Use `create(AddressSchema)` to create a new message.\n */\nexport const AddressSchema: GenMessage<Address> = /*@__PURE__*/\n messageDesc(file_common_v1_address, 0);\n\n/**\n * @generated from message common.v1.BillingAddress\n */\nexport type BillingAddress = Message<\"common.v1.BillingAddress\"> & {\n /**\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * @generated from field: string line1 = 2;\n */\n line1: string;\n\n /**\n * @generated from field: optional string line2 = 3;\n */\n line2?: string;\n\n /**\n * @generated from field: string city = 4;\n */\n city: string;\n\n /**\n * @generated from field: string country = 5;\n */\n country: string;\n\n /**\n * @generated from field: optional string zip_code = 6;\n */\n zipCode?: string;\n\n /**\n * @generated from field: optional string tax_id = 7;\n */\n taxId?: string;\n};\n\n/**\n * Describes the message common.v1.BillingAddress.\n * Use `create(BillingAddressSchema)` to create a new message.\n */\nexport const BillingAddressSchema: GenMessage<BillingAddress> = /*@__PURE__*/\n messageDesc(file_common_v1_address, 1);\n\n","// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts\"\n// @generated from file common/v1/gateway.proto (package common.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc } from \"@bufbuild/protobuf/codegenv2\";\n\n/**\n * Describes the file common/v1/gateway.proto.\n */\nexport const file_common_v1_gateway: GenFile = /*@__PURE__*/\n fileDesc(\"Chdjb21tb24vdjEvZ2F0ZXdheS5wcm90bxIJY29tbW9uLnYxKs8BCgdHYXRld2F5Eg8KC0dBVEVXQVlfQUxMEAASFwoTR0FURVdBWV9QUlpFTEVXWV8yNBABEhIKDkdBVEVXQVlfU1RSSVBFEAISEAoMR0FURVdBWV9UUEFZEAMSHAoYR0FURVdBWV9DQVNIX09OX0RFTElWRVJZEAQSEAoMR0FURVdBWV9GUkVFEAUSFgoSR0FURVdBWV9JTlBPU1RfUEFZEAYSEAoMR0FURVdBWV9QQVlVEAcSGgoWR0FURVdBWV9NQU5VQUxfUEFZTUVOVBAIQk5aTGdpdGh1Yi5jb20vZW1tZW1zL3N1cGVyLWNhcnQvYXBwcy9zcnYtd29ya2VyL3V0aWxzL21vZGVscy9jb21tb24vdjE7Y29tbW9udjFiBnByb3RvMw\");\n\n/**\n * @generated from enum common.v1.Gateway\n */\nexport enum Gateway {\n /**\n * @generated from enum value: GATEWAY_ALL = 0;\n */\n ALL = 0,\n\n /**\n * @generated from enum value: GATEWAY_PRZELEWY_24 = 1;\n */\n PRZELEWY_24 = 1,\n\n /**\n * @generated from enum value: GATEWAY_STRIPE = 2;\n */\n STRIPE = 2,\n\n /**\n * @generated from enum value: GATEWAY_TPAY = 3;\n */\n TPAY = 3,\n\n /**\n * @generated from enum value: GATEWAY_CASH_ON_DELIVERY = 4;\n */\n CASH_ON_DELIVERY = 4,\n\n /**\n * @generated from enum value: GATEWAY_FREE = 5;\n */\n FREE = 5,\n\n /**\n * @generated from enum value: GATEWAY_INPOST_PAY = 6;\n */\n INPOST_PAY = 6,\n\n /**\n * @generated from enum value: GATEWAY_PAYU = 7;\n */\n PAYU = 7,\n\n /**\n * @generated from enum value: GATEWAY_MANUAL_PAYMENT = 8;\n */\n MANUAL_PAYMENT = 8,\n}\n\n/**\n * Describes the enum common.v1.Gateway.\n */\nexport const GatewaySchema: GenEnum<Gateway> = /*@__PURE__*/\n enumDesc(file_common_v1_gateway, 0);\n\n","// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts\"\n// @generated from file common/v1/push_notifications.proto (package common.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file common/v1/push_notifications.proto.\n */\nexport const file_common_v1_push_notifications: GenFile = /*@__PURE__*/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SRUxZEAASJgoiTk9USUZJQ0FUSU9OX0dST1VQX0hPV19PRlRFTl9PRlRFThABEisKJ05PVElGSUNBVElPTl9HUk9VUF9IT1dfT0ZURU5fVkVSWV9PRlRFThACQk5aTGdpdGh1Yi5jb20vZW1tZW1zL3N1cGVyLWNhcnQvYXBwcy9zcnYtd29ya2VyL3V0aWxzL21vZGVscy9jb21tb24vdjE7Y29tbW9udjFiBnByb3RvMw\", [file_google_protobuf_timestamp]);\n\n/**\n * @generated from message common.v1.PushNotificationDeviceToken\n */\nexport type PushNotificationDeviceToken = Message<\"common.v1.PushNotificationDeviceToken\"> & {\n /**\n * @generated from field: optional string push_token = 2;\n */\n pushToken?: string;\n\n /**\n * @generated from field: optional google.protobuf.Timestamp expire_time = 3;\n */\n expireTime?: Timestamp;\n\n /**\n * @generated from field: optional string p256dh = 4;\n */\n p256dh?: string;\n\n /**\n * @generated from field: optional string endpoint = 5;\n */\n endpoint?: string;\n\n /**\n * @generated from field: common.v1.Platform platform = 6;\n */\n platform: Platform;\n};\n\n/**\n * Describes the message common.v1.PushNotificationDeviceToken.\n * Use `create(PushNotificationDeviceTokenSchema)` to create a new message.\n */\nexport const PushNotificationDeviceTokenSchema: GenMessage<PushNotificationDeviceToken> = /*@__PURE__*/\n messageDesc(file_common_v1_push_notifications, 0);\n\n/**\n * @generated from message common.v1.PushNotificationPayload\n */\nexport type PushNotificationPayload = Message<\"common.v1.PushNotificationPayload\"> & {\n /**\n * @generated from field: string title = 2;\n */\n title: string;\n\n /**\n * @generated from field: optional string open_url = 3;\n */\n openUrl?: string;\n\n /**\n * @generated from oneof common.v1.PushNotificationPayload.message\n */\n message: {\n /**\n * @generated from field: string body = 4;\n */\n value: string;\n case: \"body\";\n } | { case: undefined; value?: undefined };\n\n /**\n * @generated from field: map<string, string> data = 5;\n */\n data: { [key: string]: string };\n};\n\n/**\n * Describes the message common.v1.PushNotificationPayload.\n * Use `create(PushNotificationPayloadSchema)` to create a new message.\n */\nexport const PushNotificationPayloadSchema: GenMessage<PushNotificationPayload> = /*@__PURE__*/\n messageDesc(file_common_v1_push_notifications, 1);\n\n/**\n * @generated from enum common.v1.Platform\n */\nexport enum Platform {\n /**\n * @generated from enum value: PLATFORM_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: PLATFORM_WEB = 1;\n */\n WEB = 1,\n\n /**\n * @generated from enum value: PLATFORM_IOS_SANDBOX = 2;\n */\n IOS_SANDBOX = 2,\n\n /**\n * @generated from enum value: PLATFORM_IOS = 3;\n */\n IOS = 3,\n\n /**\n * @generated from enum value: PLATFORM_ANDROID = 4;\n */\n ANDROID = 4,\n}\n\n/**\n * Describes the enum common.v1.Platform.\n */\nexport const PlatformSchema: GenEnum<Platform> = /*@__PURE__*/\n enumDesc(file_common_v1_push_notifications, 0);\n\n/**\n * @generated from enum common.v1.NotificationEvent\n */\nexport enum NotificationEvent {\n /**\n * @generated from enum value: EVENT_UNKNOWN = 0;\n */\n EVENT_UNKNOWN = 0,\n\n /**\n * @generated from enum value: EVENT_RECEIVED = 1;\n */\n EVENT_RECEIVED = 1,\n\n /**\n * @generated from enum value: EVENT_OPENED = 2;\n */\n EVENT_OPENED = 2,\n\n /**\n * @generated from enum value: EVENT_CLICKED = 3;\n */\n EVENT_CLICKED = 3,\n\n /**\n * @generated from enum value: EVENT_DISMISSED = 4;\n */\n EVENT_DISMISSED = 4,\n}\n\n/**\n * Describes the enum common.v1.NotificationEvent.\n */\nexport const NotificationEventSchema: GenEnum<NotificationEvent> = /*@__PURE__*/\n enumDesc(file_common_v1_push_notifications, 1);\n\n/**\n * @generated from enum common.v1.NotificationGroupHowOften\n */\nexport enum NotificationGroupHowOften {\n /**\n * @generated from enum value: NOTIFICATION_GROUP_HOW_OFTEN_RARELY = 0;\n */\n RARELY = 0,\n\n /**\n * @generated from enum value: NOTIFICATION_GROUP_HOW_OFTEN_OFTEN = 1;\n */\n OFTEN = 1,\n\n /**\n * @generated from enum value: NOTIFICATION_GROUP_HOW_OFTEN_VERY_OFTEN = 2;\n */\n VERY_OFTEN = 2,\n}\n\n/**\n * Describes the enum common.v1.NotificationGroupHowOften.\n */\nexport const NotificationGroupHowOftenSchema: GenEnum<NotificationGroupHowOften> = /*@__PURE__*/\n enumDesc(file_common_v1_push_notifications, 2);\n\n","// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts\"\n// @generated from file dashboard/v1/audiobooks.proto (package dashboard.audiobooks.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Empty, Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_empty, file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file dashboard/v1/audiobooks.proto.\n */\nexport const file_dashboard_v1_audiobooks: GenFile = /*@__PURE__*/\n fileDesc(\"Ch1kYXNoYm9hcmQvdjEvYXVkaW9ib29rcy5wcm90bxIXZGFzaGJvYXJkLmF1ZGlvYm9va3MudjEiFgoUR2V0QXVkaW9ib29rc1JlcXVlc3QiIQoTR2V0QXVkaW9ib29rUmVxdWVzdBIKCgJpZBgBIAEoCSKrAQoHQ2hhcHRlchIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEhgKC2Rlc2NyaXB0aW9uGAMgASgJSACIAQESGgoNbXVsdGltZWRpYV9pZBgEIAEoCUgBiAEBEi4KCmNyZWF0ZWRfYXQYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQg4KDF9kZXNjcmlwdGlvbkIQCg5fbXVsdGltZWRpYV9pZCLzAgoJQXVkaW9ib29rEg8KAmlkGAEgASgJSACIAQESEgoKcHJvamVjdF9pZBgCIAEoCRIMCgRuYW1lGAMgASgJEhMKC2Rlc2NyaXB0aW9uGAQg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rQWNjZXNzEjUuZGFzaGJvYXJkLmF1ZGlvYm9va3MudjEuQ3JlYXRlQXVkaW9ib29rQWNjZXNzUmVxdWVzdBolLmRhc2hib2FyZC5hdWRpb2Jvb2tzLnYxLkJvb2xSZXNwb25zZRJ1ChVEZWxldGVBdWRpb2Jvb2tBY2Nlc3MSNS5kYXNoYm9hcmQuYXVkaW9ib29rcy52MS5EZWxldGVBdWRpb2Jvb2tBY2Nlc3NSZXF1ZXN0GiUuZGFzaGJvYXJkLmF1ZGlvYm9va3MudjEuQm9vbFJlc3BvbnNlYgZwcm90bzM\", [file_google_protobuf_timestamp, file_google_protobuf_empty]);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobooksRequest\n */\nexport type GetAudiobooksRequest = Message<\"dashboard.audiobooks.v1.GetAudiobooksRequest\"> & {\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobooksRequest.\n * Use `create(GetAudiobooksRequestSchema)` to create a new message.\n */\nexport const GetAudiobooksRequestSchema: GenMessage<GetAudiobooksRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 0);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookRequest\n */\nexport type GetAudiobookRequest = Message<\"dashboard.audiobooks.v1.GetAudiobookRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookRequest.\n * Use `create(GetAudiobookRequestSchema)` to create a new message.\n */\nexport const GetAudiobookRequestSchema: GenMessage<GetAudiobookRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 1);\n\n/**\n * @generated from message dashboard.audiobooks.v1.Chapter\n */\nexport type Chapter = Message<\"dashboard.audiobooks.v1.Chapter\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: optional string multimedia_id = 4;\n */\n multimediaId?: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 5;\n */\n createdAt?: Timestamp;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.Chapter.\n * Use `create(ChapterSchema)` to create a new message.\n */\nexport const ChapterSchema: GenMessage<Chapter> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 2);\n\n/**\n * @generated from message dashboard.audiobooks.v1.Audiobook\n */\nexport type Audiobook = Message<\"dashboard.audiobooks.v1.Audiobook\"> & {\n /**\n * @generated from field: optional string id = 1;\n */\n id?: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n\n /**\n * @generated from field: string name = 3;\n */\n name: string;\n\n /**\n * @generated from field: string description = 4;\n */\n description: string;\n\n /**\n * @generated from field: string cover_image = 5;\n */\n coverImage: string;\n\n /**\n * @generated from field: string thumbnail_image = 6;\n */\n thumbnailImage: string;\n\n /**\n * @generated from field: repeated dashboard.audiobooks.v1.Chapter chapters = 7;\n */\n chapters: Chapter[];\n\n /**\n * @generated from field: bool is_downloadable = 8;\n */\n isDownloadable: boolean;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 9;\n */\n createdAt?: Timestamp;\n\n /**\n * @generated from field: optional bool is_browser_downloadable = 10;\n */\n isBrowserDownloadable?: boolean;\n\n /**\n * @generated from field: optional string accent_color = 11;\n */\n accentColor?: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.Audiobook.\n * Use `create(AudiobookSchema)` to create a new message.\n */\nexport const AudiobookSchema: GenMessage<Audiobook> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 3);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobooksResponse\n */\nexport type GetAudiobooksResponse = Message<\"dashboard.audiobooks.v1.GetAudiobooksResponse\"> & {\n /**\n * @generated from field: repeated dashboard.audiobooks.v1.Audiobook audiobooks = 1;\n */\n audiobooks: Audiobook[];\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobooksResponse.\n * Use `create(GetAudiobooksResponseSchema)` to create a new message.\n */\nexport const GetAudiobooksResponseSchema: GenMessage<GetAudiobooksResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 4);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookResponse\n */\nexport type GetAudiobookResponse = Message<\"dashboard.audiobooks.v1.GetAudiobookResponse\"> & {\n /**\n * @generated from field: optional dashboard.audiobooks.v1.Audiobook audiobook = 1;\n */\n audiobook?: Audiobook;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookResponse.\n * Use `create(GetAudiobookResponseSchema)` to create a new message.\n */\nexport const GetAudiobookResponseSchema: GenMessage<GetAudiobookResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 5);\n\n/**\n * @generated from message dashboard.audiobooks.v1.CreateOrUpdateAudiobookRequest\n */\nexport type CreateOrUpdateAudiobookRequest = Message<\"dashboard.audiobooks.v1.CreateOrUpdateAudiobookRequest\"> & {\n /**\n * @generated from field: dashboard.audiobooks.v1.Audiobook audiobook = 1;\n */\n audiobook?: Audiobook;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.CreateOrUpdateAudiobookRequest.\n * Use `create(CreateOrUpdateAudiobookRequestSchema)` to create a new message.\n */\nexport const CreateOrUpdateAudiobookRequestSchema: GenMessage<CreateOrUpdateAudiobookRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 6);\n\n/**\n * @generated from message dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse\n */\nexport type CreateOrUpdateAudiobookResponse = Message<\"dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse\"> & {\n /**\n * @generated from oneof dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.Result success = 1;\n */\n value: CreateOrUpdateAudiobookResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.audiobooks.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.\n * Use `create(CreateOrUpdateAudiobookResponseSchema)` to create a new message.\n */\nexport const CreateOrUpdateAudiobookResponseSchema: GenMessage<CreateOrUpdateAudiobookResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 7);\n\n/**\n * @generated from message dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.Result\n */\nexport type CreateOrUpdateAudiobookResponse_Result = Message<\"dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.Result\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.CreateOrUpdateAudiobookResponse.Result.\n * Use `create(CreateOrUpdateAudiobookResponse_ResultSchema)` to create a new message.\n */\nexport const CreateOrUpdateAudiobookResponse_ResultSchema: GenMessage<CreateOrUpdateAudiobookResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 7, 0);\n\n/**\n * @generated from message dashboard.audiobooks.v1.DeleteAudiobookRequest\n */\nexport type DeleteAudiobookRequest = Message<\"dashboard.audiobooks.v1.DeleteAudiobookRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.DeleteAudiobookRequest.\n * Use `create(DeleteAudiobookRequestSchema)` to create a new message.\n */\nexport const DeleteAudiobookRequestSchema: GenMessage<DeleteAudiobookRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 8);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookAccessEmailsRequest\n */\nexport type GetAudiobookAccessEmailsRequest = Message<\"dashboard.audiobooks.v1.GetAudiobookAccessEmailsRequest\"> & {\n /**\n * @generated from field: string audiobook_id = 1;\n */\n audiobookId: string;\n\n /**\n * @generated from field: optional string email = 2;\n */\n email?: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookAccessEmailsRequest.\n * Use `create(GetAudiobookAccessEmailsRequestSchema)` to create a new message.\n */\nexport const GetAudiobookAccessEmailsRequestSchema: GenMessage<GetAudiobookAccessEmailsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 9);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse\n */\nexport type GetAudiobookAccessEmailsResponse = Message<\"dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse\"> & {\n /**\n * @generated from oneof dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.Result success = 1;\n */\n value: GetAudiobookAccessEmailsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.audiobooks.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.\n * Use `create(GetAudiobookAccessEmailsResponseSchema)` to create a new message.\n */\nexport const GetAudiobookAccessEmailsResponseSchema: GenMessage<GetAudiobookAccessEmailsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 10);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.AccessEmail\n */\nexport type GetAudiobookAccessEmailsResponse_AccessEmail = Message<\"dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.AccessEmail\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string email = 2;\n */\n email: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 3;\n */\n createdAt?: Timestamp;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.AccessEmail.\n * Use `create(GetAudiobookAccessEmailsResponse_AccessEmailSchema)` to create a new message.\n */\nexport const GetAudiobookAccessEmailsResponse_AccessEmailSchema: GenMessage<GetAudiobookAccessEmailsResponse_AccessEmail> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 10, 0);\n\n/**\n * @generated from message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.Result\n */\nexport type GetAudiobookAccessEmailsResponse_Result = Message<\"dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.Result\"> & {\n /**\n * @generated from field: repeated dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.AccessEmail emails = 1;\n */\n emails: GetAudiobookAccessEmailsResponse_AccessEmail[];\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.GetAudiobookAccessEmailsResponse.Result.\n * Use `create(GetAudiobookAccessEmailsResponse_ResultSchema)` to create a new message.\n */\nexport const GetAudiobookAccessEmailsResponse_ResultSchema: GenMessage<GetAudiobookAccessEmailsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 10, 1);\n\n/**\n * @generated from message dashboard.audiobooks.v1.CreateAudiobookAccessRequest\n */\nexport type CreateAudiobookAccessRequest = Message<\"dashboard.audiobooks.v1.CreateAudiobookAccessRequest\"> & {\n /**\n * @generated from field: string audiobook_id = 1;\n */\n audiobookId: string;\n\n /**\n * @generated from field: string email = 2;\n */\n email: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.CreateAudiobookAccessRequest.\n * Use `create(CreateAudiobookAccessRequestSchema)` to create a new message.\n */\nexport const CreateAudiobookAccessRequestSchema: GenMessage<CreateAudiobookAccessRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 11);\n\n/**\n * @generated from message dashboard.audiobooks.v1.DeleteAudiobookAccessRequest\n */\nexport type DeleteAudiobookAccessRequest = Message<\"dashboard.audiobooks.v1.DeleteAudiobookAccessRequest\"> & {\n /**\n * @generated from field: string system_access_id = 1;\n */\n systemAccessId: string;\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.DeleteAudiobookAccessRequest.\n * Use `create(DeleteAudiobookAccessRequestSchema)` to create a new message.\n */\nexport const DeleteAudiobookAccessRequestSchema: GenMessage<DeleteAudiobookAccessRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 12);\n\n/**\n * @generated from message dashboard.audiobooks.v1.BoolResponse\n */\nexport type BoolResponse = Message<\"dashboard.audiobooks.v1.BoolResponse\"> & {\n /**\n * @generated from oneof dashboard.audiobooks.v1.BoolResponse.result\n */\n result: {\n /**\n * @generated from field: google.protobuf.Empty success = 1;\n */\n value: Empty;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.audiobooks.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.audiobooks.v1.BoolResponse.\n * Use `create(BoolResponseSchema)` to create a new message.\n */\nexport const BoolResponseSchema: GenMessage<BoolResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_audiobooks, 13);\n\n/**\n * @generated from enum dashboard.audiobooks.v1.FailureMessage\n */\nexport enum FailureMessage {\n /**\n * @generated from enum value: FAILURE_MESSAGE_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_PROJECT_NOT_FOUND = 1;\n */\n PROJECT_NOT_FOUND = 1,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_CHAPTER_NOT_FOUND = 2;\n */\n CHAPTER_NOT_FOUND = 2,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INCORRECT_CHAPTER_FORMAT = 3;\n */\n INCORRECT_CHAPTER_FORMAT = 3,\n}\n\n/**\n * Describes the enum dashboard.audiobooks.v1.FailureMessage.\n */\nexport const FailureMessageSchema: GenEnum<FailureMessage> = /*@__PURE__*/\n enumDesc(file_dashboard_v1_audiobooks, 0);\n\n/**\n * @generated from service dashboard.audiobooks.v1.AudiobooksService\n */\nexport const AudiobooksService: GenService<{\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.GetAudiobooks\n */\n getAudiobooks: {\n methodKind: \"unary\";\n input: typeof GetAudiobooksRequestSchema;\n output: typeof GetAudiobooksResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.GetAudiobook\n */\n getAudiobook: {\n methodKind: \"unary\";\n input: typeof GetAudiobookRequestSchema;\n output: typeof GetAudiobookResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.CreateOrUpdateAudiobook\n */\n createOrUpdateAudiobook: {\n methodKind: \"unary\";\n input: typeof CreateOrUpdateAudiobookRequestSchema;\n output: typeof CreateOrUpdateAudiobookResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.DeleteAudiobook\n */\n deleteAudiobook: {\n methodKind: \"unary\";\n input: typeof DeleteAudiobookRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.GetAudiobookAccessEmails\n */\n getAudiobookAccessEmails: {\n methodKind: \"unary\";\n input: typeof GetAudiobookAccessEmailsRequestSchema;\n output: typeof GetAudiobookAccessEmailsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.CreateAudiobookAccess\n */\n createAudiobookAccess: {\n methodKind: \"unary\";\n input: typeof CreateAudiobookAccessRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.audiobooks.v1.AudiobooksService.DeleteAudiobookAccess\n */\n deleteAudiobookAccess: {\n methodKind: \"unary\";\n input: typeof DeleteAudiobookAccessRequestSchema;\n output: typeof BoolResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_dashboard_v1_audiobooks, 0);\n\n","// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,ts_nocheck=true\"\n// @generated from file public/v1/public_api.proto (package public_api.v1, syntax proto3)\n/* eslint-disable */\n// @ts-nocheck\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Address, BillingAddress } from \"../../common/v1/address_pb\";\nimport { file_common_v1_address } from \"../../common/v1/address_pb\";\nimport type { Gateway } from \"../../common/v1/gateway_pb\";\nimport { file_common_v1_gateway } from \"../../common/v1/gateway_pb\";\nimport type { NotificationEvent, NotificationGroupHowOften, PushNotificationDeviceToken } from \"../../common/v1/push_notifications_pb\";\nimport { file_common_v1_push_notifications } from \"../../common/v1/push_notifications_pb\";\nimport type { Audiobook as Audiobook$1 } from \"../../dashboard/v1/audiobooks_pb\";\nimport { file_dashboard_v1_audiobooks } from \"../../dashboard/v1/audiobooks_pb\";\nimport type { Empty, EmptySchema, Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_empty, file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file public/v1/public_api.proto.\n */\nexport const file_public_v1_public_api: GenFile = /*@__PURE__*/\n fileDesc(\"ChpwdWJsaWMvdjEvcHVibGljX2FwaS5wcm90bxINcHVibGljX2FwaS52MSI2Ch5HZXRBcHBTdG9yZUFjY291bnRUb2tlblJlcXVlc3QSFAoMYWNjZXNzX3Rva2VuGAEgASgJIjwKH0dldEFwcFN0b3JlQWNjb3VudFRva2VuUmVzcG9uc2USGQoRYXBwX2FjY291bnRfdG9rZW4YASABKAkiaQodVmVyaWZ5QXBwU3RvcmVQdXJjaGFzZVJlcXVlc3QSFAoMYWNjZXNzX3Rva2VuGAEgASgJEhoKEnNpZ25lZF90cmFuc2FjdGlvbhgCIAEoCRIWCg50cmFuc2FjdGlvbl9pZBgDIAEoCSJcCh5WZXJpZnlBcHBTdG9yZVB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9uc2UScgoVQWRkUHVibGljT3JkZXJDb21tZW50EisucHVibGljX2FwaS52MS5BZGRQdWJsaWNPcmRlckNvbW1lbnRSZXF1ZXN0GiwucHVibGljX2FwaS52MS5BZGRQdWJsaWNPcmRlckNvbW1lbnRSZXNwb25zZRJ1ChZHZXRPcmRlckZvclRlc3RpbW9uaWFsEiwucHVibGljX2FwaS52MS5HZXRPcmRlckZvclRlc3RpbW9uaWFsUmVxdWVzdBotLnB1YmxpY19hcGkudjEuR2V0T3JkZXJGb3JUZXN0aW1vbmlhbFJlc3BvbnNlEmYKEVN1Ym1pdFRlc3RpbW9uaWFsEicucHVibGljX2FwaS52MS5TdWJtaXRUZXN0aW1vbmlhbFJlcXVlc3QaKC5wdWJsaWNfYXBpLnYxLlN1Ym1pdFRlc3RpbW9uaWFsUmVzcG9uc2USeAoXR2V0VGVzdGltb25pYWxVcGxvYWRVcmwSLS5wdWJsaWNfYXBpLnYxLkdldFRlc3RpbW9uaWFsVXBsb2FkVXJsUmVxdWVzdBouLnB1YmxpY19hcGkudjEuR2V0VGVzdGltb25pYWxVcGxvYWRVcmxSZXNwb25zZWIGcHJvdG8z\", [file_common_v1_address, file_common_v1_gateway, file_common_v1_push_notifications, file_dashboard_v1_audiobooks, file_google_protobuf_empty, file_google_protobuf_timestamp]);\n\n/**\n * @generated from message public_api.v1.GetAppStoreAccountTokenRequest\n */\nexport type GetAppStoreAccountTokenRequest = Message<\"public_api.v1.GetAppStoreAccountTokenRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.GetAppStoreAccountTokenRequest.\n * Use `create(GetAppStoreAccountTokenRequestSchema)` to create a new message.\n */\nexport const GetAppStoreAccountTokenRequestSchema: GenMessage<GetAppStoreAccountTokenRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 0);\n\n/**\n * @generated from message public_api.v1.GetAppStoreAccountTokenResponse\n */\nexport type GetAppStoreAccountTokenResponse = Message<\"public_api.v1.GetAppStoreAccountTokenResponse\"> & {\n /**\n * @generated from field: string app_account_token = 1;\n */\n appAccountToken: string;\n};\n\n/**\n * Describes the message public_api.v1.GetAppStoreAccountTokenResponse.\n * Use `create(GetAppStoreAccountTokenResponseSchema)` to create a new message.\n */\nexport const GetAppStoreAccountTokenResponseSchema: GenMessage<GetAppStoreAccountTokenResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 1);\n\n/**\n * @generated from message public_api.v1.VerifyAppStorePurchaseRequest\n */\nexport type VerifyAppStorePurchaseRequest = Message<\"public_api.v1.VerifyAppStorePurchaseRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string signed_transaction = 2;\n */\n signedTransaction: string;\n\n /**\n * @generated from field: string transaction_id = 3;\n */\n transactionId: string;\n};\n\n/**\n * Describes the message public_api.v1.VerifyAppStorePurchaseRequest.\n * Use `create(VerifyAppStorePurchaseRequestSchema)` to create a new message.\n */\nexport const VerifyAppStorePurchaseRequestSchema: GenMessage<VerifyAppStorePurchaseRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 2);\n\n/**\n * @generated from message public_api.v1.VerifyAppStorePurchaseResponse\n */\nexport type VerifyAppStorePurchaseResponse = Message<\"public_api.v1.VerifyAppStorePurchaseResponse\"> & {\n /**\n * @generated from field: bool fulfilled = 1;\n */\n fulfilled: boolean;\n\n /**\n * @generated from field: string product_id = 2;\n */\n productId: string;\n\n /**\n * @generated from field: string environment = 3;\n */\n environment: string;\n};\n\n/**\n * Describes the message public_api.v1.VerifyAppStorePurchaseResponse.\n * Use `create(VerifyAppStorePurchaseResponseSchema)` to create a new message.\n */\nexport const VerifyAppStorePurchaseResponseSchema: GenMessage<VerifyAppStorePurchaseResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 3);\n\n/**\n * @generated from message public_api.v1.GetAppStoreEntitlementsRequest\n */\nexport type GetAppStoreEntitlementsRequest = Message<\"public_api.v1.GetAppStoreEntitlementsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.GetAppStoreEntitlementsRequest.\n * Use `create(GetAppStoreEntitlementsRequestSchema)` to create a new message.\n */\nexport const GetAppStoreEntitlementsRequestSchema: GenMessage<GetAppStoreEntitlementsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 4);\n\n/**\n * @generated from message public_api.v1.GetAppStoreEntitlementsResponse\n */\nexport type GetAppStoreEntitlementsResponse = Message<\"public_api.v1.GetAppStoreEntitlementsResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.GetAppStoreEntitlementsResponse.Entitlement entitlements = 1;\n */\n entitlements: GetAppStoreEntitlementsResponse_Entitlement[];\n};\n\n/**\n * Describes the message public_api.v1.GetAppStoreEntitlementsResponse.\n * Use `create(GetAppStoreEntitlementsResponseSchema)` to create a new message.\n */\nexport const GetAppStoreEntitlementsResponseSchema: GenMessage<GetAppStoreEntitlementsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 5);\n\n/**\n * @generated from message public_api.v1.GetAppStoreEntitlementsResponse.Entitlement\n */\nexport type GetAppStoreEntitlementsResponse_Entitlement = Message<\"public_api.v1.GetAppStoreEntitlementsResponse.Entitlement\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: string status = 2;\n */\n status: string;\n\n /**\n * @generated from field: string environment = 3;\n */\n environment: string;\n\n /**\n * @generated from field: string fulfillment_status = 4;\n */\n fulfillmentStatus: string;\n\n /**\n * @generated from field: string original_transaction_id = 5;\n */\n originalTransactionId: string;\n};\n\n/**\n * Describes the message public_api.v1.GetAppStoreEntitlementsResponse.Entitlement.\n * Use `create(GetAppStoreEntitlementsResponse_EntitlementSchema)` to create a new message.\n */\nexport const GetAppStoreEntitlementsResponse_EntitlementSchema: GenMessage<GetAppStoreEntitlementsResponse_Entitlement> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 5, 0);\n\n/**\n * @generated from message public_api.v1.RestoreAppStorePurchasesRequest\n */\nexport type RestoreAppStorePurchasesRequest = Message<\"public_api.v1.RestoreAppStorePurchasesRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * JWS strings from expo-iap getAvailablePurchases. Each entry is verified on\n * the backend, matched against the customer's account token, and used to\n * refresh entitlements. Duplicate or empty JWS strings are skipped.\n *\n * @generated from field: repeated string signed_transactions = 2;\n */\n signedTransactions: string[];\n};\n\n/**\n * Describes the message public_api.v1.RestoreAppStorePurchasesRequest.\n * Use `create(RestoreAppStorePurchasesRequestSchema)` to create a new message.\n */\nexport const RestoreAppStorePurchasesRequestSchema: GenMessage<RestoreAppStorePurchasesRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 6);\n\n/**\n * @generated from message public_api.v1.RestoreAppStorePurchasesResponse\n */\nexport type RestoreAppStorePurchasesResponse = Message<\"public_api.v1.RestoreAppStorePurchasesResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.RestoreAppStorePurchasesResponse.RestoredProduct products = 1;\n */\n products: RestoreAppStorePurchasesResponse_RestoredProduct[];\n\n /**\n * True when at least one transaction came back as family-shared. The\n * customer's existing library is preserved; an ops review row is recorded.\n *\n * @generated from field: bool family_sharing_review_required = 2;\n */\n familySharingReviewRequired: boolean;\n};\n\n/**\n * Describes the message public_api.v1.RestoreAppStorePurchasesResponse.\n * Use `create(RestoreAppStorePurchasesResponseSchema)` to create a new message.\n */\nexport const RestoreAppStorePurchasesResponseSchema: GenMessage<RestoreAppStorePurchasesResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 7);\n\n/**\n * @generated from message public_api.v1.RestoreAppStorePurchasesResponse.RestoredProduct\n */\nexport type RestoreAppStorePurchasesResponse_RestoredProduct = Message<\"public_api.v1.RestoreAppStorePurchasesResponse.RestoredProduct\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: string original_transaction_id = 2;\n */\n originalTransactionId: string;\n\n /**\n * \"active\" | \"revoked\" | \"skipped\" | \"rejected\"\n *\n * @generated from field: string status = 3;\n */\n status: string;\n\n /**\n * Populated when status is \"rejected\" or \"skipped\" so the caller can show\n * actionable UI (signature mismatch, family-shared ownership, owner\n * mismatch, duplicate empty JWS, etc).\n *\n * @generated from field: string reason = 4;\n */\n reason: string;\n\n /**\n * @generated from field: bool fulfilled = 5;\n */\n fulfilled: boolean;\n};\n\n/**\n * Describes the message public_api.v1.RestoreAppStorePurchasesResponse.RestoredProduct.\n * Use `create(RestoreAppStorePurchasesResponse_RestoredProductSchema)` to create a new message.\n */\nexport const RestoreAppStorePurchasesResponse_RestoredProductSchema: GenMessage<RestoreAppStorePurchasesResponse_RestoredProduct> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 7, 0);\n\n/**\n * @generated from message public_api.v1.ClearAppStoreAccountTokenRequest\n */\nexport type ClearAppStoreAccountTokenRequest = Message<\"public_api.v1.ClearAppStoreAccountTokenRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.ClearAppStoreAccountTokenRequest.\n * Use `create(ClearAppStoreAccountTokenRequestSchema)` to create a new message.\n */\nexport const ClearAppStoreAccountTokenRequestSchema: GenMessage<ClearAppStoreAccountTokenRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 8);\n\n/**\n * @generated from message public_api.v1.GetStoreKitCatalogRequest\n */\nexport type GetStoreKitCatalogRequest = Message<\"public_api.v1.GetStoreKitCatalogRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.GetStoreKitCatalogRequest.\n * Use `create(GetStoreKitCatalogRequestSchema)` to create a new message.\n */\nexport const GetStoreKitCatalogRequestSchema: GenMessage<GetStoreKitCatalogRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 9);\n\n/**\n * @generated from message public_api.v1.GetStoreKitCatalogResponse\n */\nexport type GetStoreKitCatalogResponse = Message<\"public_api.v1.GetStoreKitCatalogResponse\"> & {\n /**\n * Mirrors the DIRECT_STOREKIT_PAYWALL_ENABLED flag so the mobile client can\n * decide whether to surface the direct StoreKit paywall or fall back to\n * RevenueCat. The catalog itself is gated by DIRECT_STOREKIT_ENABLED at\n * the route level.\n *\n * @generated from field: bool paywall_enabled = 1;\n */\n paywallEnabled: boolean;\n\n /**\n * @generated from field: repeated public_api.v1.GetStoreKitCatalogResponse.Product products = 2;\n */\n products: GetStoreKitCatalogResponse_Product[];\n};\n\n/**\n * Describes the message public_api.v1.GetStoreKitCatalogResponse.\n * Use `create(GetStoreKitCatalogResponseSchema)` to create a new message.\n */\nexport const GetStoreKitCatalogResponseSchema: GenMessage<GetStoreKitCatalogResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 10);\n\n/**\n * @generated from message public_api.v1.GetStoreKitCatalogResponse.Product\n */\nexport type GetStoreKitCatalogResponse_Product = Message<\"public_api.v1.GetStoreKitCatalogResponse.Product\"> & {\n /**\n * @generated from field: string store_product_id = 1;\n */\n storeProductId: string;\n\n /**\n * @generated from field: string internal_product_id = 2;\n */\n internalProductId: string;\n\n /**\n * \"audiobook\" | \"ebook\"\n *\n * @generated from field: string kind = 3;\n */\n kind: string;\n\n /**\n * @generated from field: string display_name = 4;\n */\n displayName: string;\n\n /**\n * @generated from field: string description = 5;\n */\n description: string;\n};\n\n/**\n * Describes the message public_api.v1.GetStoreKitCatalogResponse.Product.\n * Use `create(GetStoreKitCatalogResponse_ProductSchema)` to create a new message.\n */\nexport const GetStoreKitCatalogResponse_ProductSchema: GenMessage<GetStoreKitCatalogResponse_Product> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 10, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetCourseDetailsRequest\n */\nexport type UserPanelGetCourseDetailsRequest = Message<\"public_api.v1.UserPanelGetCourseDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetCourseDetailsRequest.\n * Use `create(UserPanelGetCourseDetailsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetCourseDetailsRequestSchema: GenMessage<UserPanelGetCourseDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 11);\n\n/**\n * @generated from message public_api.v1.UserPanelGetCourseDetailsResponse\n */\nexport type UserPanelGetCourseDetailsResponse = Message<\"public_api.v1.UserPanelGetCourseDetailsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetCourseDetailsResponse.result\n */\n result: {\n /**\n * @generated from field: string redirect_url = 1;\n */\n value: string;\n case: \"redirectUrl\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetCourseDetailsResponse.\n * Use `create(UserPanelGetCourseDetailsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetCourseDetailsResponseSchema: GenMessage<UserPanelGetCourseDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 12);\n\n/**\n * @generated from message public_api.v1.GetOrdersRequest\n */\nexport type GetOrdersRequest = Message<\"public_api.v1.GetOrdersRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string access_token = 2;\n */\n accessToken: string;\n\n /**\n * @generated from field: optional int32 limit = 3;\n */\n limit?: number;\n\n /**\n * @generated from field: optional int32 offset = 4;\n */\n offset?: number;\n};\n\n/**\n * Describes the message public_api.v1.GetOrdersRequest.\n * Use `create(GetOrdersRequestSchema)` to create a new message.\n */\nexport const GetOrdersRequestSchema: GenMessage<GetOrdersRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 13);\n\n/**\n * @generated from message public_api.v1.GetOrdersResponse\n */\nexport type GetOrdersResponse = Message<\"public_api.v1.GetOrdersResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.GetOrdersResponse.OrderSummary orders = 1;\n */\n orders: GetOrdersResponse_OrderSummary[];\n\n /**\n * @generated from field: int32 total_count = 2;\n */\n totalCount: number;\n};\n\n/**\n * Describes the message public_api.v1.GetOrdersResponse.\n * Use `create(GetOrdersResponseSchema)` to create a new message.\n */\nexport const GetOrdersResponseSchema: GenMessage<GetOrdersResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 14);\n\n/**\n * @generated from message public_api.v1.GetOrdersResponse.OrderSummary\n */\nexport type GetOrdersResponse_OrderSummary = Message<\"public_api.v1.GetOrdersResponse.OrderSummary\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string status = 2;\n */\n status: string;\n\n /**\n * @generated from field: int32 total_amount = 3;\n */\n totalAmount: number;\n\n /**\n * @generated from field: string currency = 4;\n */\n currency: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 5;\n */\n createdAt?: Timestamp;\n\n /**\n * @generated from field: string customer_name = 6;\n */\n customerName: string;\n};\n\n/**\n * Describes the message public_api.v1.GetOrdersResponse.OrderSummary.\n * Use `create(GetOrdersResponse_OrderSummarySchema)` to create a new message.\n */\nexport const GetOrdersResponse_OrderSummarySchema: GenMessage<GetOrdersResponse_OrderSummary> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 14, 0);\n\n/**\n * @generated from message public_api.v1.IsOneClickPaymentAvailableRequest\n */\nexport type IsOneClickPaymentAvailableRequest = Message<\"public_api.v1.IsOneClickPaymentAvailableRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.IsOneClickPaymentAvailableRequest.\n * Use `create(IsOneClickPaymentAvailableRequestSchema)` to create a new message.\n */\nexport const IsOneClickPaymentAvailableRequestSchema: GenMessage<IsOneClickPaymentAvailableRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 15);\n\n/**\n * @generated from message public_api.v1.IsOneClickPaymentAvailableResponse\n */\nexport type IsOneClickPaymentAvailableResponse = Message<\"public_api.v1.IsOneClickPaymentAvailableResponse\"> & {\n /**\n * @generated from field: bool inpost_pay = 1;\n */\n inpostPay: boolean;\n\n /**\n * @generated from field: bool apple_pay = 2;\n */\n applePay: boolean;\n\n /**\n * @generated from field: bool google_pay = 3;\n */\n googlePay: boolean;\n\n /**\n * @generated from field: optional public_api.v1.IsOneClickPaymentAvailableResponse.GooglePayConfig google_pay_config = 4;\n */\n googlePayConfig?: IsOneClickPaymentAvailableResponse_GooglePayConfig;\n};\n\n/**\n * Describes the message public_api.v1.IsOneClickPaymentAvailableResponse.\n * Use `create(IsOneClickPaymentAvailableResponseSchema)` to create a new message.\n */\nexport const IsOneClickPaymentAvailableResponseSchema: GenMessage<IsOneClickPaymentAvailableResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 16);\n\n/**\n * @generated from message public_api.v1.IsOneClickPaymentAvailableResponse.GooglePayConfig\n */\nexport type IsOneClickPaymentAvailableResponse_GooglePayConfig = Message<\"public_api.v1.IsOneClickPaymentAvailableResponse.GooglePayConfig\"> & {\n /**\n * @generated from field: string merchant_id = 1;\n */\n merchantId: string;\n\n /**\n * @generated from field: string merchant_name = 2;\n */\n merchantName: string;\n\n /**\n * @generated from field: string gateway = 3;\n */\n gateway: string;\n\n /**\n * @generated from field: string gateway_merchant_id = 4;\n */\n gatewayMerchantId: string;\n};\n\n/**\n * Describes the message public_api.v1.IsOneClickPaymentAvailableResponse.GooglePayConfig.\n * Use `create(IsOneClickPaymentAvailableResponse_GooglePayConfigSchema)` to create a new message.\n */\nexport const IsOneClickPaymentAvailableResponse_GooglePayConfigSchema: GenMessage<IsOneClickPaymentAvailableResponse_GooglePayConfig> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 16, 0);\n\n/**\n * @generated from message public_api.v1.OneClickAuthorizePaymentRequest\n */\nexport type OneClickAuthorizePaymentRequest = Message<\"public_api.v1.OneClickAuthorizePaymentRequest\"> & {\n /**\n * @generated from field: public_api.v1.OneClickAuthorizePaymentRequest.Gateway gateway = 1;\n */\n gateway: OneClickAuthorizePaymentRequest_Gateway;\n\n /**\n * @generated from field: string paymentData = 2;\n */\n paymentData: string;\n\n /**\n * @generated from field: string paymentMethod = 3;\n */\n paymentMethod: string;\n\n /**\n * @generated from field: string transactionIdentifier = 4;\n */\n transactionIdentifier: string;\n\n /**\n * @generated from field: public_api.v1.GetPreOrderDetailsRequest order = 5;\n */\n order?: GetPreOrderDetailsRequest;\n\n /**\n * @generated from field: optional common.v1.Address shipping_address = 6;\n */\n shippingAddress?: Address;\n\n /**\n * @generated from field: optional common.v1.BillingAddress billing_address = 7;\n */\n billingAddress?: BillingAddress;\n\n /**\n * @generated from field: optional string metadata = 8;\n */\n metadata?: string;\n};\n\n/**\n * Describes the message public_api.v1.OneClickAuthorizePaymentRequest.\n * Use `create(OneClickAuthorizePaymentRequestSchema)` to create a new message.\n */\nexport const OneClickAuthorizePaymentRequestSchema: GenMessage<OneClickAuthorizePaymentRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 17);\n\n/**\n * @generated from enum public_api.v1.OneClickAuthorizePaymentRequest.Gateway\n */\nexport enum OneClickAuthorizePaymentRequest_Gateway {\n /**\n * @generated from enum value: APPLE_PAY = 0;\n */\n APPLE_PAY = 0,\n\n /**\n * @generated from enum value: GOOGLE_PAY = 1;\n */\n GOOGLE_PAY = 1,\n}\n\n/**\n * Describes the enum public_api.v1.OneClickAuthorizePaymentRequest.Gateway.\n */\nexport const OneClickAuthorizePaymentRequest_GatewaySchema: GenEnum<OneClickAuthorizePaymentRequest_Gateway> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 17, 0);\n\n/**\n * @generated from message public_api.v1.OneClickAuthorizePaymentResponse\n */\nexport type OneClickAuthorizePaymentResponse = Message<\"public_api.v1.OneClickAuthorizePaymentResponse\"> & {\n /**\n * @generated from field: bool is_success = 1;\n */\n isSuccess: boolean;\n\n /**\n * @generated from field: string redirect_url = 2;\n */\n redirectUrl: string;\n\n /**\n * @generated from field: string transaction_id = 3;\n */\n transactionId: string;\n\n /**\n * @generated from field: optional string apple_pay_tracking_url = 4;\n */\n applePayTrackingUrl?: string;\n};\n\n/**\n * Describes the message public_api.v1.OneClickAuthorizePaymentResponse.\n * Use `create(OneClickAuthorizePaymentResponseSchema)` to create a new message.\n */\nexport const OneClickAuthorizePaymentResponseSchema: GenMessage<OneClickAuthorizePaymentResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 18);\n\n/**\n * @generated from message public_api.v1.PreOrderItem\n */\nexport type PreOrderItem = Message<\"public_api.v1.PreOrderItem\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: int32 quantity = 2;\n */\n quantity: number;\n};\n\n/**\n * Describes the message public_api.v1.PreOrderItem.\n * Use `create(PreOrderItemSchema)` to create a new message.\n */\nexport const PreOrderItemSchema: GenMessage<PreOrderItem> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 19);\n\n/**\n * @generated from message public_api.v1.GetPreOrderDetailsRequest\n */\nexport type GetPreOrderDetailsRequest = Message<\"public_api.v1.GetPreOrderDetailsRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated public_api.v1.PreOrderItem items = 2;\n */\n items: PreOrderItem[];\n\n /**\n * @generated from field: optional string country_code = 3;\n */\n countryCode?: string;\n\n /**\n * @generated from field: optional string post_code = 4;\n */\n postCode?: string;\n\n /**\n * We can check if coupon code is available.\n *\n * @generated from field: optional string couponCode = 5;\n */\n couponCode?: string;\n\n /**\n * @generated from field: optional string email = 6;\n */\n email?: string;\n\n /**\n * @generated from field: optional string selected_delivery_method = 7;\n */\n selectedDeliveryMethod?: string;\n\n /**\n * @generated from field: optional string phone = 8;\n */\n phone?: string;\n};\n\n/**\n * Describes the message public_api.v1.GetPreOrderDetailsRequest.\n * Use `create(GetPreOrderDetailsRequestSchema)` to create a new message.\n */\nexport const GetPreOrderDetailsRequestSchema: GenMessage<GetPreOrderDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 20);\n\n/**\n * @generated from message public_api.v1.DeliveryMethod\n */\nexport type DeliveryMethod = Message<\"public_api.v1.DeliveryMethod\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: int32 amount = 2;\n */\n amount: number;\n\n /**\n * @generated from field: string name = 3;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 4;\n */\n description?: string;\n\n /**\n * @generated from field: optional int32 min_days = 5;\n */\n minDays?: number;\n\n /**\n * @generated from field: optional int32 max_days = 6;\n */\n maxDays?: number;\n};\n\n/**\n * Describes the message public_api.v1.DeliveryMethod.\n * Use `create(DeliveryMethodSchema)` to create a new message.\n */\nexport const DeliveryMethodSchema: GenMessage<DeliveryMethod> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 21);\n\n/**\n * @generated from message public_api.v1.GetPreOrderDetailsResponse\n */\nexport type GetPreOrderDetailsResponse = Message<\"public_api.v1.GetPreOrderDetailsResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.DeliveryMethod methods = 1;\n */\n methods: DeliveryMethod[];\n\n /**\n * @generated from field: optional string couponCode = 2;\n */\n couponCode?: string;\n\n /**\n * @generated from field: optional string selected_delivery_method = 3;\n */\n selectedDeliveryMethod?: string;\n\n /**\n * @generated from field: optional int32 total_amount = 4;\n */\n totalAmount?: number;\n\n /**\n * @generated from field: optional int32 coupon_value = 5;\n */\n couponValue?: number;\n\n /**\n * Mainly use for Google Pay\n *\n * @generated from field: string currency = 6;\n */\n currency: string;\n\n /**\n * @generated from field: string country = 7;\n */\n country: string;\n};\n\n/**\n * Describes the message public_api.v1.GetPreOrderDetailsResponse.\n * Use `create(GetPreOrderDetailsResponseSchema)` to create a new message.\n */\nexport const GetPreOrderDetailsResponseSchema: GenMessage<GetPreOrderDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 22);\n\n/**\n * @generated from message public_api.v1.NotifyUserAboutProductAvailabilityRequest\n */\nexport type NotifyUserAboutProductAvailabilityRequest = Message<\"public_api.v1.NotifyUserAboutProductAvailabilityRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string product_id = 2;\n */\n productId: string;\n\n /**\n * @generated from field: string email = 3;\n */\n email: string;\n};\n\n/**\n * Describes the message public_api.v1.NotifyUserAboutProductAvailabilityRequest.\n * Use `create(NotifyUserAboutProductAvailabilityRequestSchema)` to create a new message.\n */\nexport const NotifyUserAboutProductAvailabilityRequestSchema: GenMessage<NotifyUserAboutProductAvailabilityRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 23);\n\n/**\n * @generated from message public_api.v1.ApplePayValidateMerchantRequest\n */\nexport type ApplePayValidateMerchantRequest = Message<\"public_api.v1.ApplePayValidateMerchantRequest\"> & {\n /**\n * @generated from field: string validation_url = 1;\n */\n validationUrl: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.ApplePayValidateMerchantRequest.\n * Use `create(ApplePayValidateMerchantRequestSchema)` to create a new message.\n */\nexport const ApplePayValidateMerchantRequestSchema: GenMessage<ApplePayValidateMerchantRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 24);\n\n/**\n * @generated from message public_api.v1.ApplePayValidateMerchantResponse\n */\nexport type ApplePayValidateMerchantResponse = Message<\"public_api.v1.ApplePayValidateMerchantResponse\"> & {\n /**\n * @generated from field: string merchant_session = 1;\n */\n merchantSession: string;\n};\n\n/**\n * Describes the message public_api.v1.ApplePayValidateMerchantResponse.\n * Use `create(ApplePayValidateMerchantResponseSchema)` to create a new message.\n */\nexport const ApplePayValidateMerchantResponseSchema: GenMessage<ApplePayValidateMerchantResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 25);\n\n/**\n * @generated from message public_api.v1.GetAvailableCountForProductRequest\n */\nexport type GetAvailableCountForProductRequest = Message<\"public_api.v1.GetAvailableCountForProductRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated string all_variants = 2;\n */\n allVariants: string[];\n};\n\n/**\n * Describes the message public_api.v1.GetAvailableCountForProductRequest.\n * Use `create(GetAvailableCountForProductRequestSchema)` to create a new message.\n */\nexport const GetAvailableCountForProductRequestSchema: GenMessage<GetAvailableCountForProductRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 26);\n\n/**\n * @generated from message public_api.v1.GetAvailableCountForProductResponse\n */\nexport type GetAvailableCountForProductResponse = Message<\"public_api.v1.GetAvailableCountForProductResponse\"> & {\n /**\n * @generated from field: map<string, public_api.v1.GetAvailableCountForProductResponse.AvailableCountForProduct> available_counts = 1;\n */\n availableCounts: { [key: string]: GetAvailableCountForProductResponse_AvailableCountForProduct };\n\n /**\n * @generated from field: optional public_api.v1.GetAvailableCountForProductResponse.Error error = 2;\n */\n error?: GetAvailableCountForProductResponse_Error;\n};\n\n/**\n * Describes the message public_api.v1.GetAvailableCountForProductResponse.\n * Use `create(GetAvailableCountForProductResponseSchema)` to create a new message.\n */\nexport const GetAvailableCountForProductResponseSchema: GenMessage<GetAvailableCountForProductResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 27);\n\n/**\n * @generated from message public_api.v1.GetAvailableCountForProductResponse.AvailableCountForProduct\n */\nexport type GetAvailableCountForProductResponse_AvailableCountForProduct = Message<\"public_api.v1.GetAvailableCountForProductResponse.AvailableCountForProduct\"> & {\n /**\n * @generated from field: int32 available_quantity_to_order = 1;\n */\n availableQuantityToOrder: number;\n\n /**\n * @generated from field: bool can_back = 2;\n */\n canBack: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetAvailableCountForProductResponse.AvailableCountForProduct.\n * Use `create(GetAvailableCountForProductResponse_AvailableCountForProductSchema)` to create a new message.\n */\nexport const GetAvailableCountForProductResponse_AvailableCountForProductSchema: GenMessage<GetAvailableCountForProductResponse_AvailableCountForProduct> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 27, 0);\n\n/**\n * @generated from enum public_api.v1.GetAvailableCountForProductResponse.Error\n */\nexport enum GetAvailableCountForProductResponse_Error {\n /**\n * @generated from enum value: ERROR_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: ERROR_PROJECT_NOT_FOUND = 1;\n */\n PROJECT_NOT_FOUND = 1,\n\n /**\n * @generated from enum value: ERROR_PRODUCT_NOT_AVAILABLE = 2;\n */\n PRODUCT_NOT_AVAILABLE = 2,\n\n /**\n * @generated from enum value: ERROR_PRODUCT_NOT_AVAILABLE_BUT_CAN_BACK = 3;\n */\n PRODUCT_NOT_AVAILABLE_BUT_CAN_BACK = 3,\n}\n\n/**\n * Describes the enum public_api.v1.GetAvailableCountForProductResponse.Error.\n */\nexport const GetAvailableCountForProductResponse_ErrorSchema: GenEnum<GetAvailableCountForProductResponse_Error> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 27, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelDeleteAccountRequest\n */\nexport type UserPanelDeleteAccountRequest = Message<\"public_api.v1.UserPanelDeleteAccountRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelDeleteAccountRequest.\n * Use `create(UserPanelDeleteAccountRequestSchema)` to create a new message.\n */\nexport const UserPanelDeleteAccountRequestSchema: GenMessage<UserPanelDeleteAccountRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 28);\n\n/**\n * @generated from message public_api.v1.DidBuyProductRequest\n */\nexport type DidBuyProductRequest = Message<\"public_api.v1.DidBuyProductRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string product_id = 2;\n */\n productId: string;\n};\n\n/**\n * Describes the message public_api.v1.DidBuyProductRequest.\n * Use `create(DidBuyProductRequestSchema)` to create a new message.\n */\nexport const DidBuyProductRequestSchema: GenMessage<DidBuyProductRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 29);\n\n/**\n * @generated from message public_api.v1.UpdateNotificationSettingsRequest\n */\nexport type UpdateNotificationSettingsRequest = Message<\"public_api.v1.UpdateNotificationSettingsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated public_api.v1.UpdateNotificationSettingsRequest.Group modifications = 3;\n */\n modifications: UpdateNotificationSettingsRequest_Group[];\n\n /**\n * @generated from field: repeated public_api.v1.NotificationMethod enabled_methods = 4;\n */\n enabledMethods: NotificationMethod[];\n};\n\n/**\n * Describes the message public_api.v1.UpdateNotificationSettingsRequest.\n * Use `create(UpdateNotificationSettingsRequestSchema)` to create a new message.\n */\nexport const UpdateNotificationSettingsRequestSchema: GenMessage<UpdateNotificationSettingsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 30);\n\n/**\n * @generated from message public_api.v1.UpdateNotificationSettingsRequest.Group\n */\nexport type UpdateNotificationSettingsRequest_Group = Message<\"public_api.v1.UpdateNotificationSettingsRequest.Group\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: bool enabled = 2;\n */\n enabled: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UpdateNotificationSettingsRequest.Group.\n * Use `create(UpdateNotificationSettingsRequest_GroupSchema)` to create a new message.\n */\nexport const UpdateNotificationSettingsRequest_GroupSchema: GenMessage<UpdateNotificationSettingsRequest_Group> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 30, 0);\n\n/**\n * @generated from message public_api.v1.UpdateGlobalNotificationSettingsRequest\n */\nexport type UpdateGlobalNotificationSettingsRequest = Message<\"public_api.v1.UpdateGlobalNotificationSettingsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: bool is_muted = 2;\n */\n isMuted: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UpdateGlobalNotificationSettingsRequest.\n * Use `create(UpdateGlobalNotificationSettingsRequestSchema)` to create a new message.\n */\nexport const UpdateGlobalNotificationSettingsRequestSchema: GenMessage<UpdateGlobalNotificationSettingsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 31);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsDetailsRequest\n */\nexport type GetNotificationSettingsDetailsRequest = Message<\"public_api.v1.GetNotificationSettingsDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsDetailsRequest.\n * Use `create(GetNotificationSettingsDetailsRequestSchema)` to create a new message.\n */\nexport const GetNotificationSettingsDetailsRequestSchema: GenMessage<GetNotificationSettingsDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 32);\n\n/**\n * @generated from message public_api.v1.NotificationGroup\n */\nexport type NotificationGroup = Message<\"public_api.v1.NotificationGroup\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: bool enabled = 4;\n */\n enabled: boolean;\n\n /**\n * @generated from field: common.v1.NotificationGroupHowOften how_often = 5;\n */\n howOften: NotificationGroupHowOften;\n};\n\n/**\n * Describes the message public_api.v1.NotificationGroup.\n * Use `create(NotificationGroupSchema)` to create a new message.\n */\nexport const NotificationGroupSchema: GenMessage<NotificationGroup> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 33);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsDetailsResponse\n */\nexport type GetNotificationSettingsDetailsResponse = Message<\"public_api.v1.GetNotificationSettingsDetailsResponse\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional public_api.v1.ProjectTheme theme = 3;\n */\n theme?: ProjectTheme;\n\n /**\n * @generated from field: repeated public_api.v1.NotificationMethod available_methods = 4;\n */\n availableMethods: NotificationMethod[];\n\n /**\n * @generated from field: repeated public_api.v1.NotificationMethod enabled_methods = 5;\n */\n enabledMethods: NotificationMethod[];\n\n /**\n * @generated from field: repeated public_api.v1.NotificationGroup groups = 6;\n */\n groups: NotificationGroup[];\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsDetailsResponse.\n * Use `create(GetNotificationSettingsDetailsResponseSchema)` to create a new message.\n */\nexport const GetNotificationSettingsDetailsResponseSchema: GenMessage<GetNotificationSettingsDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 34);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsRequest\n */\nexport type GetNotificationSettingsRequest = Message<\"public_api.v1.GetNotificationSettingsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: bool all = 2;\n */\n all: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsRequest.\n * Use `create(GetNotificationSettingsRequestSchema)` to create a new message.\n */\nexport const GetNotificationSettingsRequestSchema: GenMessage<GetNotificationSettingsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 35);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsResponse\n */\nexport type GetNotificationSettingsResponse = Message<\"public_api.v1.GetNotificationSettingsResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.GetNotificationSettingsResponse.Project projects = 1;\n */\n projects: GetNotificationSettingsResponse_Project[];\n\n /**\n * @generated from field: bool is_muted = 2;\n */\n isMuted: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsResponse.\n * Use `create(GetNotificationSettingsResponseSchema)` to create a new message.\n */\nexport const GetNotificationSettingsResponseSchema: GenMessage<GetNotificationSettingsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 36);\n\n/**\n * @generated from message public_api.v1.GetNotificationSettingsResponse.Project\n */\nexport type GetNotificationSettingsResponse_Project = Message<\"public_api.v1.GetNotificationSettingsResponse.Project\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: public_api.v1.GetNotificationSettingsResponse.Status status = 3;\n */\n status: GetNotificationSettingsResponse_Status;\n\n /**\n * @generated from field: optional public_api.v1.ProjectTheme theme = 4;\n */\n theme?: ProjectTheme;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationSettingsResponse.Project.\n * Use `create(GetNotificationSettingsResponse_ProjectSchema)` to create a new message.\n */\nexport const GetNotificationSettingsResponse_ProjectSchema: GenMessage<GetNotificationSettingsResponse_Project> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 36, 0);\n\n/**\n * @generated from enum public_api.v1.GetNotificationSettingsResponse.Status\n */\nexport enum GetNotificationSettingsResponse_Status {\n /**\n * @generated from enum value: STATUS_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: STATUS_ENABLED = 1;\n */\n ENABLED = 1,\n\n /**\n * @generated from enum value: STATUS_DISABLED = 2;\n */\n DISABLED = 2,\n}\n\n/**\n * Describes the enum public_api.v1.GetNotificationSettingsResponse.Status.\n */\nexport const GetNotificationSettingsResponse_StatusSchema: GenEnum<GetNotificationSettingsResponse_Status> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 36, 0);\n\n/**\n * @generated from message public_api.v1.GetNotificationHistoryRequest\n */\nexport type GetNotificationHistoryRequest = Message<\"public_api.v1.GetNotificationHistoryRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: optional string project_id = 2;\n */\n projectId?: string;\n\n /**\n * @generated from field: repeated public_api.v1.NotificationMethod methods = 3;\n */\n methods: NotificationMethod[];\n\n /**\n * @generated from field: int32 page_size = 4;\n */\n pageSize: number;\n\n /**\n * @generated from field: optional string page_token = 5;\n */\n pageToken?: string;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationHistoryRequest.\n * Use `create(GetNotificationHistoryRequestSchema)` to create a new message.\n */\nexport const GetNotificationHistoryRequestSchema: GenMessage<GetNotificationHistoryRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 37);\n\n/**\n * @generated from message public_api.v1.NotificationHistoryItem\n */\nexport type NotificationHistoryItem = Message<\"public_api.v1.NotificationHistoryItem\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string notification_id = 2;\n */\n notificationId: string;\n\n /**\n * @generated from field: public_api.v1.NotificationMethod method = 3;\n */\n method: NotificationMethod;\n\n /**\n * @generated from field: google.protobuf.Timestamp sent_at = 4;\n */\n sentAt?: Timestamp;\n\n /**\n * @generated from field: string title = 5;\n */\n title: string;\n\n /**\n * @generated from field: optional string subtitle = 6;\n */\n subtitle?: string;\n\n /**\n * @generated from field: optional string content = 7;\n */\n content?: string;\n\n /**\n * @generated from field: optional string image_url = 8;\n */\n imageUrl?: string;\n\n /**\n * @generated from field: optional string open_url = 10;\n */\n openUrl?: string;\n\n /**\n * @generated from field: public_api.v1.NotificationHistoryItem.Sender sender = 9;\n */\n sender?: NotificationHistoryItem_Sender;\n};\n\n/**\n * Describes the message public_api.v1.NotificationHistoryItem.\n * Use `create(NotificationHistoryItemSchema)` to create a new message.\n */\nexport const NotificationHistoryItemSchema: GenMessage<NotificationHistoryItem> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 38);\n\n/**\n * @generated from message public_api.v1.NotificationHistoryItem.Sender\n */\nexport type NotificationHistoryItem_Sender = Message<\"public_api.v1.NotificationHistoryItem.Sender\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string display_name = 2;\n */\n displayName: string;\n\n /**\n * @generated from field: optional public_api.v1.ProjectTheme theme = 3;\n */\n theme?: ProjectTheme;\n};\n\n/**\n * Describes the message public_api.v1.NotificationHistoryItem.Sender.\n * Use `create(NotificationHistoryItem_SenderSchema)` to create a new message.\n */\nexport const NotificationHistoryItem_SenderSchema: GenMessage<NotificationHistoryItem_Sender> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 38, 0);\n\n/**\n * @generated from message public_api.v1.GetNotificationHistoryResponse\n */\nexport type GetNotificationHistoryResponse = Message<\"public_api.v1.GetNotificationHistoryResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.NotificationHistoryItem notifications = 1;\n */\n notifications: NotificationHistoryItem[];\n\n /**\n * @generated from field: optional string next_page_token = 2;\n */\n nextPageToken?: string;\n};\n\n/**\n * Describes the message public_api.v1.GetNotificationHistoryResponse.\n * Use `create(GetNotificationHistoryResponseSchema)` to create a new message.\n */\nexport const GetNotificationHistoryResponseSchema: GenMessage<GetNotificationHistoryResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 39);\n\n/**\n * @generated from message public_api.v1.UserPanelPushGetAvailableCompaniesRequest\n */\nexport type UserPanelPushGetAvailableCompaniesRequest = Message<\"public_api.v1.UserPanelPushGetAvailableCompaniesRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelPushGetAvailableCompaniesRequest.\n * Use `create(UserPanelPushGetAvailableCompaniesRequestSchema)` to create a new message.\n */\nexport const UserPanelPushGetAvailableCompaniesRequestSchema: GenMessage<UserPanelPushGetAvailableCompaniesRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 40);\n\n/**\n * @generated from message public_api.v1.UserPanelPushGetAvailableCompaniesResponse\n */\nexport type UserPanelPushGetAvailableCompaniesResponse = Message<\"public_api.v1.UserPanelPushGetAvailableCompaniesResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Company companies = 1;\n */\n companies: UserPanelPushGetAvailableCompaniesResponse_Company[];\n};\n\n/**\n * Describes the message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.\n * Use `create(UserPanelPushGetAvailableCompaniesResponseSchema)` to create a new message.\n */\nexport const UserPanelPushGetAvailableCompaniesResponseSchema: GenMessage<UserPanelPushGetAvailableCompaniesResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 41);\n\n/**\n * @generated from message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Group\n */\nexport type UserPanelPushGetAvailableCompaniesResponse_Group = Message<\"public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Group\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: optional string how_often = 4;\n */\n howOften?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Group.\n * Use `create(UserPanelPushGetAvailableCompaniesResponse_GroupSchema)` to create a new message.\n */\nexport const UserPanelPushGetAvailableCompaniesResponse_GroupSchema: GenMessage<UserPanelPushGetAvailableCompaniesResponse_Group> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 41, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Company\n */\nexport type UserPanelPushGetAvailableCompaniesResponse_Company = Message<\"public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Company\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: repeated public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Group groups = 3;\n */\n groups: UserPanelPushGetAvailableCompaniesResponse_Group[];\n};\n\n/**\n * Describes the message public_api.v1.UserPanelPushGetAvailableCompaniesResponse.Company.\n * Use `create(UserPanelPushGetAvailableCompaniesResponse_CompanySchema)` to create a new message.\n */\nexport const UserPanelPushGetAvailableCompaniesResponse_CompanySchema: GenMessage<UserPanelPushGetAvailableCompaniesResponse_Company> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 41, 1);\n\n/**\n * @generated from message public_api.v1.ShouldShopProductsResponse\n */\nexport type ShouldShopProductsResponse = Message<\"public_api.v1.ShouldShopProductsResponse\"> & {\n /**\n * @generated from field: bool is_visible = 1;\n */\n isVisible: boolean;\n};\n\n/**\n * Describes the message public_api.v1.ShouldShopProductsResponse.\n * Use `create(ShouldShopProductsResponseSchema)` to create a new message.\n */\nexport const ShouldShopProductsResponseSchema: GenMessage<ShouldShopProductsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 42);\n\n/**\n * @generated from message public_api.v1.ShouldShowGuestCatalogResponse\n */\nexport type ShouldShowGuestCatalogResponse = Message<\"public_api.v1.ShouldShowGuestCatalogResponse\"> & {\n /**\n * @generated from field: bool is_visible = 1;\n */\n isVisible: boolean;\n};\n\n/**\n * Describes the message public_api.v1.ShouldShowGuestCatalogResponse.\n * Use `create(ShouldShowGuestCatalogResponseSchema)` to create a new message.\n */\nexport const ShouldShowGuestCatalogResponseSchema: GenMessage<ShouldShowGuestCatalogResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 43);\n\n/**\n * @generated from message public_api.v1.GuestCatalogProduct\n */\nexport type GuestCatalogProduct = Message<\"public_api.v1.GuestCatalogProduct\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: string cover_image_url = 3;\n */\n coverImageUrl: string;\n\n /**\n * @generated from field: public_api.v1.UserProductType product_type = 4;\n */\n productType: UserProductType;\n};\n\n/**\n * Describes the message public_api.v1.GuestCatalogProduct.\n * Use `create(GuestCatalogProductSchema)` to create a new message.\n */\nexport const GuestCatalogProductSchema: GenMessage<GuestCatalogProduct> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 44);\n\n/**\n * @generated from message public_api.v1.GetGuestCatalogResponse\n */\nexport type GetGuestCatalogResponse = Message<\"public_api.v1.GetGuestCatalogResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.GuestCatalogProduct products = 1;\n */\n products: GuestCatalogProduct[];\n};\n\n/**\n * Describes the message public_api.v1.GetGuestCatalogResponse.\n * Use `create(GetGuestCatalogResponseSchema)` to create a new message.\n */\nexport const GetGuestCatalogResponseSchema: GenMessage<GetGuestCatalogResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 45);\n\n/**\n * @generated from message public_api.v1.UserPanelResolveProductAccessRequest\n */\nexport type UserPanelResolveProductAccessRequest = Message<\"public_api.v1.UserPanelResolveProductAccessRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string product_id = 2;\n */\n productId: string;\n\n /**\n * @generated from field: public_api.v1.UserProductType product_type = 3;\n */\n productType: UserProductType;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelResolveProductAccessRequest.\n * Use `create(UserPanelResolveProductAccessRequestSchema)` to create a new message.\n */\nexport const UserPanelResolveProductAccessRequestSchema: GenMessage<UserPanelResolveProductAccessRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 46);\n\n/**\n * @generated from message public_api.v1.UserPanelResolveProductAccessResponse\n */\nexport type UserPanelResolveProductAccessResponse = Message<\"public_api.v1.UserPanelResolveProductAccessResponse\"> & {\n /**\n * @generated from field: public_api.v1.UserPanelResolveProductAccessResponse.Status status = 1;\n */\n status: UserPanelResolveProductAccessResponse_Status;\n\n /**\n * @generated from field: optional string access_id = 2;\n */\n accessId?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelResolveProductAccessResponse.\n * Use `create(UserPanelResolveProductAccessResponseSchema)` to create a new message.\n */\nexport const UserPanelResolveProductAccessResponseSchema: GenMessage<UserPanelResolveProductAccessResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 47);\n\n/**\n * @generated from enum public_api.v1.UserPanelResolveProductAccessResponse.Status\n */\nexport enum UserPanelResolveProductAccessResponse_Status {\n /**\n * @generated from enum value: STATUS_UNSPECIFIED = 0;\n */\n STATUS_UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: OWNED = 1;\n */\n OWNED = 1,\n\n /**\n * @generated from enum value: NOT_OWNED = 2;\n */\n NOT_OWNED = 2,\n\n /**\n * @generated from enum value: UNAVAILABLE = 3;\n */\n UNAVAILABLE = 3,\n}\n\n/**\n * Describes the enum public_api.v1.UserPanelResolveProductAccessResponse.Status.\n */\nexport const UserPanelResolveProductAccessResponse_StatusSchema: GenEnum<UserPanelResolveProductAccessResponse_Status> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 47, 0);\n\n/**\n * @generated from message public_api.v1.GetShopProductsRequest\n */\nexport type GetShopProductsRequest = Message<\"public_api.v1.GetShopProductsRequest\"> & {\n /**\n * @generated from field: optional string access_token = 1;\n */\n accessToken?: string;\n};\n\n/**\n * Describes the message public_api.v1.GetShopProductsRequest.\n * Use `create(GetShopProductsRequestSchema)` to create a new message.\n */\nexport const GetShopProductsRequestSchema: GenMessage<GetShopProductsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 48);\n\n/**\n * @generated from message public_api.v1.GetShopProductsResponse\n */\nexport type GetShopProductsResponse = Message<\"public_api.v1.GetShopProductsResponse\"> & {\n /**\n * @generated from field: repeated public_api.v1.GetShopProductsResponse.Product products = 5;\n */\n products: GetShopProductsResponse_Product[];\n};\n\n/**\n * Describes the message public_api.v1.GetShopProductsResponse.\n * Use `create(GetShopProductsResponseSchema)` to create a new message.\n */\nexport const GetShopProductsResponseSchema: GenMessage<GetShopProductsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 49);\n\n/**\n * @generated from message public_api.v1.GetShopProductsResponse.Product\n */\nexport type GetShopProductsResponse_Product = Message<\"public_api.v1.GetShopProductsResponse.Product\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: string image_url = 3;\n */\n imageUrl: string;\n\n /**\n * @generated from field: string price = 4;\n */\n price: string;\n\n /**\n * @generated from field: optional bool is_already_bought = 5;\n */\n isAlreadyBought?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetShopProductsResponse.Product.\n * Use `create(GetShopProductsResponse_ProductSchema)` to create a new message.\n */\nexport const GetShopProductsResponse_ProductSchema: GenMessage<GetShopProductsResponse_Product> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 49, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetFileDetailsResponse\n */\nexport type UserPanelGetFileDetailsResponse = Message<\"public_api.v1.UserPanelGetFileDetailsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetFileDetailsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelGetFileDetailsResponse.Result success = 1;\n */\n value: UserPanelGetFileDetailsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetFileDetailsResponse.\n * Use `create(UserPanelGetFileDetailsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetFileDetailsResponseSchema: GenMessage<UserPanelGetFileDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 50);\n\n/**\n * @generated from message public_api.v1.UserPanelGetFileDetailsResponse.Result\n */\nexport type UserPanelGetFileDetailsResponse_Result = Message<\"public_api.v1.UserPanelGetFileDetailsResponse.Result\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated string files = 2;\n */\n files: string[];\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetFileDetailsResponse.Result.\n * Use `create(UserPanelGetFileDetailsResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelGetFileDetailsResponse_ResultSchema: GenMessage<UserPanelGetFileDetailsResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 50, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetFileDetailsRequest\n */\nexport type UserPanelGetFileDetailsRequest = Message<\"public_api.v1.UserPanelGetFileDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetFileDetailsRequest.\n * Use `create(UserPanelGetFileDetailsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetFileDetailsRequestSchema: GenMessage<UserPanelGetFileDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 51);\n\n/**\n * @generated from message public_api.v1.UserPanelGetTicketDetailsResponse\n */\nexport type UserPanelGetTicketDetailsResponse = Message<\"public_api.v1.UserPanelGetTicketDetailsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetTicketDetailsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelGetTicketDetailsResponse.Result success = 1;\n */\n value: UserPanelGetTicketDetailsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetTicketDetailsResponse.\n * Use `create(UserPanelGetTicketDetailsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetTicketDetailsResponseSchema: GenMessage<UserPanelGetTicketDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 52);\n\n/**\n * @generated from message public_api.v1.UserPanelGetTicketDetailsResponse.Result\n */\nexport type UserPanelGetTicketDetailsResponse_Result = Message<\"public_api.v1.UserPanelGetTicketDetailsResponse.Result\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string ticket_url = 2;\n */\n ticketUrl: string;\n\n /**\n * @generated from field: string product_name = 3;\n */\n productName: string;\n\n /**\n * @generated from field: string product_image_url = 4;\n */\n productImageUrl: string;\n\n /**\n * @generated from field: optional string google_wallet_url = 5;\n */\n googleWalletUrl?: string;\n\n /**\n * @generated from field: optional string apple_wallet_url = 6;\n */\n appleWalletUrl?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetTicketDetailsResponse.Result.\n * Use `create(UserPanelGetTicketDetailsResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelGetTicketDetailsResponse_ResultSchema: GenMessage<UserPanelGetTicketDetailsResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 52, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetTicketDetailsRequest\n */\nexport type UserPanelGetTicketDetailsRequest = Message<\"public_api.v1.UserPanelGetTicketDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetTicketDetailsRequest.\n * Use `create(UserPanelGetTicketDetailsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetTicketDetailsRequestSchema: GenMessage<UserPanelGetTicketDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 53);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse\n */\nexport type UserPanelGetAudiobookDetailsDownloadURLsResponse = Message<\"public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.Result success = 1;\n */\n value: UserPanelGetAudiobookDetailsDownloadURLsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.\n * Use `create(UserPanelGetAudiobookDetailsDownloadURLsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsDownloadURLsResponseSchema: GenMessage<UserPanelGetAudiobookDetailsDownloadURLsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 54);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.AudiobookDownloadDetails\n */\nexport type UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetails = Message<\"public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.AudiobookDownloadDetails\"> & {\n /**\n * @generated from field: string chapter_id = 1;\n */\n chapterId: string;\n\n /**\n * @generated from field: string public_url = 2;\n */\n publicUrl: string;\n\n /**\n * @generated from field: optional string downloadable_url = 3;\n */\n downloadableUrl?: string;\n\n /**\n * @generated from field: optional int32 duration = 4;\n */\n duration?: number;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.AudiobookDownloadDetails.\n * Use `create(UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetailsSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetailsSchema: GenMessage<UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetails> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 54, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.Result\n */\nexport type UserPanelGetAudiobookDetailsDownloadURLsResponse_Result = Message<\"public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.Result\"> & {\n /**\n * @generated from field: repeated public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.AudiobookDownloadDetails audiobook_download_details = 1;\n */\n audiobookDownloadDetails: UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetails[];\n\n /**\n * @generated from field: optional bool is_available_to_download_in_mobile_app = 2;\n */\n isAvailableToDownloadInMobileApp?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsResponse.Result.\n * Use `create(UserPanelGetAudiobookDetailsDownloadURLsResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsDownloadURLsResponse_ResultSchema: GenMessage<UserPanelGetAudiobookDetailsDownloadURLsResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 54, 1);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsRequest\n */\nexport type UserPanelGetAudiobookDetailsDownloadURLsRequest = Message<\"public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n\n /**\n * @generated from field: optional bool is_browser = 3;\n */\n isBrowser?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsDownloadURLsRequest.\n * Use `create(UserPanelGetAudiobookDetailsDownloadURLsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsDownloadURLsRequestSchema: GenMessage<UserPanelGetAudiobookDetailsDownloadURLsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 55);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsResponse\n */\nexport type UserPanelGetAudiobookDetailsResponse = Message<\"public_api.v1.UserPanelGetAudiobookDetailsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetAudiobookDetailsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.audiobooks.v1.Audiobook audiobook = 1;\n */\n value: Audiobook$1;\n case: \"audiobook\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsResponse.\n * Use `create(UserPanelGetAudiobookDetailsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsResponseSchema: GenMessage<UserPanelGetAudiobookDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 56);\n\n/**\n * @generated from message public_api.v1.UserPanelGetAudiobookDetailsRequest\n */\nexport type UserPanelGetAudiobookDetailsRequest = Message<\"public_api.v1.UserPanelGetAudiobookDetailsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string access_id = 2;\n */\n accessId: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetAudiobookDetailsRequest.\n * Use `create(UserPanelGetAudiobookDetailsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetAudiobookDetailsRequestSchema: GenMessage<UserPanelGetAudiobookDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 57);\n\n/**\n * @generated from message public_api.v1.UserPanelGetProductsRequest\n */\nexport type UserPanelGetProductsRequest = Message<\"public_api.v1.UserPanelGetProductsRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetProductsRequest.\n * Use `create(UserPanelGetProductsRequestSchema)` to create a new message.\n */\nexport const UserPanelGetProductsRequestSchema: GenMessage<UserPanelGetProductsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 58);\n\n/**\n * @generated from message public_api.v1.UserPanelGetProductsResponse\n */\nexport type UserPanelGetProductsResponse = Message<\"public_api.v1.UserPanelGetProductsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelGetProductsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelGetProductsResponse.Result success = 1;\n */\n value: UserPanelGetProductsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetProductsResponse.\n * Use `create(UserPanelGetProductsResponseSchema)` to create a new message.\n */\nexport const UserPanelGetProductsResponseSchema: GenMessage<UserPanelGetProductsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 59);\n\n/**\n * @generated from message public_api.v1.UserPanelGetProductsResponse.Result\n */\nexport type UserPanelGetProductsResponse_Result = Message<\"public_api.v1.UserPanelGetProductsResponse.Result\"> & {\n /**\n * @generated from field: repeated public_api.v1.UserProduct products = 1;\n */\n products: UserProduct[];\n};\n\n/**\n * Describes the message public_api.v1.UserPanelGetProductsResponse.Result.\n * Use `create(UserPanelGetProductsResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelGetProductsResponse_ResultSchema: GenMessage<UserPanelGetProductsResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 59, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelLogoutRequest\n */\nexport type UserPanelLogoutRequest = Message<\"public_api.v1.UserPanelLogoutRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLogoutRequest.\n * Use `create(UserPanelLogoutRequestSchema)` to create a new message.\n */\nexport const UserPanelLogoutRequestSchema: GenMessage<UserPanelLogoutRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 60);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginWithCodeResponse\n */\nexport type UserPanelLoginWithCodeResponse = Message<\"public_api.v1.UserPanelLoginWithCodeResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelLoginWithCodeResponse.result\n */\n result: {\n /**\n * @generated from field: string access_token = 1;\n */\n value: string;\n case: \"accessToken\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n\n /**\n * @generated from field: optional string email = 3;\n */\n email?: string;\n\n /**\n * @generated from field: optional string user_id = 4;\n */\n userId?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginWithCodeResponse.\n * Use `create(UserPanelLoginWithCodeResponseSchema)` to create a new message.\n */\nexport const UserPanelLoginWithCodeResponseSchema: GenMessage<UserPanelLoginWithCodeResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 61);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginWithCodeRequest\n */\nexport type UserPanelLoginWithCodeRequest = Message<\"public_api.v1.UserPanelLoginWithCodeRequest\"> & {\n /**\n * @generated from field: int32 code = 1;\n */\n code: number;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginWithCodeRequest.\n * Use `create(UserPanelLoginWithCodeRequestSchema)` to create a new message.\n */\nexport const UserPanelLoginWithCodeRequestSchema: GenMessage<UserPanelLoginWithCodeRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 62);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginResponse\n */\nexport type UserPanelLoginResponse = Message<\"public_api.v1.UserPanelLoginResponse\"> & {\n /**\n * @generated from oneof public_api.v1.UserPanelLoginResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.UserPanelLoginResponse.Result success = 1;\n */\n value: UserPanelLoginResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginResponse.\n * Use `create(UserPanelLoginResponseSchema)` to create a new message.\n */\nexport const UserPanelLoginResponseSchema: GenMessage<UserPanelLoginResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 63);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginResponse.Result\n */\nexport type UserPanelLoginResponse_Result = Message<\"public_api.v1.UserPanelLoginResponse.Result\"> & {\n /**\n * @generated from field: int32 retry_in = 1;\n */\n retryIn: number;\n\n /**\n * @generated from field: public_api.v1.LoginCodeDeliveryMethod delivery_method = 2;\n */\n deliveryMethod: LoginCodeDeliveryMethod;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginResponse.Result.\n * Use `create(UserPanelLoginResponse_ResultSchema)` to create a new message.\n */\nexport const UserPanelLoginResponse_ResultSchema: GenMessage<UserPanelLoginResponse_Result> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 63, 0);\n\n/**\n * @generated from message public_api.v1.UserPanelLoginRequest\n */\nexport type UserPanelLoginRequest = Message<\"public_api.v1.UserPanelLoginRequest\"> & {\n /**\n * @generated from field: string email = 1;\n */\n email: string;\n\n /**\n * @generated from field: optional bool regulations_accept = 2;\n */\n regulationsAccept?: boolean;\n\n /**\n * @generated from field: public_api.v1.LoginCodeDeliveryMethod delivery_method = 3;\n */\n deliveryMethod: LoginCodeDeliveryMethod;\n};\n\n/**\n * Describes the message public_api.v1.UserPanelLoginRequest.\n * Use `create(UserPanelLoginRequestSchema)` to create a new message.\n */\nexport const UserPanelLoginRequestSchema: GenMessage<UserPanelLoginRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 64);\n\n/**\n * @generated from message public_api.v1.GetOrderRetryUrlRequest\n */\nexport type GetOrderRetryUrlRequest = Message<\"public_api.v1.GetOrderRetryUrlRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderRetryUrlRequest.\n * Use `create(GetOrderRetryUrlRequestSchema)` to create a new message.\n */\nexport const GetOrderRetryUrlRequestSchema: GenMessage<GetOrderRetryUrlRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 65);\n\n/**\n * @generated from message public_api.v1.GetOrderRetryUrlResponse\n */\nexport type GetOrderRetryUrlResponse = Message<\"public_api.v1.GetOrderRetryUrlResponse\"> & {\n /**\n * @generated from oneof public_api.v1.GetOrderRetryUrlResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.GetOrderRetryUrlResponse.Success url = 1;\n */\n value: GetOrderRetryUrlResponse_Success;\n case: \"url\";\n } | {\n /**\n * @generated from field: string failure = 2;\n */\n value: string;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.GetOrderRetryUrlResponse.\n * Use `create(GetOrderRetryUrlResponseSchema)` to create a new message.\n */\nexport const GetOrderRetryUrlResponseSchema: GenMessage<GetOrderRetryUrlResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 66);\n\n/**\n * @generated from message public_api.v1.GetOrderRetryUrlResponse.Success\n */\nexport type GetOrderRetryUrlResponse_Success = Message<\"public_api.v1.GetOrderRetryUrlResponse.Success\"> & {\n /**\n * @generated from field: string url = 1;\n */\n url: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderRetryUrlResponse.Success.\n * Use `create(GetOrderRetryUrlResponse_SuccessSchema)` to create a new message.\n */\nexport const GetOrderRetryUrlResponse_SuccessSchema: GenMessage<GetOrderRetryUrlResponse_Success> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 66, 0);\n\n/**\n * @generated from message public_api.v1.GetOrderRequest\n */\nexport type GetOrderRequest = Message<\"public_api.v1.GetOrderRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string project_id = 2;\n */\n projectId: string;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderRequest.\n * Use `create(GetOrderRequestSchema)` to create a new message.\n */\nexport const GetOrderRequestSchema: GenMessage<GetOrderRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 67);\n\n/**\n * @generated from message public_api.v1.GetOrderResponse\n */\nexport type GetOrderResponse = Message<\"public_api.v1.GetOrderResponse\"> & {\n /**\n * @generated from field: optional string id = 1;\n */\n id?: string;\n\n /**\n * @generated from field: repeated public_api.v1.Item items = 2;\n */\n items: Item[];\n\n /**\n * @generated from field: public_api.v1.OrderDetails details = 3;\n */\n details?: OrderDetails;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderResponse.\n * Use `create(GetOrderResponseSchema)` to create a new message.\n */\nexport const GetOrderResponseSchema: GenMessage<GetOrderResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 68);\n\n/**\n * @generated from message public_api.v1.OrderDetails\n */\nexport type OrderDetails = Message<\"public_api.v1.OrderDetails\"> & {\n /**\n * @generated from field: repeated public_api.v1.OrderDetails.SingleItem items = 1;\n */\n items: OrderDetails_SingleItem[];\n\n /**\n * @generated from field: common.v1.Gateway gateway = 2;\n */\n gateway: Gateway;\n};\n\n/**\n * Describes the message public_api.v1.OrderDetails.\n * Use `create(OrderDetailsSchema)` to create a new message.\n */\nexport const OrderDetailsSchema: GenMessage<OrderDetails> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 69);\n\n/**\n * @generated from message public_api.v1.OrderDetails.SingleItem\n */\nexport type OrderDetails_SingleItem = Message<\"public_api.v1.OrderDetails.SingleItem\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: optional string image_url = 2;\n */\n imageUrl?: string;\n\n /**\n * @generated from field: string name = 3;\n */\n name: string;\n\n /**\n * @generated from field: int32 quantity = 4;\n */\n quantity: number;\n\n /**\n * @generated from field: int64 price_amount = 5;\n */\n priceAmount: bigint;\n\n /**\n * @generated from field: string price_currency = 6;\n */\n priceCurrency: string;\n};\n\n/**\n * Describes the message public_api.v1.OrderDetails.SingleItem.\n * Use `create(OrderDetails_SingleItemSchema)` to create a new message.\n */\nexport const OrderDetails_SingleItemSchema: GenMessage<OrderDetails_SingleItem> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 69, 0);\n\n/**\n * @generated from message public_api.v1.Item\n */\nexport type Item = Message<\"public_api.v1.Item\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: string image_url = 3;\n */\n imageUrl: string;\n\n /**\n * @generated from oneof public_api.v1.Item.item\n */\n item: {\n /**\n * @generated from field: public_api.v1.FileDownloadable file_downloadable = 4;\n */\n value: FileDownloadable;\n case: \"fileDownloadable\";\n } | {\n /**\n * @generated from field: public_api.v1.Audiobook audiobook = 5;\n */\n value: Audiobook;\n case: \"audiobook\";\n } | {\n /**\n * @generated from field: public_api.v1.Ticket ticket = 6;\n */\n value: Ticket;\n case: \"ticket\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.Item.\n * Use `create(ItemSchema)` to create a new message.\n */\nexport const ItemSchema: GenMessage<Item> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 70);\n\n/**\n * @generated from message public_api.v1.FileDownloadable\n */\nexport type FileDownloadable = Message<\"public_api.v1.FileDownloadable\"> & {\n /**\n * @generated from field: string file_url = 1;\n */\n fileUrl: string;\n};\n\n/**\n * Describes the message public_api.v1.FileDownloadable.\n * Use `create(FileDownloadableSchema)` to create a new message.\n */\nexport const FileDownloadableSchema: GenMessage<FileDownloadable> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 71);\n\n/**\n * @generated from message public_api.v1.Audiobook\n */\nexport type Audiobook = Message<\"public_api.v1.Audiobook\"> & {\n /**\n * @generated from field: string app_download_url = 1;\n */\n appDownloadUrl: string;\n};\n\n/**\n * Describes the message public_api.v1.Audiobook.\n * Use `create(AudiobookSchema)` to create a new message.\n */\nexport const AudiobookSchema: GenMessage<Audiobook> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 72);\n\n/**\n * @generated from message public_api.v1.Ticket\n */\nexport type Ticket = Message<\"public_api.v1.Ticket\"> & {\n /**\n * @generated from field: string ticket_id = 1;\n */\n ticketId: string;\n\n /**\n * @generated from field: optional string apple_pass_url = 2;\n */\n applePassUrl?: string;\n\n /**\n * @generated from field: optional string google_ticket_url = 3;\n */\n googleTicketUrl?: string;\n};\n\n/**\n * Describes the message public_api.v1.Ticket.\n * Use `create(TicketSchema)` to create a new message.\n */\nexport const TicketSchema: GenMessage<Ticket> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 73);\n\n/**\n * @generated from message public_api.v1.UserProduct\n */\nexport type UserProduct = Message<\"public_api.v1.UserProduct\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string project_name = 2;\n */\n projectName: string;\n\n /**\n * @generated from field: string product_id = 3;\n */\n productId: string;\n\n /**\n * @generated from field: string product_name = 4;\n */\n productName: string;\n\n /**\n * @generated from field: string product_description = 5;\n */\n productDescription: string;\n\n /**\n * @generated from field: string product_image_url = 6;\n */\n productImageUrl: string;\n\n /**\n * @generated from field: public_api.v1.UserProductType product_type = 7;\n */\n productType: UserProductType;\n\n /**\n * @generated from field: string access_id = 8;\n */\n accessId: string;\n\n /**\n * @generated from field: optional public_api.v1.ProjectTheme project_theme = 9;\n */\n projectTheme?: ProjectTheme;\n\n /**\n * @generated from field: optional string project_description = 10;\n */\n projectDescription?: string;\n};\n\n/**\n * Describes the message public_api.v1.UserProduct.\n * Use `create(UserProductSchema)` to create a new message.\n */\nexport const UserProductSchema: GenMessage<UserProduct> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 74);\n\n/**\n * @generated from message public_api.v1.BoolResponse\n */\nexport type BoolResponse = Message<\"public_api.v1.BoolResponse\"> & {\n /**\n * @generated from oneof public_api.v1.BoolResponse.result\n */\n result: {\n /**\n * @generated from field: google.protobuf.Empty success = 1;\n */\n value: Empty;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.BoolResponse.\n * Use `create(BoolResponseSchema)` to create a new message.\n */\nexport const BoolResponseSchema: GenMessage<BoolResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 75);\n\n/**\n * @generated from message public_api.v1.PushEventRequest\n */\nexport type PushEventRequest = Message<\"public_api.v1.PushEventRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: string notification_id = 2;\n */\n notificationId: string;\n\n /**\n * @generated from field: common.v1.NotificationEvent event = 3;\n */\n event: NotificationEvent;\n};\n\n/**\n * Describes the message public_api.v1.PushEventRequest.\n * Use `create(PushEventRequestSchema)` to create a new message.\n */\nexport const PushEventRequestSchema: GenMessage<PushEventRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 76);\n\n/**\n * @generated from message public_api.v1.PushSendDeviceTokenRequest\n */\nexport type PushSendDeviceTokenRequest = Message<\"public_api.v1.PushSendDeviceTokenRequest\"> & {\n /**\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * @generated from field: common.v1.PushNotificationDeviceToken payload = 2;\n */\n payload?: PushNotificationDeviceToken;\n\n /**\n * @generated from field: optional bool is_notification_granted = 3;\n */\n isNotificationGranted?: boolean;\n};\n\n/**\n * Describes the message public_api.v1.PushSendDeviceTokenRequest.\n * Use `create(PushSendDeviceTokenRequestSchema)` to create a new message.\n */\nexport const PushSendDeviceTokenRequestSchema: GenMessage<PushSendDeviceTokenRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 77);\n\n/**\n * @generated from message public_api.v1.ProjectTheme\n */\nexport type ProjectTheme = Message<\"public_api.v1.ProjectTheme\"> & {\n /**\n * @generated from field: optional string image_url = 1;\n */\n imageUrl?: string;\n\n /**\n * @generated from field: optional string image_dark_url = 2;\n */\n imageDarkUrl?: string;\n\n /**\n * @generated from field: optional string brand_color = 3;\n */\n brandColor?: string;\n\n /**\n * @generated from field: optional string brand_color_dark = 4;\n */\n brandColorDark?: string;\n};\n\n/**\n * Describes the message public_api.v1.ProjectTheme.\n * Use `create(ProjectThemeSchema)` to create a new message.\n */\nexport const ProjectThemeSchema: GenMessage<ProjectTheme> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 78);\n\n/**\n * Public Order Details Messages\n *\n * @generated from message public_api.v1.GetPublicOrderDetailsRequest\n */\nexport type GetPublicOrderDetailsRequest = Message<\"public_api.v1.GetPublicOrderDetailsRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string order_id = 2;\n */\n orderId: string;\n\n /**\n * If provided and matches order, show unobfuscated data\n *\n * @generated from field: optional string email = 3;\n */\n email?: string;\n\n /**\n * If provided, extract email from token for automatic verification\n *\n * @generated from field: optional string access_token = 4;\n */\n accessToken?: string;\n};\n\n/**\n * Describes the message public_api.v1.GetPublicOrderDetailsRequest.\n * Use `create(GetPublicOrderDetailsRequestSchema)` to create a new message.\n */\nexport const GetPublicOrderDetailsRequestSchema: GenMessage<GetPublicOrderDetailsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 79);\n\n/**\n * @generated from message public_api.v1.GetPublicOrderDetailsResponse\n */\nexport type GetPublicOrderDetailsResponse = Message<\"public_api.v1.GetPublicOrderDetailsResponse\"> & {\n /**\n * @generated from oneof public_api.v1.GetPublicOrderDetailsResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.PublicOrderDetails order = 1;\n */\n value: PublicOrderDetails;\n case: \"order\";\n } | {\n /**\n * @generated from field: string failure = 2;\n */\n value: string;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.GetPublicOrderDetailsResponse.\n * Use `create(GetPublicOrderDetailsResponseSchema)` to create a new message.\n */\nexport const GetPublicOrderDetailsResponseSchema: GenMessage<GetPublicOrderDetailsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 80);\n\n/**\n * @generated from message public_api.v1.PublicOrderDetails\n */\nexport type PublicOrderDetails = Message<\"public_api.v1.PublicOrderDetails\"> & {\n /**\n * @generated from field: string order_id = 1;\n */\n orderId: string;\n\n /**\n * Always visible (e.g., \"completed\", \"pending\", \"shipped\")\n *\n * @generated from field: string status = 2;\n */\n status: string;\n\n /**\n * Always visible\n *\n * @generated from field: optional string processing_status = 3;\n */\n processingStatus?: string;\n\n /**\n * Obfuscated unless email verified\n *\n * @generated from field: string customer_name = 4;\n */\n customerName: string;\n\n /**\n * @generated from field: string customer_email = 5;\n */\n customerEmail: string;\n\n /**\n * @generated from field: optional string customer_phone = 6;\n */\n customerPhone?: string;\n\n /**\n * @generated from field: optional string delivery_address = 7;\n */\n deliveryAddress?: string;\n\n /**\n * @generated from field: optional string delivery_method = 8;\n */\n deliveryMethod?: string;\n\n /**\n * @generated from field: optional string tracking_number = 9;\n */\n trackingNumber?: string;\n\n /**\n * @generated from field: repeated public_api.v1.PublicOrderItem items = 10;\n */\n items: PublicOrderItem[];\n\n /**\n * @generated from field: repeated public_api.v1.PublicOrderComment comments = 11;\n */\n comments: PublicOrderComment[];\n\n /**\n * @generated from field: int64 total_amount = 12;\n */\n totalAmount: bigint;\n\n /**\n * @generated from field: string currency = 13;\n */\n currency: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 14;\n */\n createdAt?: Timestamp;\n\n /**\n * @generated from field: optional google.protobuf.Timestamp updated_at = 15;\n */\n updatedAt?: Timestamp;\n\n /**\n * True if email matched - frontend uses this to show/hide verify form\n *\n * @generated from field: bool is_verified = 16;\n */\n isVerified: boolean;\n\n /**\n * Total non-internal comments count\n *\n * @generated from field: int32 comment_count = 17;\n */\n commentCount: number;\n\n /**\n * Project branding\n *\n * @generated from field: optional public_api.v1.ProjectTheme project_theme = 18;\n */\n projectTheme?: ProjectTheme;\n\n /**\n * @generated from field: optional string project_name = 19;\n */\n projectName?: string;\n};\n\n/**\n * Describes the message public_api.v1.PublicOrderDetails.\n * Use `create(PublicOrderDetailsSchema)` to create a new message.\n */\nexport const PublicOrderDetailsSchema: GenMessage<PublicOrderDetails> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 81);\n\n/**\n * @generated from message public_api.v1.PublicOrderItem\n */\nexport type PublicOrderItem = Message<\"public_api.v1.PublicOrderItem\"> & {\n /**\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * @generated from field: int32 quantity = 2;\n */\n quantity: number;\n\n /**\n * @generated from field: int64 price = 3;\n */\n price: bigint;\n\n /**\n * @generated from field: string currency = 4;\n */\n currency: string;\n\n /**\n * @generated from field: optional string image_url = 5;\n */\n imageUrl?: string;\n};\n\n/**\n * Describes the message public_api.v1.PublicOrderItem.\n * Use `create(PublicOrderItemSchema)` to create a new message.\n */\nexport const PublicOrderItemSchema: GenMessage<PublicOrderItem> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 82);\n\n/**\n * @generated from message public_api.v1.PublicOrderComment\n */\nexport type PublicOrderComment = Message<\"public_api.v1.PublicOrderComment\"> & {\n /**\n * @generated from field: int32 id = 1;\n */\n id: number;\n\n /**\n * Obfuscated to \"***\" if not verified\n *\n * @generated from field: string message = 2;\n */\n message: string;\n\n /**\n * \"admin\", \"system\", \"customer\"\n *\n * @generated from field: string author_type = 3;\n */\n authorType: string;\n\n /**\n * Obfuscated if not verified\n *\n * @generated from field: optional string author_name = 4;\n */\n authorName?: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 5;\n */\n createdAt?: Timestamp;\n};\n\n/**\n * Describes the message public_api.v1.PublicOrderComment.\n * Use `create(PublicOrderCommentSchema)` to create a new message.\n */\nexport const PublicOrderCommentSchema: GenMessage<PublicOrderComment> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 83);\n\n/**\n * @generated from message public_api.v1.AddPublicOrderCommentRequest\n */\nexport type AddPublicOrderCommentRequest = Message<\"public_api.v1.AddPublicOrderCommentRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string order_id = 2;\n */\n orderId: string;\n\n /**\n * @generated from field: string message = 3;\n */\n message: string;\n\n /**\n * Lucia session cookie value\n *\n * @generated from field: string access_token = 4;\n */\n accessToken: string;\n};\n\n/**\n * Describes the message public_api.v1.AddPublicOrderCommentRequest.\n * Use `create(AddPublicOrderCommentRequestSchema)` to create a new message.\n */\nexport const AddPublicOrderCommentRequestSchema: GenMessage<AddPublicOrderCommentRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 84);\n\n/**\n * @generated from message public_api.v1.AddPublicOrderCommentResponse\n */\nexport type AddPublicOrderCommentResponse = Message<\"public_api.v1.AddPublicOrderCommentResponse\"> & {\n /**\n * @generated from oneof public_api.v1.AddPublicOrderCommentResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.PublicOrderComment comment = 1;\n */\n value: PublicOrderComment;\n case: \"comment\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.AddPublicOrderCommentResponse.\n * Use `create(AddPublicOrderCommentResponseSchema)` to create a new message.\n */\nexport const AddPublicOrderCommentResponseSchema: GenMessage<AddPublicOrderCommentResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 85);\n\n/**\n * Testimonial Messages\n *\n * @generated from message public_api.v1.GetOrderForTestimonialRequest\n */\nexport type GetOrderForTestimonialRequest = Message<\"public_api.v1.GetOrderForTestimonialRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string order_id = 2;\n */\n orderId: string;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderForTestimonialRequest.\n * Use `create(GetOrderForTestimonialRequestSchema)` to create a new message.\n */\nexport const GetOrderForTestimonialRequestSchema: GenMessage<GetOrderForTestimonialRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 86);\n\n/**\n * @generated from message public_api.v1.GetOrderForTestimonialResponse\n */\nexport type GetOrderForTestimonialResponse = Message<\"public_api.v1.GetOrderForTestimonialResponse\"> & {\n /**\n * @generated from oneof public_api.v1.GetOrderForTestimonialResponse.result\n */\n result: {\n /**\n * @generated from field: public_api.v1.GetOrderForTestimonialResponse.OrderInfo order = 1;\n */\n value: GetOrderForTestimonialResponse_OrderInfo;\n case: \"order\";\n } | {\n /**\n * @generated from field: string failure = 2;\n */\n value: string;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.GetOrderForTestimonialResponse.\n * Use `create(GetOrderForTestimonialResponseSchema)` to create a new message.\n */\nexport const GetOrderForTestimonialResponseSchema: GenMessage<GetOrderForTestimonialResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 87);\n\n/**\n * @generated from message public_api.v1.GetOrderForTestimonialResponse.OrderProduct\n */\nexport type GetOrderForTestimonialResponse_OrderProduct = Message<\"public_api.v1.GetOrderForTestimonialResponse.OrderProduct\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: string product_name = 2;\n */\n productName: string;\n\n /**\n * @generated from field: optional string product_image_url = 3;\n */\n productImageUrl?: string;\n\n /**\n * @generated from field: int32 quantity = 4;\n */\n quantity: number;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderForTestimonialResponse.OrderProduct.\n * Use `create(GetOrderForTestimonialResponse_OrderProductSchema)` to create a new message.\n */\nexport const GetOrderForTestimonialResponse_OrderProductSchema: GenMessage<GetOrderForTestimonialResponse_OrderProduct> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 87, 0);\n\n/**\n * @generated from message public_api.v1.GetOrderForTestimonialResponse.OrderInfo\n */\nexport type GetOrderForTestimonialResponse_OrderInfo = Message<\"public_api.v1.GetOrderForTestimonialResponse.OrderInfo\"> & {\n /**\n * @generated from field: string order_id = 1;\n */\n orderId: string;\n\n /**\n * @generated from field: string customer_name = 2;\n */\n customerName: string;\n\n /**\n * @generated from field: string customer_email = 3;\n */\n customerEmail: string;\n\n /**\n * @generated from field: repeated public_api.v1.GetOrderForTestimonialResponse.OrderProduct products = 4;\n */\n products: GetOrderForTestimonialResponse_OrderProduct[];\n\n /**\n * @generated from field: bool already_submitted = 5;\n */\n alreadySubmitted: boolean;\n};\n\n/**\n * Describes the message public_api.v1.GetOrderForTestimonialResponse.OrderInfo.\n * Use `create(GetOrderForTestimonialResponse_OrderInfoSchema)` to create a new message.\n */\nexport const GetOrderForTestimonialResponse_OrderInfoSchema: GenMessage<GetOrderForTestimonialResponse_OrderInfo> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 87, 1);\n\n/**\n * @generated from message public_api.v1.SubmitTestimonialRequest\n */\nexport type SubmitTestimonialRequest = Message<\"public_api.v1.SubmitTestimonialRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string order_id = 2;\n */\n orderId: string;\n\n /**\n * @generated from field: string customer_name = 3;\n */\n customerName: string;\n\n /**\n * @generated from field: optional string photo_url = 4;\n */\n photoUrl?: string;\n\n /**\n * @generated from field: int32 rating = 5;\n */\n rating: number;\n\n /**\n * @generated from field: string message = 6;\n */\n message: string;\n\n /**\n * @generated from field: repeated string product_ids = 7;\n */\n productIds: string[];\n};\n\n/**\n * Describes the message public_api.v1.SubmitTestimonialRequest.\n * Use `create(SubmitTestimonialRequestSchema)` to create a new message.\n */\nexport const SubmitTestimonialRequestSchema: GenMessage<SubmitTestimonialRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 88);\n\n/**\n * @generated from message public_api.v1.SubmitTestimonialResponse\n */\nexport type SubmitTestimonialResponse = Message<\"public_api.v1.SubmitTestimonialResponse\"> & {\n /**\n * @generated from oneof public_api.v1.SubmitTestimonialResponse.result\n */\n result: {\n /**\n * @generated from field: google.protobuf.Empty success = 1;\n */\n value: Empty;\n case: \"success\";\n } | {\n /**\n * @generated from field: public_api.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message public_api.v1.SubmitTestimonialResponse.\n * Use `create(SubmitTestimonialResponseSchema)` to create a new message.\n */\nexport const SubmitTestimonialResponseSchema: GenMessage<SubmitTestimonialResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 89);\n\n/**\n * @generated from message public_api.v1.GetTestimonialUploadUrlRequest\n */\nexport type GetTestimonialUploadUrlRequest = Message<\"public_api.v1.GetTestimonialUploadUrlRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string order_id = 2;\n */\n orderId: string;\n\n /**\n * @generated from field: string filename = 3;\n */\n filename: string;\n};\n\n/**\n * Describes the message public_api.v1.GetTestimonialUploadUrlRequest.\n * Use `create(GetTestimonialUploadUrlRequestSchema)` to create a new message.\n */\nexport const GetTestimonialUploadUrlRequestSchema: GenMessage<GetTestimonialUploadUrlRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 90);\n\n/**\n * @generated from message public_api.v1.GetTestimonialUploadUrlResponse\n */\nexport type GetTestimonialUploadUrlResponse = Message<\"public_api.v1.GetTestimonialUploadUrlResponse\"> & {\n /**\n * @generated from field: string upload_url = 1;\n */\n uploadUrl: string;\n\n /**\n * @generated from field: string public_url = 2;\n */\n publicUrl: string;\n};\n\n/**\n * Describes the message public_api.v1.GetTestimonialUploadUrlResponse.\n * Use `create(GetTestimonialUploadUrlResponseSchema)` to create a new message.\n */\nexport const GetTestimonialUploadUrlResponseSchema: GenMessage<GetTestimonialUploadUrlResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_public_api, 91);\n\n/**\n * @generated from enum public_api.v1.LoginCodeDeliveryMethod\n */\nexport enum LoginCodeDeliveryMethod {\n /**\n * @generated from enum value: LOGIN_CODE_DELIVERY_METHOD_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: LOGIN_CODE_DELIVERY_METHOD_EMAIL = 1;\n */\n EMAIL = 1,\n\n /**\n * @generated from enum value: LOGIN_CODE_DELIVERY_METHOD_PUSH = 2;\n */\n PUSH = 2,\n\n /**\n * @generated from enum value: LOGIN_CODE_DELIVERY_METHOD_SMS = 3;\n */\n SMS = 3,\n}\n\n/**\n * Describes the enum public_api.v1.LoginCodeDeliveryMethod.\n */\nexport const LoginCodeDeliveryMethodSchema: GenEnum<LoginCodeDeliveryMethod> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 0);\n\n/**\n * @generated from enum public_api.v1.UserProductType\n */\nexport enum UserProductType {\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_AUDIO = 1;\n */\n AUDIO = 1,\n\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_FILE = 2;\n */\n FILE = 2,\n\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_TICKET = 3;\n */\n TICKET = 3,\n\n /**\n * @generated from enum value: USER_PRODUCT_TYPE_COURSE = 4;\n */\n COURSE = 4,\n}\n\n/**\n * Describes the enum public_api.v1.UserProductType.\n */\nexport const UserProductTypeSchema: GenEnum<UserProductType> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 1);\n\n/**\n * @generated from enum public_api.v1.FailureMessage\n */\nexport enum FailureMessage {\n /**\n * @generated from enum value: FAILURE_MESSAGE_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_EMAIL_NOT_FOUND = 1;\n */\n EMAIL_NOT_FOUND = 1,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INCORRECT_EMAIL = 2;\n */\n INCORRECT_EMAIL = 2,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INCORRECT_CODE = 3;\n */\n INCORRECT_CODE = 3,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_GENERATE_ACCESS_TOKEN_FAILED = 4;\n */\n GENERATE_ACCESS_TOKEN_FAILED = 4,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_LOGOUT_FAILED = 5;\n */\n LOGOUT_FAILED = 5,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_PRDUCTS_NOT_FOUND = 6;\n */\n PRDUCTS_NOT_FOUND = 6,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_AUDIOBOOK_NOT_FOUND = 7;\n */\n AUDIOBOOK_NOT_FOUND = 7,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INCORRECT_AUDIOBOOK = 8;\n */\n INCORRECT_AUDIOBOOK = 8,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_UNAUTHORIZED = 9;\n */\n UNAUTHORIZED = 9,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_TICKET_NOT_FOUND = 10;\n */\n TICKET_NOT_FOUND = 10,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_DELIVERY_METHOD_UNAVAILABLE = 11;\n */\n DELIVERY_METHOD_UNAVAILABLE = 11,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_DELIVERY_FAILED = 12;\n */\n DELIVERY_FAILED = 12,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_RATE_LIMITED = 13;\n */\n RATE_LIMITED = 13,\n}\n\n/**\n * Describes the enum public_api.v1.FailureMessage.\n */\nexport const FailureMessageSchema: GenEnum<FailureMessage> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 2);\n\n/**\n * @generated from enum public_api.v1.NotificationMethod\n */\nexport enum NotificationMethod {\n /**\n * @generated from enum value: NOTIFICATION_METHOD_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: NOTIFICATION_METHOD_EMAIL = 1;\n */\n EMAIL = 1,\n\n /**\n * @generated from enum value: NOTIFICATION_METHOD_SMS = 2;\n */\n SMS = 2,\n\n /**\n * @generated from enum value: NOTIFICATION_METHOD_PUSH = 3;\n */\n PUSH = 3,\n}\n\n/**\n * Describes the enum public_api.v1.NotificationMethod.\n */\nexport const NotificationMethodSchema: GenEnum<NotificationMethod> = /*@__PURE__*/\n enumDesc(file_public_v1_public_api, 3);\n\n/**\n * @generated from service public_api.v1.PublicApiService\n */\nexport const PublicApiService: GenService<{\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetOrder\n */\n getOrder: {\n methodKind: \"unary\";\n input: typeof GetOrderRequestSchema;\n output: typeof GetOrderResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetOrders\n */\n getOrders: {\n methodKind: \"unary\";\n input: typeof GetOrdersRequestSchema;\n output: typeof GetOrdersResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetOrderRetryUrl\n */\n getOrderRetryUrl: {\n methodKind: \"unary\";\n input: typeof GetOrderRetryUrlRequestSchema;\n output: typeof GetOrderRetryUrlResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelLogin\n */\n userPanelLogin: {\n methodKind: \"unary\";\n input: typeof UserPanelLoginRequestSchema;\n output: typeof UserPanelLoginResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelLoginWithCode\n */\n userPanelLoginWithCode: {\n methodKind: \"unary\";\n input: typeof UserPanelLoginWithCodeRequestSchema;\n output: typeof UserPanelLoginWithCodeResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelLogout\n */\n userPanelLogout: {\n methodKind: \"unary\";\n input: typeof UserPanelLogoutRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelDeleteAccount\n */\n userPanelDeleteAccount: {\n methodKind: \"unary\";\n input: typeof UserPanelDeleteAccountRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetProducts\n */\n userPanelGetProducts: {\n methodKind: \"unary\";\n input: typeof UserPanelGetProductsRequestSchema;\n output: typeof UserPanelGetProductsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetAudiobookDetails\n */\n userPanelGetAudiobookDetails: {\n methodKind: \"unary\";\n input: typeof UserPanelGetAudiobookDetailsRequestSchema;\n output: typeof UserPanelGetAudiobookDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetAudiobookDetailsDownloadURLs\n */\n userPanelGetAudiobookDetailsDownloadURLs: {\n methodKind: \"unary\";\n input: typeof UserPanelGetAudiobookDetailsDownloadURLsRequestSchema;\n output: typeof UserPanelGetAudiobookDetailsDownloadURLsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetFileDetails\n */\n userPanelGetFileDetails: {\n methodKind: \"unary\";\n input: typeof UserPanelGetFileDetailsRequestSchema;\n output: typeof UserPanelGetFileDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetTicketDetails\n */\n userPanelGetTicketDetails: {\n methodKind: \"unary\";\n input: typeof UserPanelGetTicketDetailsRequestSchema;\n output: typeof UserPanelGetTicketDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetCourseDetails\n */\n userPanelGetCourseDetails: {\n methodKind: \"unary\";\n input: typeof UserPanelGetCourseDetailsRequestSchema;\n output: typeof UserPanelGetCourseDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.PushSendDeviceToken\n */\n pushSendDeviceToken: {\n methodKind: \"unary\";\n input: typeof PushSendDeviceTokenRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.PushEvent\n */\n pushEvent: {\n methodKind: \"unary\";\n input: typeof PushEventRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * iOS SHOP methods\n *\n * @generated from rpc public_api.v1.PublicApiService.ShouldShopProducts\n */\n shouldShopProducts: {\n methodKind: \"unary\";\n input: typeof EmptySchema;\n output: typeof ShouldShopProductsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.ShouldShowGuestCatalog\n */\n shouldShowGuestCatalog: {\n methodKind: \"unary\";\n input: typeof EmptySchema;\n output: typeof ShouldShowGuestCatalogResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetGuestCatalog\n */\n getGuestCatalog: {\n methodKind: \"unary\";\n input: typeof EmptySchema;\n output: typeof GetGuestCatalogResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelResolveProductAccess\n */\n userPanelResolveProductAccess: {\n methodKind: \"unary\";\n input: typeof UserPanelResolveProductAccessRequestSchema;\n output: typeof UserPanelResolveProductAccessResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetShopProducts\n */\n getShopProducts: {\n methodKind: \"unary\";\n input: typeof GetShopProductsRequestSchema;\n output: typeof GetShopProductsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.DidBuyProduct\n */\n didBuyProduct: {\n methodKind: \"unary\";\n input: typeof DidBuyProductRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetAppStoreAccountToken\n */\n getAppStoreAccountToken: {\n methodKind: \"unary\";\n input: typeof GetAppStoreAccountTokenRequestSchema;\n output: typeof GetAppStoreAccountTokenResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.VerifyAppStorePurchase\n */\n verifyAppStorePurchase: {\n methodKind: \"unary\";\n input: typeof VerifyAppStorePurchaseRequestSchema;\n output: typeof VerifyAppStorePurchaseResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetAppStoreEntitlements\n */\n getAppStoreEntitlements: {\n methodKind: \"unary\";\n input: typeof GetAppStoreEntitlementsRequestSchema;\n output: typeof GetAppStoreEntitlementsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.RestoreAppStorePurchases\n */\n restoreAppStorePurchases: {\n methodKind: \"unary\";\n input: typeof RestoreAppStorePurchasesRequestSchema;\n output: typeof RestoreAppStorePurchasesResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.ClearAppStoreAccountToken\n */\n clearAppStoreAccountToken: {\n methodKind: \"unary\";\n input: typeof ClearAppStoreAccountTokenRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetStoreKitCatalog\n */\n getStoreKitCatalog: {\n methodKind: \"unary\";\n input: typeof GetStoreKitCatalogRequestSchema;\n output: typeof GetStoreKitCatalogResponseSchema;\n },\n /**\n * Notification settings\n *\n * @generated from rpc public_api.v1.PublicApiService.GetNotificationSettings\n */\n getNotificationSettings: {\n methodKind: \"unary\";\n input: typeof GetNotificationSettingsRequestSchema;\n output: typeof GetNotificationSettingsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetNotificationSettingsDetails\n */\n getNotificationSettingsDetails: {\n methodKind: \"unary\";\n input: typeof GetNotificationSettingsDetailsRequestSchema;\n output: typeof GetNotificationSettingsDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UpdateGlobalNotificationSettings\n */\n updateGlobalNotificationSettings: {\n methodKind: \"unary\";\n input: typeof UpdateGlobalNotificationSettingsRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.UpdateNotificationSettings\n */\n updateNotificationSettings: {\n methodKind: \"unary\";\n input: typeof UpdateNotificationSettingsRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetNotificationHistory\n */\n getNotificationHistory: {\n methodKind: \"unary\";\n input: typeof GetNotificationHistoryRequestSchema;\n output: typeof GetNotificationHistoryResponseSchema;\n },\n /**\n * Product V2 requests\n *\n * @generated from rpc public_api.v1.PublicApiService.GetAvailableCountForProduct\n */\n getAvailableCountForProduct: {\n methodKind: \"unary\";\n input: typeof GetAvailableCountForProductRequestSchema;\n output: typeof GetAvailableCountForProductResponseSchema;\n },\n /**\n * Checkout requests\n *\n * @generated from rpc public_api.v1.PublicApiService.IsOneClickPaymentAvailable\n */\n isOneClickPaymentAvailable: {\n methodKind: \"unary\";\n input: typeof IsOneClickPaymentAvailableRequestSchema;\n output: typeof IsOneClickPaymentAvailableResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetPreOrderDetails\n */\n getPreOrderDetails: {\n methodKind: \"unary\";\n input: typeof GetPreOrderDetailsRequestSchema;\n output: typeof GetPreOrderDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.ApplePayValidateMerchant\n */\n applePayValidateMerchant: {\n methodKind: \"unary\";\n input: typeof ApplePayValidateMerchantRequestSchema;\n output: typeof ApplePayValidateMerchantResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.AuthorizeOneClickPayment\n */\n authorizeOneClickPayment: {\n methodKind: \"unary\";\n input: typeof OneClickAuthorizePaymentRequestSchema;\n output: typeof OneClickAuthorizePaymentResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.NotifyUserAboutProductAvailability\n */\n notifyUserAboutProductAvailability: {\n methodKind: \"unary\";\n input: typeof NotifyUserAboutProductAvailabilityRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * Public order details (with obfuscation)\n *\n * @generated from rpc public_api.v1.PublicApiService.GetPublicOrderDetails\n */\n getPublicOrderDetails: {\n methodKind: \"unary\";\n input: typeof GetPublicOrderDetailsRequestSchema;\n output: typeof GetPublicOrderDetailsResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.AddPublicOrderComment\n */\n addPublicOrderComment: {\n methodKind: \"unary\";\n input: typeof AddPublicOrderCommentRequestSchema;\n output: typeof AddPublicOrderCommentResponseSchema;\n },\n /**\n * Testimonials\n *\n * @generated from rpc public_api.v1.PublicApiService.GetOrderForTestimonial\n */\n getOrderForTestimonial: {\n methodKind: \"unary\";\n input: typeof GetOrderForTestimonialRequestSchema;\n output: typeof GetOrderForTestimonialResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.SubmitTestimonial\n */\n submitTestimonial: {\n methodKind: \"unary\";\n input: typeof SubmitTestimonialRequestSchema;\n output: typeof SubmitTestimonialResponseSchema;\n },\n /**\n * @generated from rpc public_api.v1.PublicApiService.GetTestimonialUploadUrl\n */\n getTestimonialUploadUrl: {\n methodKind: \"unary\";\n input: typeof GetTestimonialUploadUrlRequestSchema;\n output: typeof GetTestimonialUploadUrlResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_public_v1_public_api, 0);\n\n","import type { Transport } from \"@connectrpc/connect\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport { createConnectTransport } from \"@connectrpc/connect-web\";\nimport { PublicApiService } from \"./gen/proto/public/v1/public_api_pb\";\n\nexport namespace PublicApiClient {\n export function get(host: string): Client<typeof PublicApiService> {\n return createClient(PublicApiService, getTransport(host));\n }\n\n const transports = new Map<string, Transport>();\n function getTransport(host: string): Transport {\n let transport = transports.get(host);\n if (transport == null) {\n transport = createConnectTransport({\n useBinaryFormat: true,\n baseUrl: host + \"/api/rpc\",\n });\n transports.set(host, transport);\n }\n return transport;\n }\n}\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport type Modify<T, R> = Omit<T, keyof R> & R;\n\nexport type Partial<T> = {\n [P in keyof T]?: T[P];\n};\n","export const DEFAULT_HOST = \"https://bitsnap.pl\";\nexport let HOST = DEFAULT_HOST;\n\nexport function setCustomHost(host: string) {\n console.log(\"setCustomHost\", host);\n HOST = host;\n}\n","// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts\"\n// @generated from file dashboard/v1/product.proto (package dashboard.product.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Empty, Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_empty, file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file dashboard/v1/product.proto.\n */\nexport const file_dashboard_v1_product: GenFile = /*@__PURE__*/\n fileDesc(\"ChpkYXNoYm9hcmQvdjEvcHJvZHVjdC5wcm90bxIUZGFzaGJvYXJkLnByb2R1Y3QudjEiNAoeR2V0R3Vlc3RDYXRhbG9nU2V0dGluZ3NSZXF1ZXN0EhIKCnByb2R1Y3RfaWQYASABKAkibAobU2V0R3Vlc3RDYXRhbG9nRW50cnlSZXF1ZXN0EhIKCnByb2R1Y3RfaWQYASABKAkSFAoMcHJvZHVjdF90eXBlGAIgASgJEg8KB2VuYWJsZWQYAyABKAgSEgoKc29ydF9vcmRlchgEIAEoBSL3AQofR2V0R3Vlc3RDYXRhbG9nU2V0dGluZ3NSZXNwb25zZRISCgpjYW5fbWFuYWdlGAEgASgIEh0KFWd1ZXN0X2NhdGFsb2dfZW5hYmxlZBgCIAEoCBI4CgdlbnRyaWVzGAMgAygLMicuZGFzaGJvYXJkLnByb2R1Y3QudjEuR3Vlc3RDYXRhbG9nRW50cnkSHQoVYXZhaWxhYmxlX3Byb2R1Y3RfaWRzGAQgAygJEkgKD3Byb2R1Y3Rfb3B0aW9ucxgFIAMoCzIvLmRhc2hib2FyZC5wcm9kdWN0LnYxLkd1ZXN0Q2F0YWxvZ1Byb2R1Y3RPcHRpb24iRQoZR3Vlc3RDYXRhbG9nUHJvZHVjdE9wdGlvbhISCgpwcm9kdWN0X2lkGAEgASgJEhQKDGRpc3BsYXlfbmFtZRgCIAEoCSJ+ChFHdWVzdENhdGFsb2dFbnRyeRISCgp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BlcmF0aW9uUmVzdWx0EmIKDUNyZWF0ZVByb2R1Y3QSKi5kYXNoYm9hcmQucHJvZHVjdC52MS5DcmVhdGVQcm9kdWN0UmVxdWVzdBolLmRhc2hib2FyZC5wcm9kdWN0LnYxLk9wZXJhdGlvblJlc3VsdBJiCg1EZWxldGVQcm9kdWN0EiouZGFzaGJvYXJkLnByb2R1Y3QudjEuRGVsZXRlUHJvZHVjdFJlcXVlc3QaJS5kYXNoYm9hcmQucHJvZHVjdC52MS5PcGVyYXRpb25SZXN1bHQSZwoOR2V0UHJvZHVjdEJ5SWQSKy5kYXNoYm9hcmQucHJvZHVjdC52MS5HZXRQcm9kdWN0QnlJZFJlcXVlc3QaKC5kYXNoYm9hcmQucHJvZHVjdC52MS5HZXRQcm9kdWN0UmVzcG9uc2UShgEKF0dldEd1ZXN0Q2F0YWxvZ1NldHRpbmdzEjQuZGFzaGJvYXJkLnByb2R1Y3QudjEuR2V0R3Vlc3RDYXRhbG9nU2V0dGluZ3NSZXF1ZXN0GjUuZGFzaGJvYXJkLnByb2R1Y3QudjEuR2V0R3Vlc3RDYXRhbG9nU2V0dGluZ3NSZXNwb25zZRKAAQoUU2V0R3Vlc3RDYXRhbG9nRW50cnkSMS5kYXNoYm9hcmQucHJvZHVjdC52MS5TZXRHdWVzdENhdGFsb2dFbnRyeVJlcXVlc3QaNS5kYXNoYm9hcmQucHJvZHVjdC52MS5HZXRHdWVzdENhdGFsb2dTZXR0aW5nc1Jlc3BvbnNlYgZwcm90bzM\", [file_google_protobuf_empty, file_google_protobuf_timestamp]);\n\n/**\n * @generated from message dashboard.product.v1.GetGuestCatalogSettingsRequest\n */\nexport type GetGuestCatalogSettingsRequest = Message<\"dashboard.product.v1.GetGuestCatalogSettingsRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetGuestCatalogSettingsRequest.\n * Use `create(GetGuestCatalogSettingsRequestSchema)` to create a new message.\n */\nexport const GetGuestCatalogSettingsRequestSchema: GenMessage<GetGuestCatalogSettingsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 0);\n\n/**\n * @generated from message dashboard.product.v1.SetGuestCatalogEntryRequest\n */\nexport type SetGuestCatalogEntryRequest = Message<\"dashboard.product.v1.SetGuestCatalogEntryRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: string product_type = 2;\n */\n productType: string;\n\n /**\n * @generated from field: bool enabled = 3;\n */\n enabled: boolean;\n\n /**\n * @generated from field: int32 sort_order = 4;\n */\n sortOrder: number;\n};\n\n/**\n * Describes the message dashboard.product.v1.SetGuestCatalogEntryRequest.\n * Use `create(SetGuestCatalogEntryRequestSchema)` to create a new message.\n */\nexport const SetGuestCatalogEntryRequestSchema: GenMessage<SetGuestCatalogEntryRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 1);\n\n/**\n * @generated from message dashboard.product.v1.GetGuestCatalogSettingsResponse\n */\nexport type GetGuestCatalogSettingsResponse = Message<\"dashboard.product.v1.GetGuestCatalogSettingsResponse\"> & {\n /**\n * @generated from field: bool can_manage = 1;\n */\n canManage: boolean;\n\n /**\n * @generated from field: bool guest_catalog_enabled = 2;\n */\n guestCatalogEnabled: boolean;\n\n /**\n * @generated from field: repeated dashboard.product.v1.GuestCatalogEntry entries = 3;\n */\n entries: GuestCatalogEntry[];\n\n /**\n * @generated from field: repeated string available_product_ids = 4;\n */\n availableProductIds: string[];\n\n /**\n * @generated from field: repeated dashboard.product.v1.GuestCatalogProductOption product_options = 5;\n */\n productOptions: GuestCatalogProductOption[];\n};\n\n/**\n * Describes the message dashboard.product.v1.GetGuestCatalogSettingsResponse.\n * Use `create(GetGuestCatalogSettingsResponseSchema)` to create a new message.\n */\nexport const GetGuestCatalogSettingsResponseSchema: GenMessage<GetGuestCatalogSettingsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 2);\n\n/**\n * @generated from message dashboard.product.v1.GuestCatalogProductOption\n */\nexport type GuestCatalogProductOption = Message<\"dashboard.product.v1.GuestCatalogProductOption\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: string display_name = 2;\n */\n displayName: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GuestCatalogProductOption.\n * Use `create(GuestCatalogProductOptionSchema)` to create a new message.\n */\nexport const GuestCatalogProductOptionSchema: GenMessage<GuestCatalogProductOption> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 3);\n\n/**\n * @generated from message dashboard.product.v1.GuestCatalogEntry\n */\nexport type GuestCatalogEntry = Message<\"dashboard.product.v1.GuestCatalogEntry\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: string product_type = 2;\n */\n productType: string;\n\n /**\n * @generated from field: bool enabled = 3;\n */\n enabled: boolean;\n\n /**\n * @generated from field: int32 sort_order = 4;\n */\n sortOrder: number;\n\n /**\n * @generated from field: string eligibility_reason = 5;\n */\n eligibilityReason: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GuestCatalogEntry.\n * Use `create(GuestCatalogEntrySchema)` to create a new message.\n */\nexport const GuestCatalogEntrySchema: GenMessage<GuestCatalogEntry> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 4);\n\n/**\n * @generated from message dashboard.product.v1.ArchiveProductRequest\n */\nexport type ArchiveProductRequest = Message<\"dashboard.product.v1.ArchiveProductRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.ArchiveProductRequest.\n * Use `create(ArchiveProductRequestSchema)` to create a new message.\n */\nexport const ArchiveProductRequestSchema: GenMessage<ArchiveProductRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 5);\n\n/**\n * @generated from message dashboard.product.v1.DuplicateProductRequest\n */\nexport type DuplicateProductRequest = Message<\"dashboard.product.v1.DuplicateProductRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.DuplicateProductRequest.\n * Use `create(DuplicateProductRequestSchema)` to create a new message.\n */\nexport const DuplicateProductRequestSchema: GenMessage<DuplicateProductRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 6);\n\n/**\n * @generated from message dashboard.product.v1.DuplicateProductResponse\n */\nexport type DuplicateProductResponse = Message<\"dashboard.product.v1.DuplicateProductResponse\"> & {\n /**\n * @generated from field: string duplicated_product_id = 1;\n */\n duplicatedProductId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.DuplicateProductResponse.\n * Use `create(DuplicateProductResponseSchema)` to create a new message.\n */\nexport const DuplicateProductResponseSchema: GenMessage<DuplicateProductResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 7);\n\n/**\n * @generated from message dashboard.product.v1.ExchangeProductIDsToNamesRequest\n */\nexport type ExchangeProductIDsToNamesRequest = Message<\"dashboard.product.v1.ExchangeProductIDsToNamesRequest\"> & {\n /**\n * @generated from field: repeated string product_ids = 1;\n */\n productIds: string[];\n};\n\n/**\n * Describes the message dashboard.product.v1.ExchangeProductIDsToNamesRequest.\n * Use `create(ExchangeProductIDsToNamesRequestSchema)` to create a new message.\n */\nexport const ExchangeProductIDsToNamesRequestSchema: GenMessage<ExchangeProductIDsToNamesRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 8);\n\n/**\n * @generated from message dashboard.product.v1.ExchangeProductIDsToNamesResponse\n */\nexport type ExchangeProductIDsToNamesResponse = Message<\"dashboard.product.v1.ExchangeProductIDsToNamesResponse\"> & {\n /**\n * @generated from field: map<string, string> product_names = 1;\n */\n productNames: { [key: string]: string };\n};\n\n/**\n * Describes the message dashboard.product.v1.ExchangeProductIDsToNamesResponse.\n * Use `create(ExchangeProductIDsToNamesResponseSchema)` to create a new message.\n */\nexport const ExchangeProductIDsToNamesResponseSchema: GenMessage<ExchangeProductIDsToNamesResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 9);\n\n/**\n * @generated from message dashboard.product.v1.GetFileAccessMembersRequest\n */\nexport type GetFileAccessMembersRequest = Message<\"dashboard.product.v1.GetFileAccessMembersRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: optional string search = 2;\n */\n search?: string;\n\n /**\n * @generated from field: optional string variant_id = 3;\n */\n variantId?: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetFileAccessMembersRequest.\n * Use `create(GetFileAccessMembersRequestSchema)` to create a new message.\n */\nexport const GetFileAccessMembersRequestSchema: GenMessage<GetFileAccessMembersRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 10);\n\n/**\n * @generated from message dashboard.product.v1.GetFileAccessMembersResponse\n */\nexport type GetFileAccessMembersResponse = Message<\"dashboard.product.v1.GetFileAccessMembersResponse\"> & {\n /**\n * @generated from field: repeated dashboard.product.v1.GetFileAccessMembersResponse.Value members = 1;\n */\n members: GetFileAccessMembersResponse_Value[];\n};\n\n/**\n * Describes the message dashboard.product.v1.GetFileAccessMembersResponse.\n * Use `create(GetFileAccessMembersResponseSchema)` to create a new message.\n */\nexport const GetFileAccessMembersResponseSchema: GenMessage<GetFileAccessMembersResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 11);\n\n/**\n * @generated from message dashboard.product.v1.GetFileAccessMembersResponse.Value\n */\nexport type GetFileAccessMembersResponse_Value = Message<\"dashboard.product.v1.GetFileAccessMembersResponse.Value\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string email = 2;\n */\n email: string;\n\n /**\n * @generated from field: optional google.protobuf.Timestamp created_at = 3;\n */\n createdAt?: Timestamp;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetFileAccessMembersResponse.Value.\n * Use `create(GetFileAccessMembersResponse_ValueSchema)` to create a new message.\n */\nexport const GetFileAccessMembersResponse_ValueSchema: GenMessage<GetFileAccessMembersResponse_Value> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 11, 0);\n\n/**\n * @generated from message dashboard.product.v1.GiveAccessToFileRequest\n */\nexport type GiveAccessToFileRequest = Message<\"dashboard.product.v1.GiveAccessToFileRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: optional string variant_id = 2;\n */\n variantId?: string;\n\n /**\n * @generated from field: string email = 3;\n */\n email: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GiveAccessToFileRequest.\n * Use `create(GiveAccessToFileRequestSchema)` to create a new message.\n */\nexport const GiveAccessToFileRequestSchema: GenMessage<GiveAccessToFileRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 12);\n\n/**\n * @generated from message dashboard.product.v1.GiveAccessToFileResponse\n */\nexport type GiveAccessToFileResponse = Message<\"dashboard.product.v1.GiveAccessToFileResponse\"> & {\n /**\n * @generated from field: bool success = 1;\n */\n success: boolean;\n};\n\n/**\n * Describes the message dashboard.product.v1.GiveAccessToFileResponse.\n * Use `create(GiveAccessToFileResponseSchema)` to create a new message.\n */\nexport const GiveAccessToFileResponseSchema: GenMessage<GiveAccessToFileResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 13);\n\n/**\n * @generated from message dashboard.product.v1.RemoveAccessToFileRequest\n */\nexport type RemoveAccessToFileRequest = Message<\"dashboard.product.v1.RemoveAccessToFileRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.RemoveAccessToFileRequest.\n * Use `create(RemoveAccessToFileRequestSchema)` to create a new message.\n */\nexport const RemoveAccessToFileRequestSchema: GenMessage<RemoveAccessToFileRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 14);\n\n/**\n * @generated from message dashboard.product.v1.RemoveAccessToFileResponse\n */\nexport type RemoveAccessToFileResponse = Message<\"dashboard.product.v1.RemoveAccessToFileResponse\"> & {\n /**\n * @generated from field: bool success = 1;\n */\n success: boolean;\n};\n\n/**\n * Describes the message dashboard.product.v1.RemoveAccessToFileResponse.\n * Use `create(RemoveAccessToFileResponseSchema)` to create a new message.\n */\nexport const RemoveAccessToFileResponseSchema: GenMessage<RemoveAccessToFileResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 15);\n\n/**\n * @generated from message dashboard.product.v1.SendTestEmailWithMessageRequest\n */\nexport type SendTestEmailWithMessageRequest = Message<\"dashboard.product.v1.SendTestEmailWithMessageRequest\"> & {\n /**\n * @generated from field: string email = 1;\n */\n email: string;\n\n /**\n * @generated from field: string html_message = 2;\n */\n htmlMessage: string;\n\n /**\n * @generated from field: optional string title = 3;\n */\n title?: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.SendTestEmailWithMessageRequest.\n * Use `create(SendTestEmailWithMessageRequestSchema)` to create a new message.\n */\nexport const SendTestEmailWithMessageRequestSchema: GenMessage<SendTestEmailWithMessageRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 16);\n\n/**\n * @generated from message dashboard.product.v1.GetProductVariantsRequest\n */\nexport type GetProductVariantsRequest = Message<\"dashboard.product.v1.GetProductVariantsRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductVariantsRequest.\n * Use `create(GetProductVariantsRequestSchema)` to create a new message.\n */\nexport const GetProductVariantsRequestSchema: GenMessage<GetProductVariantsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 17);\n\n/**\n * @generated from message dashboard.product.v1.GetProductVariantsResponse\n */\nexport type GetProductVariantsResponse = Message<\"dashboard.product.v1.GetProductVariantsResponse\"> & {\n /**\n * @generated from field: repeated dashboard.product.v1.GetProductVariantsResponse.SingleVariant variants = 1;\n */\n variants: GetProductVariantsResponse_SingleVariant[];\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductVariantsResponse.\n * Use `create(GetProductVariantsResponseSchema)` to create a new message.\n */\nexport const GetProductVariantsResponseSchema: GenMessage<GetProductVariantsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 18);\n\n/**\n * @generated from message dashboard.product.v1.GetProductVariantsResponse.SingleVariant\n */\nexport type GetProductVariantsResponse_SingleVariant = Message<\"dashboard.product.v1.GetProductVariantsResponse.SingleVariant\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductVariantsResponse.SingleVariant.\n * Use `create(GetProductVariantsResponse_SingleVariantSchema)` to create a new message.\n */\nexport const GetProductVariantsResponse_SingleVariantSchema: GenMessage<GetProductVariantsResponse_SingleVariant> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 18, 0);\n\n/**\n * @generated from message dashboard.product.v1.UpdateProductAfterPurchaseMessageRequest\n */\nexport type UpdateProductAfterPurchaseMessageRequest = Message<\"dashboard.product.v1.UpdateProductAfterPurchaseMessageRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: string message = 2;\n */\n message: string;\n\n /**\n * @generated from field: string html_message = 3;\n */\n htmlMessage: string;\n\n /**\n * @generated from field: optional string title = 4;\n */\n title?: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.UpdateProductAfterPurchaseMessageRequest.\n * Use `create(UpdateProductAfterPurchaseMessageRequestSchema)` to create a new message.\n */\nexport const UpdateProductAfterPurchaseMessageRequestSchema: GenMessage<UpdateProductAfterPurchaseMessageRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 19);\n\n/**\n * @generated from message dashboard.product.v1.GetProductAfterPurchaseMessageRequest\n */\nexport type GetProductAfterPurchaseMessageRequest = Message<\"dashboard.product.v1.GetProductAfterPurchaseMessageRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductAfterPurchaseMessageRequest.\n * Use `create(GetProductAfterPurchaseMessageRequestSchema)` to create a new message.\n */\nexport const GetProductAfterPurchaseMessageRequestSchema: GenMessage<GetProductAfterPurchaseMessageRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 20);\n\n/**\n * @generated from message dashboard.product.v1.GetProductAfterPurchaseMessageResponse\n */\nexport type GetProductAfterPurchaseMessageResponse = Message<\"dashboard.product.v1.GetProductAfterPurchaseMessageResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.GetProductAfterPurchaseMessageResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.GetProductAfterPurchaseMessageResponse.Success success = 1;\n */\n value: GetProductAfterPurchaseMessageResponse_Success;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductAfterPurchaseMessageResponse.\n * Use `create(GetProductAfterPurchaseMessageResponseSchema)` to create a new message.\n */\nexport const GetProductAfterPurchaseMessageResponseSchema: GenMessage<GetProductAfterPurchaseMessageResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 21);\n\n/**\n * @generated from message dashboard.product.v1.GetProductAfterPurchaseMessageResponse.Success\n */\nexport type GetProductAfterPurchaseMessageResponse_Success = Message<\"dashboard.product.v1.GetProductAfterPurchaseMessageResponse.Success\"> & {\n /**\n * @generated from field: optional string message = 1;\n */\n message?: string;\n\n /**\n * @generated from field: optional string html_message = 2;\n */\n htmlMessage?: string;\n\n /**\n * @generated from field: optional string title = 3;\n */\n title?: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductAfterPurchaseMessageResponse.Success.\n * Use `create(GetProductAfterPurchaseMessageResponse_SuccessSchema)` to create a new message.\n */\nexport const GetProductAfterPurchaseMessageResponse_SuccessSchema: GenMessage<GetProductAfterPurchaseMessageResponse_Success> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 21, 0);\n\n/**\n * @generated from message dashboard.product.v1.PublishProductIfNeededRequest\n */\nexport type PublishProductIfNeededRequest = Message<\"dashboard.product.v1.PublishProductIfNeededRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.PublishProductIfNeededRequest.\n * Use `create(PublishProductIfNeededRequestSchema)` to create a new message.\n */\nexport const PublishProductIfNeededRequestSchema: GenMessage<PublishProductIfNeededRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 22);\n\n/**\n * @generated from message dashboard.product.v1.UpdateProductSendTicketAfterPurchaseRequest\n */\nexport type UpdateProductSendTicketAfterPurchaseRequest = Message<\"dashboard.product.v1.UpdateProductSendTicketAfterPurchaseRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: bool send_ticket_after_purchase = 2;\n */\n sendTicketAfterPurchase: boolean;\n};\n\n/**\n * Describes the message dashboard.product.v1.UpdateProductSendTicketAfterPurchaseRequest.\n * Use `create(UpdateProductSendTicketAfterPurchaseRequestSchema)` to create a new message.\n */\nexport const UpdateProductSendTicketAfterPurchaseRequestSchema: GenMessage<UpdateProductSendTicketAfterPurchaseRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 23);\n\n/**\n * @generated from message dashboard.product.v1.UpdateProductAudiobookAfterPurchaseRequest\n */\nexport type UpdateProductAudiobookAfterPurchaseRequest = Message<\"dashboard.product.v1.UpdateProductAudiobookAfterPurchaseRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: string audiobook_id = 2;\n */\n audiobookId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.UpdateProductAudiobookAfterPurchaseRequest.\n * Use `create(UpdateProductAudiobookAfterPurchaseRequestSchema)` to create a new message.\n */\nexport const UpdateProductAudiobookAfterPurchaseRequestSchema: GenMessage<UpdateProductAudiobookAfterPurchaseRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 24);\n\n/**\n * @generated from message dashboard.product.v1.GetProductSendTicketAfterPurchaseRequest\n */\nexport type GetProductSendTicketAfterPurchaseRequest = Message<\"dashboard.product.v1.GetProductSendTicketAfterPurchaseRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductSendTicketAfterPurchaseRequest.\n * Use `create(GetProductSendTicketAfterPurchaseRequestSchema)` to create a new message.\n */\nexport const GetProductSendTicketAfterPurchaseRequestSchema: GenMessage<GetProductSendTicketAfterPurchaseRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 25);\n\n/**\n * @generated from message dashboard.product.v1.GetProductSendTicketAfterPurchaseResponse\n */\nexport type GetProductSendTicketAfterPurchaseResponse = Message<\"dashboard.product.v1.GetProductSendTicketAfterPurchaseResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.GetProductSendTicketAfterPurchaseResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.GetProductSendTicketAfterPurchaseResponse.Success success = 1;\n */\n value: GetProductSendTicketAfterPurchaseResponse_Success;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductSendTicketAfterPurchaseResponse.\n * Use `create(GetProductSendTicketAfterPurchaseResponseSchema)` to create a new message.\n */\nexport const GetProductSendTicketAfterPurchaseResponseSchema: GenMessage<GetProductSendTicketAfterPurchaseResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 26);\n\n/**\n * @generated from message dashboard.product.v1.GetProductSendTicketAfterPurchaseResponse.Success\n */\nexport type GetProductSendTicketAfterPurchaseResponse_Success = Message<\"dashboard.product.v1.GetProductSendTicketAfterPurchaseResponse.Success\"> & {\n /**\n * @generated from field: bool send_ticket_after_purchase = 1;\n */\n sendTicketAfterPurchase: boolean;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductSendTicketAfterPurchaseResponse.Success.\n * Use `create(GetProductSendTicketAfterPurchaseResponse_SuccessSchema)` to create a new message.\n */\nexport const GetProductSendTicketAfterPurchaseResponse_SuccessSchema: GenMessage<GetProductSendTicketAfterPurchaseResponse_Success> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 26, 0);\n\n/**\n * @generated from message dashboard.product.v1.GetProductAudiobookAfterPurchaseRequest\n */\nexport type GetProductAudiobookAfterPurchaseRequest = Message<\"dashboard.product.v1.GetProductAudiobookAfterPurchaseRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductAudiobookAfterPurchaseRequest.\n * Use `create(GetProductAudiobookAfterPurchaseRequestSchema)` to create a new message.\n */\nexport const GetProductAudiobookAfterPurchaseRequestSchema: GenMessage<GetProductAudiobookAfterPurchaseRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 27);\n\n/**\n * @generated from message dashboard.product.v1.GetProductAudiobookAfterPurchaseResponse\n */\nexport type GetProductAudiobookAfterPurchaseResponse = Message<\"dashboard.product.v1.GetProductAudiobookAfterPurchaseResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.GetProductAudiobookAfterPurchaseResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.GetProductAudiobookAfterPurchaseResponse.Success success = 1;\n */\n value: GetProductAudiobookAfterPurchaseResponse_Success;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductAudiobookAfterPurchaseResponse.\n * Use `create(GetProductAudiobookAfterPurchaseResponseSchema)` to create a new message.\n */\nexport const GetProductAudiobookAfterPurchaseResponseSchema: GenMessage<GetProductAudiobookAfterPurchaseResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 28);\n\n/**\n * @generated from message dashboard.product.v1.GetProductAudiobookAfterPurchaseResponse.Success\n */\nexport type GetProductAudiobookAfterPurchaseResponse_Success = Message<\"dashboard.product.v1.GetProductAudiobookAfterPurchaseResponse.Success\"> & {\n /**\n * @generated from field: string audiobook_id = 1;\n */\n audiobookId: string;\n\n /**\n * @generated from field: string audiobook_title = 2;\n */\n audiobookTitle: string;\n\n /**\n * @generated from field: string audiobook_image_url = 3;\n */\n audiobookImageUrl: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductAudiobookAfterPurchaseResponse.Success.\n * Use `create(GetProductAudiobookAfterPurchaseResponse_SuccessSchema)` to create a new message.\n */\nexport const GetProductAudiobookAfterPurchaseResponse_SuccessSchema: GenMessage<GetProductAudiobookAfterPurchaseResponse_Success> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 28, 0);\n\n/**\n * @generated from message dashboard.product.v1.SearchProductsRequest\n */\nexport type SearchProductsRequest = Message<\"dashboard.product.v1.SearchProductsRequest\"> & {\n /**\n * @generated from field: optional string search = 1;\n */\n search?: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.SearchProductsRequest.\n * Use `create(SearchProductsRequestSchema)` to create a new message.\n */\nexport const SearchProductsRequestSchema: GenMessage<SearchProductsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 29);\n\n/**\n * @generated from message dashboard.product.v1.SearchProductsResponse\n */\nexport type SearchProductsResponse = Message<\"dashboard.product.v1.SearchProductsResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.SearchProductsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.SearchProductsResponse.Result success = 1;\n */\n value: SearchProductsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.SearchProductsResponse.\n * Use `create(SearchProductsResponseSchema)` to create a new message.\n */\nexport const SearchProductsResponseSchema: GenMessage<SearchProductsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 30);\n\n/**\n * @generated from message dashboard.product.v1.SearchProductsResponse.SingleProduct\n */\nexport type SearchProductsResponse_SingleProduct = Message<\"dashboard.product.v1.SearchProductsResponse.SingleProduct\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string image_url = 3;\n */\n imageUrl?: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.SearchProductsResponse.SingleProduct.\n * Use `create(SearchProductsResponse_SingleProductSchema)` to create a new message.\n */\nexport const SearchProductsResponse_SingleProductSchema: GenMessage<SearchProductsResponse_SingleProduct> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 30, 0);\n\n/**\n * @generated from message dashboard.product.v1.SearchProductsResponse.Result\n */\nexport type SearchProductsResponse_Result = Message<\"dashboard.product.v1.SearchProductsResponse.Result\"> & {\n /**\n * @generated from field: repeated dashboard.product.v1.SearchProductsResponse.SingleProduct products = 1;\n */\n products: SearchProductsResponse_SingleProduct[];\n};\n\n/**\n * Describes the message dashboard.product.v1.SearchProductsResponse.Result.\n * Use `create(SearchProductsResponse_ResultSchema)` to create a new message.\n */\nexport const SearchProductsResponse_ResultSchema: GenMessage<SearchProductsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 30, 1);\n\n/**\n * @generated from message dashboard.product.v1.GetProductBoughtArticlesRequest\n */\nexport type GetProductBoughtArticlesRequest = Message<\"dashboard.product.v1.GetProductBoughtArticlesRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductBoughtArticlesRequest.\n * Use `create(GetProductBoughtArticlesRequestSchema)` to create a new message.\n */\nexport const GetProductBoughtArticlesRequestSchema: GenMessage<GetProductBoughtArticlesRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 31);\n\n/**\n * @generated from message dashboard.product.v1.GetProductBoughtArticlesResponse\n */\nexport type GetProductBoughtArticlesResponse = Message<\"dashboard.product.v1.GetProductBoughtArticlesResponse\"> & {\n /**\n * @generated from field: repeated dashboard.product.v1.ProductBoughtArticle articles = 1;\n */\n articles: ProductBoughtArticle[];\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductBoughtArticlesResponse.\n * Use `create(GetProductBoughtArticlesResponseSchema)` to create a new message.\n */\nexport const GetProductBoughtArticlesResponseSchema: GenMessage<GetProductBoughtArticlesResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 32);\n\n/**\n * @generated from message dashboard.product.v1.ProductBoughtArticle\n */\nexport type ProductBoughtArticle = Message<\"dashboard.product.v1.ProductBoughtArticle\"> & {\n /**\n * empty string if new.\n *\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string product_id = 2;\n */\n productId: string;\n\n /**\n * @generated from field: optional string content = 3;\n */\n content?: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 8;\n */\n createdAt?: Timestamp;\n};\n\n/**\n * Describes the message dashboard.product.v1.ProductBoughtArticle.\n * Use `create(ProductBoughtArticleSchema)` to create a new message.\n */\nexport const ProductBoughtArticleSchema: GenMessage<ProductBoughtArticle> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 33);\n\n/**\n * @generated from message dashboard.product.v1.UpdateProductBoughtArticleRequest\n */\nexport type UpdateProductBoughtArticleRequest = Message<\"dashboard.product.v1.UpdateProductBoughtArticleRequest\"> & {\n /**\n * @generated from field: dashboard.product.v1.ProductBoughtArticle article = 1;\n */\n article?: ProductBoughtArticle;\n};\n\n/**\n * Describes the message dashboard.product.v1.UpdateProductBoughtArticleRequest.\n * Use `create(UpdateProductBoughtArticleRequestSchema)` to create a new message.\n */\nexport const UpdateProductBoughtArticleRequestSchema: GenMessage<UpdateProductBoughtArticleRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 34);\n\n/**\n * @generated from message dashboard.product.v1.GetProductRequest\n */\nexport type GetProductRequest = Message<\"dashboard.product.v1.GetProductRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductRequest.\n * Use `create(GetProductRequestSchema)` to create a new message.\n */\nexport const GetProductRequestSchema: GenMessage<GetProductRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 35);\n\n/**\n * @generated from message dashboard.product.v1.GetProductResponse\n */\nexport type GetProductResponse = Message<\"dashboard.product.v1.GetProductResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.GetProductResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.ProductV2 product = 1;\n */\n value: ProductV2;\n case: \"product\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n\n /**\n * @generated from field: repeated dashboard.product.v1.GetProductResponse.SellStats sell_stats = 3;\n */\n sellStats: GetProductResponse_SellStats[];\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductResponse.\n * Use `create(GetProductResponseSchema)` to create a new message.\n */\nexport const GetProductResponseSchema: GenMessage<GetProductResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 36);\n\n/**\n * @generated from message dashboard.product.v1.GetProductResponse.SellStats\n */\nexport type GetProductResponse_SellStats = Message<\"dashboard.product.v1.GetProductResponse.SellStats\"> & {\n /**\n * @generated from field: string productID = 1;\n */\n productID: string;\n\n /**\n * @generated from field: int32 sold = 2;\n */\n sold: number;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductResponse.SellStats.\n * Use `create(GetProductResponse_SellStatsSchema)` to create a new message.\n */\nexport const GetProductResponse_SellStatsSchema: GenMessage<GetProductResponse_SellStats> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 36, 0);\n\n/**\n * @generated from message dashboard.product.v1.CreateOrUpdateProductRequest\n */\nexport type CreateOrUpdateProductRequest = Message<\"dashboard.product.v1.CreateOrUpdateProductRequest\"> & {\n /**\n * @generated from field: dashboard.product.v1.ProductV2 product = 1;\n */\n product?: ProductV2;\n\n /**\n * @generated from field: bool is_description_different = 2;\n */\n isDescriptionDifferent: boolean;\n};\n\n/**\n * Describes the message dashboard.product.v1.CreateOrUpdateProductRequest.\n * Use `create(CreateOrUpdateProductRequestSchema)` to create a new message.\n */\nexport const CreateOrUpdateProductRequestSchema: GenMessage<CreateOrUpdateProductRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 37);\n\n/**\n * @generated from message dashboard.product.v1.UpdateProductUniqueSlugRequest\n */\nexport type UpdateProductUniqueSlugRequest = Message<\"dashboard.product.v1.UpdateProductUniqueSlugRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: string new_unique_slug = 2;\n */\n newUniqueSlug: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.UpdateProductUniqueSlugRequest.\n * Use `create(UpdateProductUniqueSlugRequestSchema)` to create a new message.\n */\nexport const UpdateProductUniqueSlugRequestSchema: GenMessage<UpdateProductUniqueSlugRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 38);\n\n/**\n * @generated from message dashboard.product.v1.ProductV2\n */\nexport type ProductV2 = Message<\"dashboard.product.v1.ProductV2\"> & {\n /**\n * @generated from field: optional string id = 1;\n */\n id?: string;\n\n /**\n * @generated from field: string unique_slug = 2;\n */\n uniqueSlug: string;\n\n /**\n * @generated from field: string project_id = 3;\n */\n projectId: string;\n\n /**\n * @generated from field: dashboard.product.v1.ProductV2.Status status = 4;\n */\n status: ProductV2_Status;\n\n /**\n * @generated from field: optional bool is_recurring = 5;\n */\n isRecurring?: boolean;\n\n /**\n * @generated from field: optional dashboard.product.v1.Recurring recurring = 6;\n */\n recurring?: Recurring;\n\n /**\n * @generated from field: string name = 7;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 8;\n */\n description?: string;\n\n /**\n * @generated from field: optional string html_description = 9;\n */\n htmlDescription?: string;\n\n /**\n * @generated from field: optional string short_description = 10;\n */\n shortDescription?: string;\n\n /**\n * @generated from field: optional int32 price_amount = 11;\n */\n priceAmount?: number;\n\n /**\n * @generated from field: optional string price_currency = 12;\n */\n priceCurrency?: string;\n\n /**\n * @generated from field: optional float tax = 13;\n */\n tax?: number;\n\n /**\n * @generated from field: optional int32 available_quantity = 14;\n */\n availableQuantity?: number;\n\n /**\n * @generated from field: map<string, string> features = 15;\n */\n features: { [key: string]: string };\n\n /**\n * @generated from field: repeated string images = 16;\n */\n images: string[];\n\n /**\n * @generated from field: optional string thumbnail_image = 17;\n */\n thumbnailImage?: string;\n\n /**\n * @generated from field: optional string main_image = 18;\n */\n mainImage?: string;\n\n /**\n * @generated from field: repeated dashboard.product.v1.Variant variants = 19;\n */\n variants: Variant[];\n\n /**\n * @generated from field: optional bool send_ticket_after_purchase = 20;\n */\n sendTicketAfterPurchase?: boolean;\n\n /**\n * @generated from field: optional bool is_product_visible_on_list = 21;\n */\n isProductVisibleOnList?: boolean;\n\n /**\n * @generated from field: optional bool is_deliverable = 24;\n */\n isDeliverable?: boolean;\n\n /**\n * @generated from field: optional bool force_manual_payment = 29;\n */\n forceManualPayment?: boolean;\n\n /**\n * @generated from field: optional int32 weight_grams = 30;\n */\n weightGrams?: number;\n\n /**\n * @generated from field: optional int32 width_millimeters = 31;\n */\n widthMillimeters?: number;\n\n /**\n * @generated from field: optional int32 height_millimeters = 32;\n */\n heightMillimeters?: number;\n\n /**\n * @generated from field: int64 created_at = 25;\n */\n createdAt: bigint;\n\n /**\n * @generated from field: int64 updated_at = 26;\n */\n updatedAt: bigint;\n\n /**\n * @generated from field: optional int64 deleted_at = 27;\n */\n deletedAt?: bigint;\n\n /**\n * @generated from field: optional bool archived = 28;\n */\n archived?: boolean;\n\n /**\n * Monotonic conditional-save token. Clients must send the revision they read.\n *\n * @generated from field: int32 revision = 33;\n */\n revision: number;\n};\n\n/**\n * Describes the message dashboard.product.v1.ProductV2.\n * Use `create(ProductV2Schema)` to create a new message.\n */\nexport const ProductV2Schema: GenMessage<ProductV2> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 39);\n\n/**\n * @generated from enum dashboard.product.v1.ProductV2.Status\n */\nexport enum ProductV2_Status {\n /**\n * @generated from enum value: DRAFT = 0;\n */\n DRAFT = 0,\n\n /**\n * @generated from enum value: UNPUBLISHED = 1;\n */\n UNPUBLISHED = 1,\n\n /**\n * @generated from enum value: PUBLISHED = 2;\n */\n PUBLISHED = 2,\n}\n\n/**\n * Describes the enum dashboard.product.v1.ProductV2.Status.\n */\nexport const ProductV2_StatusSchema: GenEnum<ProductV2_Status> = /*@__PURE__*/\n enumDesc(file_dashboard_v1_product, 39, 0);\n\n/**\n * @generated from message dashboard.product.v1.Recurring\n */\nexport type Recurring = Message<\"dashboard.product.v1.Recurring\"> & {\n /**\n * @generated from field: dashboard.product.v1.BillingPeriod billingPeriod = 1;\n */\n billingPeriod: BillingPeriod;\n\n /**\n * @generated from field: optional int32 trial_days = 2;\n */\n trialDays?: number;\n\n /**\n * @generated from field: optional int32 number_of_payments = 3;\n */\n numberOfPayments?: number;\n\n /**\n * @generated from field: optional bool change_amount_for_currentSubscribers = 4;\n */\n changeAmountForCurrentSubscribers?: boolean;\n\n /**\n * @generated from field: optional bool remove_access_for_cancelled_subscribers = 5;\n */\n removeAccessForCancelledSubscribers?: boolean;\n\n /**\n * @generated from field: optional bool should_send_trial_period_reminder = 6;\n */\n shouldSendTrialPeriodReminder?: boolean;\n};\n\n/**\n * Describes the message dashboard.product.v1.Recurring.\n * Use `create(RecurringSchema)` to create a new message.\n */\nexport const RecurringSchema: GenMessage<Recurring> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 40);\n\n/**\n * @generated from message dashboard.product.v1.VariantDiscount\n */\nexport type VariantDiscount = Message<\"dashboard.product.v1.VariantDiscount\"> & {\n /**\n * @generated from field: dashboard.product.v1.VariantDiscount.Type type = 1;\n */\n type: VariantDiscount_Type;\n\n /**\n * Minor units for FIXED; basis points (10000 = 100%) for PERCENTAGE.\n *\n * @generated from field: int32 amount = 2;\n */\n amount: number;\n\n /**\n * Kept at field 3 for wire compatibility with the original discount model.\n *\n * @generated from field: optional google.protobuf.Timestamp end_date = 3;\n */\n endDate?: Timestamp;\n\n /**\n * @generated from field: optional string id = 4;\n */\n id?: string;\n\n /**\n * @generated from field: bool enabled = 5;\n */\n enabled: boolean;\n\n /**\n * @generated from field: optional google.protobuf.Timestamp start_date = 6;\n */\n startDate?: Timestamp;\n};\n\n/**\n * Describes the message dashboard.product.v1.VariantDiscount.\n * Use `create(VariantDiscountSchema)` to create a new message.\n */\nexport const VariantDiscountSchema: GenMessage<VariantDiscount> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 41);\n\n/**\n * @generated from enum dashboard.product.v1.VariantDiscount.Type\n */\nexport enum VariantDiscount_Type {\n /**\n * @generated from enum value: FIXED = 0;\n */\n FIXED = 0,\n\n /**\n * @generated from enum value: PERCENTAGE = 1;\n */\n PERCENTAGE = 1,\n}\n\n/**\n * Describes the enum dashboard.product.v1.VariantDiscount.Type.\n */\nexport const VariantDiscount_TypeSchema: GenEnum<VariantDiscount_Type> = /*@__PURE__*/\n enumDesc(file_dashboard_v1_product, 41, 0);\n\n/**\n * @generated from message dashboard.product.v1.Variant\n */\nexport type Variant = Message<\"dashboard.product.v1.Variant\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: optional string image_url = 4;\n */\n imageUrl?: string;\n\n /**\n * @generated from field: int32 price_amount = 5;\n */\n priceAmount: number;\n\n /**\n * @generated from field: string price_currency = 6;\n */\n priceCurrency: string;\n\n /**\n * @generated from field: optional int32 tax = 7;\n */\n tax?: number;\n\n /**\n * @generated from field: optional int32 available_quantity = 8;\n */\n availableQuantity?: number;\n\n /**\n * @generated from field: optional dashboard.product.v1.Recurring recurring = 9;\n */\n recurring?: Recurring;\n\n /**\n * @generated from field: optional bool is_deliverable = 10;\n */\n isDeliverable?: boolean;\n\n /**\n * @generated from field: optional int32 lowest_price_30_days = 11;\n */\n lowestPrice30Days?: number;\n\n /**\n * @generated from field: optional dashboard.product.v1.VariantDiscount discount = 12;\n */\n discount?: VariantDiscount;\n\n /**\n * @generated from field: optional google.protobuf.Timestamp estimated_delivery_at = 13;\n */\n estimatedDeliveryAt?: Timestamp;\n\n /**\n * @generated from field: int32 regular_price_amount = 14;\n */\n regularPriceAmount: number;\n\n /**\n * @generated from field: int32 effective_price_amount = 15;\n */\n effectivePriceAmount: number;\n\n /**\n * @generated from field: optional int32 reference_price_amount = 16;\n */\n referencePriceAmount?: number;\n\n /**\n * @generated from field: bool reference_history_available = 17;\n */\n referenceHistoryAvailable: boolean;\n\n /**\n * @generated from field: int64 price_version = 18;\n */\n priceVersion: bigint;\n\n /**\n * @generated from field: optional google.protobuf.Timestamp next_price_change_at = 19;\n */\n nextPriceChangeAt?: Timestamp;\n};\n\n/**\n * Describes the message dashboard.product.v1.Variant.\n * Use `create(VariantSchema)` to create a new message.\n */\nexport const VariantSchema: GenMessage<Variant> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 42);\n\n/**\n * @generated from message dashboard.product.v1.CreateOrUpdateProductResponse\n */\nexport type CreateOrUpdateProductResponse = Message<\"dashboard.product.v1.CreateOrUpdateProductResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.CreateOrUpdateProductResponse.result\n */\n result: {\n /**\n * @generated from field: string product_id = 1;\n */\n value: string;\n case: \"productId\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.CreateOrUpdateProductResponse.\n * Use `create(CreateOrUpdateProductResponseSchema)` to create a new message.\n */\nexport const CreateOrUpdateProductResponseSchema: GenMessage<CreateOrUpdateProductResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 43);\n\n/**\n * @generated from message dashboard.product.v1.BoolResponse\n */\nexport type BoolResponse = Message<\"dashboard.product.v1.BoolResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.BoolResponse.result\n */\n result: {\n /**\n * @generated from field: google.protobuf.Empty success = 1;\n */\n value: Empty;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.BoolResponse.\n * Use `create(BoolResponseSchema)` to create a new message.\n */\nexport const BoolResponseSchema: GenMessage<BoolResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 44);\n\n/**\n * Plain bool result message for non-success/failure RPCs\n *\n * @generated from message dashboard.product.v1.OperationResult\n */\nexport type OperationResult = Message<\"dashboard.product.v1.OperationResult\"> & {\n /**\n * @generated from field: bool success = 1;\n */\n success: boolean;\n};\n\n/**\n * Describes the message dashboard.product.v1.OperationResult.\n * Use `create(OperationResultSchema)` to create a new message.\n */\nexport const OperationResultSchema: GenMessage<OperationResult> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 45);\n\n/**\n * @generated from message dashboard.product.v1.GetProductsRequest\n */\nexport type GetProductsRequest = Message<\"dashboard.product.v1.GetProductsRequest\"> & {\n /**\n * @generated from field: optional string search = 1;\n */\n search?: string;\n\n /**\n * @generated from field: optional string type = 2;\n */\n type?: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductsRequest.\n * Use `create(GetProductsRequestSchema)` to create a new message.\n */\nexport const GetProductsRequestSchema: GenMessage<GetProductsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 46);\n\n/**\n * @generated from message dashboard.product.v1.GetProductsResponse\n */\nexport type GetProductsResponse = Message<\"dashboard.product.v1.GetProductsResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.GetProductsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.GetProductsResponse.Result success = 1;\n */\n value: GetProductsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductsResponse.\n * Use `create(GetProductsResponseSchema)` to create a new message.\n */\nexport const GetProductsResponseSchema: GenMessage<GetProductsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 47);\n\n/**\n * @generated from message dashboard.product.v1.GetProductsResponse.Result\n */\nexport type GetProductsResponse_Result = Message<\"dashboard.product.v1.GetProductsResponse.Result\"> & {\n /**\n * @generated from field: repeated string product_ids = 1;\n */\n productIds: string[];\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductsResponse.Result.\n * Use `create(GetProductsResponse_ResultSchema)` to create a new message.\n */\nexport const GetProductsResponse_ResultSchema: GenMessage<GetProductsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 47, 0);\n\n/**\n * @generated from message dashboard.product.v1.GetProductsByIdsRequest\n */\nexport type GetProductsByIdsRequest = Message<\"dashboard.product.v1.GetProductsByIdsRequest\"> & {\n /**\n * @generated from field: repeated string ids = 1;\n */\n ids: string[];\n\n /**\n * @generated from field: optional string currency = 2;\n */\n currency?: string;\n\n /**\n * @generated from field: optional string lang = 3;\n */\n lang?: string;\n\n /**\n * @generated from field: optional bool group_variants = 4;\n */\n groupVariants?: boolean;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductsByIdsRequest.\n * Use `create(GetProductsByIdsRequestSchema)` to create a new message.\n */\nexport const GetProductsByIdsRequestSchema: GenMessage<GetProductsByIdsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 48);\n\n/**\n * @generated from message dashboard.product.v1.GetProductsByIdsResponse\n */\nexport type GetProductsByIdsResponse = Message<\"dashboard.product.v1.GetProductsByIdsResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.GetProductsByIdsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.GetProductsByIdsResponse.Result success = 1;\n */\n value: GetProductsByIdsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductsByIdsResponse.\n * Use `create(GetProductsByIdsResponseSchema)` to create a new message.\n */\nexport const GetProductsByIdsResponseSchema: GenMessage<GetProductsByIdsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 49);\n\n/**\n * @generated from message dashboard.product.v1.GetProductsByIdsResponse.Product\n */\nexport type GetProductsByIdsResponse_Product = Message<\"dashboard.product.v1.GetProductsByIdsResponse.Product\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: int32 price = 3;\n */\n price: number;\n\n /**\n * @generated from field: string currency = 4;\n */\n currency: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductsByIdsResponse.Product.\n * Use `create(GetProductsByIdsResponse_ProductSchema)` to create a new message.\n */\nexport const GetProductsByIdsResponse_ProductSchema: GenMessage<GetProductsByIdsResponse_Product> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 49, 0);\n\n/**\n * @generated from message dashboard.product.v1.GetProductsByIdsResponse.Result\n */\nexport type GetProductsByIdsResponse_Result = Message<\"dashboard.product.v1.GetProductsByIdsResponse.Result\"> & {\n /**\n * @generated from field: repeated dashboard.product.v1.GetProductsByIdsResponse.Product products = 1;\n */\n products: GetProductsByIdsResponse_Product[];\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductsByIdsResponse.Result.\n * Use `create(GetProductsByIdsResponse_ResultSchema)` to create a new message.\n */\nexport const GetProductsByIdsResponse_ResultSchema: GenMessage<GetProductsByIdsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 49, 1);\n\n/**\n * @generated from message dashboard.product.v1.GetProductGridRequest\n */\nexport type GetProductGridRequest = Message<\"dashboard.product.v1.GetProductGridRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: optional string search = 2;\n */\n search?: string;\n\n /**\n * @generated from field: optional string currency = 3;\n */\n currency?: string;\n\n /**\n * @generated from field: optional bool group_variants = 4;\n */\n groupVariants?: boolean;\n\n /**\n * @generated from field: optional int32 offset = 5;\n */\n offset?: number;\n\n /**\n * @generated from field: optional int32 limit = 6;\n */\n limit?: number;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductGridRequest.\n * Use `create(GetProductGridRequestSchema)` to create a new message.\n */\nexport const GetProductGridRequestSchema: GenMessage<GetProductGridRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 50);\n\n/**\n * @generated from message dashboard.product.v1.GetProductGridResponse\n */\nexport type GetProductGridResponse = Message<\"dashboard.product.v1.GetProductGridResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.GetProductGridResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.GetProductGridResponse.Result success = 1;\n */\n value: GetProductGridResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductGridResponse.\n * Use `create(GetProductGridResponseSchema)` to create a new message.\n */\nexport const GetProductGridResponseSchema: GenMessage<GetProductGridResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 51);\n\n/**\n * @generated from message dashboard.product.v1.GetProductGridResponse.Result\n */\nexport type GetProductGridResponse_Result = Message<\"dashboard.product.v1.GetProductGridResponse.Result\"> & {\n /**\n * @generated from field: repeated string product_ids = 1;\n */\n productIds: string[];\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductGridResponse.Result.\n * Use `create(GetProductGridResponse_ResultSchema)` to create a new message.\n */\nexport const GetProductGridResponse_ResultSchema: GenMessage<GetProductGridResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 51, 0);\n\n/**\n * @generated from message dashboard.product.v1.GetMainPageProductsRequest\n */\nexport type GetMainPageProductsRequest = Message<\"dashboard.product.v1.GetMainPageProductsRequest\"> & {\n /**\n * @generated from field: optional string project_id = 1;\n */\n projectId?: string;\n\n /**\n * @generated from field: optional string search = 2;\n */\n search?: string;\n\n /**\n * @generated from field: optional int32 limit = 3;\n */\n limit?: number;\n\n /**\n * @generated from field: optional int32 offset = 4;\n */\n offset?: number;\n\n /**\n * @generated from field: optional bool include_archived = 5;\n */\n includeArchived?: boolean;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetMainPageProductsRequest.\n * Use `create(GetMainPageProductsRequestSchema)` to create a new message.\n */\nexport const GetMainPageProductsRequestSchema: GenMessage<GetMainPageProductsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 52);\n\n/**\n * @generated from message dashboard.product.v1.GetMainPageProductsResponse\n */\nexport type GetMainPageProductsResponse = Message<\"dashboard.product.v1.GetMainPageProductsResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.GetMainPageProductsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.GetMainPageProductsResponse.Result success = 1;\n */\n value: GetMainPageProductsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.GetMainPageProductsResponse.\n * Use `create(GetMainPageProductsResponseSchema)` to create a new message.\n */\nexport const GetMainPageProductsResponseSchema: GenMessage<GetMainPageProductsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 53);\n\n/**\n * @generated from message dashboard.product.v1.GetMainPageProductsResponse.Result\n */\nexport type GetMainPageProductsResponse_Result = Message<\"dashboard.product.v1.GetMainPageProductsResponse.Result\"> & {\n /**\n * @generated from field: repeated string product_ids = 1;\n */\n productIds: string[];\n\n /**\n * @generated from field: optional int32 total_count = 2;\n */\n totalCount?: number;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetMainPageProductsResponse.Result.\n * Use `create(GetMainPageProductsResponse_ResultSchema)` to create a new message.\n */\nexport const GetMainPageProductsResponse_ResultSchema: GenMessage<GetMainPageProductsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 53, 0);\n\n/**\n * @generated from message dashboard.product.v1.GetPublicProductByUniqueSlugRequest\n */\nexport type GetPublicProductByUniqueSlugRequest = Message<\"dashboard.product.v1.GetPublicProductByUniqueSlugRequest\"> & {\n /**\n * @generated from field: string unique_slug = 1;\n */\n uniqueSlug: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetPublicProductByUniqueSlugRequest.\n * Use `create(GetPublicProductByUniqueSlugRequestSchema)` to create a new message.\n */\nexport const GetPublicProductByUniqueSlugRequestSchema: GenMessage<GetPublicProductByUniqueSlugRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 54);\n\n/**\n * @generated from message dashboard.product.v1.GetPublicProductByUniqueSlugResponse\n */\nexport type GetPublicProductByUniqueSlugResponse = Message<\"dashboard.product.v1.GetPublicProductByUniqueSlugResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.GetPublicProductByUniqueSlugResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.GetPublicProductByUniqueSlugResponse.Result success = 1;\n */\n value: GetPublicProductByUniqueSlugResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.GetPublicProductByUniqueSlugResponse.\n * Use `create(GetPublicProductByUniqueSlugResponseSchema)` to create a new message.\n */\nexport const GetPublicProductByUniqueSlugResponseSchema: GenMessage<GetPublicProductByUniqueSlugResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 55);\n\n/**\n * @generated from message dashboard.product.v1.GetPublicProductByUniqueSlugResponse.Result\n */\nexport type GetPublicProductByUniqueSlugResponse_Result = Message<\"dashboard.product.v1.GetPublicProductByUniqueSlugResponse.Result\"> & {\n /**\n * @generated from field: bool success = 1;\n */\n success: boolean;\n\n /**\n * @generated from field: optional string message = 2;\n */\n message?: string;\n\n /**\n * @generated from field: string project_id = 3;\n */\n projectId: string;\n\n /**\n * @generated from field: string id = 4;\n */\n id: string;\n\n /**\n * @generated from field: string name = 5;\n */\n name: string;\n\n /**\n * @generated from field: optional string short_description = 6;\n */\n shortDescription?: string;\n\n /**\n * @generated from field: optional int32 price_amount = 7;\n */\n priceAmount?: number;\n\n /**\n * @generated from field: optional string price_currency = 8;\n */\n priceCurrency?: string;\n\n /**\n * @generated from field: optional string main_image = 9;\n */\n mainImage?: string;\n\n /**\n * @generated from field: optional string thumbnail_image = 10;\n */\n thumbnailImage?: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetPublicProductByUniqueSlugResponse.Result.\n * Use `create(GetPublicProductByUniqueSlugResponse_ResultSchema)` to create a new message.\n */\nexport const GetPublicProductByUniqueSlugResponse_ResultSchema: GenMessage<GetPublicProductByUniqueSlugResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 55, 0);\n\n/**\n * @generated from message dashboard.product.v1.GetPublicAgreementsRequest\n */\nexport type GetPublicAgreementsRequest = Message<\"dashboard.product.v1.GetPublicAgreementsRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: repeated string product_ids = 2;\n */\n productIds: string[];\n\n /**\n * @generated from field: bool contains_recurring = 3;\n */\n containsRecurring: boolean;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetPublicAgreementsRequest.\n * Use `create(GetPublicAgreementsRequestSchema)` to create a new message.\n */\nexport const GetPublicAgreementsRequestSchema: GenMessage<GetPublicAgreementsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 56);\n\n/**\n * @generated from message dashboard.product.v1.GetPublicAgreementsResponse\n */\nexport type GetPublicAgreementsResponse = Message<\"dashboard.product.v1.GetPublicAgreementsResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.GetPublicAgreementsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.GetPublicAgreementsResponse.Result success = 1;\n */\n value: GetPublicAgreementsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.GetPublicAgreementsResponse.\n * Use `create(GetPublicAgreementsResponseSchema)` to create a new message.\n */\nexport const GetPublicAgreementsResponseSchema: GenMessage<GetPublicAgreementsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 57);\n\n/**\n * @generated from message dashboard.product.v1.GetPublicAgreementsResponse.Agreement\n */\nexport type GetPublicAgreementsResponse_Agreement = Message<\"dashboard.product.v1.GetPublicAgreementsResponse.Agreement\"> & {\n /**\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * @generated from field: bool required = 2;\n */\n required: boolean;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetPublicAgreementsResponse.Agreement.\n * Use `create(GetPublicAgreementsResponse_AgreementSchema)` to create a new message.\n */\nexport const GetPublicAgreementsResponse_AgreementSchema: GenMessage<GetPublicAgreementsResponse_Agreement> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 57, 0);\n\n/**\n * @generated from message dashboard.product.v1.GetPublicAgreementsResponse.Result\n */\nexport type GetPublicAgreementsResponse_Result = Message<\"dashboard.product.v1.GetPublicAgreementsResponse.Result\"> & {\n /**\n * @generated from field: bool success = 1;\n */\n success: boolean;\n\n /**\n * @generated from field: optional string message = 2;\n */\n message?: string;\n\n /**\n * @generated from field: repeated dashboard.product.v1.GetPublicAgreementsResponse.Agreement result = 3;\n */\n result: GetPublicAgreementsResponse_Agreement[];\n};\n\n/**\n * Describes the message dashboard.product.v1.GetPublicAgreementsResponse.Result.\n * Use `create(GetPublicAgreementsResponse_ResultSchema)` to create a new message.\n */\nexport const GetPublicAgreementsResponse_ResultSchema: GenMessage<GetPublicAgreementsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 57, 1);\n\n/**\n * @generated from message dashboard.product.v1.GetEProductsAddedForThisProductRequest\n */\nexport type GetEProductsAddedForThisProductRequest = Message<\"dashboard.product.v1.GetEProductsAddedForThisProductRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetEProductsAddedForThisProductRequest.\n * Use `create(GetEProductsAddedForThisProductRequestSchema)` to create a new message.\n */\nexport const GetEProductsAddedForThisProductRequestSchema: GenMessage<GetEProductsAddedForThisProductRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 58);\n\n/**\n * @generated from message dashboard.product.v1.GetEProductsAddedForThisProductResponse\n */\nexport type GetEProductsAddedForThisProductResponse = Message<\"dashboard.product.v1.GetEProductsAddedForThisProductResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.GetEProductsAddedForThisProductResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.GetEProductsAddedForThisProductResponse.Result success = 1;\n */\n value: GetEProductsAddedForThisProductResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.GetEProductsAddedForThisProductResponse.\n * Use `create(GetEProductsAddedForThisProductResponseSchema)` to create a new message.\n */\nexport const GetEProductsAddedForThisProductResponseSchema: GenMessage<GetEProductsAddedForThisProductResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 59);\n\n/**\n * @generated from message dashboard.product.v1.GetEProductsAddedForThisProductResponse.Result\n */\nexport type GetEProductsAddedForThisProductResponse_Result = Message<\"dashboard.product.v1.GetEProductsAddedForThisProductResponse.Result\"> & {\n /**\n * @generated from field: repeated string eproduct_ids = 1;\n */\n eproductIds: string[];\n};\n\n/**\n * Describes the message dashboard.product.v1.GetEProductsAddedForThisProductResponse.Result.\n * Use `create(GetEProductsAddedForThisProductResponse_ResultSchema)` to create a new message.\n */\nexport const GetEProductsAddedForThisProductResponse_ResultSchema: GenMessage<GetEProductsAddedForThisProductResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 59, 0);\n\n/**\n * @generated from message dashboard.product.v1.UpdateEProductsAddedForThisProductRequest\n */\nexport type UpdateEProductsAddedForThisProductRequest = Message<\"dashboard.product.v1.UpdateEProductsAddedForThisProductRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: repeated string eproduct_ids = 2;\n */\n eproductIds: string[];\n};\n\n/**\n * Describes the message dashboard.product.v1.UpdateEProductsAddedForThisProductRequest.\n * Use `create(UpdateEProductsAddedForThisProductRequestSchema)` to create a new message.\n */\nexport const UpdateEProductsAddedForThisProductRequestSchema: GenMessage<UpdateEProductsAddedForThisProductRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 60);\n\n/**\n * @generated from message dashboard.product.v1.GetListOfAdditionalAgreementsRequest\n */\nexport type GetListOfAdditionalAgreementsRequest = Message<\"dashboard.product.v1.GetListOfAdditionalAgreementsRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetListOfAdditionalAgreementsRequest.\n * Use `create(GetListOfAdditionalAgreementsRequestSchema)` to create a new message.\n */\nexport const GetListOfAdditionalAgreementsRequestSchema: GenMessage<GetListOfAdditionalAgreementsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 61);\n\n/**\n * @generated from message dashboard.product.v1.AgreementOption\n */\nexport type AgreementOption = Message<\"dashboard.product.v1.AgreementOption\"> & {\n /**\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * @generated from field: bool is_required = 2;\n */\n isRequired: boolean;\n\n /**\n * @generated from field: optional string link = 3;\n */\n link?: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.AgreementOption.\n * Use `create(AgreementOptionSchema)` to create a new message.\n */\nexport const AgreementOptionSchema: GenMessage<AgreementOption> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 62);\n\n/**\n * @generated from message dashboard.product.v1.GetListOfAdditionalAgreementsResponse\n */\nexport type GetListOfAdditionalAgreementsResponse = Message<\"dashboard.product.v1.GetListOfAdditionalAgreementsResponse\"> & {\n /**\n * @generated from oneof dashboard.product.v1.GetListOfAdditionalAgreementsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.product.v1.GetListOfAdditionalAgreementsResponse.Result success = 1;\n */\n value: GetListOfAdditionalAgreementsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.product.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.product.v1.GetListOfAdditionalAgreementsResponse.\n * Use `create(GetListOfAdditionalAgreementsResponseSchema)` to create a new message.\n */\nexport const GetListOfAdditionalAgreementsResponseSchema: GenMessage<GetListOfAdditionalAgreementsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 63);\n\n/**\n * @generated from message dashboard.product.v1.GetListOfAdditionalAgreementsResponse.Result\n */\nexport type GetListOfAdditionalAgreementsResponse_Result = Message<\"dashboard.product.v1.GetListOfAdditionalAgreementsResponse.Result\"> & {\n /**\n * @generated from field: bool success = 1;\n */\n success: boolean;\n\n /**\n * @generated from field: optional string message = 2;\n */\n message?: string;\n\n /**\n * @generated from field: repeated dashboard.product.v1.AgreementOption result = 3;\n */\n result: AgreementOption[];\n};\n\n/**\n * Describes the message dashboard.product.v1.GetListOfAdditionalAgreementsResponse.Result.\n * Use `create(GetListOfAdditionalAgreementsResponse_ResultSchema)` to create a new message.\n */\nexport const GetListOfAdditionalAgreementsResponse_ResultSchema: GenMessage<GetListOfAdditionalAgreementsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 63, 0);\n\n/**\n * @generated from message dashboard.product.v1.UpdateListOfAdditionalAgreementsRequest\n */\nexport type UpdateListOfAdditionalAgreementsRequest = Message<\"dashboard.product.v1.UpdateListOfAdditionalAgreementsRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n\n /**\n * @generated from field: repeated dashboard.product.v1.AgreementOption agreements = 2;\n */\n agreements: AgreementOption[];\n};\n\n/**\n * Describes the message dashboard.product.v1.UpdateListOfAdditionalAgreementsRequest.\n * Use `create(UpdateListOfAdditionalAgreementsRequestSchema)` to create a new message.\n */\nexport const UpdateListOfAdditionalAgreementsRequestSchema: GenMessage<UpdateListOfAdditionalAgreementsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 64);\n\n/**\n * @generated from message dashboard.product.v1.CreateProductRequest\n */\nexport type CreateProductRequest = Message<\"dashboard.product.v1.CreateProductRequest\"> & {\n /**\n * @generated from field: string name = 1;\n */\n name: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.CreateProductRequest.\n * Use `create(CreateProductRequestSchema)` to create a new message.\n */\nexport const CreateProductRequestSchema: GenMessage<CreateProductRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 65);\n\n/**\n * @generated from message dashboard.product.v1.DeleteProductRequest\n */\nexport type DeleteProductRequest = Message<\"dashboard.product.v1.DeleteProductRequest\"> & {\n /**\n * @generated from field: string product_id = 1;\n */\n productId: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.DeleteProductRequest.\n * Use `create(DeleteProductRequestSchema)` to create a new message.\n */\nexport const DeleteProductRequestSchema: GenMessage<DeleteProductRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 66);\n\n/**\n * @generated from message dashboard.product.v1.GetProductByIdRequest\n */\nexport type GetProductByIdRequest = Message<\"dashboard.product.v1.GetProductByIdRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string id = 2;\n */\n id: string;\n};\n\n/**\n * Describes the message dashboard.product.v1.GetProductByIdRequest.\n * Use `create(GetProductByIdRequestSchema)` to create a new message.\n */\nexport const GetProductByIdRequestSchema: GenMessage<GetProductByIdRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_product, 67);\n\n/**\n * @generated from enum dashboard.product.v1.BillingPeriod\n */\nexport enum BillingPeriod {\n /**\n * @generated from enum value: BILLING_PERIOD_DAILY = 0;\n */\n DAILY = 0,\n\n /**\n * @generated from enum value: BILLING_PERIOD_WEEKLY = 1;\n */\n WEEKLY = 1,\n\n /**\n * @generated from enum value: BILLING_PERIOD_MONTHLY = 2;\n */\n MONTHLY = 2,\n\n /**\n * @generated from enum value: BILLING_PERIOD_QUARTERLY = 3;\n */\n QUARTERLY = 3,\n\n /**\n * @generated from enum value: BILLING_PERIOD_SEMI_ANNUALLY = 4;\n */\n SEMI_ANNUALLY = 4,\n\n /**\n * @generated from enum value: BILLING_PERIOD_ANNUALLY = 5;\n */\n ANNUALLY = 5,\n}\n\n/**\n * Describes the enum dashboard.product.v1.BillingPeriod.\n */\nexport const BillingPeriodSchema: GenEnum<BillingPeriod> = /*@__PURE__*/\n enumDesc(file_dashboard_v1_product, 0);\n\n/**\n * @generated from enum dashboard.product.v1.FailureMessage\n */\nexport enum FailureMessage {\n /**\n * @generated from enum value: FAILURE_MESSAGE_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_PROJECT_NOT_FOUND = 1;\n */\n PROJECT_NOT_FOUND = 1,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_PRODUCT_NOT_FOUND = 2;\n */\n PRODUCT_NOT_FOUND = 2,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_INVALID_PRODUCT_ID = 3;\n */\n INVALID_PRODUCT_ID = 3,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_SLUG_ALREADY_TAKEN = 4;\n */\n SLUG_ALREADY_TAKEN = 4,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_CANNOT_CREATE_PRODUCT = 5;\n */\n CANNOT_CREATE_PRODUCT = 5,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NO_ACCESS = 6;\n */\n NO_ACCESS = 6,\n}\n\n/**\n * Describes the enum dashboard.product.v1.FailureMessage.\n */\nexport const FailureMessageSchema: GenEnum<FailureMessage> = /*@__PURE__*/\n enumDesc(file_dashboard_v1_product, 1);\n\n/**\n * @generated from service dashboard.product.v1.ProductRouter\n */\nexport const ProductRouter: GenService<{\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.CreateOrUpdateProduct\n */\n createOrUpdateProduct: {\n methodKind: \"unary\";\n input: typeof CreateOrUpdateProductRequestSchema;\n output: typeof CreateOrUpdateProductResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.DuplicateProduct\n */\n duplicateProduct: {\n methodKind: \"unary\";\n input: typeof DuplicateProductRequestSchema;\n output: typeof DuplicateProductResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.UpdateProductUniqueSlug\n */\n updateProductUniqueSlug: {\n methodKind: \"unary\";\n input: typeof UpdateProductUniqueSlugRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetProduct\n */\n getProduct: {\n methodKind: \"unary\";\n input: typeof GetProductRequestSchema;\n output: typeof GetProductResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetProductSendTicketAfterPurchase\n */\n getProductSendTicketAfterPurchase: {\n methodKind: \"unary\";\n input: typeof GetProductSendTicketAfterPurchaseRequestSchema;\n output: typeof GetProductSendTicketAfterPurchaseResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetProductAudiobookAfterPurchase\n */\n getProductAudiobookAfterPurchase: {\n methodKind: \"unary\";\n input: typeof GetProductAudiobookAfterPurchaseRequestSchema;\n output: typeof GetProductAudiobookAfterPurchaseResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.UpdateProductSendTicketAfterPurchase\n */\n updateProductSendTicketAfterPurchase: {\n methodKind: \"unary\";\n input: typeof UpdateProductSendTicketAfterPurchaseRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.UpdateProductAudiobookAfterPurchase\n */\n updateProductAudiobookAfterPurchase: {\n methodKind: \"unary\";\n input: typeof UpdateProductAudiobookAfterPurchaseRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.PublishProductIfNeeded\n */\n publishProductIfNeeded: {\n methodKind: \"unary\";\n input: typeof PublishProductIfNeededRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetProductAfterPurchaseMessage\n */\n getProductAfterPurchaseMessage: {\n methodKind: \"unary\";\n input: typeof GetProductAfterPurchaseMessageRequestSchema;\n output: typeof GetProductAfterPurchaseMessageResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.UpdateProductAfterPurchaseMessage\n */\n updateProductAfterPurchaseMessage: {\n methodKind: \"unary\";\n input: typeof UpdateProductAfterPurchaseMessageRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetProductVariants\n */\n getProductVariants: {\n methodKind: \"unary\";\n input: typeof GetProductVariantsRequestSchema;\n output: typeof GetProductVariantsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.SendTestEmailWithMessage\n */\n sendTestEmailWithMessage: {\n methodKind: \"unary\";\n input: typeof SendTestEmailWithMessageRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.SearchProducts\n */\n searchProducts: {\n methodKind: \"unary\";\n input: typeof SearchProductsRequestSchema;\n output: typeof SearchProductsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.ExchangeProductIDsToNames\n */\n exchangeProductIDsToNames: {\n methodKind: \"unary\";\n input: typeof ExchangeProductIDsToNamesRequestSchema;\n output: typeof ExchangeProductIDsToNamesResponseSchema;\n },\n /**\n * After product buy methods\n *\n * @generated from rpc dashboard.product.v1.ProductRouter.GetProductBoughtArticles\n */\n getProductBoughtArticles: {\n methodKind: \"unary\";\n input: typeof GetProductBoughtArticlesRequestSchema;\n output: typeof GetProductBoughtArticlesResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.UpdateProductBoughtArticle\n */\n updateProductBoughtArticle: {\n methodKind: \"unary\";\n input: typeof UpdateProductBoughtArticleRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.AddProductBoughtArticle\n */\n addProductBoughtArticle: {\n methodKind: \"unary\";\n input: typeof ProductBoughtArticleSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetFileAccessMembers\n */\n getFileAccessMembers: {\n methodKind: \"unary\";\n input: typeof GetFileAccessMembersRequestSchema;\n output: typeof GetFileAccessMembersResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GiveAccessToFile\n */\n giveAccessToFile: {\n methodKind: \"unary\";\n input: typeof GiveAccessToFileRequestSchema;\n output: typeof GiveAccessToFileResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.RemoveAccessToFile\n */\n removeAccessToFile: {\n methodKind: \"unary\";\n input: typeof RemoveAccessToFileRequestSchema;\n output: typeof RemoveAccessToFileResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.ArchiveProduct\n */\n archiveProduct: {\n methodKind: \"unary\";\n input: typeof ArchiveProductRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.UnarchiveProduct\n */\n unarchiveProduct: {\n methodKind: \"unary\";\n input: typeof ArchiveProductRequestSchema;\n output: typeof BoolResponseSchema;\n },\n /**\n * Dashboard product procedures (ported from tRPC)\n *\n * @generated from rpc dashboard.product.v1.ProductRouter.GetProducts\n */\n getProducts: {\n methodKind: \"unary\";\n input: typeof GetProductsRequestSchema;\n output: typeof GetProductsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetProductsByIds\n */\n getProductsByIds: {\n methodKind: \"unary\";\n input: typeof GetProductsByIdsRequestSchema;\n output: typeof GetProductsByIdsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetProductGrid\n */\n getProductGrid: {\n methodKind: \"unary\";\n input: typeof GetProductGridRequestSchema;\n output: typeof GetProductGridResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetMainPageProducts\n */\n getMainPageProducts: {\n methodKind: \"unary\";\n input: typeof GetMainPageProductsRequestSchema;\n output: typeof GetMainPageProductsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetPublicProductByUniqueSlug\n */\n getPublicProductByUniqueSlug: {\n methodKind: \"unary\";\n input: typeof GetPublicProductByUniqueSlugRequestSchema;\n output: typeof GetPublicProductByUniqueSlugResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetPublicAgreements\n */\n getPublicAgreements: {\n methodKind: \"unary\";\n input: typeof GetPublicAgreementsRequestSchema;\n output: typeof GetPublicAgreementsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetEProductsAddedForThisProduct\n */\n getEProductsAddedForThisProduct: {\n methodKind: \"unary\";\n input: typeof GetEProductsAddedForThisProductRequestSchema;\n output: typeof GetEProductsAddedForThisProductResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.UpdateEProductsAddedForThisProduct\n */\n updateEProductsAddedForThisProduct: {\n methodKind: \"unary\";\n input: typeof UpdateEProductsAddedForThisProductRequestSchema;\n output: typeof OperationResultSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetListOfAdditionalAgreements\n */\n getListOfAdditionalAgreements: {\n methodKind: \"unary\";\n input: typeof GetListOfAdditionalAgreementsRequestSchema;\n output: typeof GetListOfAdditionalAgreementsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.UpdateListOfAdditionalAgreements\n */\n updateListOfAdditionalAgreements: {\n methodKind: \"unary\";\n input: typeof UpdateListOfAdditionalAgreementsRequestSchema;\n output: typeof OperationResultSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.CreateProduct\n */\n createProduct: {\n methodKind: \"unary\";\n input: typeof CreateProductRequestSchema;\n output: typeof OperationResultSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.DeleteProduct\n */\n deleteProduct: {\n methodKind: \"unary\";\n input: typeof DeleteProductRequestSchema;\n output: typeof OperationResultSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetProductById\n */\n getProductById: {\n methodKind: \"unary\";\n input: typeof GetProductByIdRequestSchema;\n output: typeof GetProductResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.GetGuestCatalogSettings\n */\n getGuestCatalogSettings: {\n methodKind: \"unary\";\n input: typeof GetGuestCatalogSettingsRequestSchema;\n output: typeof GetGuestCatalogSettingsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.product.v1.ProductRouter.SetGuestCatalogEntry\n */\n setGuestCatalogEntry: {\n methodKind: \"unary\";\n input: typeof SetGuestCatalogEntryRequestSchema;\n output: typeof GetGuestCatalogSettingsResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_dashboard_v1_product, 0);\n\n","// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts,ts_nocheck=true\"\n// @generated from file dashboard/v1/notifications.proto (package dashboard.notifications.v1, syntax proto3)\n/* eslint-disable */\n// @ts-nocheck\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { EmptySchema, Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_empty, file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { SearchProductsResponseSchema } from \"./product_pb\";\nimport { file_dashboard_v1_product } from \"./product_pb\";\nimport type { NotificationGroupHowOften } from \"../../common/v1/push_notifications_pb\";\nimport { file_common_v1_push_notifications } from \"../../common/v1/push_notifications_pb\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file dashboard/v1/notifications.proto.\n */\nexport const file_dashboard_v1_notifications: GenFile = /*@__PURE__*/\n fileDesc(\"CiBkYXNoYm9hcmQvdjEvbm90aWZpY2F0aW9ucy5wcm90bxIaZGFzaGJvYXJkLm5vdGlmaWNhdGlvbnMudjEiYAoWVmVyaWZ5VXNlckVtYWlsUmVxdWVzdBISCgVlbWFpbBgBIAEoCUgAiAEBEhEKBGNvZGUYAiABKAlIAYgBARIMCgRzbHVnGAMgASgJQggKBl9lbWFpbEIHCgVfY29kZSJ/ChdWZXJpZnlVc2VyRW1haWxSZXNwb25zZRIPCgJvaxgBI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Qubm90aWZpY2F0aW9ucy52MS5HZXROb3RpZmljYXRpb25TdGF0c1Jlc3BvbnNlYgZwcm90bzM\", [file_google_protobuf_timestamp, file_google_protobuf_empty, file_dashboard_v1_product, file_common_v1_push_notifications]);\n\n/**\n * @generated from message dashboard.notifications.v1.VerifyUserEmailRequest\n */\nexport type VerifyUserEmailRequest = Message<\"dashboard.notifications.v1.VerifyUserEmailRequest\"> & {\n /**\n * @generated from field: optional string email = 1;\n */\n email?: string;\n\n /**\n * @generated from field: optional string code = 2;\n */\n code?: string;\n\n /**\n * @generated from field: string slug = 3;\n */\n slug: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.VerifyUserEmailRequest.\n * Use `create(VerifyUserEmailRequestSchema)` to create a new message.\n */\nexport const VerifyUserEmailRequestSchema: GenMessage<VerifyUserEmailRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.VerifyUserEmailResponse\n */\nexport type VerifyUserEmailResponse = Message<\"dashboard.notifications.v1.VerifyUserEmailResponse\"> & {\n /**\n * @generated from field: optional bool ok = 1;\n */\n ok?: boolean;\n\n /**\n * @generated from field: optional string access_token = 2;\n */\n accessToken?: string;\n\n /**\n * @generated from field: optional string user_id = 3;\n */\n userId?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.VerifyUserEmailResponse.\n * Use `create(VerifyUserEmailResponseSchema)` to create a new message.\n */\nexport const VerifyUserEmailResponseSchema: GenMessage<VerifyUserEmailResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 1);\n\n/**\n * @generated from message dashboard.notifications.v1.GetUserGroupsRequest\n */\nexport type GetUserGroupsRequest = Message<\"dashboard.notifications.v1.GetUserGroupsRequest\"> & {\n /**\n * @generated from field: string slug = 1;\n */\n slug: string;\n\n /**\n * if access token is not provided, all groups are off and user needs to check which groups are for him.\n *\n * @generated from field: optional string access_token = 2;\n */\n accessToken?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetUserGroupsRequest.\n * Use `create(GetUserGroupsRequestSchema)` to create a new message.\n */\nexport const GetUserGroupsRequestSchema: GenMessage<GetUserGroupsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 2);\n\n/**\n * @generated from message dashboard.notifications.v1.GetUserGroupsResponse\n */\nexport type GetUserGroupsResponse = Message<\"dashboard.notifications.v1.GetUserGroupsResponse\"> & {\n /**\n * @generated from field: repeated dashboard.notifications.v1.GetUserGroupsResponse.Group groups = 1;\n */\n groups: GetUserGroupsResponse_Group[];\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetUserGroupsResponse.\n * Use `create(GetUserGroupsResponseSchema)` to create a new message.\n */\nexport const GetUserGroupsResponseSchema: GenMessage<GetUserGroupsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 3);\n\n/**\n * @generated from message dashboard.notifications.v1.GetUserGroupsResponse.Group\n */\nexport type GetUserGroupsResponse_Group = Message<\"dashboard.notifications.v1.GetUserGroupsResponse.Group\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: bool is_on = 4;\n */\n isOn: boolean;\n\n /**\n * @generated from field: optional common.v1.NotificationGroupHowOften how_often = 5;\n */\n howOften?: NotificationGroupHowOften;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetUserGroupsResponse.Group.\n * Use `create(GetUserGroupsResponse_GroupSchema)` to create a new message.\n */\nexport const GetUserGroupsResponse_GroupSchema: GenMessage<GetUserGroupsResponse_Group> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 3, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.UpdateUserGroupsRequest\n */\nexport type UpdateUserGroupsRequest = Message<\"dashboard.notifications.v1.UpdateUserGroupsRequest\"> & {\n /**\n * @generated from field: string slug = 1;\n */\n slug: string;\n\n /**\n * @generated from field: string user_id = 2;\n */\n userId: string;\n\n /**\n * @generated from field: repeated string group_ids = 3;\n */\n groupIds: string[];\n\n /**\n * @generated from field: optional string access_token = 4;\n */\n accessToken?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.UpdateUserGroupsRequest.\n * Use `create(UpdateUserGroupsRequestSchema)` to create a new message.\n */\nexport const UpdateUserGroupsRequestSchema: GenMessage<UpdateUserGroupsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 4);\n\n/**\n * @generated from message dashboard.notifications.v1.GetNotificationUserSettingsRequest\n */\nexport type GetNotificationUserSettingsRequest = Message<\"dashboard.notifications.v1.GetNotificationUserSettingsRequest\"> & {\n /**\n * @generated from field: string slug = 1;\n */\n slug: string;\n\n /**\n * @generated from field: string user_id = 2;\n */\n userId: string;\n\n /**\n * @generated from field: optional string access_token = 3;\n */\n accessToken?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetNotificationUserSettingsRequest.\n * Use `create(GetNotificationUserSettingsRequestSchema)` to create a new message.\n */\nexport const GetNotificationUserSettingsRequestSchema: GenMessage<GetNotificationUserSettingsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 5);\n\n/**\n * @generated from message dashboard.notifications.v1.GetNotificationUserSettingsResponse\n */\nexport type GetNotificationUserSettingsResponse = Message<\"dashboard.notifications.v1.GetNotificationUserSettingsResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.GetNotificationUserSettingsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.GetNotificationUserSettingsResponse.Result success = 1;\n */\n value: GetNotificationUserSettingsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetNotificationUserSettingsResponse.\n * Use `create(GetNotificationUserSettingsResponseSchema)` to create a new message.\n */\nexport const GetNotificationUserSettingsResponseSchema: GenMessage<GetNotificationUserSettingsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 6);\n\n/**\n * @generated from message dashboard.notifications.v1.GetNotificationUserSettingsResponse.Result\n */\nexport type GetNotificationUserSettingsResponse_Result = Message<\"dashboard.notifications.v1.GetNotificationUserSettingsResponse.Result\"> & {\n /**\n * @generated from field: string notification_setting_id = 1;\n */\n notificationSettingId: string;\n\n /**\n * @generated from field: string subscription_slug = 2;\n */\n subscriptionSlug: string;\n\n /**\n * @generated from field: bool mobile_notification_enabled = 3;\n */\n mobileNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool email_notification_enabled = 4;\n */\n emailNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool sms_notification_enabled = 5;\n */\n smsNotificationEnabled: boolean;\n\n /**\n * it can be unavailable for certain of reasons.\n *\n * @generated from field: bool email_notification_available = 6;\n */\n emailNotificationAvailable: boolean;\n\n /**\n * @generated from field: bool sms_notification_available = 7;\n */\n smsNotificationAvailable: boolean;\n\n /**\n * @generated from field: bool mobile_notification_available = 8;\n */\n mobileNotificationAvailable: boolean;\n\n /**\n * @generated from field: bool has_user_installed_app = 9;\n */\n hasUserInstalledApp: boolean;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetNotificationUserSettingsResponse.Result.\n * Use `create(GetNotificationUserSettingsResponse_ResultSchema)` to create a new message.\n */\nexport const GetNotificationUserSettingsResponse_ResultSchema: GenMessage<GetNotificationUserSettingsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 6, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.CreateNotificationSettingRequest\n */\nexport type CreateNotificationSettingRequest = Message<\"dashboard.notifications.v1.CreateNotificationSettingRequest\"> & {\n};\n\n/**\n * Describes the message dashboard.notifications.v1.CreateNotificationSettingRequest.\n * Use `create(CreateNotificationSettingRequestSchema)` to create a new message.\n */\nexport const CreateNotificationSettingRequestSchema: GenMessage<CreateNotificationSettingRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 7);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationSettingRequest\n */\nexport type ReadNotificationSettingRequest = Message<\"dashboard.notifications.v1.ReadNotificationSettingRequest\"> & {\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationSettingRequest.\n * Use `create(ReadNotificationSettingRequestSchema)` to create a new message.\n */\nexport const ReadNotificationSettingRequestSchema: GenMessage<ReadNotificationSettingRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 8);\n\n/**\n * @generated from message dashboard.notifications.v1.UpdateNotificationSettingRequest\n */\nexport type UpdateNotificationSettingRequest = Message<\"dashboard.notifications.v1.UpdateNotificationSettingRequest\"> & {\n /**\n * @generated from field: string notification_setting_id = 1;\n */\n notificationSettingId: string;\n\n /**\n * @generated from field: string subscription_slug = 2;\n */\n subscriptionSlug: string;\n\n /**\n * @generated from field: bool mobile_notification_enabled = 3;\n */\n mobileNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool email_notification_enabled = 4;\n */\n emailNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool sms_notification_enabled = 5;\n */\n smsNotificationEnabled: boolean;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.UpdateNotificationSettingRequest.\n * Use `create(UpdateNotificationSettingRequestSchema)` to create a new message.\n */\nexport const UpdateNotificationSettingRequestSchema: GenMessage<UpdateNotificationSettingRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 9);\n\n/**\n * @generated from message dashboard.notifications.v1.DeleteNotificationSettingRequest\n */\nexport type DeleteNotificationSettingRequest = Message<\"dashboard.notifications.v1.DeleteNotificationSettingRequest\"> & {\n /**\n * @generated from field: string notification_setting_id = 1;\n */\n notificationSettingId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.DeleteNotificationSettingRequest.\n * Use `create(DeleteNotificationSettingRequestSchema)` to create a new message.\n */\nexport const DeleteNotificationSettingRequestSchema: GenMessage<DeleteNotificationSettingRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 10);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationSettingResponse\n */\nexport type ReadNotificationSettingResponse = Message<\"dashboard.notifications.v1.ReadNotificationSettingResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.ReadNotificationSettingResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.ReadNotificationSettingResponse.Result success = 1;\n */\n value: ReadNotificationSettingResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationSettingResponse.\n * Use `create(ReadNotificationSettingResponseSchema)` to create a new message.\n */\nexport const ReadNotificationSettingResponseSchema: GenMessage<ReadNotificationSettingResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 11);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationSettingResponse.Result\n */\nexport type ReadNotificationSettingResponse_Result = Message<\"dashboard.notifications.v1.ReadNotificationSettingResponse.Result\"> & {\n /**\n * @generated from field: string notification_setting_id = 1;\n */\n notificationSettingId: string;\n\n /**\n * @generated from field: string subscription_slug = 2;\n */\n subscriptionSlug: string;\n\n /**\n * @generated from field: bool mobile_notification_enabled = 3;\n */\n mobileNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool email_notification_enabled = 4;\n */\n emailNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool sms_notification_enabled = 5;\n */\n smsNotificationEnabled: boolean;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationSettingResponse.Result.\n * Use `create(ReadNotificationSettingResponse_ResultSchema)` to create a new message.\n */\nexport const ReadNotificationSettingResponse_ResultSchema: GenMessage<ReadNotificationSettingResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 11, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationSettingResponse\n */\nexport type NotificationSettingResponse = Message<\"dashboard.notifications.v1.NotificationSettingResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.NotificationSettingResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.NotificationSettingResponse.Result success = 1;\n */\n value: NotificationSettingResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationSettingResponse.\n * Use `create(NotificationSettingResponseSchema)` to create a new message.\n */\nexport const NotificationSettingResponseSchema: GenMessage<NotificationSettingResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 12);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationSettingResponse.Result\n */\nexport type NotificationSettingResponse_Result = Message<\"dashboard.notifications.v1.NotificationSettingResponse.Result\"> & {\n /**\n * @generated from field: string notification_setting_id = 1;\n */\n notificationSettingId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationSettingResponse.Result.\n * Use `create(NotificationSettingResponse_ResultSchema)` to create a new message.\n */\nexport const NotificationSettingResponse_ResultSchema: GenMessage<NotificationSettingResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 12, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.CreateNotificationGroupRequest\n */\nexport type CreateNotificationGroupRequest = Message<\"dashboard.notifications.v1.CreateNotificationGroupRequest\"> & {\n /**\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 2;\n */\n description?: string;\n\n /**\n * @generated from field: optional common.v1.NotificationGroupHowOften how_often = 3;\n */\n howOften?: NotificationGroupHowOften;\n\n /**\n * @generated from field: optional bool is_public = 4;\n */\n isPublic?: boolean;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.CreateNotificationGroupRequest.\n * Use `create(CreateNotificationGroupRequestSchema)` to create a new message.\n */\nexport const CreateNotificationGroupRequestSchema: GenMessage<CreateNotificationGroupRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 13);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationGroupsRequest\n */\nexport type ReadNotificationGroupsRequest = Message<\"dashboard.notifications.v1.ReadNotificationGroupsRequest\"> & {\n /**\n * @generated from field: repeated string group_ids = 1;\n */\n groupIds: string[];\n\n /**\n * @generated from field: optional string group_name = 2;\n */\n groupName?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationGroupsRequest.\n * Use `create(ReadNotificationGroupsRequestSchema)` to create a new message.\n */\nexport const ReadNotificationGroupsRequestSchema: GenMessage<ReadNotificationGroupsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 14);\n\n/**\n * @generated from message dashboard.notifications.v1.UpdateNotificationGroupRequest\n */\nexport type UpdateNotificationGroupRequest = Message<\"dashboard.notifications.v1.UpdateNotificationGroupRequest\"> & {\n /**\n * @generated from field: string notification_group_id = 1;\n */\n notificationGroupId: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: optional common.v1.NotificationGroupHowOften how_often = 4;\n */\n howOften?: NotificationGroupHowOften;\n\n /**\n * @generated from field: optional bool is_public = 5;\n */\n isPublic?: boolean;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.UpdateNotificationGroupRequest.\n * Use `create(UpdateNotificationGroupRequestSchema)` to create a new message.\n */\nexport const UpdateNotificationGroupRequestSchema: GenMessage<UpdateNotificationGroupRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 15);\n\n/**\n * @generated from message dashboard.notifications.v1.DeleteNotificationGroupRequest\n */\nexport type DeleteNotificationGroupRequest = Message<\"dashboard.notifications.v1.DeleteNotificationGroupRequest\"> & {\n /**\n * @generated from field: string notification_group_id = 1;\n */\n notificationGroupId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.DeleteNotificationGroupRequest.\n * Use `create(DeleteNotificationGroupRequestSchema)` to create a new message.\n */\nexport const DeleteNotificationGroupRequestSchema: GenMessage<DeleteNotificationGroupRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 16);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationGroupsResponse\n */\nexport type ReadNotificationGroupsResponse = Message<\"dashboard.notifications.v1.ReadNotificationGroupsResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.ReadNotificationGroupsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.ReadNotificationGroupsResponse.Result success = 1;\n */\n value: ReadNotificationGroupsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationGroupsResponse.\n * Use `create(ReadNotificationGroupsResponseSchema)` to create a new message.\n */\nexport const ReadNotificationGroupsResponseSchema: GenMessage<ReadNotificationGroupsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 17);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationGroupsResponse.Group\n */\nexport type ReadNotificationGroupsResponse_Group = Message<\"dashboard.notifications.v1.ReadNotificationGroupsResponse.Group\"> & {\n /**\n * @generated from field: string notification_group_id = 1;\n */\n notificationGroupId: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: optional string description = 3;\n */\n description?: string;\n\n /**\n * @generated from field: optional common.v1.NotificationGroupHowOften how_often = 4;\n */\n howOften?: NotificationGroupHowOften;\n\n /**\n * @generated from field: int32 users = 5;\n */\n users: number;\n\n /**\n * @generated from field: bool is_public = 6;\n */\n isPublic: boolean;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationGroupsResponse.Group.\n * Use `create(ReadNotificationGroupsResponse_GroupSchema)` to create a new message.\n */\nexport const ReadNotificationGroupsResponse_GroupSchema: GenMessage<ReadNotificationGroupsResponse_Group> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 17, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationGroupsResponse.Result\n */\nexport type ReadNotificationGroupsResponse_Result = Message<\"dashboard.notifications.v1.ReadNotificationGroupsResponse.Result\"> & {\n /**\n * @generated from field: repeated dashboard.notifications.v1.ReadNotificationGroupsResponse.Group groups = 1;\n */\n groups: ReadNotificationGroupsResponse_Group[];\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationGroupsResponse.Result.\n * Use `create(ReadNotificationGroupsResponse_ResultSchema)` to create a new message.\n */\nexport const ReadNotificationGroupsResponse_ResultSchema: GenMessage<ReadNotificationGroupsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 17, 1);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationGroupResponse\n */\nexport type NotificationGroupResponse = Message<\"dashboard.notifications.v1.NotificationGroupResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.NotificationGroupResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.NotificationGroupResponse.Result success = 1;\n */\n value: NotificationGroupResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationGroupResponse.\n * Use `create(NotificationGroupResponseSchema)` to create a new message.\n */\nexport const NotificationGroupResponseSchema: GenMessage<NotificationGroupResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 18);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationGroupResponse.Result\n */\nexport type NotificationGroupResponse_Result = Message<\"dashboard.notifications.v1.NotificationGroupResponse.Result\"> & {\n /**\n * @generated from field: string notification_group_id = 1;\n */\n notificationGroupId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationGroupResponse.Result.\n * Use `create(NotificationGroupResponse_ResultSchema)` to create a new message.\n */\nexport const NotificationGroupResponse_ResultSchema: GenMessage<NotificationGroupResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 18, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.CreateNotificationUserRequest\n */\nexport type CreateNotificationUserRequest = Message<\"dashboard.notifications.v1.CreateNotificationUserRequest\"> & {\n /**\n * @generated from field: string slug = 1;\n */\n slug: string;\n\n /**\n * @generated from field: string email = 2;\n */\n email: string;\n\n /**\n * @generated from field: repeated string groups = 3;\n */\n groups: string[];\n\n /**\n * @generated from field: optional string phone = 4;\n */\n phone?: string;\n\n /**\n * @generated from field: optional string first_name = 5;\n */\n firstName?: string;\n\n /**\n * @generated from field: optional string last_name = 6;\n */\n lastName?: string;\n\n /**\n * @generated from field: bool mobile_notification_enabled = 7;\n */\n mobileNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool email_notification_enabled = 8;\n */\n emailNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool sms_notification_enabled = 9;\n */\n smsNotificationEnabled: boolean;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.CreateNotificationUserRequest.\n * Use `create(CreateNotificationUserRequestSchema)` to create a new message.\n */\nexport const CreateNotificationUserRequestSchema: GenMessage<CreateNotificationUserRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 19);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationUsersRequest\n */\nexport type ReadNotificationUsersRequest = Message<\"dashboard.notifications.v1.ReadNotificationUsersRequest\"> & {\n /**\n * @generated from field: repeated string user_ids = 1;\n */\n userIds: string[];\n\n /**\n * @generated from field: optional string user_email = 2;\n */\n userEmail?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationUsersRequest.\n * Use `create(ReadNotificationUsersRequestSchema)` to create a new message.\n */\nexport const ReadNotificationUsersRequestSchema: GenMessage<ReadNotificationUsersRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 20);\n\n/**\n * @generated from message dashboard.notifications.v1.UpdateNotificationUserRequest\n */\nexport type UpdateNotificationUserRequest = Message<\"dashboard.notifications.v1.UpdateNotificationUserRequest\"> & {\n /**\n * @generated from field: string slug = 1;\n */\n slug: string;\n\n /**\n * @generated from field: string notification_user_id = 2;\n */\n notificationUserId: string;\n\n /**\n * @generated from field: optional string first_name = 3;\n */\n firstName?: string;\n\n /**\n * @generated from field: optional string last_name = 4;\n */\n lastName?: string;\n\n /**\n * @generated from field: bool mobile_notification_enabled = 5;\n */\n mobileNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool email_notification_enabled = 6;\n */\n emailNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool sms_notification_enabled = 7;\n */\n smsNotificationEnabled: boolean;\n\n /**\n * @generated from field: optional string access_token = 8;\n */\n accessToken?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.UpdateNotificationUserRequest.\n * Use `create(UpdateNotificationUserRequestSchema)` to create a new message.\n */\nexport const UpdateNotificationUserRequestSchema: GenMessage<UpdateNotificationUserRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 21);\n\n/**\n * @generated from message dashboard.notifications.v1.DeleteNotificationUserRequest\n */\nexport type DeleteNotificationUserRequest = Message<\"dashboard.notifications.v1.DeleteNotificationUserRequest\"> & {\n /**\n * @generated from field: string user_id = 1;\n */\n userId: string;\n\n /**\n * @generated from field: string slug = 2;\n */\n slug: string;\n\n /**\n * @generated from field: optional string access_token = 3;\n */\n accessToken?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.DeleteNotificationUserRequest.\n * Use `create(DeleteNotificationUserRequestSchema)` to create a new message.\n */\nexport const DeleteNotificationUserRequestSchema: GenMessage<DeleteNotificationUserRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 22);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationUsersResponse\n */\nexport type ReadNotificationUsersResponse = Message<\"dashboard.notifications.v1.ReadNotificationUsersResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.ReadNotificationUsersResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.ReadNotificationUsersResponse.Result success = 1;\n */\n value: ReadNotificationUsersResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationUsersResponse.\n * Use `create(ReadNotificationUsersResponseSchema)` to create a new message.\n */\nexport const ReadNotificationUsersResponseSchema: GenMessage<ReadNotificationUsersResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 23);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationUsersResponse.Result\n */\nexport type ReadNotificationUsersResponse_Result = Message<\"dashboard.notifications.v1.ReadNotificationUsersResponse.Result\"> & {\n /**\n * @generated from field: repeated dashboard.notifications.v1.User users = 1;\n */\n users: User[];\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationUsersResponse.Result.\n * Use `create(ReadNotificationUsersResponse_ResultSchema)` to create a new message.\n */\nexport const ReadNotificationUsersResponse_ResultSchema: GenMessage<ReadNotificationUsersResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 23, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationUserResponse\n */\nexport type NotificationUserResponse = Message<\"dashboard.notifications.v1.NotificationUserResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.NotificationUserResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.NotificationUserResponse.Result success = 1;\n */\n value: NotificationUserResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n\n /**\n * @generated from field: optional string access_token = 3;\n */\n accessToken?: string;\n\n /**\n * @generated from field: optional string user_id = 4;\n */\n userId?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationUserResponse.\n * Use `create(NotificationUserResponseSchema)` to create a new message.\n */\nexport const NotificationUserResponseSchema: GenMessage<NotificationUserResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 24);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationUserResponse.Result\n */\nexport type NotificationUserResponse_Result = Message<\"dashboard.notifications.v1.NotificationUserResponse.Result\"> & {\n /**\n * @generated from field: string notification_user_id = 1;\n */\n notificationUserId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationUserResponse.Result.\n * Use `create(NotificationUserResponse_ResultSchema)` to create a new message.\n */\nexport const NotificationUserResponse_ResultSchema: GenMessage<NotificationUserResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 24, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.CreateNotificationGroupUserRequest\n */\nexport type CreateNotificationGroupUserRequest = Message<\"dashboard.notifications.v1.CreateNotificationGroupUserRequest\"> & {\n /**\n * @generated from field: string notification_group_id = 1;\n */\n notificationGroupId: string;\n\n /**\n * @generated from field: string notification_user_id = 2;\n */\n notificationUserId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.CreateNotificationGroupUserRequest.\n * Use `create(CreateNotificationGroupUserRequestSchema)` to create a new message.\n */\nexport const CreateNotificationGroupUserRequestSchema: GenMessage<CreateNotificationGroupUserRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 25);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationGroupUsersRequests\n */\nexport type ReadNotificationGroupUsersRequests = Message<\"dashboard.notifications.v1.ReadNotificationGroupUsersRequests\"> & {\n /**\n * @generated from field: repeated string group_ids = 1;\n */\n groupIds: string[];\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationGroupUsersRequests.\n * Use `create(ReadNotificationGroupUsersRequestsSchema)` to create a new message.\n */\nexport const ReadNotificationGroupUsersRequestsSchema: GenMessage<ReadNotificationGroupUsersRequests> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 26);\n\n/**\n * @generated from message dashboard.notifications.v1.UpdateNotificationGroupUserRequest\n */\nexport type UpdateNotificationGroupUserRequest = Message<\"dashboard.notifications.v1.UpdateNotificationGroupUserRequest\"> & {\n /**\n * @generated from field: string notification_group_user_id = 1;\n */\n notificationGroupUserId: string;\n\n /**\n * @generated from field: string notification_group_id = 2;\n */\n notificationGroupId: string;\n\n /**\n * @generated from field: string notification_user_id = 3;\n */\n notificationUserId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.UpdateNotificationGroupUserRequest.\n * Use `create(UpdateNotificationGroupUserRequestSchema)` to create a new message.\n */\nexport const UpdateNotificationGroupUserRequestSchema: GenMessage<UpdateNotificationGroupUserRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 27);\n\n/**\n * @generated from message dashboard.notifications.v1.DeleteNotificationGroupUserRequest\n */\nexport type DeleteNotificationGroupUserRequest = Message<\"dashboard.notifications.v1.DeleteNotificationGroupUserRequest\"> & {\n /**\n * @generated from field: string notification_group_user_id = 1;\n */\n notificationGroupUserId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.DeleteNotificationGroupUserRequest.\n * Use `create(DeleteNotificationGroupUserRequestSchema)` to create a new message.\n */\nexport const DeleteNotificationGroupUserRequestSchema: GenMessage<DeleteNotificationGroupUserRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 28);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationGroupUsersResponse\n */\nexport type ReadNotificationGroupUsersResponse = Message<\"dashboard.notifications.v1.ReadNotificationGroupUsersResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.ReadNotificationGroupUsersResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.ReadNotificationGroupUsersResponse.Result success = 1;\n */\n value: ReadNotificationGroupUsersResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationGroupUsersResponse.\n * Use `create(ReadNotificationGroupUsersResponseSchema)` to create a new message.\n */\nexport const ReadNotificationGroupUsersResponseSchema: GenMessage<ReadNotificationGroupUsersResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 29);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationGroupUsersResponse.Result\n */\nexport type ReadNotificationGroupUsersResponse_Result = Message<\"dashboard.notifications.v1.ReadNotificationGroupUsersResponse.Result\"> & {\n /**\n * @generated from field: repeated dashboard.notifications.v1.User users = 1;\n */\n users: User[];\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationGroupUsersResponse.Result.\n * Use `create(ReadNotificationGroupUsersResponse_ResultSchema)` to create a new message.\n */\nexport const ReadNotificationGroupUsersResponse_ResultSchema: GenMessage<ReadNotificationGroupUsersResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 29, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationGroupUserResponse\n */\nexport type NotificationGroupUserResponse = Message<\"dashboard.notifications.v1.NotificationGroupUserResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.NotificationGroupUserResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.NotificationGroupUserResponse.Result success = 1;\n */\n value: NotificationGroupUserResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationGroupUserResponse.\n * Use `create(NotificationGroupUserResponseSchema)` to create a new message.\n */\nexport const NotificationGroupUserResponseSchema: GenMessage<NotificationGroupUserResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 30);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationGroupUserResponse.Result\n */\nexport type NotificationGroupUserResponse_Result = Message<\"dashboard.notifications.v1.NotificationGroupUserResponse.Result\"> & {\n /**\n * @generated from field: string notification_group_user_id = 1;\n */\n notificationGroupUserId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationGroupUserResponse.Result.\n * Use `create(NotificationGroupUserResponse_ResultSchema)` to create a new message.\n */\nexport const NotificationGroupUserResponse_ResultSchema: GenMessage<NotificationGroupUserResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 30, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationMessage\n */\nexport type NotificationMessage = Message<\"dashboard.notifications.v1.NotificationMessage\"> & {\n /**\n * @generated from field: string notification_message_id = 1;\n */\n notificationMessageId: string;\n\n /**\n * @generated from field: dashboard.notifications.v1.NotificationMessageStatus status = 2;\n */\n status: NotificationMessageStatus;\n\n /**\n * @generated from field: google.protobuf.Timestamp send_at = 3;\n */\n sendAt?: Timestamp;\n\n /**\n * @generated from field: string title = 4;\n */\n title: string;\n\n /**\n * @generated from field: optional string subtitle = 5;\n */\n subtitle?: string;\n\n /**\n * @generated from field: optional string message = 6;\n */\n message?: string;\n\n /**\n * @generated from field: optional string image_url = 7;\n */\n imageUrl?: string;\n\n /**\n * @generated from field: optional string open_url = 15;\n */\n openUrl?: string;\n\n /**\n * @generated from field: repeated string groups = 8;\n */\n groups: string[];\n\n /**\n * @generated from field: repeated string products = 9;\n */\n products: string[];\n\n /**\n * @generated from field: repeated string users = 10;\n */\n users: string[];\n\n /**\n * @generated from field: bool mobile_notification_enabled = 11;\n */\n mobileNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool email_notification_enabled = 12;\n */\n emailNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool sms_notification_enabled = 13;\n */\n smsNotificationEnabled: boolean;\n\n /**\n * @generated from field: optional string error_message = 14;\n */\n errorMessage?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationMessage.\n * Use `create(NotificationMessageSchema)` to create a new message.\n */\nexport const NotificationMessageSchema: GenMessage<NotificationMessage> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 31);\n\n/**\n * @generated from message dashboard.notifications.v1.CreateNotificationMessageRequest\n */\nexport type CreateNotificationMessageRequest = Message<\"dashboard.notifications.v1.CreateNotificationMessageRequest\"> & {\n /**\n * @generated from field: dashboard.notifications.v1.NotificationMessageStatus status = 1;\n */\n status: NotificationMessageStatus;\n\n /**\n * @generated from field: google.protobuf.Timestamp send_at = 2;\n */\n sendAt?: Timestamp;\n\n /**\n * @generated from field: string title = 3;\n */\n title: string;\n\n /**\n * @generated from field: optional string subtitle = 4;\n */\n subtitle?: string;\n\n /**\n * @generated from field: optional string message = 5;\n */\n message?: string;\n\n /**\n * @generated from field: optional string image_url = 6;\n */\n imageUrl?: string;\n\n /**\n * @generated from field: optional string open_url = 13;\n */\n openUrl?: string;\n\n /**\n * @generated from field: repeated string groups = 7;\n */\n groups: string[];\n\n /**\n * @generated from field: repeated string products = 8;\n */\n products: string[];\n\n /**\n * @generated from field: repeated string users = 9;\n */\n users: string[];\n\n /**\n * @generated from field: bool mobile_notification_enabled = 10;\n */\n mobileNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool email_notification_enabled = 11;\n */\n emailNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool sms_notification_enabled = 12;\n */\n smsNotificationEnabled: boolean;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.CreateNotificationMessageRequest.\n * Use `create(CreateNotificationMessageRequestSchema)` to create a new message.\n */\nexport const CreateNotificationMessageRequestSchema: GenMessage<CreateNotificationMessageRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 32);\n\n/**\n * @generated from message dashboard.notifications.v1.GetSentNotificationMessagesRequest\n */\nexport type GetSentNotificationMessagesRequest = Message<\"dashboard.notifications.v1.GetSentNotificationMessagesRequest\"> & {\n /**\n * @generated from field: optional string notification_message_id = 1;\n */\n notificationMessageId?: string;\n\n /**\n * @generated from field: optional google.protobuf.Timestamp start_time = 2;\n */\n startTime?: Timestamp;\n\n /**\n * @generated from field: optional google.protobuf.Timestamp end_time = 3;\n */\n endTime?: Timestamp;\n\n /**\n * @generated from field: optional bool include_export_data = 4;\n */\n includeExportData?: boolean;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetSentNotificationMessagesRequest.\n * Use `create(GetSentNotificationMessagesRequestSchema)` to create a new message.\n */\nexport const GetSentNotificationMessagesRequestSchema: GenMessage<GetSentNotificationMessagesRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 33);\n\n/**\n * @generated from message dashboard.notifications.v1.GetSentNotificationMessagesResponse\n */\nexport type GetSentNotificationMessagesResponse = Message<\"dashboard.notifications.v1.GetSentNotificationMessagesResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.GetSentNotificationMessagesResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.GetSentNotificationMessagesResponse.Result success = 1;\n */\n value: GetSentNotificationMessagesResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetSentNotificationMessagesResponse.\n * Use `create(GetSentNotificationMessagesResponseSchema)` to create a new message.\n */\nexport const GetSentNotificationMessagesResponseSchema: GenMessage<GetSentNotificationMessagesResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 34);\n\n/**\n * @generated from message dashboard.notifications.v1.GetSentNotificationMessagesResponse.NotificationMessageStats\n */\nexport type GetSentNotificationMessagesResponse_NotificationMessageStats = Message<\"dashboard.notifications.v1.GetSentNotificationMessagesResponse.NotificationMessageStats\"> & {\n /**\n * @generated from field: int32 sent = 1;\n */\n sent: number;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetSentNotificationMessagesResponse.NotificationMessageStats.\n * Use `create(GetSentNotificationMessagesResponse_NotificationMessageStatsSchema)` to create a new message.\n */\nexport const GetSentNotificationMessagesResponse_NotificationMessageStatsSchema: GenMessage<GetSentNotificationMessagesResponse_NotificationMessageStats> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 34, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.GetSentNotificationMessagesResponse.Result\n */\nexport type GetSentNotificationMessagesResponse_Result = Message<\"dashboard.notifications.v1.GetSentNotificationMessagesResponse.Result\"> & {\n /**\n * @generated from field: repeated dashboard.notifications.v1.NotificationMessage notification_messages = 1;\n */\n notificationMessages: NotificationMessage[];\n\n /**\n * @generated from field: dashboard.notifications.v1.GetSentNotificationMessagesResponse.NotificationMessageStats stats = 2;\n */\n stats?: GetSentNotificationMessagesResponse_NotificationMessageStats;\n\n /**\n * @generated from field: optional bytes export_data = 3;\n */\n exportData?: Uint8Array;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetSentNotificationMessagesResponse.Result.\n * Use `create(GetSentNotificationMessagesResponse_ResultSchema)` to create a new message.\n */\nexport const GetSentNotificationMessagesResponse_ResultSchema: GenMessage<GetSentNotificationMessagesResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 34, 1);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationMessagesRequest\n */\nexport type ReadNotificationMessagesRequest = Message<\"dashboard.notifications.v1.ReadNotificationMessagesRequest\"> & {\n /**\n * @generated from field: optional string notification_message_id = 1;\n */\n notificationMessageId?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationMessagesRequest.\n * Use `create(ReadNotificationMessagesRequestSchema)` to create a new message.\n */\nexport const ReadNotificationMessagesRequestSchema: GenMessage<ReadNotificationMessagesRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 35);\n\n/**\n * @generated from message dashboard.notifications.v1.UpdateNotificationMessageRequest\n */\nexport type UpdateNotificationMessageRequest = Message<\"dashboard.notifications.v1.UpdateNotificationMessageRequest\"> & {\n /**\n * @generated from field: string notification_message_id = 1;\n */\n notificationMessageId: string;\n\n /**\n * @generated from field: dashboard.notifications.v1.NotificationMessageStatus status = 2;\n */\n status: NotificationMessageStatus;\n\n /**\n * @generated from field: google.protobuf.Timestamp send_at = 3;\n */\n sendAt?: Timestamp;\n\n /**\n * @generated from field: string title = 4;\n */\n title: string;\n\n /**\n * @generated from field: optional string subtitle = 5;\n */\n subtitle?: string;\n\n /**\n * @generated from field: optional string message = 6;\n */\n message?: string;\n\n /**\n * @generated from field: optional string image_url = 7;\n */\n imageUrl?: string;\n\n /**\n * @generated from field: repeated string groups = 8;\n */\n groups: string[];\n\n /**\n * @generated from field: repeated string products = 9;\n */\n products: string[];\n\n /**\n * @generated from field: repeated string users = 10;\n */\n users: string[];\n\n /**\n * @generated from field: bool mobile_notification_enabled = 11;\n */\n mobileNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool email_notification_enabled = 12;\n */\n emailNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool sms_notification_enabled = 13;\n */\n smsNotificationEnabled: boolean;\n\n /**\n * @generated from field: optional string error_message = 14;\n */\n errorMessage?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.UpdateNotificationMessageRequest.\n * Use `create(UpdateNotificationMessageRequestSchema)` to create a new message.\n */\nexport const UpdateNotificationMessageRequestSchema: GenMessage<UpdateNotificationMessageRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 36);\n\n/**\n * @generated from message dashboard.notifications.v1.DeleteNotificationMessageRequest\n */\nexport type DeleteNotificationMessageRequest = Message<\"dashboard.notifications.v1.DeleteNotificationMessageRequest\"> & {\n /**\n * @generated from field: string notification_message_id = 1;\n */\n notificationMessageId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.DeleteNotificationMessageRequest.\n * Use `create(DeleteNotificationMessageRequestSchema)` to create a new message.\n */\nexport const DeleteNotificationMessageRequestSchema: GenMessage<DeleteNotificationMessageRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 37);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationMessagesResponse\n */\nexport type ReadNotificationMessagesResponse = Message<\"dashboard.notifications.v1.ReadNotificationMessagesResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.ReadNotificationMessagesResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.ReadNotificationMessagesResponse.Result success = 1;\n */\n value: ReadNotificationMessagesResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationMessagesResponse.\n * Use `create(ReadNotificationMessagesResponseSchema)` to create a new message.\n */\nexport const ReadNotificationMessagesResponseSchema: GenMessage<ReadNotificationMessagesResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 38);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationMessagesResponse.Result\n */\nexport type ReadNotificationMessagesResponse_Result = Message<\"dashboard.notifications.v1.ReadNotificationMessagesResponse.Result\"> & {\n /**\n * @generated from field: repeated dashboard.notifications.v1.NotificationMessage notification_messages = 1;\n */\n notificationMessages: NotificationMessage[];\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationMessagesResponse.Result.\n * Use `create(ReadNotificationMessagesResponse_ResultSchema)` to create a new message.\n */\nexport const ReadNotificationMessagesResponse_ResultSchema: GenMessage<ReadNotificationMessagesResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 38, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationMessageResponse\n */\nexport type NotificationMessageResponse = Message<\"dashboard.notifications.v1.NotificationMessageResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.NotificationMessageResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.NotificationMessageResponse.Result success = 1;\n */\n value: NotificationMessageResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationMessageResponse.\n * Use `create(NotificationMessageResponseSchema)` to create a new message.\n */\nexport const NotificationMessageResponseSchema: GenMessage<NotificationMessageResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 39);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationMessageResponse.Result\n */\nexport type NotificationMessageResponse_Result = Message<\"dashboard.notifications.v1.NotificationMessageResponse.Result\"> & {\n /**\n * @generated from field: string notification_message_id = 1;\n */\n notificationMessageId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationMessageResponse.Result.\n * Use `create(NotificationMessageResponse_ResultSchema)` to create a new message.\n */\nexport const NotificationMessageResponse_ResultSchema: GenMessage<NotificationMessageResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 39, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.CreateNotificationMessageJobRequest\n */\nexport type CreateNotificationMessageJobRequest = Message<\"dashboard.notifications.v1.CreateNotificationMessageJobRequest\"> & {\n /**\n * @generated from field: dashboard.notifications.v1.NotificationMessageJobStatus status = 1;\n */\n status: NotificationMessageJobStatus;\n\n /**\n * @generated from field: google.protobuf.Timestamp sent_at = 2;\n */\n sentAt?: Timestamp;\n\n /**\n * @generated from field: string customer_id = 3;\n */\n customerId: string;\n\n /**\n * @generated from field: string notification_message_id = 4;\n */\n notificationMessageId: string;\n\n /**\n * @generated from field: repeated string priority = 5;\n */\n priority: string[];\n\n /**\n * @generated from field: optional string error_message = 6;\n */\n errorMessage?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.CreateNotificationMessageJobRequest.\n * Use `create(CreateNotificationMessageJobRequestSchema)` to create a new message.\n */\nexport const CreateNotificationMessageJobRequestSchema: GenMessage<CreateNotificationMessageJobRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 40);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationMessageJobsRequest\n */\nexport type ReadNotificationMessageJobsRequest = Message<\"dashboard.notifications.v1.ReadNotificationMessageJobsRequest\"> & {\n /**\n * @generated from field: optional string notification_message_job_id = 1;\n */\n notificationMessageJobId?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationMessageJobsRequest.\n * Use `create(ReadNotificationMessageJobsRequestSchema)` to create a new message.\n */\nexport const ReadNotificationMessageJobsRequestSchema: GenMessage<ReadNotificationMessageJobsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 41);\n\n/**\n * @generated from message dashboard.notifications.v1.UpdateNotificationMessageJobRequest\n */\nexport type UpdateNotificationMessageJobRequest = Message<\"dashboard.notifications.v1.UpdateNotificationMessageJobRequest\"> & {\n /**\n * @generated from field: string notification_message_job_id = 1;\n */\n notificationMessageJobId: string;\n\n /**\n * @generated from field: dashboard.notifications.v1.NotificationMessageJobStatus status = 2;\n */\n status: NotificationMessageJobStatus;\n\n /**\n * @generated from field: google.protobuf.Timestamp sent_at = 3;\n */\n sentAt?: Timestamp;\n\n /**\n * @generated from field: optional string error_message = 4;\n */\n errorMessage?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.UpdateNotificationMessageJobRequest.\n * Use `create(UpdateNotificationMessageJobRequestSchema)` to create a new message.\n */\nexport const UpdateNotificationMessageJobRequestSchema: GenMessage<UpdateNotificationMessageJobRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 42);\n\n/**\n * @generated from message dashboard.notifications.v1.DeleteNotificationMessageJobRequest\n */\nexport type DeleteNotificationMessageJobRequest = Message<\"dashboard.notifications.v1.DeleteNotificationMessageJobRequest\"> & {\n /**\n * @generated from field: string notification_message_job_id = 1;\n */\n notificationMessageJobId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.DeleteNotificationMessageJobRequest.\n * Use `create(DeleteNotificationMessageJobRequestSchema)` to create a new message.\n */\nexport const DeleteNotificationMessageJobRequestSchema: GenMessage<DeleteNotificationMessageJobRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 43);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationMessageJobsResponse\n */\nexport type ReadNotificationMessageJobsResponse = Message<\"dashboard.notifications.v1.ReadNotificationMessageJobsResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.ReadNotificationMessageJobsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.ReadNotificationMessageJobsResponse.Result success = 1;\n */\n value: ReadNotificationMessageJobsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationMessageJobsResponse.\n * Use `create(ReadNotificationMessageJobsResponseSchema)` to create a new message.\n */\nexport const ReadNotificationMessageJobsResponseSchema: GenMessage<ReadNotificationMessageJobsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 44);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationMessageJobsResponse.NotificationMessageJob\n */\nexport type ReadNotificationMessageJobsResponse_NotificationMessageJob = Message<\"dashboard.notifications.v1.ReadNotificationMessageJobsResponse.NotificationMessageJob\"> & {\n /**\n * @generated from field: string notification_message_job_id = 1;\n */\n notificationMessageJobId: string;\n\n /**\n * @generated from field: dashboard.notifications.v1.NotificationMessageJobStatus status = 2;\n */\n status: NotificationMessageJobStatus;\n\n /**\n * @generated from field: google.protobuf.Timestamp sent_at = 3;\n */\n sentAt?: Timestamp;\n\n /**\n * @generated from field: string customer_id = 4;\n */\n customerId: string;\n\n /**\n * @generated from field: string notification_message_id = 5;\n */\n notificationMessageId: string;\n\n /**\n * @generated from field: repeated string priority = 6;\n */\n priority: string[];\n\n /**\n * @generated from field: optional string error_message = 7;\n */\n errorMessage?: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationMessageJobsResponse.NotificationMessageJob.\n * Use `create(ReadNotificationMessageJobsResponse_NotificationMessageJobSchema)` to create a new message.\n */\nexport const ReadNotificationMessageJobsResponse_NotificationMessageJobSchema: GenMessage<ReadNotificationMessageJobsResponse_NotificationMessageJob> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 44, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationMessageJobsResponse.Result\n */\nexport type ReadNotificationMessageJobsResponse_Result = Message<\"dashboard.notifications.v1.ReadNotificationMessageJobsResponse.Result\"> & {\n /**\n * @generated from field: repeated dashboard.notifications.v1.ReadNotificationMessageJobsResponse.NotificationMessageJob notification_message_jobs = 1;\n */\n notificationMessageJobs: ReadNotificationMessageJobsResponse_NotificationMessageJob[];\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationMessageJobsResponse.Result.\n * Use `create(ReadNotificationMessageJobsResponse_ResultSchema)` to create a new message.\n */\nexport const ReadNotificationMessageJobsResponse_ResultSchema: GenMessage<ReadNotificationMessageJobsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 44, 1);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationMessageJobResponse\n */\nexport type NotificationMessageJobResponse = Message<\"dashboard.notifications.v1.NotificationMessageJobResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.NotificationMessageJobResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.NotificationMessageJobResponse.Result success = 1;\n */\n value: NotificationMessageJobResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationMessageJobResponse.\n * Use `create(NotificationMessageJobResponseSchema)` to create a new message.\n */\nexport const NotificationMessageJobResponseSchema: GenMessage<NotificationMessageJobResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 45);\n\n/**\n * @generated from message dashboard.notifications.v1.NotificationMessageJobResponse.Result\n */\nexport type NotificationMessageJobResponse_Result = Message<\"dashboard.notifications.v1.NotificationMessageJobResponse.Result\"> & {\n /**\n * @generated from field: string notification_message_job_id = 1;\n */\n notificationMessageJobId: string;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.NotificationMessageJobResponse.Result.\n * Use `create(NotificationMessageJobResponse_ResultSchema)` to create a new message.\n */\nexport const NotificationMessageJobResponse_ResultSchema: GenMessage<NotificationMessageJobResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 45, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.User\n */\nexport type User = Message<\"dashboard.notifications.v1.User\"> & {\n /**\n * @generated from field: string notification_user_id = 1;\n */\n notificationUserId: string;\n\n /**\n * @generated from field: string email = 2;\n */\n email: string;\n\n /**\n * @generated from field: optional string first_name = 3;\n */\n firstName?: string;\n\n /**\n * @generated from field: optional string last_name = 4;\n */\n lastName?: string;\n\n /**\n * @generated from field: bool mobile_notification_enabled = 5;\n */\n mobileNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool email_notification_enabled = 6;\n */\n emailNotificationEnabled: boolean;\n\n /**\n * @generated from field: bool sms_notification_enabled = 7;\n */\n smsNotificationEnabled: boolean;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 8;\n */\n createdAt?: Timestamp;\n\n /**\n * @generated from field: optional bool is_app_installed = 9;\n */\n isAppInstalled?: boolean;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.User.\n * Use `create(UserSchema)` to create a new message.\n */\nexport const UserSchema: GenMessage<User> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 46);\n\n/**\n * @generated from message dashboard.notifications.v1.ReadNotificationProductsRequest\n */\nexport type ReadNotificationProductsRequest = Message<\"dashboard.notifications.v1.ReadNotificationProductsRequest\"> & {\n /**\n * @generated from field: repeated string product_ids = 1;\n */\n productIds: string[];\n};\n\n/**\n * Describes the message dashboard.notifications.v1.ReadNotificationProductsRequest.\n * Use `create(ReadNotificationProductsRequestSchema)` to create a new message.\n */\nexport const ReadNotificationProductsRequestSchema: GenMessage<ReadNotificationProductsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 47);\n\n/**\n * @generated from message dashboard.notifications.v1.GetProjectedRecipientCountRequest\n */\nexport type GetProjectedRecipientCountRequest = Message<\"dashboard.notifications.v1.GetProjectedRecipientCountRequest\"> & {\n /**\n * @generated from field: repeated string groups = 1;\n */\n groups: string[];\n\n /**\n * @generated from field: repeated string products = 2;\n */\n products: string[];\n\n /**\n * @generated from field: repeated string users = 3;\n */\n users: string[];\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetProjectedRecipientCountRequest.\n * Use `create(GetProjectedRecipientCountRequestSchema)` to create a new message.\n */\nexport const GetProjectedRecipientCountRequestSchema: GenMessage<GetProjectedRecipientCountRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 48);\n\n/**\n * @generated from message dashboard.notifications.v1.GetProjectedRecipientCountResponse\n */\nexport type GetProjectedRecipientCountResponse = Message<\"dashboard.notifications.v1.GetProjectedRecipientCountResponse\"> & {\n /**\n * @generated from field: int32 total = 1;\n */\n total: number;\n\n /**\n * @generated from field: int32 email_count = 2;\n */\n emailCount: number;\n\n /**\n * @generated from field: int32 sms_count = 3;\n */\n smsCount: number;\n\n /**\n * @generated from field: int32 mobile_count = 4;\n */\n mobileCount: number;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetProjectedRecipientCountResponse.\n * Use `create(GetProjectedRecipientCountResponseSchema)` to create a new message.\n */\nexport const GetProjectedRecipientCountResponseSchema: GenMessage<GetProjectedRecipientCountResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 49);\n\n/**\n * @generated from message dashboard.notifications.v1.GetNotificationStatsRequest\n */\nexport type GetNotificationStatsRequest = Message<\"dashboard.notifications.v1.GetNotificationStatsRequest\"> & {\n /**\n * @generated from field: optional google.protobuf.Timestamp start_time = 1;\n */\n startTime?: Timestamp;\n\n /**\n * @generated from field: optional google.protobuf.Timestamp end_time = 2;\n */\n endTime?: Timestamp;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetNotificationStatsRequest.\n * Use `create(GetNotificationStatsRequestSchema)` to create a new message.\n */\nexport const GetNotificationStatsRequestSchema: GenMessage<GetNotificationStatsRequest> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 50);\n\n/**\n * @generated from message dashboard.notifications.v1.GetNotificationStatsResponse\n */\nexport type GetNotificationStatsResponse = Message<\"dashboard.notifications.v1.GetNotificationStatsResponse\"> & {\n /**\n * @generated from oneof dashboard.notifications.v1.GetNotificationStatsResponse.result\n */\n result: {\n /**\n * @generated from field: dashboard.notifications.v1.GetNotificationStatsResponse.Result success = 1;\n */\n value: GetNotificationStatsResponse_Result;\n case: \"success\";\n } | {\n /**\n * @generated from field: dashboard.notifications.v1.FailureMessage failure = 2;\n */\n value: FailureMessage;\n case: \"failure\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetNotificationStatsResponse.\n * Use `create(GetNotificationStatsResponseSchema)` to create a new message.\n */\nexport const GetNotificationStatsResponseSchema: GenMessage<GetNotificationStatsResponse> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 51);\n\n/**\n * @generated from message dashboard.notifications.v1.GetNotificationStatsResponse.StatusBreakdown\n */\nexport type GetNotificationStatsResponse_StatusBreakdown = Message<\"dashboard.notifications.v1.GetNotificationStatsResponse.StatusBreakdown\"> & {\n /**\n * @generated from field: int32 drafts = 1;\n */\n drafts: number;\n\n /**\n * @generated from field: int32 planned = 2;\n */\n planned: number;\n\n /**\n * @generated from field: int32 in_progress = 3;\n */\n inProgress: number;\n\n /**\n * @generated from field: int32 sent = 4;\n */\n sent: number;\n\n /**\n * @generated from field: int32 error = 5;\n */\n error: number;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetNotificationStatsResponse.StatusBreakdown.\n * Use `create(GetNotificationStatsResponse_StatusBreakdownSchema)` to create a new message.\n */\nexport const GetNotificationStatsResponse_StatusBreakdownSchema: GenMessage<GetNotificationStatsResponse_StatusBreakdown> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 51, 0);\n\n/**\n * @generated from message dashboard.notifications.v1.GetNotificationStatsResponse.ChannelBreakdown\n */\nexport type GetNotificationStatsResponse_ChannelBreakdown = Message<\"dashboard.notifications.v1.GetNotificationStatsResponse.ChannelBreakdown\"> & {\n /**\n * @generated from field: int32 mobile = 1;\n */\n mobile: number;\n\n /**\n * @generated from field: int32 email = 2;\n */\n email: number;\n\n /**\n * @generated from field: int32 sms = 3;\n */\n sms: number;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetNotificationStatsResponse.ChannelBreakdown.\n * Use `create(GetNotificationStatsResponse_ChannelBreakdownSchema)` to create a new message.\n */\nexport const GetNotificationStatsResponse_ChannelBreakdownSchema: GenMessage<GetNotificationStatsResponse_ChannelBreakdown> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 51, 1);\n\n/**\n * @generated from message dashboard.notifications.v1.GetNotificationStatsResponse.TimelinePoint\n */\nexport type GetNotificationStatsResponse_TimelinePoint = Message<\"dashboard.notifications.v1.GetNotificationStatsResponse.TimelinePoint\"> & {\n /**\n * @generated from field: string date = 1;\n */\n date: string;\n\n /**\n * @generated from field: int32 count = 2;\n */\n count: number;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetNotificationStatsResponse.TimelinePoint.\n * Use `create(GetNotificationStatsResponse_TimelinePointSchema)` to create a new message.\n */\nexport const GetNotificationStatsResponse_TimelinePointSchema: GenMessage<GetNotificationStatsResponse_TimelinePoint> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 51, 2);\n\n/**\n * @generated from message dashboard.notifications.v1.GetNotificationStatsResponse.Result\n */\nexport type GetNotificationStatsResponse_Result = Message<\"dashboard.notifications.v1.GetNotificationStatsResponse.Result\"> & {\n /**\n * @generated from field: dashboard.notifications.v1.GetNotificationStatsResponse.StatusBreakdown status_breakdown = 1;\n */\n statusBreakdown?: GetNotificationStatsResponse_StatusBreakdown;\n\n /**\n * @generated from field: dashboard.notifications.v1.GetNotificationStatsResponse.ChannelBreakdown channel_breakdown = 2;\n */\n channelBreakdown?: GetNotificationStatsResponse_ChannelBreakdown;\n\n /**\n * @generated from field: repeated dashboard.notifications.v1.GetNotificationStatsResponse.TimelinePoint timeline = 3;\n */\n timeline: GetNotificationStatsResponse_TimelinePoint[];\n\n /**\n * @generated from field: int32 total_subscribers = 4;\n */\n totalSubscribers: number;\n};\n\n/**\n * Describes the message dashboard.notifications.v1.GetNotificationStatsResponse.Result.\n * Use `create(GetNotificationStatsResponse_ResultSchema)` to create a new message.\n */\nexport const GetNotificationStatsResponse_ResultSchema: GenMessage<GetNotificationStatsResponse_Result> = /*@__PURE__*/\n messageDesc(file_dashboard_v1_notifications, 51, 3);\n\n/**\n * @generated from enum dashboard.notifications.v1.NotificationMessageStatus\n */\nexport enum NotificationMessageStatus {\n /**\n * @generated from enum value: DRAFT = 0;\n */\n DRAFT = 0,\n\n /**\n * @generated from enum value: PLANNED = 1;\n */\n PLANNED = 1,\n\n /**\n * @generated from enum value: IN_PROGRESS = 2;\n */\n IN_PROGRESS = 2,\n\n /**\n * @generated from enum value: SENT = 3;\n */\n SENT = 3,\n\n /**\n * @generated from enum value: ERROR = 4;\n */\n ERROR = 4,\n}\n\n/**\n * Describes the enum dashboard.notifications.v1.NotificationMessageStatus.\n */\nexport const NotificationMessageStatusSchema: GenEnum<NotificationMessageStatus> = /*@__PURE__*/\n enumDesc(file_dashboard_v1_notifications, 0);\n\n/**\n * @generated from enum dashboard.notifications.v1.NotificationMessageJobStatus\n */\nexport enum NotificationMessageJobStatus {\n /**\n * @generated from enum value: NOTIFICATION_MESSAGE_JOB_STATUS_TODO = 0;\n */\n TODO = 0,\n\n /**\n * @generated from enum value: NOTIFICATION_MESSAGE_JOB_STATUS_IN_PROGRESS = 1;\n */\n IN_PROGRESS = 1,\n\n /**\n * @generated from enum value: NOTIFICATION_MESSAGE_JOB_STATUS_SENT = 2;\n */\n SENT = 2,\n\n /**\n * @generated from enum value: NOTIFICATION_MESSAGE_JOB_STATUS_ERROR = 3;\n */\n ERROR = 3,\n}\n\n/**\n * Describes the enum dashboard.notifications.v1.NotificationMessageJobStatus.\n */\nexport const NotificationMessageJobStatusSchema: GenEnum<NotificationMessageJobStatus> = /*@__PURE__*/\n enumDesc(file_dashboard_v1_notifications, 1);\n\n/**\n * @generated from enum dashboard.notifications.v1.FailureMessage\n */\nexport enum FailureMessage {\n /**\n * @generated from enum value: FAILURE_MESSAGE_UNKNOWN = 0;\n */\n UNKNOWN = 0,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_PROJECT_NOT_FOUND = 1;\n */\n PROJECT_NOT_FOUND = 1,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_SETTING_NOT_FOUND = 2;\n */\n NOTIFICATION_SETTING_NOT_FOUND = 2,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_CREATE_NOTIFICATION_SETTING_FAILED = 3;\n */\n CREATE_NOTIFICATION_SETTING_FAILED = 3,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_UPDATE_NOTIFICATION_SETTING_FAILED = 4;\n */\n UPDATE_NOTIFICATION_SETTING_FAILED = 4,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_DELETE_NOTIFICATION_SETTING_FAILED = 5;\n */\n DELETE_NOTIFICATION_SETTING_FAILED = 5,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_GROUP_NOT_FOUND = 6;\n */\n NOTIFICATION_GROUP_NOT_FOUND = 6,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_GROUPS_NOT_FOUND = 7;\n */\n NOTIFICATION_GROUPS_NOT_FOUND = 7,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_CREATE_NOTIFICATION_GROUP_FAILED = 8;\n */\n CREATE_NOTIFICATION_GROUP_FAILED = 8,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_UPDATE_NOTIFICATION_GROUP_FAILED = 9;\n */\n UPDATE_NOTIFICATION_GROUP_FAILED = 9,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_DELETE_NOTIFICATION_GROUP_FAILED = 10;\n */\n DELETE_NOTIFICATION_GROUP_FAILED = 10,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_USER_NOT_FOUND = 11;\n */\n NOTIFICATION_USER_NOT_FOUND = 11,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_USERS_NOT_FOUND = 12;\n */\n NOTIFICATION_USERS_NOT_FOUND = 12,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_CREATE_NOTIFICATION_USER_FAILED = 13;\n */\n CREATE_NOTIFICATION_USER_FAILED = 13,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_UPDATE_NOTIFICATION_USER_FAILED = 14;\n */\n UPDATE_NOTIFICATION_USER_FAILED = 14,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_DELETE_NOTIFICATION_USER_FAILED = 15;\n */\n DELETE_NOTIFICATION_USER_FAILED = 15,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_GROUP_USER_NOT_FOUND = 16;\n */\n NOTIFICATION_GROUP_USER_NOT_FOUND = 16,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_CREATE_NOTIFICATION_GROUP_USER_FAILED = 17;\n */\n CREATE_NOTIFICATION_GROUP_USER_FAILED = 17,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_UPDATE_NOTIFICATION_GROUP_USER_FAILED = 18;\n */\n UPDATE_NOTIFICATION_GROUP_USER_FAILED = 18,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_DELETE_NOTIFICATION_GROUP_USER_FAILED = 19;\n */\n DELETE_NOTIFICATION_GROUP_USER_FAILED = 19,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_MESSAGE_NOT_FOUND = 20;\n */\n NOTIFICATION_MESSAGE_NOT_FOUND = 20,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_MESSAGES_NOT_FOUND = 21;\n */\n NOTIFICATION_MESSAGES_NOT_FOUND = 21,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_CREATE_NOTIFICATION_MESSAGE_FAILED = 22;\n */\n CREATE_NOTIFICATION_MESSAGE_FAILED = 22,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_UPDATE_NOTIFICATION_MESSAGE_FAILED = 23;\n */\n UPDATE_NOTIFICATION_MESSAGE_FAILED = 23,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_DELETE_NOTIFICATION_MESSAGE_FAILED = 24;\n */\n DELETE_NOTIFICATION_MESSAGE_FAILED = 24,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_MESSAGE_JOB_NOT_FOUND = 25;\n */\n NOTIFICATION_MESSAGE_JOB_NOT_FOUND = 25,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_MESSAGE_JOBS_NOT_FOUND = 26;\n */\n NOTIFICATION_MESSAGE_JOBS_NOT_FOUND = 26,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_CREATE_NOTIFICATION_MESSAGE_JOB_FAILED = 27;\n */\n CREATE_NOTIFICATION_MESSAGE_JOB_FAILED = 27,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_UPDATE_NOTIFICATION_MESSAGE_JOB_FAILED = 28;\n */\n UPDATE_NOTIFICATION_MESSAGE_JOB_FAILED = 28,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_DELETE_NOTIFICATION_MESSAGE_JOB_FAILED = 29;\n */\n DELETE_NOTIFICATION_MESSAGE_JOB_FAILED = 29,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_SETTING_ALREADY_EXIST = 30;\n */\n NOTIFICATION_SETTING_ALREADY_EXIST = 30,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_SETTING_SLUG_ALREADY_TAKEN = 31;\n */\n NOTIFICATION_SETTING_SLUG_ALREADY_TAKEN = 31,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_USER_ALREADY_EXIST = 32;\n */\n NOTIFICATION_USER_ALREADY_EXIST = 32,\n\n /**\n * @generated from enum value: FAILURE_MESSAGE_NOTIFICATION_GROUP_ALREADY_EXIST = 33;\n */\n NOTIFICATION_GROUP_ALREADY_EXIST = 33,\n}\n\n/**\n * Describes the enum dashboard.notifications.v1.FailureMessage.\n */\nexport const FailureMessageSchema: GenEnum<FailureMessage> = /*@__PURE__*/\n enumDesc(file_dashboard_v1_notifications, 2);\n\n/**\n * @generated from service dashboard.notifications.v1.NotificationsService\n */\nexport const NotificationsService: GenService<{\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.CreateNotificationSetting\n */\n createNotificationSetting: {\n methodKind: \"unary\";\n input: typeof CreateNotificationSettingRequestSchema;\n output: typeof NotificationSettingResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationSetting\n */\n readNotificationSetting: {\n methodKind: \"unary\";\n input: typeof ReadNotificationSettingRequestSchema;\n output: typeof ReadNotificationSettingResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateNotificationSetting\n */\n updateNotificationSetting: {\n methodKind: \"unary\";\n input: typeof UpdateNotificationSettingRequestSchema;\n output: typeof NotificationSettingResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.DeleteNotificationSetting\n */\n deleteNotificationSetting: {\n methodKind: \"unary\";\n input: typeof DeleteNotificationSettingRequestSchema;\n output: typeof NotificationSettingResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.CreateNotificationGroup\n */\n createNotificationGroup: {\n methodKind: \"unary\";\n input: typeof CreateNotificationGroupRequestSchema;\n output: typeof NotificationGroupResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationGroups\n */\n readNotificationGroups: {\n methodKind: \"unary\";\n input: typeof ReadNotificationGroupsRequestSchema;\n output: typeof ReadNotificationGroupsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateNotificationGroup\n */\n updateNotificationGroup: {\n methodKind: \"unary\";\n input: typeof UpdateNotificationGroupRequestSchema;\n output: typeof NotificationGroupResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.DeleteNotificationGroup\n */\n deleteNotificationGroup: {\n methodKind: \"unary\";\n input: typeof DeleteNotificationGroupRequestSchema;\n output: typeof NotificationGroupResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.CreateNotificationUser\n */\n createNotificationUser: {\n methodKind: \"unary\";\n input: typeof CreateNotificationUserRequestSchema;\n output: typeof NotificationUserResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationUsers\n */\n readNotificationUsers: {\n methodKind: \"unary\";\n input: typeof ReadNotificationUsersRequestSchema;\n output: typeof ReadNotificationUsersResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateNotificationUser\n */\n updateNotificationUser: {\n methodKind: \"unary\";\n input: typeof UpdateNotificationUserRequestSchema;\n output: typeof NotificationUserResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.DeleteNotificationUser\n */\n deleteNotificationUser: {\n methodKind: \"unary\";\n input: typeof DeleteNotificationUserRequestSchema;\n output: typeof NotificationUserResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.CreateNotificationGroupUser\n */\n createNotificationGroupUser: {\n methodKind: \"unary\";\n input: typeof CreateNotificationGroupUserRequestSchema;\n output: typeof NotificationGroupUserResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationGroupUsers\n */\n readNotificationGroupUsers: {\n methodKind: \"unary\";\n input: typeof ReadNotificationGroupUsersRequestsSchema;\n output: typeof ReadNotificationGroupUsersResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateNotificationGroupUser\n */\n updateNotificationGroupUser: {\n methodKind: \"unary\";\n input: typeof UpdateNotificationGroupUserRequestSchema;\n output: typeof NotificationGroupUserResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.DeleteNotificationGroupUser\n */\n deleteNotificationGroupUser: {\n methodKind: \"unary\";\n input: typeof DeleteNotificationGroupUserRequestSchema;\n output: typeof NotificationGroupUserResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.CreateNotificationMessage\n */\n createNotificationMessage: {\n methodKind: \"unary\";\n input: typeof CreateNotificationMessageRequestSchema;\n output: typeof NotificationMessageResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationMessages\n */\n readNotificationMessages: {\n methodKind: \"unary\";\n input: typeof ReadNotificationMessagesRequestSchema;\n output: typeof ReadNotificationMessagesResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.GetSentNotificationMessages\n */\n getSentNotificationMessages: {\n methodKind: \"unary\";\n input: typeof GetSentNotificationMessagesRequestSchema;\n output: typeof GetSentNotificationMessagesResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateNotificationMessage\n */\n updateNotificationMessage: {\n methodKind: \"unary\";\n input: typeof UpdateNotificationMessageRequestSchema;\n output: typeof NotificationMessageResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.DeleteNotificationMessage\n */\n deleteNotificationMessage: {\n methodKind: \"unary\";\n input: typeof DeleteNotificationMessageRequestSchema;\n output: typeof NotificationMessageResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.CreateNotificationMessageJob\n */\n createNotificationMessageJob: {\n methodKind: \"unary\";\n input: typeof CreateNotificationMessageJobRequestSchema;\n output: typeof NotificationMessageJobResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationMessageJobs\n */\n readNotificationMessageJobs: {\n methodKind: \"unary\";\n input: typeof ReadNotificationMessageJobsRequestSchema;\n output: typeof ReadNotificationMessageJobsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateNotificationMessageJob\n */\n updateNotificationMessageJob: {\n methodKind: \"unary\";\n input: typeof UpdateNotificationMessageJobRequestSchema;\n output: typeof NotificationMessageJobResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.DeleteNotificationMessageJob\n */\n deleteNotificationMessageJob: {\n methodKind: \"unary\";\n input: typeof DeleteNotificationMessageJobRequestSchema;\n output: typeof NotificationMessageJobResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationProducts\n */\n readNotificationProducts: {\n methodKind: \"unary\";\n input: typeof ReadNotificationProductsRequestSchema;\n output: typeof SearchProductsResponseSchema;\n },\n /**\n * Public endpoints\n *\n * @generated from rpc dashboard.notifications.v1.NotificationsService.GetNotificationUserSettings\n */\n getNotificationUserSettings: {\n methodKind: \"unary\";\n input: typeof GetNotificationUserSettingsRequestSchema;\n output: typeof GetNotificationUserSettingsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.VerifyUserEmail\n */\n verifyUserEmail: {\n methodKind: \"unary\";\n input: typeof VerifyUserEmailRequestSchema;\n output: typeof VerifyUserEmailResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.GetUserGroups\n */\n getUserGroups: {\n methodKind: \"unary\";\n input: typeof GetUserGroupsRequestSchema;\n output: typeof GetUserGroupsResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateUserGroups\n */\n updateUserGroups: {\n methodKind: \"unary\";\n input: typeof UpdateUserGroupsRequestSchema;\n output: typeof EmptySchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.GetProjectedRecipientCount\n */\n getProjectedRecipientCount: {\n methodKind: \"unary\";\n input: typeof GetProjectedRecipientCountRequestSchema;\n output: typeof GetProjectedRecipientCountResponseSchema;\n },\n /**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.GetNotificationStats\n */\n getNotificationStats: {\n methodKind: \"unary\";\n input: typeof GetNotificationStatsRequestSchema;\n output: typeof GetNotificationStatsResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_dashboard_v1_notifications, 0);\n\n","// @generated by protoc-gen-connect-query v2.2.0 with parameter \"target=ts,ts_nocheck=true\"\n// @generated from file dashboard/v1/notifications.proto (package dashboard.notifications.v1, syntax proto3)\n/* eslint-disable */\n// @ts-nocheck\n\nimport { NotificationsService } from \"./notifications_pb\";\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.CreateNotificationSetting\n */\nexport const createNotificationSetting = NotificationsService.method.createNotificationSetting;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationSetting\n */\nexport const readNotificationSetting = NotificationsService.method.readNotificationSetting;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateNotificationSetting\n */\nexport const updateNotificationSetting = NotificationsService.method.updateNotificationSetting;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.DeleteNotificationSetting\n */\nexport const deleteNotificationSetting = NotificationsService.method.deleteNotificationSetting;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.CreateNotificationGroup\n */\nexport const createNotificationGroup = NotificationsService.method.createNotificationGroup;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationGroups\n */\nexport const readNotificationGroups = NotificationsService.method.readNotificationGroups;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateNotificationGroup\n */\nexport const updateNotificationGroup = NotificationsService.method.updateNotificationGroup;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.DeleteNotificationGroup\n */\nexport const deleteNotificationGroup = NotificationsService.method.deleteNotificationGroup;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.CreateNotificationUser\n */\nexport const createNotificationUser = NotificationsService.method.createNotificationUser;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationUsers\n */\nexport const readNotificationUsers = NotificationsService.method.readNotificationUsers;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateNotificationUser\n */\nexport const updateNotificationUser = NotificationsService.method.updateNotificationUser;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.DeleteNotificationUser\n */\nexport const deleteNotificationUser = NotificationsService.method.deleteNotificationUser;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.CreateNotificationGroupUser\n */\nexport const createNotificationGroupUser = NotificationsService.method.createNotificationGroupUser;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationGroupUsers\n */\nexport const readNotificationGroupUsers = NotificationsService.method.readNotificationGroupUsers;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateNotificationGroupUser\n */\nexport const updateNotificationGroupUser = NotificationsService.method.updateNotificationGroupUser;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.DeleteNotificationGroupUser\n */\nexport const deleteNotificationGroupUser = NotificationsService.method.deleteNotificationGroupUser;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.CreateNotificationMessage\n */\nexport const createNotificationMessage = NotificationsService.method.createNotificationMessage;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationMessages\n */\nexport const readNotificationMessages = NotificationsService.method.readNotificationMessages;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.GetSentNotificationMessages\n */\nexport const getSentNotificationMessages = NotificationsService.method.getSentNotificationMessages;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateNotificationMessage\n */\nexport const updateNotificationMessage = NotificationsService.method.updateNotificationMessage;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.DeleteNotificationMessage\n */\nexport const deleteNotificationMessage = NotificationsService.method.deleteNotificationMessage;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.CreateNotificationMessageJob\n */\nexport const createNotificationMessageJob = NotificationsService.method.createNotificationMessageJob;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationMessageJobs\n */\nexport const readNotificationMessageJobs = NotificationsService.method.readNotificationMessageJobs;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateNotificationMessageJob\n */\nexport const updateNotificationMessageJob = NotificationsService.method.updateNotificationMessageJob;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.DeleteNotificationMessageJob\n */\nexport const deleteNotificationMessageJob = NotificationsService.method.deleteNotificationMessageJob;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.ReadNotificationProducts\n */\nexport const readNotificationProducts = NotificationsService.method.readNotificationProducts;\n\n/**\n * Public endpoints\n *\n * @generated from rpc dashboard.notifications.v1.NotificationsService.GetNotificationUserSettings\n */\nexport const getNotificationUserSettings = NotificationsService.method.getNotificationUserSettings;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.VerifyUserEmail\n */\nexport const verifyUserEmail = NotificationsService.method.verifyUserEmail;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.GetUserGroups\n */\nexport const getUserGroups = NotificationsService.method.getUserGroups;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.UpdateUserGroups\n */\nexport const updateUserGroups = NotificationsService.method.updateUserGroups;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.GetProjectedRecipientCount\n */\nexport const getProjectedRecipientCount = NotificationsService.method.getProjectedRecipientCount;\n\n/**\n * @generated from rpc dashboard.notifications.v1.NotificationsService.GetNotificationStats\n */\nexport const getNotificationStats = NotificationsService.method.getNotificationStats;\n","// @generated by protoc-gen-connect-query v2.2.0 with parameter \"target=ts,ts_nocheck=true\"\n// @generated from file public/v1/public_api.proto (package public_api.v1, syntax proto3)\n/* eslint-disable */\n// @ts-nocheck\n\nimport { PublicApiService } from \"./public_api_pb\";\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.GetOrder\n */\nexport const getOrder = PublicApiService.method.getOrder;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.GetOrders\n */\nexport const getOrders = PublicApiService.method.getOrders;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.GetOrderRetryUrl\n */\nexport const getOrderRetryUrl = PublicApiService.method.getOrderRetryUrl;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelLogin\n */\nexport const userPanelLogin = PublicApiService.method.userPanelLogin;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelLoginWithCode\n */\nexport const userPanelLoginWithCode = PublicApiService.method.userPanelLoginWithCode;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelLogout\n */\nexport const userPanelLogout = PublicApiService.method.userPanelLogout;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelDeleteAccount\n */\nexport const userPanelDeleteAccount = PublicApiService.method.userPanelDeleteAccount;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetProducts\n */\nexport const userPanelGetProducts = PublicApiService.method.userPanelGetProducts;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetAudiobookDetails\n */\nexport const userPanelGetAudiobookDetails = PublicApiService.method.userPanelGetAudiobookDetails;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetAudiobookDetailsDownloadURLs\n */\nexport const userPanelGetAudiobookDetailsDownloadURLs = PublicApiService.method.userPanelGetAudiobookDetailsDownloadURLs;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetFileDetails\n */\nexport const userPanelGetFileDetails = PublicApiService.method.userPanelGetFileDetails;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetTicketDetails\n */\nexport const userPanelGetTicketDetails = PublicApiService.method.userPanelGetTicketDetails;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelGetCourseDetails\n */\nexport const userPanelGetCourseDetails = PublicApiService.method.userPanelGetCourseDetails;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.PushSendDeviceToken\n */\nexport const pushSendDeviceToken = PublicApiService.method.pushSendDeviceToken;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.PushEvent\n */\nexport const pushEvent = PublicApiService.method.pushEvent;\n\n/**\n * iOS SHOP methods\n *\n * @generated from rpc public_api.v1.PublicApiService.ShouldShopProducts\n */\nexport const shouldShopProducts = PublicApiService.method.shouldShopProducts;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.ShouldShowGuestCatalog\n */\nexport const shouldShowGuestCatalog = PublicApiService.method.shouldShowGuestCatalog;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.GetGuestCatalog\n */\nexport const getGuestCatalog = PublicApiService.method.getGuestCatalog;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UserPanelResolveProductAccess\n */\nexport const userPanelResolveProductAccess = PublicApiService.method.userPanelResolveProductAccess;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.GetShopProducts\n */\nexport const getShopProducts = PublicApiService.method.getShopProducts;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.DidBuyProduct\n */\nexport const didBuyProduct = PublicApiService.method.didBuyProduct;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.GetAppStoreAccountToken\n */\nexport const getAppStoreAccountToken = PublicApiService.method.getAppStoreAccountToken;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.VerifyAppStorePurchase\n */\nexport const verifyAppStorePurchase = PublicApiService.method.verifyAppStorePurchase;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.GetAppStoreEntitlements\n */\nexport const getAppStoreEntitlements = PublicApiService.method.getAppStoreEntitlements;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.RestoreAppStorePurchases\n */\nexport const restoreAppStorePurchases = PublicApiService.method.restoreAppStorePurchases;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.ClearAppStoreAccountToken\n */\nexport const clearAppStoreAccountToken = PublicApiService.method.clearAppStoreAccountToken;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.GetStoreKitCatalog\n */\nexport const getStoreKitCatalog = PublicApiService.method.getStoreKitCatalog;\n\n/**\n * Notification settings\n *\n * @generated from rpc public_api.v1.PublicApiService.GetNotificationSettings\n */\nexport const getNotificationSettings = PublicApiService.method.getNotificationSettings;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.GetNotificationSettingsDetails\n */\nexport const getNotificationSettingsDetails = PublicApiService.method.getNotificationSettingsDetails;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UpdateGlobalNotificationSettings\n */\nexport const updateGlobalNotificationSettings = PublicApiService.method.updateGlobalNotificationSettings;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.UpdateNotificationSettings\n */\nexport const updateNotificationSettings = PublicApiService.method.updateNotificationSettings;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.GetNotificationHistory\n */\nexport const getNotificationHistory = PublicApiService.method.getNotificationHistory;\n\n/**\n * Product V2 requests\n *\n * @generated from rpc public_api.v1.PublicApiService.GetAvailableCountForProduct\n */\nexport const getAvailableCountForProduct = PublicApiService.method.getAvailableCountForProduct;\n\n/**\n * Checkout requests\n *\n * @generated from rpc public_api.v1.PublicApiService.IsOneClickPaymentAvailable\n */\nexport const isOneClickPaymentAvailable = PublicApiService.method.isOneClickPaymentAvailable;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.GetPreOrderDetails\n */\nexport const getPreOrderDetails = PublicApiService.method.getPreOrderDetails;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.ApplePayValidateMerchant\n */\nexport const applePayValidateMerchant = PublicApiService.method.applePayValidateMerchant;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.AuthorizeOneClickPayment\n */\nexport const authorizeOneClickPayment = PublicApiService.method.authorizeOneClickPayment;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.NotifyUserAboutProductAvailability\n */\nexport const notifyUserAboutProductAvailability = PublicApiService.method.notifyUserAboutProductAvailability;\n\n/**\n * Public order details (with obfuscation)\n *\n * @generated from rpc public_api.v1.PublicApiService.GetPublicOrderDetails\n */\nexport const getPublicOrderDetails = PublicApiService.method.getPublicOrderDetails;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.AddPublicOrderComment\n */\nexport const addPublicOrderComment = PublicApiService.method.addPublicOrderComment;\n\n/**\n * Testimonials\n *\n * @generated from rpc public_api.v1.PublicApiService.GetOrderForTestimonial\n */\nexport const getOrderForTestimonial = PublicApiService.method.getOrderForTestimonial;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.SubmitTestimonial\n */\nexport const submitTestimonial = PublicApiService.method.submitTestimonial;\n\n/**\n * @generated from rpc public_api.v1.PublicApiService.GetTestimonialUploadUrl\n */\nexport const getTestimonialUploadUrl = PublicApiService.method.getTestimonialUploadUrl;\n","// @generated by protoc-gen-es v2.11.0 with parameter \"target=ts\"\n// @generated from file common/v1/environment.proto (package common.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc } from \"@bufbuild/protobuf/codegenv2\";\n\n/**\n * Describes the file common/v1/environment.proto.\n */\nexport const file_common_v1_environment: GenFile = /*@__PURE__*/\n fileDesc(\"Chtjb21tb24vdjEvZW52aXJvbm1lbnQucHJvdG8SCWNvbW1vbi52MSonCgtFbnZpcm9ubWVudBIOCgpQUk9EVUNUSU9OEAASCAoEVEVTVBABQk5aTGdpdGh1Yi5jb20vZW1tZW1zL3N1cGVyLWNhcnQvYXBwcy9zcnYtd29ya2VyL3V0aWxzL21vZGVscy9jb21tb24vdjE7Y29tbW9udjFiBnByb3RvMw\");\n\n/**\n * @generated from enum common.v1.Environment\n */\nexport enum Environment {\n /**\n * @generated from enum value: PRODUCTION = 0;\n */\n PRODUCTION = 0,\n\n /**\n * @generated from enum value: TEST = 1;\n */\n TEST = 1,\n}\n\n/**\n * Describes the enum common.v1.Environment.\n */\nexport const EnvironmentSchema: GenEnum<Environment> = /*@__PURE__*/\n enumDesc(file_common_v1_environment, 0);\n\n","// @generated by protoc-gen-es v2.14.1 with parameter \"target=ts,ts_nocheck=true\"\n// @generated from file public/v1/returns.proto (package public.v1, syntax proto3)\n/* eslint-disable */\n// @ts-nocheck\n\nimport type { GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Environment } from \"../../common/v1/environment_pb\";\nimport { file_common_v1_environment } from \"../../common/v1/environment_pb\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file public/v1/returns.proto.\n */\nexport const file_public_v1_returns: GenFile = /*@__PURE__*/\n fileDesc(\"ChdwdWJsaWMvdjEvcmV0dXJucy5wcm90bxIJcHVibGljLnYxImsKGVN0YXJ0UmV0dXJuU2Vzc2lvblJlcXVlc3QSEgoKcHJvamVjdF9pZBgBIAEoCRINCgVlbWFpbBgCIAEoCRIrCgtlbnZpcm9ubWVudBgDIAEoDjIWLmNvbW1vbi52MS5FbnZpcm9ubWVudCJhChpTdGFydFJldHVyblNlc3Npb25SZXNwb25zZRIUCgxjaGFsbGVuZ2VfaWQYASABKAkSHAoUcmVzZW5kX2FmdGVyX3NlY29uZHMYAiABKAUSDwoHbWVzc2FnZRgDIAEoCSKBAQoaVmVyaWZ5UmV0dXJuU2Vzc2lvblJlcXVlc3QSEgoKcHJvamVjdF9pZBgBIAEoCRIUCgxjaGFsbGVuZ2VfaWQYAiABKAkSDAoEY29kZRgDIAEoCRIrCgtlbnZpcm9ubWVudBgEIAEoDjIWLmNvbW1vbi52MS5FbnZpcm9ubWVudCJkChtWZXJpZnlSZXR1cm5TZXNzaW9uUmVzcG9uc2USFQoNc2Vzc2lvbl90b2tlbhgBIAEoCRIuCgpleHBpcmVzX2F0GAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCJ0ChtFeGNoYW5nZVBhbmVsU2Vzc2lvblJlcXVlc3QSEgoKcHJvamVjdF9pZBgBIAEoCRIUCgxhY2Nlc3NfdG9rZW4YAiABKAkSKwoLZW52aXJvbm1lbnQYAyABKA4yFi5jb21tb24udjEuRW52aXJvbm1lbnQiZQocRXhjaGFuZ2VQYW5lbFNlc3Npb25SZXNwb25zZRIVCg1zZXNzaW9uX3Rva2VuGAEgASgJEi4KCmV4cGlyZXNfYXQYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIjMKClJldHVyblBhZ2USEQoJcG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F1ZXN0GiUucHVibGljLnYxLkdldFJldHVybmFibGVPcmRlclJlc3BvbnNlEmQKE0NyZWF0ZVJldHVyblJlcXVlc3QSJS5wdWJsaWMudjEuQ3JlYXRlUmV0dXJuUmVxdWVzdFJlcXVlc3QaJi5wdWJsaWMudjEuQ3JlYXRlUmV0dXJuUmVxdWVzdFJlc3BvbnNlElIKDUxpc3RNeVJldHVybnMSHy5wdWJsaWMudjEuTGlzdE15UmV0dXJuc1JlcXVlc3QaIC5wdWJsaWMudjEuTGlzdE15UmV0dXJuc1Jlc3BvbnNlEkwKC0dldE15UmV0dXJuEh0ucHVibGljLnYxLkdldE15UmV0dXJuUmVxdWVzdBoeLnB1YmxpYy52MS5HZXRNeVJldHVyblJlc3BvbnNlYgZwcm90bzM\", [file_common_v1_environment, file_google_protobuf_timestamp]);\n\n/**\n * @generated from message public.v1.StartReturnSessionRequest\n */\nexport type StartReturnSessionRequest = Message<\"public.v1.StartReturnSessionRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string email = 2;\n */\n email: string;\n\n /**\n * @generated from field: common.v1.Environment environment = 3;\n */\n environment: Environment;\n};\n\n/**\n * Describes the message public.v1.StartReturnSessionRequest.\n * Use `create(StartReturnSessionRequestSchema)` to create a new message.\n */\nexport const StartReturnSessionRequestSchema: GenMessage<StartReturnSessionRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 0);\n\n/**\n * @generated from message public.v1.StartReturnSessionResponse\n */\nexport type StartReturnSessionResponse = Message<\"public.v1.StartReturnSessionResponse\"> & {\n /**\n * @generated from field: string challenge_id = 1;\n */\n challengeId: string;\n\n /**\n * @generated from field: int32 resend_after_seconds = 2;\n */\n resendAfterSeconds: number;\n\n /**\n * @generated from field: string message = 3;\n */\n message: string;\n};\n\n/**\n * Describes the message public.v1.StartReturnSessionResponse.\n * Use `create(StartReturnSessionResponseSchema)` to create a new message.\n */\nexport const StartReturnSessionResponseSchema: GenMessage<StartReturnSessionResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 1);\n\n/**\n * @generated from message public.v1.VerifyReturnSessionRequest\n */\nexport type VerifyReturnSessionRequest = Message<\"public.v1.VerifyReturnSessionRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string challenge_id = 2;\n */\n challengeId: string;\n\n /**\n * @generated from field: string code = 3;\n */\n code: string;\n\n /**\n * @generated from field: common.v1.Environment environment = 4;\n */\n environment: Environment;\n};\n\n/**\n * Describes the message public.v1.VerifyReturnSessionRequest.\n * Use `create(VerifyReturnSessionRequestSchema)` to create a new message.\n */\nexport const VerifyReturnSessionRequestSchema: GenMessage<VerifyReturnSessionRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 2);\n\n/**\n * @generated from message public.v1.VerifyReturnSessionResponse\n */\nexport type VerifyReturnSessionResponse = Message<\"public.v1.VerifyReturnSessionResponse\"> & {\n /**\n * @generated from field: string session_token = 1;\n */\n sessionToken: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message public.v1.VerifyReturnSessionResponse.\n * Use `create(VerifyReturnSessionResponseSchema)` to create a new message.\n */\nexport const VerifyReturnSessionResponseSchema: GenMessage<VerifyReturnSessionResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 3);\n\n/**\n * Exchanges a customer panel access token for a returns session. The email comes\n * from the server-side panel session, never from the request.\n *\n * @generated from message public.v1.ExchangePanelSessionRequest\n */\nexport type ExchangePanelSessionRequest = Message<\"public.v1.ExchangePanelSessionRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string access_token = 2;\n */\n accessToken: string;\n\n /**\n * @generated from field: common.v1.Environment environment = 3;\n */\n environment: Environment;\n};\n\n/**\n * Describes the message public.v1.ExchangePanelSessionRequest.\n * Use `create(ExchangePanelSessionRequestSchema)` to create a new message.\n */\nexport const ExchangePanelSessionRequestSchema: GenMessage<ExchangePanelSessionRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 4);\n\n/**\n * @generated from message public.v1.ExchangePanelSessionResponse\n */\nexport type ExchangePanelSessionResponse = Message<\"public.v1.ExchangePanelSessionResponse\"> & {\n /**\n * @generated from field: string session_token = 1;\n */\n sessionToken: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message public.v1.ExchangePanelSessionResponse.\n * Use `create(ExchangePanelSessionResponseSchema)` to create a new message.\n */\nexport const ExchangePanelSessionResponseSchema: GenMessage<ExchangePanelSessionResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 5);\n\n/**\n * @generated from message public.v1.ReturnPage\n */\nexport type ReturnPage = Message<\"public.v1.ReturnPage\"> & {\n /**\n * @generated from field: int32 page_size = 1;\n */\n pageSize: number;\n\n /**\n * @generated from field: string page_token = 2;\n */\n pageToken: string;\n};\n\n/**\n * Describes the message public.v1.ReturnPage.\n * Use `create(ReturnPageSchema)` to create a new message.\n */\nexport const ReturnPageSchema: GenMessage<ReturnPage> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 6);\n\n/**\n * @generated from message public.v1.ReturnOrderSummary\n */\nexport type ReturnOrderSummary = Message<\"public.v1.ReturnOrderSummary\"> & {\n /**\n * @generated from field: string canonical_order_id = 1;\n */\n canonicalOrderId: string;\n\n /**\n * @generated from field: string display_reference = 2;\n */\n displayReference: string;\n\n /**\n * @generated from field: string gateway = 3;\n */\n gateway: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp purchased_at = 4;\n */\n purchasedAt?: Timestamp | undefined;\n\n /**\n * @generated from field: int64 total_minor = 5;\n */\n totalMinor: bigint;\n\n /**\n * @generated from field: string currency = 6;\n */\n currency: string;\n\n /**\n * @generated from field: int32 returnable_line_count = 7;\n */\n returnableLineCount: number;\n};\n\n/**\n * Describes the message public.v1.ReturnOrderSummary.\n * Use `create(ReturnOrderSummarySchema)` to create a new message.\n */\nexport const ReturnOrderSummarySchema: GenMessage<ReturnOrderSummary> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 7);\n\n/**\n * @generated from message public.v1.ListReturnOrdersRequest\n */\nexport type ListReturnOrdersRequest = Message<\"public.v1.ListReturnOrdersRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string session_token = 2;\n */\n sessionToken: string;\n\n /**\n * @generated from field: int32 page_size = 3;\n */\n pageSize: number;\n\n /**\n * @generated from field: string page_token = 4;\n */\n pageToken: string;\n};\n\n/**\n * Describes the message public.v1.ListReturnOrdersRequest.\n * Use `create(ListReturnOrdersRequestSchema)` to create a new message.\n */\nexport const ListReturnOrdersRequestSchema: GenMessage<ListReturnOrdersRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 8);\n\n/**\n * @generated from message public.v1.ListReturnOrdersResponse\n */\nexport type ListReturnOrdersResponse = Message<\"public.v1.ListReturnOrdersResponse\"> & {\n /**\n * @generated from field: repeated public.v1.ReturnOrderSummary orders = 1;\n */\n orders: ReturnOrderSummary[];\n\n /**\n * @generated from field: string next_page_token = 2;\n */\n nextPageToken: string;\n\n /**\n * @generated from field: int32 total = 3;\n */\n total: number;\n};\n\n/**\n * Describes the message public.v1.ListReturnOrdersResponse.\n * Use `create(ListReturnOrdersResponseSchema)` to create a new message.\n */\nexport const ListReturnOrdersResponseSchema: GenMessage<ListReturnOrdersResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 9);\n\n/**\n * @generated from message public.v1.ReturnOrderLine\n */\nexport type ReturnOrderLine = Message<\"public.v1.ReturnOrderLine\"> & {\n /**\n * @generated from field: string line_id = 1;\n */\n lineId: string;\n\n /**\n * @generated from field: string product_id = 2;\n */\n productId: string;\n\n /**\n * @generated from field: string variant_id = 3;\n */\n variantId: string;\n\n /**\n * @generated from field: string name = 4;\n */\n name: string;\n\n /**\n * @generated from field: string fulfillment_type = 5;\n */\n fulfillmentType: string;\n\n /**\n * @generated from field: int32 purchased_quantity = 6;\n */\n purchasedQuantity: number;\n\n /**\n * @generated from field: int32 reserved_quantity = 7;\n */\n reservedQuantity: number;\n\n /**\n * @generated from field: int32 returned_quantity = 8;\n */\n returnedQuantity: number;\n\n /**\n * @generated from field: int32 available_quantity = 9;\n */\n availableQuantity: number;\n\n /**\n * @generated from field: int64 regular_unit_minor = 10;\n */\n regularUnitMinor: bigint;\n\n /**\n * @generated from field: int64 paid_unit_minor = 11;\n */\n paidUnitMinor: bigint;\n\n /**\n * @generated from field: string currency = 12;\n */\n currency: string;\n\n /**\n * @generated from field: bool eligible = 13;\n */\n eligible: boolean;\n\n /**\n * @generated from field: string exclusion_reason = 14;\n */\n exclusionReason: string;\n\n /**\n * @generated from field: int64 paid_line_total_minor = 15;\n */\n paidLineTotalMinor: bigint;\n\n /**\n * @generated from field: int64 coupon_allocation_minor = 16;\n */\n couponAllocationMinor: bigint;\n\n /**\n * @generated from field: string access_source = 17;\n */\n accessSource: string;\n\n /**\n * @generated from field: string access_reference = 18;\n */\n accessReference: string;\n};\n\n/**\n * Describes the message public.v1.ReturnOrderLine.\n * Use `create(ReturnOrderLineSchema)` to create a new message.\n */\nexport const ReturnOrderLineSchema: GenMessage<ReturnOrderLine> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 10);\n\n/**\n * @generated from message public.v1.ReturnOrderDetail\n */\nexport type ReturnOrderDetail = Message<\"public.v1.ReturnOrderDetail\"> & {\n /**\n * @generated from field: string canonical_order_id = 1;\n */\n canonicalOrderId: string;\n\n /**\n * @generated from field: string display_reference = 2;\n */\n displayReference: string;\n\n /**\n * @generated from field: string gateway = 3;\n */\n gateway: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp purchased_at = 4;\n */\n purchasedAt?: Timestamp | undefined;\n\n /**\n * @generated from field: int64 total_minor = 5;\n */\n totalMinor: bigint;\n\n /**\n * @generated from field: string currency = 6;\n */\n currency: string;\n\n /**\n * @generated from field: repeated public.v1.ReturnOrderLine lines = 7;\n */\n lines: ReturnOrderLine[];\n};\n\n/**\n * Describes the message public.v1.ReturnOrderDetail.\n * Use `create(ReturnOrderDetailSchema)` to create a new message.\n */\nexport const ReturnOrderDetailSchema: GenMessage<ReturnOrderDetail> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 11);\n\n/**\n * @generated from message public.v1.ReturnRequestLineInput\n */\nexport type ReturnRequestLineInput = Message<\"public.v1.ReturnRequestLineInput\"> & {\n /**\n * @generated from field: string line_id = 1;\n */\n lineId: string;\n\n /**\n * @generated from field: int32 quantity = 2;\n */\n quantity: number;\n};\n\n/**\n * Describes the message public.v1.ReturnRequestLineInput.\n * Use `create(ReturnRequestLineInputSchema)` to create a new message.\n */\nexport const ReturnRequestLineInputSchema: GenMessage<ReturnRequestLineInput> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 12);\n\n/**\n * @generated from message public.v1.ReturnHistoryEntry\n */\nexport type ReturnHistoryEntry = Message<\"public.v1.ReturnHistoryEntry\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string reference = 2;\n */\n reference: string;\n\n /**\n * @generated from field: string status = 3;\n */\n status: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 4;\n */\n createdAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message public.v1.ReturnHistoryEntry.\n * Use `create(ReturnHistoryEntrySchema)` to create a new message.\n */\nexport const ReturnHistoryEntrySchema: GenMessage<ReturnHistoryEntry> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 13);\n\n/**\n * @generated from message public.v1.ReturnRequestLineView\n */\nexport type ReturnRequestLineView = Message<\"public.v1.ReturnRequestLineView\"> & {\n /**\n * @generated from field: string line_id = 1;\n */\n lineId: string;\n\n /**\n * @generated from field: string name = 2;\n */\n name: string;\n\n /**\n * @generated from field: string fulfillment_type = 3;\n */\n fulfillmentType: string;\n\n /**\n * @generated from field: int32 requested_quantity = 4;\n */\n requestedQuantity: number;\n\n /**\n * @generated from field: int32 approved_quantity = 5;\n */\n approvedQuantity: number;\n\n /**\n * @generated from field: int32 received_quantity = 6;\n */\n receivedQuantity: number;\n\n /**\n * @generated from field: string access_status = 7;\n */\n accessStatus: string;\n};\n\n/**\n * Describes the message public.v1.ReturnRequestLineView.\n * Use `create(ReturnRequestLineViewSchema)` to create a new message.\n */\nexport const ReturnRequestLineViewSchema: GenMessage<ReturnRequestLineView> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 14);\n\n/**\n * @generated from message public.v1.ReturnRequestView\n */\nexport type ReturnRequestView = Message<\"public.v1.ReturnRequestView\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string reference = 2;\n */\n reference: string;\n\n /**\n * @generated from field: string canonical_order_id = 3;\n */\n canonicalOrderId: string;\n\n /**\n * @generated from field: string status = 4;\n */\n status: string;\n\n /**\n * @generated from field: string refund_status = 5;\n */\n refundStatus: string;\n\n /**\n * @generated from field: int64 refund_amount_minor = 6;\n */\n refundAmountMinor: bigint;\n\n /**\n * @generated from field: string currency = 7;\n */\n currency: string;\n\n /**\n * @generated from field: string customer_note = 8;\n */\n customerNote: string;\n\n /**\n * @generated from field: int64 version = 9;\n */\n version: bigint;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 10;\n */\n createdAt?: Timestamp | undefined;\n\n /**\n * @generated from field: repeated public.v1.ReturnRequestLineView lines = 11;\n */\n lines: ReturnRequestLineView[];\n\n /**\n * @generated from field: repeated public.v1.ReturnHistoryEntry history = 12;\n */\n history: ReturnHistoryEntry[];\n\n /**\n * @generated from field: string return_instructions = 13;\n */\n returnInstructions: string;\n};\n\n/**\n * Describes the message public.v1.ReturnRequestView.\n * Use `create(ReturnRequestViewSchema)` to create a new message.\n */\nexport const ReturnRequestViewSchema: GenMessage<ReturnRequestView> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 15);\n\n/**\n * @generated from message public.v1.GetReturnableOrderRequest\n */\nexport type GetReturnableOrderRequest = Message<\"public.v1.GetReturnableOrderRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string session_token = 2;\n */\n sessionToken: string;\n\n /**\n * @generated from field: string canonical_order_id = 3;\n */\n canonicalOrderId: string;\n};\n\n/**\n * Describes the message public.v1.GetReturnableOrderRequest.\n * Use `create(GetReturnableOrderRequestSchema)` to create a new message.\n */\nexport const GetReturnableOrderRequestSchema: GenMessage<GetReturnableOrderRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 16);\n\n/**\n * @generated from message public.v1.GetReturnableOrderResponse\n */\nexport type GetReturnableOrderResponse = Message<\"public.v1.GetReturnableOrderResponse\"> & {\n /**\n * @generated from field: public.v1.ReturnOrderDetail order = 1;\n */\n order?: ReturnOrderDetail | undefined;\n\n /**\n * @generated from field: repeated public.v1.ReturnHistoryEntry return_history = 2;\n */\n returnHistory: ReturnHistoryEntry[];\n};\n\n/**\n * Describes the message public.v1.GetReturnableOrderResponse.\n * Use `create(GetReturnableOrderResponseSchema)` to create a new message.\n */\nexport const GetReturnableOrderResponseSchema: GenMessage<GetReturnableOrderResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 17);\n\n/**\n * @generated from message public.v1.CreateReturnRequestRequest\n */\nexport type CreateReturnRequestRequest = Message<\"public.v1.CreateReturnRequestRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string session_token = 2;\n */\n sessionToken: string;\n\n /**\n * @generated from field: string canonical_order_id = 3;\n */\n canonicalOrderId: string;\n\n /**\n * @generated from field: repeated public.v1.ReturnRequestLineInput items = 4;\n */\n items: ReturnRequestLineInput[];\n\n /**\n * @generated from field: string note = 5;\n */\n note: string;\n\n /**\n * @generated from field: string idempotency_key = 6;\n */\n idempotencyKey: string;\n};\n\n/**\n * Describes the message public.v1.CreateReturnRequestRequest.\n * Use `create(CreateReturnRequestRequestSchema)` to create a new message.\n */\nexport const CreateReturnRequestRequestSchema: GenMessage<CreateReturnRequestRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 18);\n\n/**\n * @generated from message public.v1.CreateReturnRequestResponse\n */\nexport type CreateReturnRequestResponse = Message<\"public.v1.CreateReturnRequestResponse\"> & {\n /**\n * @generated from field: public.v1.ReturnRequestView request = 1;\n */\n request?: ReturnRequestView | undefined;\n};\n\n/**\n * Describes the message public.v1.CreateReturnRequestResponse.\n * Use `create(CreateReturnRequestResponseSchema)` to create a new message.\n */\nexport const CreateReturnRequestResponseSchema: GenMessage<CreateReturnRequestResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 19);\n\n/**\n * @generated from message public.v1.ListMyReturnsRequest\n */\nexport type ListMyReturnsRequest = Message<\"public.v1.ListMyReturnsRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string session_token = 2;\n */\n sessionToken: string;\n\n /**\n * @generated from field: int32 page_size = 3;\n */\n pageSize: number;\n\n /**\n * @generated from field: string page_token = 4;\n */\n pageToken: string;\n};\n\n/**\n * Describes the message public.v1.ListMyReturnsRequest.\n * Use `create(ListMyReturnsRequestSchema)` to create a new message.\n */\nexport const ListMyReturnsRequestSchema: GenMessage<ListMyReturnsRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 20);\n\n/**\n * @generated from message public.v1.ListMyReturnsResponse\n */\nexport type ListMyReturnsResponse = Message<\"public.v1.ListMyReturnsResponse\"> & {\n /**\n * @generated from field: repeated public.v1.ReturnRequestView returns = 1;\n */\n returns: ReturnRequestView[];\n\n /**\n * @generated from field: string next_page_token = 2;\n */\n nextPageToken: string;\n\n /**\n * @generated from field: int32 total = 3;\n */\n total: number;\n};\n\n/**\n * Describes the message public.v1.ListMyReturnsResponse.\n * Use `create(ListMyReturnsResponseSchema)` to create a new message.\n */\nexport const ListMyReturnsResponseSchema: GenMessage<ListMyReturnsResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 21);\n\n/**\n * @generated from message public.v1.GetMyReturnRequest\n */\nexport type GetMyReturnRequest = Message<\"public.v1.GetMyReturnRequest\"> & {\n /**\n * @generated from field: string project_id = 1;\n */\n projectId: string;\n\n /**\n * @generated from field: string session_token = 2;\n */\n sessionToken: string;\n\n /**\n * @generated from field: string return_id = 3;\n */\n returnId: string;\n};\n\n/**\n * Describes the message public.v1.GetMyReturnRequest.\n * Use `create(GetMyReturnRequestSchema)` to create a new message.\n */\nexport const GetMyReturnRequestSchema: GenMessage<GetMyReturnRequest> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 22);\n\n/**\n * @generated from message public.v1.GetMyReturnResponse\n */\nexport type GetMyReturnResponse = Message<\"public.v1.GetMyReturnResponse\"> & {\n /**\n * @generated from field: public.v1.ReturnRequestView request = 1;\n */\n request?: ReturnRequestView | undefined;\n};\n\n/**\n * Describes the message public.v1.GetMyReturnResponse.\n * Use `create(GetMyReturnResponseSchema)` to create a new message.\n */\nexport const GetMyReturnResponseSchema: GenMessage<GetMyReturnResponse> = /*@__PURE__*/\n messageDesc(file_public_v1_returns, 23);\n\n/**\n * @generated from service public.v1.ReturnsService\n */\nexport const ReturnsService: GenService<{\n /**\n * @generated from rpc public.v1.ReturnsService.StartReturnSession\n */\n startReturnSession: {\n methodKind: \"unary\";\n input: typeof StartReturnSessionRequestSchema;\n output: typeof StartReturnSessionResponseSchema;\n },\n /**\n * @generated from rpc public.v1.ReturnsService.VerifyReturnSession\n */\n verifyReturnSession: {\n methodKind: \"unary\";\n input: typeof VerifyReturnSessionRequestSchema;\n output: typeof VerifyReturnSessionResponseSchema;\n },\n /**\n * @generated from rpc public.v1.ReturnsService.ExchangePanelSession\n */\n exchangePanelSession: {\n methodKind: \"unary\";\n input: typeof ExchangePanelSessionRequestSchema;\n output: typeof ExchangePanelSessionResponseSchema;\n },\n /**\n * @generated from rpc public.v1.ReturnsService.ListReturnOrders\n */\n listReturnOrders: {\n methodKind: \"unary\";\n input: typeof ListReturnOrdersRequestSchema;\n output: typeof ListReturnOrdersResponseSchema;\n },\n /**\n * @generated from rpc public.v1.ReturnsService.GetReturnableOrder\n */\n getReturnableOrder: {\n methodKind: \"unary\";\n input: typeof GetReturnableOrderRequestSchema;\n output: typeof GetReturnableOrderResponseSchema;\n },\n /**\n * @generated from rpc public.v1.ReturnsService.CreateReturnRequest\n */\n createReturnRequest: {\n methodKind: \"unary\";\n input: typeof CreateReturnRequestRequestSchema;\n output: typeof CreateReturnRequestResponseSchema;\n },\n /**\n * @generated from rpc public.v1.ReturnsService.ListMyReturns\n */\n listMyReturns: {\n methodKind: \"unary\";\n input: typeof ListMyReturnsRequestSchema;\n output: typeof ListMyReturnsResponseSchema;\n },\n /**\n * @generated from rpc public.v1.ReturnsService.GetMyReturn\n */\n getMyReturn: {\n methodKind: \"unary\";\n input: typeof GetMyReturnRequestSchema;\n output: typeof GetMyReturnResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_public_v1_returns, 0);\n\n","// @generated by protoc-gen-connect-query v2.3.1 with parameter \"target=ts,ts_nocheck=true\"\n// @generated from file public/v1/returns.proto (package public.v1, syntax proto3)\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ReturnsService } from \"./returns_pb\";\n\n/**\n * @generated from rpc public.v1.ReturnsService.StartReturnSession\n */\nexport const startReturnSession = ReturnsService.method.startReturnSession;\n\n/**\n * @generated from rpc public.v1.ReturnsService.VerifyReturnSession\n */\nexport const verifyReturnSession = ReturnsService.method.verifyReturnSession;\n\n/**\n * @generated from rpc public.v1.ReturnsService.ExchangePanelSession\n */\nexport const exchangePanelSession = ReturnsService.method.exchangePanelSession;\n\n/**\n * @generated from rpc public.v1.ReturnsService.ListReturnOrders\n */\nexport const listReturnOrders = ReturnsService.method.listReturnOrders;\n\n/**\n * @generated from rpc public.v1.ReturnsService.GetReturnableOrder\n */\nexport const getReturnableOrder = ReturnsService.method.getReturnableOrder;\n\n/**\n * @generated from rpc public.v1.ReturnsService.CreateReturnRequest\n */\nexport const createReturnRequest = ReturnsService.method.createReturnRequest;\n\n/**\n * @generated from rpc public.v1.ReturnsService.ListMyReturns\n */\nexport const listMyReturns = ReturnsService.method.listMyReturns;\n\n/**\n * @generated from rpc public.v1.ReturnsService.GetMyReturn\n */\nexport const getMyReturn = ReturnsService.method.getMyReturn;\n","import {\n TransportProvider,\n useMutation as um,\n useQuery as uq,\n} from \"@connectrpc/connect-query\";\nimport { createConnectTransport } from \"@connectrpc/connect-web\";\nimport { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\nimport React, { useState } from \"react\";\n\nimport { Transport } from \"@connectrpc/connect\";\nimport { HOST, setCustomHost } from \"./components/checkout/constants\";\nimport * as notificationsRouter from \"./gen/proto/dashboard/v1/notifications-NotificationsService_connectquery\";\nimport * as publicApiRouter from \"./gen/proto/public/v1/public_api-PublicApiService_connectquery\";\nimport * as returnsRouter from \"./gen/proto/public/v1/returns-ReturnsService_connectquery\";\n\nlet currentFinalTransportHost: string | undefined;\nlet finalTransport: Transport | undefined;\n\n// @ts-ignore\nBigInt.prototype.toJSON = function () {\n return this.toString();\n};\n\nexport const rpcProvider = {\n publicApi: publicApiRouter,\n notifications: notificationsRouter,\n returns: returnsRouter,\n};\n\nexport const useQuery = uq;\nexport const useMutation = um;\n\nlet customHost: string | undefined;\n\nexport function setHost(host: string): void {\n customHost = host;\n setCustomHost(host);\n}\n\nexport function getTransportHost(): string {\n return customHost ?? HOST;\n}\n\nfunction createRpcTransport(host: string): Transport {\n return createConnectTransport({\n baseUrl: host + \"/api/rpc\",\n useBinaryFormat: true,\n // @ts-ignore\n fetch: async (input, init?) => {\n return fetch(input, {\n ...init,\n keepalive: false,\n credentials: \"include\",\n });\n },\n });\n}\n\nconst transportsByHost = new Map<string, Transport>();\n\n/**\n * Transport for an explicit host, created once per host. Unlike the shared\n * transport behind `RpcProvider`, several hosts can be in use at the same time.\n */\nexport function getRpcTransport(host: string): Transport {\n let transport = transportsByHost.get(host);\n if (transport == null) {\n transport = createRpcTransport(host);\n transportsByHost.set(host, transport);\n }\n return transport;\n}\n\nexport const RpcProvider: React.FC<{\n children: React.ReactNode;\n}> = ({ children }) => {\n const transportHost = getTransportHost();\n\n if (finalTransport == null || currentFinalTransportHost !== transportHost) {\n currentFinalTransportHost = transportHost;\n finalTransport = createRpcTransport(transportHost);\n }\n\n const [queryClient] = useState(\n () =>\n new QueryClient({\n defaultOptions: { queries: { staleTime: 5000 } },\n }),\n );\n\n return (\n <TransportProvider transport={finalTransport}>\n <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>\n </TransportProvider>\n );\n};\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/src/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40\",\n outline:\n \"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n xs: \"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5\",\n lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n \"icon-xs\": \"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-8\",\n \"icon-lg\": \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot.Root : \"button\"\n\n return (\n <Comp\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","import * as React from \"react\"\n\nimport { cn } from \"@/src/lib/utils\"\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"leading-none font-semibold\", className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\n \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6\", className)}\n {...props}\n />\n )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center px-6 [.border-t]:pt-6\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@/src/lib/utils\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n \"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n","import * as React from \"react\"\nimport { OTPInput, OTPInputContext } from \"input-otp\"\nimport { MinusIcon } from \"lucide-react\"\n\nimport { cn } from \"@/src/lib/utils\"\n\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps<typeof OTPInput> & {\n containerClassName?: string\n}) {\n return (\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\"flex items-center\", className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n index: number\n}) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n \"data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]\",\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n )\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n )\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\n","import * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\n\nimport { cn } from \"@/src/lib/utils\"\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n","export function LoadingIndicator() {\n return (\n <div className=\"flex items-center gap-2\">\n <div className=\"h-3 w-3 animate-bounce rounded-full bg-current [animation-delay:-0.3s]\" />\n <div className=\"h-3 w-3 animate-bounce rounded-full bg-current [animation-delay:-0.15s]\" />\n <div className=\"h-3 w-3 animate-bounce rounded-full bg-current\" />\n </div>\n );\n}\n\nexport default LoadingIndicator;\n","import type { GetThemeOutput } from \"./types\";\n\nlet config: PanelConfig = {\n projectID: undefined,\n loginURL: \"/panel/login\",\n theme: undefined,\n host: undefined,\n allowedReturnOrigins: [],\n};\n\nlet allowedReturnOrigins: string[] = [];\n\nexport interface PanelConfig {\n projectID?: string;\n loginURL?: string;\n theme?: GetThemeOutput;\n host?: string;\n allowedReturnOrigins: string[];\n}\n\nexport function setPanelConfig(newConfig: Partial<PanelConfig>): void {\n config = { ...config, ...newConfig };\n}\n\nexport function getPanelConfig(): PanelConfig {\n return config;\n}\n\nexport function setProjectID(projectID: string): void {\n config.projectID = projectID;\n}\n\nexport function setTheme(theme: GetThemeOutput): void {\n config.theme = theme;\n}\n\nexport function setLoginURL(loginURL: string): void {\n config.loginURL = loginURL;\n}\n\nexport function setHost(host: string): void {\n config.host = host;\n}\n\nexport function setAllowedReturnOrigins(origins: string[]): void {\n allowedReturnOrigins = origins;\n config = { ...config, allowedReturnOrigins: origins };\n}\n\nexport function getAllowedReturnOrigins(): string[] {\n return allowedReturnOrigins;\n}\n","import { createContext, useContext } from \"react\";\nimport { RpcProvider } from \"../rpc-provider\";\nimport { getPanelConfig, type PanelConfig } from \"./config\";\n\nconst PanelContext = createContext<PanelConfig>(getPanelConfig());\n\nexport const PanelProvider: React.FC<{\n children: React.ReactNode;\n}> = ({ children }) => {\n return (\n <RpcProvider>\n <PanelContext.Provider value={{ ...getPanelConfig() }}>\n <div className=\"bitsnap-react\">{children}</div>\n </PanelContext.Provider>\n </RpcProvider>\n );\n};\n\nexport const usePanelConfig = () => useContext(PanelContext);\n","import { getAllowedReturnOrigins } from \"./config\";\n\nconst RETURN_URL_PARAM = \"return_url\";\nconst RETURN_URL_STORAGE_KEY = \"__return_url\";\nconst ACCESS_TOKEN_PARAM = \"accessToken\";\n\nexport function getReturnURLFromSearch(search: string): string | null {\n const raw = new URLSearchParams(search).get(RETURN_URL_PARAM);\n if (!raw) return null;\n return validateReturnURL(raw);\n}\n\nexport function persistReturnURL(returnURL: string | null): void {\n if (typeof window === \"undefined\") return;\n if (returnURL) {\n window.sessionStorage.setItem(RETURN_URL_STORAGE_KEY, returnURL);\n } else {\n window.sessionStorage.removeItem(RETURN_URL_STORAGE_KEY);\n }\n}\n\nexport function readPersistedReturnURL(): string | null {\n if (typeof window === \"undefined\") return null;\n const stored = window.sessionStorage.getItem(RETURN_URL_STORAGE_KEY);\n if (!stored) return null;\n return validateReturnURL(stored);\n}\n\nfunction isOriginAllowed(origin: string, allowedOrigins: string[]): boolean {\n return allowedOrigins.some((allowed) => {\n if (origin === allowed) return true;\n const allowedHost = new URL(allowed).hostname;\n const originHost = new URL(origin).hostname;\n return originHost.endsWith(`.${allowedHost}`) || originHost === allowedHost;\n });\n}\n\nfunction validateReturnURL(raw: string): string | null {\n try {\n const u = new URL(raw);\n if (u.protocol !== \"https:\" && u.protocol !== \"http:\") return null;\n if (!isOriginAllowed(u.origin, getAllowedReturnOrigins())) return null;\n return u.toString();\n } catch {\n return null;\n }\n}\n\nexport function buildAccessTokenRedirect(\n returnURL: string,\n accessToken: string,\n): string {\n const u = new URL(returnURL);\n u.searchParams.set(ACCESS_TOKEN_PARAM, accessToken);\n return u.toString();\n}\n","const panelSessionKey = (projectID: string, host?: string) =>\n `bitsnap-panel-session:${encodeURIComponent(host ?? \"https://bitsnap.pl\")}:${encodeURIComponent(projectID)}`;\n\nconst panelEmailKey = (projectID: string, host?: string) =>\n `bitsnap-panel-email:${encodeURIComponent(host ?? \"https://bitsnap.pl\")}:${encodeURIComponent(projectID)}`;\n\nexport function getPanelSession(projectID?: string, host?: string) {\n if (typeof window === \"undefined\" || !projectID) return undefined;\n const token = window.localStorage.getItem(panelSessionKey(projectID, host));\n return token ?? undefined;\n}\n\nexport function savePanelSession(projectID: string | undefined, token: string, email: string, host?: string) {\n if (typeof window === \"undefined\" || !projectID) return;\n window.localStorage.setItem(panelSessionKey(projectID, host), token);\n window.localStorage.setItem(panelEmailKey(projectID, host), email);\n}\n\nexport function getPanelEmail(projectID?: string, host?: string) {\n if (typeof window === \"undefined\" || !projectID) return null;\n return window.localStorage.getItem(panelEmailKey(projectID, host));\n}\n\nexport function clearPanelSession(projectID?: string, host?: string) {\n if (typeof window === \"undefined\" || !projectID) return;\n window.localStorage.removeItem(panelSessionKey(projectID, host));\n window.localStorage.removeItem(panelEmailKey(projectID, host));\n}\n","import { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport {\n useEffect,\n useState,\n type ChangeEvent,\n type CSSProperties,\n type FormEvent,\n} from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { rpcProvider, useMutation } from \"../../rpc-provider\";\nimport { Button } from \"../../ui/button\";\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"../../ui/card\";\nimport { Input } from \"../../ui/input\";\nimport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n} from \"../../ui/input-otp\";\nimport { REGEXP_ONLY_DIGITS } from \"input-otp\";\nimport { Label } from \"../../ui/label\";\nimport LoadingIndicator from \"../LoadingIndicator\";\nimport {\n getAllowedReturnOrigins,\n setAllowedReturnOrigins,\n} from \"../config\";\nimport { usePanelConfig } from \"../PanelProvider\";\nimport {\n buildAccessTokenRedirect,\n getReturnURLFromSearch,\n persistReturnURL,\n readPersistedReturnURL,\n} from \"../return-url\";\nimport { getPanelSession, savePanelSession } from \"../session-storage\";\n\ntype LoginResponseStatus = \"success\" | \"error\" | \"default\";\n\nif (typeof window !== \"undefined\") {\n const currentOrigin = window.location.origin;\n const knownSiblings = [\n currentOrigin,\n \"https://bitsnap.pl\",\n \"https://kursy.bitsnap.pl\",\n ];\n if (getAllowedReturnOrigins().length === 0) {\n setAllowedReturnOrigins(Array.from(new Set(knownSiblings)));\n }\n}\n\ninterface LoginUserPanelProps {\n projectID?: string;\n host?: string;\n reveal: () => void;\n email: string;\n setEmail: (input: string) => void;\n loginUser: () => void;\n isLoginLoading: boolean;\n errMsg: string;\n}\n\ninterface VerifyCodePanelProps {\n projectID?: string;\n host?: string;\n email: string;\n reveal: () => void;\n setEmail: (input: string) => void;\n loginUser: () => void;\n isLoginLoading: boolean;\n loginUserResponse: {\n status: \"error\" | \"ok\";\n retryIn: number;\n message?: string | undefined;\n } | null;\n setLoginUserResponse: (\n response: {\n status: \"error\" | \"ok\";\n retryIn: number;\n message?: string | undefined;\n } | null,\n ) => void;\n responseStatus: LoginResponseStatus;\n setResponseStatus: (status: LoginResponseStatus) => void;\n errMsg: string;\n}\n\nconst LoginUserPanel = ({\n projectID,\n host,\n reveal,\n email,\n setEmail,\n loginUser,\n isLoginLoading,\n errMsg,\n}: LoginUserPanelProps) => {\n const { projectID: configuredProjectID, host: configuredHost } = usePanelConfig();\n if (\n typeof window !== \"undefined\" &&\n getPanelSession(projectID ?? configuredProjectID, host ?? configuredHost) != null\n ) {\n // @ts-ignore\n window.location.href = window.location.href.replaceAll(\"login\", \"\");\n return null;\n }\n\n const [isValidEmail, setIsValidEmail] = useState<boolean>(false);\n\n const emailValidation = (input: string) => {\n const emailPattern =\n /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\n if (emailPattern.test(input.trim())) {\n return setIsValidEmail(true);\n }\n\n return setIsValidEmail(false);\n };\n\n const handleInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n const { value } = e.target;\n emailValidation(value);\n setEmail(value);\n };\n\n function goToVerifyCode() {\n reveal();\n }\n\n function onSubmit(e: FormEvent<HTMLFormElement>) {\n e.preventDefault();\n void loginUser();\n }\n\n return (\n <main className=\"mx-auto flex max-w-sm flex-1 flex-col justify-center space-y-12\">\n <div className={cn(\"flex min-w-sm flex-col gap-6\")}>\n <Card>\n <CardHeader>\n <CardTitle className=\"text-2xl\">Zaloguj się</CardTitle>\n <CardDescription>\n Wyślemy do Ciebie kod na maila, dzięki któremu się zalogujesz.\n </CardDescription>\n </CardHeader>\n <CardContent>\n <form onSubmit={onSubmit}>\n <div className=\"flex flex-col gap-6\">\n <div className=\"grid gap-2\">\n <Label htmlFor=\"email\">Email</Label>\n <Input\n id=\"email\"\n onChange={handleInputChange}\n type=\"email\"\n placeholder=\"m@example.com\"\n required\n />\n <span\n className={cn(\n !isValidEmail && email.length > 0\n ? \"font-bold text-red-500\"\n : \"text-neutral-700 dark:text-neutral-400\",\n \"text-xs\",\n )}\n >\n {!isValidEmail && email.length > 0\n ? \"Nieprawidłowy adres email\"\n : \"Wpisz swój adres email\"}\n </span>\n </div>\n\n <div>\n <Button\n type=\"submit\"\n disabled={isLoginLoading}\n className=\"relative w-full\"\n onClick={loginUser}\n >\n {isLoginLoading && (\n <div className=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\">\n <LoadingIndicator />\n </div>\n )}\n Zaloguj się\n </Button>\n {errMsg.length > 0 && (\n <p className=\"text-xs font-medium text-red-500\">{errMsg}</p>\n )}\n </div>\n </div>\n <div className=\"mt-4 text-center text-sm\">\n Masz już kod?{\" \"}\n <button\n type=\"button\"\n onClick={goToVerifyCode}\n className=\"underline underline-offset-4\"\n >\n Mam już kod\n </button>\n </div>\n </form>\n </CardContent>\n </Card>\n </div>\n </main>\n );\n};\n\nconst VerifyCodePanel = ({\n projectID,\n host,\n email,\n reveal,\n setEmail,\n isLoginLoading,\n loginUserResponse,\n setLoginUserResponse,\n setResponseStatus,\n errMsg,\n}: VerifyCodePanelProps) => {\n const { mutateAsync: verifyCodeAsync, isPending: isVerifyLoading } =\n useMutation(rpcProvider.publicApi.userPanelLoginWithCode);\n\n const [code, setCode] = useState<string>(\"\");\n const [isValidCode, setIsValidCode] = useState<boolean>(false);\n const [isSubmitted, setIsSubmitted] = useState<boolean>(false);\n const [retryIn, setRetryIn] = useState(0);\n\n const codeValidation = (input: string) => {\n const codePattern = /^\\d+$/;\n\n if (codePattern.test(input.trim())) {\n return setIsValidCode(true);\n }\n\n return setIsValidCode(false);\n };\n\n const handleInputChange = (value: string) => {\n codeValidation(value);\n setCode(value);\n };\n\n async function login() {\n setIsSubmitted(true);\n if (code.length == 0) {\n setIsValidCode(false);\n return;\n }\n const codeValue = parseInt(code);\n\n const verifyCodeResult = await verifyCodeAsync({\n code: codeValue,\n });\n\n let status, message, accessToken;\n\n if (verifyCodeResult.result.case === \"accessToken\") {\n setIsValidCode(true);\n status = \"ok\";\n message = undefined;\n accessToken = verifyCodeResult.result.value;\n } else {\n setIsValidCode(false);\n status = \"error\";\n message = verifyCodeResult.result.value;\n accessToken = undefined;\n }\n\n if (status === \"error\") {\n setIsValidCode(false);\n console.warn(\"error:\", `Kod błędu: ${message}`);\n console.warn(\"Nieprawidłowy kod, spróbuj ponownie.\");\n }\n\n if (status === \"ok\") {\n if (accessToken) {\n savePanelSession(projectID, accessToken, email, host);\n }\n const returnURL = typeof window !== \"undefined\"\n ? readPersistedReturnURL()\n : null;\n setTimeout(() => {\n if (accessToken && returnURL) {\n window.location.href = buildAccessTokenRedirect(returnURL, accessToken);\n return;\n }\n window.location.reload();\n }, 100);\n }\n }\n\n function handleRetryInTime() {\n const intervalId = setInterval(() => {\n setRetryIn((prevRetryIn) => {\n if (prevRetryIn > 0) {\n return prevRetryIn - 1;\n } else {\n clearInterval(intervalId);\n return 0;\n }\n });\n }, 1000);\n\n return () => {\n clearInterval(intervalId);\n };\n }\n\n useEffect(() => {\n if (loginUserResponse?.status === \"ok\" && loginUserResponse?.retryIn > 0) {\n setRetryIn(loginUserResponse.retryIn);\n handleRetryInTime();\n }\n }, [loginUserResponse]);\n\n function backToLoginComponent() {\n setEmail(\"\");\n setLoginUserResponse(null);\n setResponseStatus(\"default\");\n reveal();\n }\n\n function onCodeSubmit(e: FormEvent<HTMLFormElement>) {\n e.preventDefault();\n void login();\n }\n\n return (\n <main className=\"mx-auto flex max-w-md flex-1 flex-col justify-center space-y-8\">\n <div className={cn(\"flex min-w-sm flex-col gap-6\")}>\n <Card>\n <CardHeader>\n <CardTitle className=\"text-2xl\">Wpisz kod z maila</CardTitle>\n <CardDescription>\n Sprawdź czy przypadkiem nie wylądował w spamie.\n </CardDescription>\n </CardHeader>\n <CardContent>\n <form onSubmit={onCodeSubmit} className=\"flex flex-col gap-6\">\n <div className=\"grid gap-2\">\n <div className=\"my-5 flex w-full items-center justify-center\">\n <div className=\"flex flex-col gap-2\">\n <InputOTP\n id=\"verify-code\"\n maxLength={6}\n pattern={REGEXP_ONLY_DIGITS}\n onChange={(newValue) => {\n handleInputChange(newValue);\n }}\n >\n <InputOTPGroup>\n <InputOTPSlot index={0} />\n <InputOTPSlot index={1} />\n <InputOTPSlot index={2} />\n </InputOTPGroup>\n <InputOTPSeparator />\n <InputOTPGroup>\n <InputOTPSlot index={3} />\n <InputOTPSlot index={4} />\n <InputOTPSlot index={5} />\n </InputOTPGroup>\n </InputOTP>\n <span\n className={cn(\n !isValidCode && isSubmitted\n ? \"text-red-500\"\n : \"text-neutral-700 dark:text-neutral-400\",\n \"text-xs\",\n )}\n >\n {!isValidCode && isSubmitted\n ? code.length == 0\n ? \"Kod nie może być pusty\"\n : \"Kod musi składać się z cyfr\"\n : \"Wpisz kod z maila\"}\n </span>\n </div>\n </div>\n </div>\n\n <div>\n <Button\n type=\"submit\"\n disabled={isLoginLoading || isVerifyLoading}\n className=\"relative w-full\"\n >\n {(isLoginLoading || isVerifyLoading) && (\n <div className=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\">\n <LoadingIndicator />\n </div>\n )}\n Zaloguj się\n </Button>\n {errMsg.length > 0 && (\n <p className=\"text-xs font-medium text-red-500\">{errMsg}</p>\n )}\n </div>\n </form>\n <div className=\"mt-4 text-center text-sm\">\n Nie masz kodu?{\" \"}\n <button\n type=\"button\"\n onClick={backToLoginComponent}\n className=\"underline underline-offset-4\"\n >\n Wróć\n </button>\n </div>\n </CardContent>\n </Card>\n </div>\n </main>\n );\n};\n\nconst PanelLoginComponentWrapper = () => {\n const { theme, allowedReturnOrigins, projectID, host } = usePanelConfig();\n\n const styles = {\n \"--button-background-color\": theme?.colors?.brand ?? \"#FFFFFF\",\n \"--button-background-color-dark\": theme?.colors?.brandDark ?? \"#000000\",\n \"--button-text-color\": theme?.colors?.brandDark ?? \"#000000\",\n \"--button-text-color-dark\": theme?.colors?.brand ?? \"#FFFFFF\",\n } as CSSProperties;\n\n type Screen = \"login\" | \"verifyCode\";\n\n const [activeScreen, setActiveScreen] = useState<Screen>(\"login\");\n const [parent] = useAutoAnimate({\n duration: 300,\n easing: \"ease-in-out\",\n disrespectUserMotionPreference: false,\n });\n\n const reveal = () =>\n setActiveScreen((prevScreen) =>\n prevScreen === \"login\" ? \"verifyCode\" : \"login\",\n );\n\n const [email, setEmail] = useState<string>(\"\");\n const [responseStatus, setResponseStatus] =\n useState<LoginResponseStatus>(\"default\");\n const [loginUserResponse, setLoginUserResponse] = useState<{\n status: \"error\" | \"ok\";\n retryIn: number;\n message?: string | undefined;\n } | null>(null);\n const { mutateAsync: loginUserAsync, isPending: isLoginLoading } =\n useMutation(rpcProvider.publicApi.userPanelLogin);\n\n const [errMsg, setErrMsg] = useState(\"\");\n\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n if (window.parent !== window) return;\n\n const queryReturnURL = getReturnURLFromSearch(window.location.search);\n if (queryReturnURL) {\n persistReturnURL(queryReturnURL);\n }\n\n const returnURL = queryReturnURL ?? readPersistedReturnURL();\n if (!returnURL) return;\n\n const existingToken = getPanelSession(projectID, host);\n if (!existingToken) return;\n\n window.location.href = buildAccessTokenRedirect(returnURL, existingToken);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allowedReturnOrigins, projectID, host]);\n\n async function loginUser() {\n setErrMsg(\"\");\n setResponseStatus(\"default\");\n const loginUserResult = await loginUserAsync({\n email: email,\n });\n\n const status = loginUserResult.result.case === \"success\" ? \"ok\" : \"error\";\n let retryIn = 0;\n let message = undefined;\n\n if (loginUserResult.result.case === \"success\") {\n retryIn = loginUserResult.result.value.retryIn;\n }\n\n if (status === \"error\") {\n message = \"Nieprawidłowy adres email, spróbuj ponownie.\";\n }\n\n setLoginUserResponse({\n status: status,\n retryIn: retryIn,\n message: message,\n });\n\n if (status === \"ok\" && activeScreen === \"login\") {\n reveal();\n } else if (status === \"ok\" && activeScreen === \"verifyCode\") {\n setResponseStatus(\"success\");\n } else if (status === \"error\") {\n setErrMsg(message ?? \"Nieprawidłowy adres email, spróbuj ponownie.\");\n }\n }\n\n return (\n <div className=\"bg-white text-black dark:bg-black dark:text-white\">\n <div\n className=\"font-inter flex h-screen w-screen flex-col p-4\"\n style={styles}\n ref={parent}\n >\n <header>\n {theme?.logoDarkURL && (\n <img\n src={theme?.logoDarkURL}\n className=\"hidden dark:inline\"\n alt=\"Company Logo\"\n draggable={false}\n />\n )}\n {theme?.logoURL && (\n <img\n src={theme?.logoURL}\n className=\"dark:hidden\"\n alt=\"Company Logo\"\n draggable={false}\n />\n )}\n </header>\n {activeScreen === \"login\" && (\n <LoginUserPanel\n projectID={projectID}\n host={host}\n reveal={reveal}\n email={email}\n setEmail={setEmail}\n loginUser={loginUser}\n isLoginLoading={isLoginLoading}\n errMsg={errMsg}\n />\n )}\n {activeScreen === \"verifyCode\" && (\n <VerifyCodePanel\n projectID={projectID}\n host={host}\n email={email}\n reveal={reveal}\n setEmail={setEmail}\n loginUser={loginUser}\n isLoginLoading={isLoginLoading}\n loginUserResponse={loginUserResponse}\n setLoginUserResponse={setLoginUserResponse}\n responseStatus={responseStatus}\n setResponseStatus={setResponseStatus}\n errMsg={errMsg}\n />\n )}\n </div>\n </div>\n );\n};\n\nexport const PanelLogin = () => {\n return <PanelLoginComponentWrapper />;\n};\n","import { useState, useCallback, useEffect } from \"react\";\n\nexport function useUrlSearchParams<T extends Record<string, unknown>>(\n initialValue: T,\n): [T, (params: Partial<T>) => void] {\n const [params, setParams] = useState<T>(() => {\n if (typeof window === \"undefined\") {\n return initialValue;\n }\n const urlParams = new URLSearchParams(window.location.search);\n const parsed: Partial<T> = {};\n \n (Object.keys(initialValue) as Array<keyof T>).forEach((key) => {\n const value = urlParams.get(key as string);\n if (value !== null) {\n try {\n (parsed as Record<string, unknown>)[key as string] = JSON.parse(value);\n } catch {\n (parsed as Record<string, unknown>)[key as string] = value as T[keyof T];\n }\n }\n });\n \n return { ...initialValue, ...parsed };\n });\n\n const updateParams = useCallback((newParams: Partial<T>) => {\n setParams((prev) => {\n const updated = { ...prev, ...newParams };\n \n if (typeof window !== \"undefined\") {\n const urlParams = new URLSearchParams();\n (Object.keys(updated) as Array<keyof T>).forEach((key) => {\n const value = updated[key];\n if (value !== undefined && value !== null) {\n urlParams.set(key as string, JSON.stringify(value));\n }\n });\n \n const newUrl = `${window.location.pathname}?${urlParams.toString()}`;\n window.history.pushState({}, \"\", newUrl);\n }\n \n return updated;\n });\n }, []);\n\n useEffect(() => {\n const handlePopState = () => {\n const urlParams = new URLSearchParams(window.location.search);\n const parsed: Partial<T> = {};\n \n (Object.keys(initialValue) as Array<keyof T>).forEach((key) => {\n const value = urlParams.get(key as string);\n if (value !== null) {\n try {\n (parsed as Record<string, unknown>)[key as string] = JSON.parse(value);\n } catch {\n (parsed as Record<string, unknown>)[key as string] = value as T[keyof T];\n }\n }\n });\n \n setParams({ ...initialValue, ...parsed });\n };\n\n window.addEventListener(\"popstate\", handlePopState);\n return () => window.removeEventListener(\"popstate\", handlePopState);\n }, [initialValue]);\n\n return [params, updateParams];\n}\n","function parseHex(value: string): [number, number, number] | undefined {\n const match = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(value);\n if (match == null) {\n return undefined;\n }\n let hex = match[1];\n if (hex.length <= 4) {\n hex = hex\n .split(\"\")\n .map((char) => char + char)\n .join(\"\");\n }\n return [\n parseInt(hex.slice(0, 2), 16),\n parseInt(hex.slice(2, 4), 16),\n parseInt(hex.slice(4, 6), 16),\n ];\n}\n\nfunction parseRgb(value: string): [number, number, number] | undefined {\n const match =\n /^rgba?\\(\\s*(\\d{1,3})[\\s,]+(\\d{1,3})[\\s,]+(\\d{1,3})(?:[\\s,/]+[\\d.%]+)?\\s*\\)$/i.exec(\n value,\n );\n if (match == null) {\n return undefined;\n }\n const channels = [match[1], match[2], match[3]].map(Number);\n return channels.every((channel) => channel <= 255)\n ? (channels as [number, number, number])\n : undefined;\n}\n\nfunction linearize(channel: number): number {\n const value = channel / 255;\n return value <= 0.03928 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;\n}\n\n/**\n * Text color that stays readable on a brand color: white or near black,\n * whichever has the higher WCAG contrast. `undefined` when the color is not a\n * hex or `rgb()` value.\n */\nexport function readableForeground(color: string): string | undefined {\n const trimmed = color.trim();\n const rgb = parseHex(trimmed) ?? parseRgb(trimmed);\n if (rgb == null) {\n return undefined;\n }\n const [r, g, b] = rgb.map(linearize);\n const luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n // Contrast against white (1.05 / (L + 0.05)) versus against black.\n const whiteContrast = 1.05 / (luminance + 0.05);\n const blackContrast = (luminance + 0.05) / 0.05;\n return whiteContrast >= blackContrast ? \"#ffffff\" : \"#18181b\";\n}\n\n/**\n * Appearance tokens derived from one brand color: button background, focus\n * ring and, when the color can be parsed, a readable button foreground.\n */\nexport function brandColorTokens(color: string): {\n buttonBackground: string;\n focusRing: string;\n buttonForeground?: string;\n} {\n const foreground = readableForeground(color);\n return {\n buttonBackground: color,\n focusRing: color,\n ...(foreground != null ? { buttonForeground: foreground } : {}),\n };\n}\n","import type { ReturnsAppearance } from \"../components/returns/appearance\";\nimport { brandColorTokens, readableForeground } from \"../components/returns/color\";\n\nexport { readableForeground };\n\n/**\n * Returns appearance of the panel Returns screen derived from the panel brand\n * color. An explicit appearance wins; without a brand color the library\n * defaults apply (`undefined`).\n */\nexport function resolvePanelReturnsAppearance(\n explicit: ReturnsAppearance | undefined,\n brand: string | undefined,\n): ReturnsAppearance | undefined {\n if (explicit != null) {\n return explicit;\n }\n const color = brand?.trim();\n if (color == null || color === \"\") {\n return undefined;\n }\n return { tokens: brandColorTokens(color) };\n}\n","import * as React from \"react\"\nimport * as SwitchPrimitive from \"@radix-ui/react-switch\"\n\nimport { cn } from \"@/src/lib/utils\"\n\nfunction Switch({\n className,\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n \"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n \"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0\"\n )}\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\n","import { Label } from \"../../ui/label\";\nimport { Switch } from \"../../ui/switch\";\nimport { useState } from \"react\";\n\ninterface PanelNotificationsComponentProps {}\n\nfunction PanelNotificationsComponent({}: PanelNotificationsComponentProps) {\n const [notifications, setNotifications] = useState<Record<string, boolean>>({\n disableAll: false,\n });\n\n return (\n <>\n <h3 className=\"text-2xl\">Powiadomienia</h3>\n <p className=\"text-sm text-neutral-500\">\n Zarządzaj swoimi powiadomieniami\n </p>\n <div className=\"mt-6\">\n <div className=\"flex items-center space-x-2\">\n <Switch\n id=\"disable-all-notifications\"\n checked={notifications.disableAll}\n onCheckedChange={(checked) =>\n setNotifications((prevState) => ({\n ...prevState,\n disableAll: checked,\n }))\n }\n />\n <Label\n htmlFor=\"disable-all-notifications\"\n className=\"flex flex-col gap-1 text-base\"\n >\n Wszystkie powiadomienia\n <span className=\"text-xs font-normal text-neutral-500 md:text-sm\">\n Ten przycisk może wyłączyć wszystkie powiadomienia\n </span>\n </Label>\n </div>\n </div>\n </>\n );\n}\n\nexport default PanelNotificationsComponent;\n","import * as React from \"react\"\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n MoreHorizontalIcon,\n} from \"lucide-react\"\n\nimport { cn } from \"@/src/lib/utils\"\nimport { buttonVariants, type Button } from \"@/src/ui/button\"\n\nfunction Pagination({ className, ...props }: React.ComponentProps<\"nav\">) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n )\n}\n\nfunction PaginationContent({\n className,\n ...props\n}: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"pagination-content\"\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n )\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<\"li\">) {\n return <li data-slot=\"pagination-item\" {...props} />\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, \"size\"> &\n React.ComponentProps<\"a\">\n\nfunction PaginationLink({\n className,\n isActive,\n size = \"icon\",\n ...props\n}: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? \"page\" : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? \"outline\" : \"ghost\",\n size,\n }),\n className\n )}\n {...props}\n />\n )\n}\n\nfunction PaginationPrevious({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 px-2.5 sm:pl-2.5\", className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 px-2.5 sm:pr-2.5\", className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\"flex size-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n )\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n}\n","import { cn } from \"@/src/lib/utils\"\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"skeleton\"\n className={cn(\"bg-accent animate-pulse rounded-md\", className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n","import { rpcProvider, useQuery } from \"../../rpc-provider\";\nimport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n} from \"../../ui/pagination\";\nimport { Skeleton } from \"../../ui/skeleton\";\nimport { useState } from \"react\";\n\ninterface PanelOrderHistoryComponentProps {\n projectID: string;\n accessToken: string;\n openOrderDetails: (orderId: string) => void;\n}\n\nconst formatDate = (ts: number): string =>\n new Date(ts * 1000).toLocaleDateString(undefined, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n });\n\nconst formatAmount = (amount: number, currency: string): string =>\n new Intl.NumberFormat(\"en-US\", {\n style: \"currency\",\n currency: currency.toUpperCase(),\n }).format(amount / 100);\n\nconst statusLabel: Record<string, string> = {\n draft: \"Szkic\",\n unpaid: \"Nieopłacona\",\n paid: \"Opłacona\",\n overdue: \"Zaległa\",\n cancelled: \"Anulowana\",\n completed: \"Zakończone\",\n processing: \"Przetwarzane\",\n refunded: \"Zwrócone\",\n};\n\nconst statusColor: Record<string, string> = {\n draft: \"text-neutral-400\",\n unpaid: \"text-yellow-500\",\n paid: \"text-green-600\",\n overdue: \"text-red-500\",\n cancelled: \"text-neutral-400 line-through\",\n completed: \"text-green-600\",\n processing: \"text-blue-500\",\n refunded: \"text-purple-500\",\n};\n\nfunction PanelOrderHistory({\n openOrderDetails,\n projectID,\n accessToken,\n}: PanelOrderHistoryComponentProps) {\n const [offset, setOffset] = useState(0);\n const limit = 20;\n\n const { data, isFetching } = useQuery(rpcProvider.publicApi.getOrders, {\n projectId: projectID,\n accessToken,\n offset,\n limit,\n });\n\n const orders = data?.orders ?? [];\n const totalCount = data?.totalCount ?? 0;\n const currentPage = Math.floor(offset / limit) + 1;\n const totalPages = Math.ceil(totalCount / limit);\n\n const handlePageChange = (newOffset: number) => {\n setOffset(newOffset);\n };\n\n return (\n <>\n <h3 className=\"text-2xl\">Historia zamówień</h3>\n <p className=\"text-sm text-neutral-500 dark:text-neutral-400\">\n Twoje zamówienia\n </p>\n\n {isFetching ? (\n <div className=\"mt-6 flex w-full flex-col gap-3\">\n {[...Array(5)].map((_, i) => (\n <div\n key={i}\n className=\"rounded-xl bg-white p-4 shadow-sm dark:bg-neutral-800\"\n >\n <div className=\"flex items-center justify-between\">\n <div className=\"space-y-2\">\n <Skeleton className=\"h-4 w-24\" />\n <Skeleton className=\"h-3 w-32\" />\n </div>\n <div className=\"space-y-2 text-right\">\n <Skeleton className=\"ml-auto h-4 w-16\" />\n <Skeleton className=\"ml-auto h-3 w-12\" />\n </div>\n </div>\n <div className=\"mt-3\">\n <Skeleton className=\"h-3 w-40\" />\n </div>\n </div>\n ))}\n </div>\n ) : orders.length === 0 ? (\n <div className=\"mt-6 text-sm text-neutral-400\">Brak zamówień.</div>\n ) : (\n <div>\n <div className=\"mt-6 flex w-full flex-col gap-3\">\n {orders.map((order) => (\n <button\n key={order.id}\n onClick={() => openOrderDetails(order.id)}\n className=\"block rounded-xl bg-white p-4 text-left shadow-sm transition-colors hover:bg-neutral-50 dark:bg-neutral-800 dark:hover:bg-neutral-700\"\n >\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"font-medium\">Zamówienie #{order.id}</p>\n <p className=\"text-xs text-neutral-500 dark:text-neutral-400\">\n {order.customerName || \"Klient\"}\n </p>\n </div>\n <div className=\"text-right\">\n <p className=\"font-semibold\">\n {formatAmount(order.totalAmount, order.currency)}\n </p>\n <p\n className={`text-xs font-medium ${statusColor[order.status] ?? \"text-neutral-400\"}`}\n >\n {statusLabel[order.status] ?? order.status}\n </p>\n </div>\n </div>\n\n <div className=\"mt-2 flex items-center justify-between text-xs text-neutral-500 dark:text-neutral-400\">\n <span>\n Data:{\" \"}\n {order.createdAt\n ? formatDate(Number(order.createdAt.seconds))\n : \"-\"}\n </span>\n </div>\n </button>\n ))}\n </div>\n\n {totalPages > 1 && !isFetching && (\n <div className=\"mt-4 flex justify-center\">\n <Pagination>\n <PaginationContent>\n {currentPage > 1 && (\n <PaginationItem>\n <PaginationPrevious\n onClick={() => handlePageChange(offset - limit)}\n />\n </PaginationItem>\n )}\n\n {currentPage > 2 && (\n <PaginationItem>\n <PaginationLink onClick={() => handlePageChange(0)}>\n 1\n </PaginationLink>\n </PaginationItem>\n )}\n\n {currentPage > 3 && (\n <PaginationItem>\n <PaginationEllipsis />\n </PaginationItem>\n )}\n\n {[currentPage - 1, currentPage, currentPage + 1]\n .filter((page) => page > 0 && page <= totalPages)\n .map((page) => (\n <PaginationItem key={page}>\n <PaginationLink\n onClick={() => handlePageChange((page - 1) * limit)}\n isActive={currentPage === page}\n >\n {page}\n </PaginationLink>\n </PaginationItem>\n ))}\n\n {currentPage < totalPages - 2 && (\n <PaginationItem>\n <PaginationEllipsis />\n </PaginationItem>\n )}\n\n {currentPage < totalPages && (\n <PaginationItem>\n <PaginationLink\n onClick={() =>\n handlePageChange((totalPages - 1) * limit)\n }\n >\n {totalPages}\n </PaginationLink>\n </PaginationItem>\n )}\n\n {currentPage < totalPages && (\n <PaginationItem>\n <PaginationNext\n onClick={() => handlePageChange(offset + limit)}\n />\n </PaginationItem>\n )}\n </PaginationContent>\n </Pagination>\n </div>\n )}\n </div>\n )}\n </>\n );\n}\n\nexport default PanelOrderHistory;\n","import { useState } from \"react\";\n\ninterface Plan {\n id: number;\n tierKey: string;\n tierName: string;\n configName: string;\n status: string;\n billingDay: number;\n startDate: number;\n endDate: number | null;\n}\n\ninterface PanelPlansComponentProps {\n projectID: string;\n}\n\nconst formatDate = (ts: number): string =>\n new Date(ts * 1000).toLocaleDateString(undefined, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n });\n\nconst statusLabel: Record<string, string> = {\n active: \"Aktywny\",\n cancelled: \"Anulowany\",\n paused: \"Wstrzymany\",\n};\n\nconst statusColor: Record<string, string> = {\n active: \"text-green-600\",\n cancelled: \"text-red-500\",\n paused: \"text-yellow-500\",\n};\n\nfunction PanelPlansComponent({ projectID: _projectID }: PanelPlansComponentProps) {\n const [plans, setPlans] = useState<Plan[]>([]);\n const [isLoading, setIsLoading] = useState(true);\n\n return (\n <>\n <h3 className=\"text-2xl\">Plany</h3>\n <p className=\"text-sm text-neutral-500\">Twoje aktywne subskrypcje</p>\n\n {isLoading ? (\n <div className=\"mt-6 text-sm text-neutral-400\">Ładowanie...</div>\n ) : plans.length === 0 ? (\n <div className=\"mt-6 text-sm text-neutral-400\">\n Brak aktywnych planów.\n </div>\n ) : (\n <div className=\"mt-6 flex flex-col gap-4\">\n {plans.map((plan) => (\n <div\n key={plan.id}\n className=\"rounded-xl bg-white p-5 shadow-sm dark:bg-neutral-800\"\n >\n <div className=\"flex items-start justify-between\">\n <div>\n <p className=\"font-semibold\">{plan.tierName}</p>\n {plan.configName && (\n <p className=\"text-sm text-neutral-500\">{plan.configName}</p>\n )}\n </div>\n <span\n className={`text-sm font-medium ${statusColor[plan.status] ?? \"text-neutral-500\"}`}\n >\n {statusLabel[plan.status] ?? plan.status}\n </span>\n </div>\n <div className=\"mt-3 grid grid-cols-2 gap-2 text-sm text-neutral-600 dark:text-neutral-400\">\n <div>\n <span className=\"font-medium\">Dzień rozliczenia:</span>{\" \"}\n {plan.billingDay}\n </div>\n <div>\n <span className=\"font-medium\">Data startu:</span>{\" \"}\n {formatDate(plan.startDate)}\n </div>\n {plan.endDate && (\n <div>\n <span className=\"font-medium\">Data zakończenia:</span>{\" \"}\n {formatDate(plan.endDate)}\n </div>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </>\n );\n}\n\nexport default PanelPlansComponent;\n","import { Loader2Icon } from \"lucide-react\"\n\nimport { cn } from \"@/src/lib/utils\"\n\nfunction Spinner({ className, ...props }: React.ComponentProps<\"svg\">) {\n return (\n <Loader2Icon\n role=\"status\"\n aria-label=\"Loading\"\n className={cn(\"size-4 animate-spin\", className)}\n {...props}\n />\n )\n}\n\nexport { Spinner }\n","import * as React from \"react\";\n\nimport { cn } from \"../lib/utils\";\n\nexport interface TextareaProps\n extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, ...props }, ref) => {\n return (\n <textarea\n className={cn(\n \"flex min-h-[60px] w-full rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus-visible:ring-neutral-300\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nTextarea.displayName = \"Textarea\";\n\nexport { Textarea };\n","import type { CSSProperties } from \"react\";\n\n/**\n * Generic building blocks shared by the appearance modules (checkout, and\n * later returns). Each module supplies its own token to CSS variable map, theme\n * presets and shadcn mapping, and keeps its own public types. Everything here\n * is pure so it can be tested without a DOM.\n */\n\n/** Caller overrides for a single slot. */\nexport type SlotAppearance = {\n /** Merged after the built-in classes with `cn`, so Tailwind conflicts resolve. */\n className?: string;\n /** Merged after the built-in inline styles. */\n style?: CSSProperties;\n};\n\n/** Typed partial map of slot name to its overrides. */\nexport type AppearanceElements<Slot extends string> = Partial<\n Record<Slot, SlotAppearance>\n>;\n\n/** CSS custom property used for each token. */\nexport type TokenVariables<Token extends string> = Readonly<\n Record<Token, string>\n>;\n\n/**\n * Remaps a token onto a shadcn theme variable (`--background`, `--ring`, ...)\n * so shared UI primitives follow the module's tokens. Only written when the\n * token is in effect.\n */\nexport type ShadcnVariableMapping<Token extends string> = readonly {\n token: Token;\n variable: string;\n}[];\n\nexport type AppearanceCoreConfig<Token extends string, Theme extends string> = {\n /** Theme used when the caller does not select one. */\n defaultTheme: Theme;\n /** Partial token sets applied underneath the caller tokens. */\n presets: Record<Theme, Partial<Record<Token, string>>>;\n variables: TokenVariables<Token>;\n shadcnVariables: ShadcnVariableMapping<Token>;\n};\n\nexport type ResolvedAppearanceCore<\n Token extends string,\n Theme extends string,\n Slot extends string,\n> = {\n theme: Theme;\n /** `true` as soon as the caller passed a theme, a token or a slot override. */\n isCustomized: boolean;\n /** Tokens that are in effect. Empty entries were dropped. */\n tokens: Partial<Record<Token, string>>;\n elements: AppearanceElements<Slot>;\n /** Inline custom properties for the theme boundary. */\n boundaryStyle: CSSProperties;\n};\n\n/** Drops `undefined`/`null` tokens so unset values keep the stylesheet default. */\nexport function omitUndefined<Token extends string>(\n tokens: Partial<Record<Token, string>>,\n): Partial<Record<Token, string>> {\n const result: Record<string, unknown> = {};\n\n for (const [key, value] of Object.entries(tokens)) {\n if (value != null) {\n result[key] = value;\n }\n }\n\n return result as Partial<Record<Token, string>>;\n}\n\nexport function hasAnyElement<Slot extends string>(\n elements: AppearanceElements<Slot>,\n): boolean {\n return Object.values<SlotAppearance | undefined>(elements).some(\n (element) =>\n element != null && (element.className != null || element.style != null),\n );\n}\n\n/**\n * Token to CSS variable resolution, followed by the shadcn remapping. Only\n * tokens that are in effect produce a variable.\n */\nexport function resolveBoundaryStyle<Token extends string>(\n tokens: Partial<Record<Token, string>>,\n variables: TokenVariables<Token>,\n shadcnVariables: ShadcnVariableMapping<Token>,\n): CSSProperties {\n const style: Record<string, string> = {};\n\n for (const [token, variable] of Object.entries<string>(variables)) {\n const value = tokens[token as Token];\n if (value != null) {\n style[variable] = value;\n }\n }\n\n for (const { token, variable } of shadcnVariables) {\n const value = tokens[token];\n if (value != null) {\n style[variable] = value;\n }\n }\n\n return style as CSSProperties;\n}\n\n/**\n * Resolves theme, tokens, slot overrides and the boundary style. The resolver\n * never invents values: a token is only present when the caller provided it or\n * selected a theme preset that carries it.\n */\nexport function resolveAppearanceCore<\n Token extends string,\n Theme extends string,\n Slot extends string,\n>(\n appearance:\n | {\n theme?: Theme;\n tokens?: Partial<Record<Token, string>>;\n elements?: AppearanceElements<Slot>;\n }\n | undefined,\n config: AppearanceCoreConfig<Token, Theme>,\n): ResolvedAppearanceCore<Token, Theme, Slot> {\n const theme: Theme = appearance?.theme ?? config.defaultTheme;\n\n const tokens = omitUndefined<Token>({\n ...config.presets[theme],\n ...appearance?.tokens,\n });\n\n const elements = appearance?.elements ?? {};\n\n return {\n theme,\n isCustomized:\n appearance?.theme != null ||\n Object.keys(tokens).length > 0 ||\n hasAnyElement(elements),\n tokens,\n elements,\n boundaryStyle: resolveBoundaryStyle(\n tokens,\n config.variables,\n config.shadcnVariables,\n ),\n };\n}\n\n/** Caller overrides for a slot, if any were provided. */\nexport function getSlotAppearance<Slot extends string>(\n elements: AppearanceElements<Slot>,\n slot: Slot,\n): SlotAppearance | undefined {\n return elements[slot];\n}\n","import type { CSSProperties } from \"react\";\nimport {\n getSlotAppearance,\n resolveAppearanceCore,\n type AppearanceElements,\n type ShadcnVariableMapping,\n type SlotAppearance,\n} from \"@/src/lib/appearance-core\";\n\n/**\n * Returns appearance API.\n *\n * It mirrors `CheckoutAppearance` (theme, tokens, elements) so a shop can reuse\n * one brand object for both. The resolver is pure: it turns the caller input\n * into a theme name, the tokens in effect, the slot overrides and the inline\n * style for the theme boundary.\n */\n\nexport type ReturnsTheme = \"light\" | \"dark\";\n\nexport type ReturnsAppearanceTokens = {\n /** Font family of the returns views. The library never loads fonts. */\n fontFamily?: string;\n /** Base font size. */\n fontSize?: string;\n /** Page background. */\n background?: string;\n /** Raised surfaces: cards, skeletons, summaries. */\n surface?: string;\n /** Main text color. */\n foreground?: string;\n /** Secondary text: descriptions, dates, hints. */\n mutedForeground?: string;\n /** Borders of cards, inputs and separators. */\n border?: string;\n /** Primary button background. */\n buttonBackground?: string;\n /** Primary button text. */\n buttonForeground?: string;\n /** Primary button background on hover. */\n buttonHoverBackground?: string;\n /** Hover surface of secondary buttons and selectable cards. */\n hoverSurface?: string;\n /** Focus ring color. Also applied to shared UI primitives through `--ring`. */\n focusRing?: string;\n /** Error color. */\n error?: string;\n /** Success color: result screen, completed and refunded statuses. */\n success?: string;\n /** Warning color: statuses that need attention. */\n warning?: string;\n /** Status badge background. */\n badgeBackground?: string;\n /** Status badge text. */\n badgeForeground?: string;\n /** Background of text inputs and the note field. */\n inputBackground?: string;\n /** Corner radius, applied through `--radius`. */\n radius?: string;\n};\n\n/**\n * Stable slot names. They are exposed as `data-bitsnap-returns-slot`\n * attributes so they can also be targeted from plain CSS.\n */\nexport const RETURNS_SLOT_NAMES = [\n // Frame\n \"root\",\n \"header\",\n \"title\",\n \"description\",\n \"backButton\",\n \"stepIndicator\",\n \"error\",\n \"emptyState\",\n \"skeleton\",\n // Auth\n \"emailForm\",\n \"emailInput\",\n \"codeForm\",\n \"codeInput\",\n \"resendButton\",\n \"logoutButton\",\n // Orders\n \"orderList\",\n \"orderCard\",\n \"orderReference\",\n \"orderDate\",\n \"orderTotal\",\n \"pagination\",\n // Selection\n \"lineList\",\n \"line\",\n \"lineName\",\n \"linePrice\",\n \"lineQuantityControl\",\n \"quantityButton\",\n \"quantityInput\",\n \"lineIneligibleReason\",\n \"noteInput\",\n // Confirmation and result\n \"summary\",\n \"submitButton\",\n \"secondaryButton\",\n \"successState\",\n \"returnReference\",\n \"returnInstructions\",\n // My returns\n \"returnList\",\n \"returnCard\",\n \"statusBadge\",\n \"history\",\n \"historyEntry\",\n] as const;\n\nexport type ReturnsSlotName = (typeof RETURNS_SLOT_NAMES)[number];\n\nexport type ReturnsSlotAppearance = SlotAppearance;\n\nexport type ReturnsAppearanceElements = AppearanceElements<ReturnsSlotName>;\n\nexport type ReturnsAppearance = {\n /** `\"light\"` or `\"dark\"`. Omitted means `\"light\"`. */\n theme?: ReturnsTheme;\n /** Partial overrides applied over the theme preset. */\n tokens?: ReturnsAppearanceTokens;\n /** Per element `className`/`style` overrides. */\n elements?: ReturnsAppearanceElements;\n};\n\nexport type ResolvedReturnsAppearance = {\n theme: ReturnsTheme;\n /** Tokens that are in effect (the theme preset plus caller overrides). */\n tokens: ReturnsAppearanceTokens;\n elements: ReturnsAppearanceElements;\n /** Theme marker class for the theme boundary. */\n boundaryClassName: string;\n /** Inline custom properties applied to the returns root. */\n boundaryStyle: CSSProperties;\n};\n\n/** CSS custom property used for each token. */\nexport const RETURNS_TOKEN_VARIABLES = {\n fontFamily: \"--bitsnap-returns-font-family\",\n fontSize: \"--bitsnap-returns-font-size\",\n background: \"--bitsnap-returns-background\",\n surface: \"--bitsnap-returns-surface\",\n foreground: \"--bitsnap-returns-foreground\",\n mutedForeground: \"--bitsnap-returns-muted-foreground\",\n border: \"--bitsnap-returns-border\",\n buttonBackground: \"--bitsnap-returns-button-background\",\n buttonForeground: \"--bitsnap-returns-button-foreground\",\n buttonHoverBackground: \"--bitsnap-returns-button-hover-background\",\n hoverSurface: \"--bitsnap-returns-hover-surface\",\n focusRing: \"--bitsnap-returns-focus-ring\",\n error: \"--bitsnap-returns-error\",\n success: \"--bitsnap-returns-success\",\n warning: \"--bitsnap-returns-warning\",\n badgeBackground: \"--bitsnap-returns-badge-background\",\n badgeForeground: \"--bitsnap-returns-badge-foreground\",\n inputBackground: \"--bitsnap-returns-input-background\",\n radius: \"--bitsnap-returns-radius\",\n} as const;\n\nexport type ReturnsTokenName = keyof typeof RETURNS_TOKEN_VARIABLES;\n\n/**\n * Complete palettes. They carry colors and radius only, so typography is never\n * reset implicitly. `returns.css` falls back to the light values, which keeps\n * the views usable even when the boundary style is missing.\n */\nexport const RETURNS_THEME_PRESETS: Record<\n ReturnsTheme,\n ReturnsAppearanceTokens\n> = {\n light: {\n background: \"#ffffff\",\n surface: \"#f9fafb\",\n foreground: \"#18181b\",\n mutedForeground: \"#71717a\",\n border: \"#e4e4e7\",\n buttonBackground: \"#18181b\",\n buttonForeground: \"#fafafa\",\n buttonHoverBackground: \"#000000\",\n hoverSurface: \"#f4f4f5\",\n focusRing: \"#71717a\",\n error: \"#dc2626\",\n success: \"#16a34a\",\n warning: \"#d97706\",\n badgeBackground: \"#f4f4f5\",\n badgeForeground: \"#3f3f46\",\n inputBackground: \"#ffffff\",\n radius: \"8px\",\n },\n dark: {\n background: \"#18181b\",\n surface: \"#27272a\",\n foreground: \"#fafafa\",\n mutedForeground: \"#a1a1aa\",\n border: \"#3f3f46\",\n buttonBackground: \"#fafafa\",\n buttonForeground: \"#18181b\",\n buttonHoverBackground: \"#e4e4e7\",\n hoverSurface: \"#3f3f46\",\n focusRing: \"#a1a1aa\",\n error: \"#f87171\",\n success: \"#4ade80\",\n warning: \"#fbbf24\",\n badgeBackground: \"#3f3f46\",\n badgeForeground: \"#e4e4e7\",\n inputBackground: \"#27272a\",\n radius: \"8px\",\n },\n};\n\n/**\n * Shared UI primitives (`Button`, `Input`, `Label`, ...) read the shadcn theme\n * variables, so those follow the returns tokens inside the boundary.\n */\nconst RETURNS_SHADCN_VARIABLES: ShadcnVariableMapping<ReturnsTokenName> = [\n { token: \"background\", variable: \"--background\" },\n { token: \"foreground\", variable: \"--foreground\" },\n { token: \"surface\", variable: \"--card\" },\n { token: \"foreground\", variable: \"--card-foreground\" },\n { token: \"surface\", variable: \"--popover\" },\n { token: \"foreground\", variable: \"--popover-foreground\" },\n { token: \"buttonBackground\", variable: \"--primary\" },\n { token: \"buttonForeground\", variable: \"--primary-foreground\" },\n { token: \"surface\", variable: \"--secondary\" },\n { token: \"foreground\", variable: \"--secondary-foreground\" },\n { token: \"hoverSurface\", variable: \"--accent\" },\n { token: \"foreground\", variable: \"--accent-foreground\" },\n { token: \"mutedForeground\", variable: \"--muted-foreground\" },\n { token: \"border\", variable: \"--border\" },\n { token: \"border\", variable: \"--input\" },\n { token: \"focusRing\", variable: \"--ring\" },\n { token: \"error\", variable: \"--destructive\" },\n { token: \"radius\", variable: \"--radius\" },\n];\n\nexport function resolveReturnsAppearance(\n appearance?: ReturnsAppearance,\n): ResolvedReturnsAppearance {\n const resolved = resolveAppearanceCore<\n ReturnsTokenName,\n ReturnsTheme,\n ReturnsSlotName\n >(appearance, {\n defaultTheme: \"light\",\n presets: RETURNS_THEME_PRESETS,\n variables: RETURNS_TOKEN_VARIABLES,\n shadcnVariables: RETURNS_SHADCN_VARIABLES,\n });\n\n return {\n theme: resolved.theme,\n tokens: resolved.tokens,\n elements: resolved.elements,\n boundaryClassName: resolved.theme,\n boundaryStyle: resolved.boundaryStyle,\n };\n}\n\n/** Caller overrides for a single slot, if any were provided. */\nexport function getReturnsSlotAppearance(\n resolved: ResolvedReturnsAppearance,\n slot: ReturnsSlotName,\n): ReturnsSlotAppearance | undefined {\n return getSlotAppearance(resolved.elements, slot);\n}\n","import { createContext, useContext, useMemo } from \"react\";\nimport type { ReactNode } from \"react\";\nimport {\n getReturnsSlotAppearance,\n resolveReturnsAppearance,\n type ResolvedReturnsAppearance,\n type ReturnsAppearance,\n type ReturnsSlotAppearance,\n type ReturnsSlotName,\n} from \"./appearance\";\n\nconst ReturnsAppearanceContext = createContext<ResolvedReturnsAppearance>(\n resolveReturnsAppearance(),\n);\n\n/**\n * Returns scoped appearance provider. It only wraps the returns views, so the\n * configuration never leaks into checkout, the panel or the host page.\n */\nexport function ReturnsAppearanceProvider({\n appearance,\n children,\n}: {\n appearance?: ReturnsAppearance;\n children: ReactNode;\n}) {\n const resolved = useMemo(\n () => resolveReturnsAppearance(appearance),\n [appearance],\n );\n\n return (\n <ReturnsAppearanceContext.Provider value={resolved}>\n {children}\n </ReturnsAppearanceContext.Provider>\n );\n}\n\nexport function useReturnsAppearance(): ResolvedReturnsAppearance {\n return useContext(ReturnsAppearanceContext);\n}\n\n/**\n * Returns the caller overrides for a slot, meant to be merged with the\n * built-in presentation:\n *\n * ```tsx\n * const slot = useReturnsSlot(\"title\");\n *\n * return <h2 className={cn(\"text-xl font-semibold\", slot.className)} style={slot.style} />;\n * ```\n */\nexport function useReturnsSlot(slot: ReturnsSlotName): ReturnsSlotAppearance {\n const resolved = useReturnsAppearance();\n\n return getReturnsSlotAppearance(resolved, slot) ?? {};\n}\n","import type { ReturnsTextKey } from \"./texts\";\n\n/** Backend error code that means the returns session is gone. */\nexport const SESSION_EXPIRED = \"SESSION_EXPIRED\";\n\nconst ERROR_TEXT_KEYS: Record<string, ReturnsTextKey> = {\n INVALID_EMAIL: \"errorInvalidEmail\",\n INVALID_OR_EXPIRED_CODE: \"errorInvalidCode\",\n SESSION_EXPIRED: \"errorSessionExpired\",\n ORDER_NOT_FOUND: \"errorOrderNotFound\",\n RETURN_NOT_FOUND: \"errorReturnNotFound\",\n QUANTITY_UNAVAILABLE: \"errorQuantityUnavailable\",\n ITEM_NOT_RETURNABLE: \"errorItemNotReturnable\",\n INVALID_RETURN_ITEMS: \"errorItemNotReturnable\",\n RETURNS_DISABLED: \"errorReturnsDisabled\",\n SUBMISSION_RATE_LIMITED: \"errorRateLimited\",\n IDEMPOTENCY_CONFLICT: \"errorIdempotencyConflict\",\n VERIFICATION_DELIVERY_FAILED: \"errorDeliveryFailed\",\n};\n\n/**\n * Backend error code of a failed RPC. `ConnectError.rawMessage` carries it; for\n * other errors the message is searched for a known code.\n */\nexport function getReturnsErrorCode(error: unknown): string | undefined {\n if (error == null || typeof error !== \"object\") {\n return undefined;\n }\n\n const { rawMessage, message } = error as {\n rawMessage?: unknown;\n message?: unknown;\n };\n\n if (typeof rawMessage === \"string\" && rawMessage.length > 0) {\n return rawMessage;\n }\n\n if (typeof message === \"string\") {\n return Object.keys(ERROR_TEXT_KEYS).find((code) => message.includes(code));\n }\n\n return undefined;\n}\n\nexport function isSessionExpiredError(error: unknown): boolean {\n return getReturnsErrorCode(error) === SESSION_EXPIRED;\n}\n\n/** Maps any failure to the text key of a customer facing message. */\nexport function mapReturnsError(error: unknown): ReturnsTextKey {\n const code = getReturnsErrorCode(error);\n\n return (code != null ? ERROR_TEXT_KEYS[code] : undefined) ?? \"errorGeneric\";\n}\n","/**\n * New idempotency key for one return submission. Uses `crypto.randomUUID`\n * where available and falls back to random bytes (or `Math.random` as the last\n * resort) so older browsers and non-secure contexts keep working. Keys stay\n * well below the 128 character backend limit.\n */\nexport function createIdempotencyKey(): string {\n const cryptoObject: Crypto | undefined =\n typeof globalThis !== \"undefined\" ? globalThis.crypto : undefined;\n\n if (typeof cryptoObject?.randomUUID === \"function\") {\n return cryptoObject.randomUUID();\n }\n\n const bytes = new Uint8Array(16);\n if (typeof cryptoObject?.getRandomValues === \"function\") {\n cryptoObject.getRandomValues(bytes);\n } else {\n for (let i = 0; i < bytes.length; i++) {\n bytes[i] = Math.floor(Math.random() * 256);\n }\n }\n\n return Array.from(bytes, (byte) => byte.toString(16).padStart(2, \"0\")).join(\n \"\",\n );\n}\n","import { Environment } from \"@/src/gen/proto/common/v1/environment_pb\";\nimport type { ReturnsAppearance } from \"./appearance\";\nimport { brandColorTokens } from \"./color\";\nimport type { ReturnsTexts } from \"./texts\";\n\n/**\n * Compatibility layer for the `bitsnap-react` 1.6.0 returns widget. Everything\n * here is pure; the components and hooks apply it at their boundary.\n */\n\n/** Environment as a string or as the proto enum used by 1.6.0. */\nexport type ReturnsEnvironmentInput = \"production\" | \"test\" | Environment;\n\n/** Text keys of the 1.6.0 widget. */\nexport type LegacyReturnsTexts = Partial<{\n title: string;\n email: string;\n sendCode: string;\n code: string;\n verify: string;\n orders: string;\n submit: string;\n note: string;\n loading: string;\n history: string;\n}>;\n\n/** Our text keys plus the 1.6.0 ones. Our keys win when both are given. */\nexport type ReturnsTextsInput = Partial<ReturnsTexts> & LegacyReturnsTexts;\n\n/** 1.6.0 `theme` prop. */\nexport type LegacyReturnsTheme = { brandColor?: string };\n\n/** Backend environment for a string or enum value. Defaults to production. */\nexport function resolveReturnsEnvironment(\n environment?: ReturnsEnvironmentInput,\n): Environment {\n return environment === \"test\" || environment === Environment.TEST\n ? Environment.TEST\n : Environment.PRODUCTION;\n}\n\nconst LEGACY_TEXT_KEYS: Record<\n Exclude<keyof LegacyReturnsTexts, \"loading\">,\n readonly (keyof ReturnsTexts)[]\n> = {\n title: [\"emailStepTitle\"],\n email: [\"emailLabel\"],\n sendCode: [\"emailSubmit\"],\n code: [\"codeLabel\"],\n verify: [\"codeSubmit\"],\n orders: [\"ordersTitle\"],\n submit: [\"confirmationSubmit\"],\n note: [\"noteLabel\"],\n history: [\"myReturnsTitle\", \"myReturnsLink\"],\n};\n\n/**\n * Maps 1.6.0 text keys onto ours. A key of the new API always wins over the\n * legacy key that maps to it. `loading` has the same name in both.\n */\nexport function mapLegacyTexts(\n texts: ReturnsTextsInput | undefined,\n): Partial<ReturnsTexts> | undefined {\n if (texts == null) {\n return undefined;\n }\n\n const result: Partial<ReturnsTexts> = {};\n for (const [legacyKey, targets] of Object.entries(LEGACY_TEXT_KEYS) as [\n keyof typeof LEGACY_TEXT_KEYS,\n readonly (keyof ReturnsTexts)[],\n ][]) {\n const value = texts[legacyKey];\n if (typeof value === \"string\") {\n for (const target of targets) {\n result[target] = value;\n }\n }\n }\n\n for (const key of Object.keys(texts) as (keyof ReturnsTextsInput)[]) {\n if (key in LEGACY_TEXT_KEYS) {\n continue;\n }\n const value = texts[key];\n if (typeof value === \"string\") {\n result[key as keyof ReturnsTexts] = value;\n }\n }\n\n return result;\n}\n\n/**\n * Appearance with the 1.6.0 `brandColor` applied as button background, focus\n * ring and readable button foreground. Explicit `appearance.tokens` win.\n */\nexport function resolveBrandAppearance(\n appearance: ReturnsAppearance | undefined,\n theme: LegacyReturnsTheme | undefined,\n): ReturnsAppearance | undefined {\n const color = theme?.brandColor?.trim();\n if (color == null || color === \"\") {\n return appearance;\n }\n return {\n ...appearance,\n tokens: { ...brandColorTokens(color), ...appearance?.tokens },\n };\n}\n\n/** Arguments of the paged hooks in either call style. */\nexport type PagedArguments = {\n pageSize: number;\n /** Explicit page token of the positional (1.6.0) form. */\n explicitPageToken: string | undefined;\n};\n\n/**\n * Normalizes `(pageSize?, pageToken?)` (1.6.0) and `({ pageSize })` (ours).\n * Both forms default to 20 items, like 1.6.0.\n */\nexport function resolvePagedArguments(\n first: number | { pageSize?: number } | undefined,\n pageToken: string | undefined,\n): PagedArguments {\n if (typeof first === \"object\" && first != null) {\n return { pageSize: first.pageSize ?? 20, explicitPageToken: undefined };\n }\n if (typeof first === \"number\" || pageToken !== undefined) {\n return { pageSize: first ?? 20, explicitPageToken: pageToken ?? \"\" };\n }\n return { pageSize: 20, explicitPageToken: undefined };\n}\n","import { timestampMs, type Timestamp } from \"@bufbuild/protobuf/wkt\";\n\n/** Returns session as kept in `sessionStorage`. */\nexport type StoredReturnsSession = {\n token: string;\n /** Expiry as unix milliseconds. */\n expiresAt: number;\n};\n\n/** The part of `Storage` the session code needs. */\nexport type SessionStorageLike = Pick<\n Storage,\n \"getItem\" | \"setItem\" | \"removeItem\"\n>;\n\nconst KEY_PREFIX = \"bitsnap-returns-session:\";\n\n/** One key per project, so projects on the same page never share a session. */\nexport function sessionStorageKey(projectID: string): string {\n return `${KEY_PREFIX}${projectID}`;\n}\n\n/**\n * `window.sessionStorage` when it is usable, otherwise `undefined`. Safe to\n * call on the server and where storage access throws (blocked cookies).\n */\nexport function getBrowserSessionStorage(): SessionStorageLike | undefined {\n try {\n return typeof window !== \"undefined\" ? window.sessionStorage : undefined;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Reads the stored session. Malformed and expired entries are removed and\n * reported as no session.\n */\nexport function readStoredSession(\n storage: SessionStorageLike | undefined,\n projectID: string,\n now: number = Date.now(),\n): StoredReturnsSession | undefined {\n if (storage == null) {\n return undefined;\n }\n\n const key = sessionStorageKey(projectID);\n\n try {\n const raw = storage.getItem(key);\n if (raw == null) {\n return undefined;\n }\n\n const parsed: unknown = JSON.parse(raw);\n if (\n parsed != null &&\n typeof parsed === \"object\" &&\n typeof (parsed as StoredReturnsSession).token === \"string\" &&\n (parsed as StoredReturnsSession).token.length > 0 &&\n typeof (parsed as StoredReturnsSession).expiresAt === \"number\" &&\n (parsed as StoredReturnsSession).expiresAt > now\n ) {\n const { token, expiresAt } = parsed as StoredReturnsSession;\n return { token, expiresAt };\n }\n\n storage.removeItem(key);\n } catch {\n try {\n storage.removeItem(key);\n } catch {\n // Storage is unusable; nothing else to clean up.\n }\n }\n\n return undefined;\n}\n\nexport function writeStoredSession(\n storage: SessionStorageLike | undefined,\n projectID: string,\n session: StoredReturnsSession,\n): void {\n try {\n storage?.setItem(sessionStorageKey(projectID), JSON.stringify(session));\n } catch {\n // The session still works in memory when storage is full or blocked.\n }\n}\n\nexport function clearStoredSession(\n storage: SessionStorageLike | undefined,\n projectID: string,\n): void {\n try {\n storage?.removeItem(sessionStorageKey(projectID));\n } catch {\n // Nothing to do when storage is blocked.\n }\n}\n\n/** Expiry of a backend session in unix milliseconds, `undefined` when missing. */\nexport function expiryToMillis(\n expiresAt: Timestamp | undefined,\n): number | undefined {\n return expiresAt == null ? undefined : timestampMs(expiresAt);\n}\n","/**\n * Shared text machinery: typed string tables per locale, the locale fallback\n * and a merge with caller overrides. Each module (checkout, later returns)\n * supplies its own key type and default tables.\n */\n\n/** Strings of one locale, keyed by text key. */\nexport type TextTable<Key extends string> = Record<Key, string>;\n\n/** Default tables for the supported locales. */\nexport type LocaleTables<Key extends string> = {\n en: TextTable<Key>;\n pl: TextTable<Key>;\n};\n\n/**\n * Picks the table for a locale. Any locale starting with `en` (case\n * insensitive, so `en`, `en-US`, `EN-gb`) gets English; everything else,\n * including unknown locales, gets the Polish default.\n */\nexport function pickLocaleTable<Key extends string>(\n tables: LocaleTables<Key>,\n locale: string,\n): TextTable<Key> {\n return locale.toLowerCase().startsWith(\"en\") ? tables.en : tables.pl;\n}\n\n/**\n * Merges caller overrides over a table. Overrides apply regardless of the\n * locale; `undefined`/`null` entries are ignored so the default stays.\n */\nexport function mergeTexts<Key extends string>(\n table: TextTable<Key>,\n overrides?: Partial<TextTable<Key>>,\n): TextTable<Key> {\n const result: Record<string, string> = { ...table };\n\n if (overrides != null) {\n for (const [key, value] of Object.entries<string | undefined>(overrides)) {\n if (value != null) {\n result[key] = value;\n }\n }\n }\n\n return result as TextTable<Key>;\n}\n\n/** Locale table merged with the caller overrides. */\nexport function resolveTexts<Key extends string>(\n tables: LocaleTables<Key>,\n locale: string,\n overrides?: Partial<TextTable<Key>>,\n): TextTable<Key> {\n return mergeTexts(pickLocaleTable(tables, locale), overrides);\n}\n\n/** Looks up a single text. Unknown keys return the key itself. */\nexport function lookupText<Key extends string>(\n texts: TextTable<Key>,\n key: Key,\n): string {\n return (texts as Record<string, string | undefined>)[key] ?? key;\n}\n","import {\n lookupText,\n resolveTexts,\n type LocaleTables,\n} from \"@/src/lib/texts\";\n\n/**\n * Every string the checkout renders. Pass a partial object through the\n * `texts` prop of `BitsnapCheckout` to override any of them, whatever the\n * locale.\n */\nexport type CheckoutTexts = {\n /** Drawer title. */\n cart: string;\n /** Shown when the cart has no products. */\n emptyCart: string;\n /** Label next to the total price. */\n total: string;\n /** Delivery note next to the total price. */\n delivery: string;\n /** Country selector placeholder. */\n chooseCountry: string;\n /** Checkout button label. */\n nextStep: string;\n /** Error shown when some products are out of stock. */\n unavailableProducts: string;\n};\n\nexport type CheckoutTextKey = keyof CheckoutTexts;\n\nexport const CHECKOUT_TEXT_TABLES: LocaleTables<CheckoutTextKey> = {\n en: {\n cart: \"Cart\",\n emptyCart: \"Your cart is empty.\",\n total: \"Total:\",\n delivery: \"+ delivery\",\n chooseCountry: \"Choose a country\",\n nextStep: \"Next step\",\n unavailableProducts: \"Not all products are available.\",\n },\n pl: {\n cart: \"Koszyk\",\n emptyCart: \"Brak produktów w koszyku.\",\n total: \"Suma:\",\n delivery: \"+ dostawa\",\n chooseCountry: \"Wybierz kraj\",\n nextStep: \"Następny krok\",\n unavailableProducts: \"Nie wszystkie produkty są dostępne w magazynie.\",\n },\n};\n\n/** Default texts for a locale merged with the caller overrides. */\nexport function resolveCheckoutTexts(\n locale: string,\n overrides?: Partial<CheckoutTexts>,\n): CheckoutTexts {\n return resolveTexts(CHECKOUT_TEXT_TABLES, locale, overrides);\n}\n\nexport function getCheckoutText(\n key: CheckoutTextKey,\n locale: string,\n overrides?: Partial<CheckoutTexts>,\n): string {\n return lookupText(resolveCheckoutTexts(locale, overrides), key);\n}\n","import { pickLocaleTable } from \"@/src/lib/texts\";\nimport { CHECKOUT_TEXT_TABLES } from \"./texts\";\n\nexport const DEFAULT_LOCALE = \"pl-PL\" as const;\nconst localeStorageKey = \"bitsnap-locale\";\n\nlet activeLocale: string | undefined;\n\nexport function setLocale(locale?: string): void {\n const value = locale?.trim();\n activeLocale = value\n ? value.toLowerCase() === \"en\"\n ? \"en-US\"\n : value.toLowerCase() === \"pl\"\n ? DEFAULT_LOCALE\n : value\n : undefined;\n if (typeof localStorage !== \"undefined\") {\n if (activeLocale == null) {\n localStorage.removeItem(localeStorageKey);\n } else {\n localStorage.setItem(localeStorageKey, activeLocale);\n }\n }\n}\n\nexport function getLocale(): string {\n if (activeLocale != null) {\n return activeLocale;\n }\n if (typeof localStorage !== \"undefined\") {\n return localStorage.getItem(localeStorageKey) ?? DEFAULT_LOCALE;\n }\n return DEFAULT_LOCALE;\n}\n\nexport function translate(key: string, locale: string = getLocale()): string {\n return (\n (pickLocaleTable(CHECKOUT_TEXT_TABLES, locale) as Record<string, string>)[\n key\n ] ?? key\n );\n}\n","import { lookupText, resolveTexts, type LocaleTables } from \"@/src/lib/texts\";\n\n/**\n * Every string the returns views render. Pass a partial object through the\n * `texts` prop of `BitsnapReturns`/`ReturnsProvider` to override any of them,\n * whatever the locale. Strings with `{name}` placeholders keep them in\n * overrides; unknown placeholders are left untouched.\n */\nexport type ReturnsTexts = {\n // Frame\n /** Label of the back buttons. */\n back: string;\n /** Step indicator, placeholders `{current}` and `{total}`. */\n stepIndicator: string;\n /** Skeleton accessible label. */\n loading: string;\n /** Button that opens the list of previous returns. */\n myReturnsLink: string;\n\n // Email step\n emailStepTitle: string;\n emailStepDescription: string;\n emailLabel: string;\n emailPlaceholder: string;\n emailSubmit: string;\n\n // Code step\n codeStepTitle: string;\n /** Placeholder `{email}`. */\n codeStepDescription: string;\n codeLabel: string;\n codeSubmit: string;\n resend: string;\n /** Placeholder `{seconds}`. */\n resendIn: string;\n logout: string;\n\n // Orders\n ordersTitle: string;\n ordersDescription: string;\n ordersEmpty: string;\n /** Placeholder `{reference}`. */\n orderTitle: string;\n /** Placeholder `{count}`. */\n orderReturnableLines: string;\n orderSelect: string;\n paginationPrevious: string;\n paginationNext: string;\n /** Placeholders `{page}` and `{total}` (number of orders). */\n paginationInfo: string;\n\n // Order detail\n /** Placeholder `{reference}`. */\n orderDetailTitle: string;\n orderDetailDescription: string;\n /** Placeholder `{name}`. */\n quantityLabel: string;\n /** Placeholder `{name}`. */\n quantityDecrease: string;\n /** Placeholder `{name}`. */\n quantityIncrease: string;\n /** Placeholder `{available}`. */\n quantityOfAvailable: string;\n /** Shown for an ineligible line without a reason from the backend. */\n lineIneligibleFallback: string;\n noteLabel: string;\n notePlaceholder: string;\n selectionContinue: string;\n selectionEmpty: string;\n previousReturnsTitle: string;\n\n // Confirmation\n confirmationTitle: string;\n confirmationDescription: string;\n confirmationSummary: string;\n /** Placeholder `{quantity}`. */\n confirmationQuantity: string;\n confirmationNote: string;\n confirmationSubmit: string;\n\n // Result\n successTitle: string;\n successDescription: string;\n successReference: string;\n successInstructions: string;\n successDone: string;\n\n // My returns\n myReturnsTitle: string;\n myReturnsDescription: string;\n myReturnsEmpty: string;\n myReturnOpen: string;\n myReturnDetailTitle: string;\n /** Placeholder `{reference}`. */\n myReturnTitle: string;\n myReturnCreatedAt: string;\n myReturnRefund: string;\n myReturnLines: string;\n /** Placeholders `{requested}`, `{approved}`, `{received}`. */\n myReturnLineQuantities: string;\n myReturnNote: string;\n myReturnHistory: string;\n\n // Request status labels\n statusSubmitted: string;\n statusApproved: string;\n statusRejected: string;\n statusAwaitingReceipt: string;\n statusReceived: string;\n statusCompleted: string;\n statusCancelled: string;\n statusRefunded: string;\n /** Any status the backend adds later. */\n statusFallback: string;\n\n // Refund status labels\n refundStatusNotStarted: string;\n refundStatusPending: string;\n refundStatusSucceeded: string;\n refundStatusFailed: string;\n refundStatusFallback: string;\n\n // Error messages\n errorGeneric: string;\n errorInvalidEmail: string;\n errorInvalidCode: string;\n errorSessionExpired: string;\n errorOrderNotFound: string;\n errorReturnNotFound: string;\n errorQuantityUnavailable: string;\n errorItemNotReturnable: string;\n errorReturnsDisabled: string;\n errorRateLimited: string;\n errorIdempotencyConflict: string;\n errorDeliveryFailed: string;\n errorRetry: string;\n};\n\nexport type ReturnsTextKey = keyof ReturnsTexts;\n\nexport const RETURNS_TEXT_TABLES: LocaleTables<ReturnsTextKey> = {\n en: {\n back: \"Back\",\n stepIndicator: \"Step {current} of {total}\",\n loading: \"Loading\",\n myReturnsLink: \"My returns\",\n\n emailStepTitle: \"Return a product\",\n emailStepDescription:\n \"Enter the email address you used for the order. We will send you a verification code.\",\n emailLabel: \"Email address\",\n emailPlaceholder: \"name@example.com\",\n emailSubmit: \"Send code\",\n\n codeStepTitle: \"Enter the code\",\n codeStepDescription: \"We sent a verification code to {email}.\",\n codeLabel: \"Verification code\",\n codeSubmit: \"Verify\",\n resend: \"Send the code again\",\n resendIn: \"Send again in {seconds} s\",\n logout: \"Sign out\",\n\n ordersTitle: \"Your orders\",\n ordersDescription: \"Choose the order that contains the product to return.\",\n ordersEmpty: \"There are no orders eligible for return.\",\n orderTitle: \"Order {reference}\",\n orderReturnableLines: \"Products available to return: {count}\",\n orderSelect: \"Choose\",\n paginationPrevious: \"Previous\",\n paginationNext: \"Next\",\n paginationInfo: \"Page {page}, {total} orders\",\n\n orderDetailTitle: \"Order {reference}\",\n orderDetailDescription: \"Select the products and quantities to return.\",\n quantityLabel: \"Quantity to return: {name}\",\n quantityDecrease: \"Decrease quantity: {name}\",\n quantityIncrease: \"Increase quantity: {name}\",\n quantityOfAvailable: \"of {available}\",\n lineIneligibleFallback: \"This product cannot be returned.\",\n noteLabel: \"Note (optional)\",\n notePlaceholder: \"Tell us why you are returning the product\",\n selectionContinue: \"Continue\",\n selectionEmpty: \"Select at least one item to return.\",\n previousReturnsTitle: \"Earlier returns for this order\",\n\n confirmationTitle: \"Confirm the return\",\n confirmationDescription: \"Check the products before you submit the request.\",\n confirmationSummary: \"Products to return\",\n confirmationQuantity: \"Quantity: {quantity}\",\n confirmationNote: \"Your note\",\n confirmationSubmit: \"Submit return request\",\n\n successTitle: \"Return request submitted\",\n successDescription: \"We received your request and will keep you posted.\",\n successReference: \"Request number\",\n successInstructions: \"What to do next\",\n successDone: \"Back to orders\",\n\n myReturnsTitle: \"My returns\",\n myReturnsDescription: \"Track the status of your return requests.\",\n myReturnsEmpty: \"You have not submitted any return requests yet.\",\n myReturnOpen: \"Details\",\n myReturnDetailTitle: \"Return details\",\n myReturnTitle: \"Return {reference}\",\n myReturnCreatedAt: \"Submitted\",\n myReturnRefund: \"Refund\",\n myReturnLines: \"Products\",\n myReturnLineQuantities:\n \"Requested: {requested}, approved: {approved}, received: {received}\",\n myReturnNote: \"Your note\",\n myReturnHistory: \"History\",\n\n statusSubmitted: \"Submitted\",\n statusApproved: \"Approved\",\n statusRejected: \"Rejected\",\n statusAwaitingReceipt: \"Awaiting the package\",\n statusReceived: \"Package received\",\n statusCompleted: \"Completed\",\n statusCancelled: \"Cancelled\",\n statusRefunded: \"Refunded\",\n statusFallback: \"In progress\",\n\n refundStatusNotStarted: \"Not started\",\n refundStatusPending: \"Refund in progress\",\n refundStatusSucceeded: \"Refunded\",\n refundStatusFailed: \"Refund failed\",\n refundStatusFallback: \"Unknown\",\n\n errorGeneric: \"Something went wrong. Please try again.\",\n errorInvalidEmail: \"Enter a valid email address.\",\n errorInvalidCode: \"The code is invalid or has expired.\",\n errorSessionExpired: \"Your session has expired. Verify your email again.\",\n errorOrderNotFound: \"We could not find this order.\",\n errorReturnNotFound: \"We could not find this return request.\",\n errorQuantityUnavailable:\n \"The selected quantity is no longer available for return.\",\n errorItemNotReturnable: \"One of the selected products cannot be returned.\",\n errorReturnsDisabled: \"Returns are not available in this shop.\",\n errorRateLimited: \"Too many attempts. Please try again later.\",\n errorIdempotencyConflict:\n \"This request was already submitted with different contents. Reload and try again.\",\n errorDeliveryFailed: \"We could not send the code. Please try again.\",\n errorRetry: \"Try again\",\n },\n pl: {\n back: \"Wstecz\",\n stepIndicator: \"Krok {current} z {total}\",\n loading: \"Ładowanie\",\n myReturnsLink: \"Moje zwroty\",\n\n emailStepTitle: \"Zwróć produkt\",\n emailStepDescription:\n \"Podaj adres e-mail użyty w zamówieniu. Wyślemy na niego kod weryfikacyjny.\",\n emailLabel: \"Adres e-mail\",\n emailPlaceholder: \"jan@example.com\",\n emailSubmit: \"Wyślij kod\",\n\n codeStepTitle: \"Wpisz kod\",\n codeStepDescription: \"Wysłaliśmy kod weryfikacyjny na adres {email}.\",\n codeLabel: \"Kod weryfikacyjny\",\n codeSubmit: \"Zweryfikuj\",\n resend: \"Wyślij kod ponownie\",\n resendIn: \"Wyślij ponownie za {seconds} s\",\n logout: \"Wyloguj się\",\n\n ordersTitle: \"Twoje zamówienia\",\n ordersDescription: \"Wybierz zamówienie z produktem do zwrotu.\",\n ordersEmpty: \"Brak zamówień, które można zwrócić.\",\n orderTitle: \"Zamówienie {reference}\",\n orderReturnableLines: \"Produkty do zwrotu: {count}\",\n orderSelect: \"Wybierz\",\n paginationPrevious: \"Poprzednia\",\n paginationNext: \"Następna\",\n paginationInfo: \"Strona {page}, zamówień: {total}\",\n\n orderDetailTitle: \"Zamówienie {reference}\",\n orderDetailDescription: \"Wybierz produkty i ilości do zwrotu.\",\n quantityLabel: \"Ilość do zwrotu: {name}\",\n quantityDecrease: \"Zmniejsz ilość: {name}\",\n quantityIncrease: \"Zwiększ ilość: {name}\",\n quantityOfAvailable: \"z {available}\",\n lineIneligibleFallback: \"Ten produkt nie podlega zwrotowi.\",\n noteLabel: \"Uwagi (opcjonalnie)\",\n notePlaceholder: \"Napisz, dlaczego zwracasz produkt\",\n selectionContinue: \"Dalej\",\n selectionEmpty: \"Wybierz co najmniej jedną sztukę do zwrotu.\",\n previousReturnsTitle: \"Wcześniejsze zwroty tego zamówienia\",\n\n confirmationTitle: \"Potwierdź zwrot\",\n confirmationDescription: \"Sprawdź produkty przed wysłaniem zgłoszenia.\",\n confirmationSummary: \"Produkty do zwrotu\",\n confirmationQuantity: \"Ilość: {quantity}\",\n confirmationNote: \"Twoje uwagi\",\n confirmationSubmit: \"Wyślij zgłoszenie zwrotu\",\n\n successTitle: \"Zgłoszenie zwrotu zostało wysłane\",\n successDescription: \"Otrzymaliśmy zgłoszenie i będziemy informować o jego statusie.\",\n successReference: \"Numer zgłoszenia\",\n successInstructions: \"Co dalej\",\n successDone: \"Wróć do zamówień\",\n\n myReturnsTitle: \"Moje zwroty\",\n myReturnsDescription: \"Sprawdź status swoich zgłoszeń zwrotu.\",\n myReturnsEmpty: \"Nie masz jeszcze żadnych zgłoszeń zwrotu.\",\n myReturnOpen: \"Szczegóły\",\n myReturnDetailTitle: \"Szczegóły zwrotu\",\n myReturnTitle: \"Zwrot {reference}\",\n myReturnCreatedAt: \"Zgłoszono\",\n myReturnRefund: \"Zwrot środków\",\n myReturnLines: \"Produkty\",\n myReturnLineQuantities:\n \"Zgłoszono: {requested}, zaakceptowano: {approved}, odebrano: {received}\",\n myReturnNote: \"Twoje uwagi\",\n myReturnHistory: \"Historia\",\n\n statusSubmitted: \"Zgłoszony\",\n statusApproved: \"Zaakceptowany\",\n statusRejected: \"Odrzucony\",\n statusAwaitingReceipt: \"Oczekiwanie na paczkę\",\n statusReceived: \"Paczka odebrana\",\n statusCompleted: \"Zakończony\",\n statusCancelled: \"Anulowany\",\n statusRefunded: \"Środki zwrócone\",\n statusFallback: \"W trakcie\",\n\n refundStatusNotStarted: \"Nie rozpoczęto\",\n refundStatusPending: \"Zwrot środków w toku\",\n refundStatusSucceeded: \"Środki zwrócone\",\n refundStatusFailed: \"Zwrot środków nie powiódł się\",\n refundStatusFallback: \"Nieznany\",\n\n errorGeneric: \"Coś poszło nie tak. Spróbuj ponownie.\",\n errorInvalidEmail: \"Podaj poprawny adres e-mail.\",\n errorInvalidCode: \"Kod jest nieprawidłowy lub wygasł.\",\n errorSessionExpired: \"Sesja wygasła. Zweryfikuj adres e-mail ponownie.\",\n errorOrderNotFound: \"Nie znaleziono tego zamówienia.\",\n errorReturnNotFound: \"Nie znaleziono tego zgłoszenia zwrotu.\",\n errorQuantityUnavailable:\n \"Wybrana ilość nie jest już dostępna do zwrotu.\",\n errorItemNotReturnable: \"Jeden z wybranych produktów nie podlega zwrotowi.\",\n errorReturnsDisabled: \"Zwroty nie są dostępne w tym sklepie.\",\n errorRateLimited: \"Zbyt wiele prób. Spróbuj ponownie później.\",\n errorIdempotencyConflict:\n \"To zgłoszenie zostało już wysłane z inną zawartością. Odśwież stronę i spróbuj ponownie.\",\n errorDeliveryFailed: \"Nie udało się wysłać kodu. Spróbuj ponownie.\",\n errorRetry: \"Spróbuj ponownie\",\n },\n};\n\n/** Default texts for a locale merged with the caller overrides. */\nexport function resolveReturnsTexts(\n locale: string,\n overrides?: Partial<ReturnsTexts>,\n): ReturnsTexts {\n return resolveTexts(RETURNS_TEXT_TABLES, locale, overrides);\n}\n\nexport function getReturnsText(\n key: ReturnsTextKey,\n locale: string,\n overrides?: Partial<ReturnsTexts>,\n): string {\n return lookupText(resolveReturnsTexts(locale, overrides), key);\n}\n\n/** Replaces `{name}` placeholders. Unknown placeholders stay as they are. */\nexport function fillText(\n template: string,\n values: Record<string, string | number>,\n): string {\n return template.replace(/\\{(\\w+)\\}/g, (match, name: string) =>\n Object.prototype.hasOwnProperty.call(values, name)\n ? String(values[name])\n : match,\n );\n}\n\nconst STATUS_TEXT_KEYS: Record<string, ReturnsTextKey> = {\n submitted: \"statusSubmitted\",\n approved: \"statusApproved\",\n rejected: \"statusRejected\",\n awaiting_receipt: \"statusAwaitingReceipt\",\n received: \"statusReceived\",\n completed: \"statusCompleted\",\n cancelled: \"statusCancelled\",\n refunded: \"statusRefunded\",\n};\n\nconst REFUND_STATUS_TEXT_KEYS: Record<string, ReturnsTextKey> = {\n not_started: \"refundStatusNotStarted\",\n pending: \"refundStatusPending\",\n succeeded: \"refundStatusSucceeded\",\n failed: \"refundStatusFailed\",\n};\n\n/** Text key for a backend request status, with a fallback for unknown ones. */\nexport function statusTextKey(status: string): ReturnsTextKey {\n return STATUS_TEXT_KEYS[status] ?? \"statusFallback\";\n}\n\n/** Text key for a backend refund status, with a fallback for unknown ones. */\nexport function refundStatusTextKey(status: string): ReturnsTextKey {\n return REFUND_STATUS_TEXT_KEYS[status] ?? \"refundStatusFallback\";\n}\n","import { createContext, useCallback, useContext, useMemo } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { getLocale } from \"@/src/components/checkout/locale\";\nimport {\n fillText,\n resolveReturnsTexts,\n type ReturnsTextKey,\n type ReturnsTexts,\n} from \"./texts\";\n\ntype ReturnsTextsContextValue = {\n /** Active locale (the `locale` prop or the library locale). */\n locale: string;\n texts: ReturnsTexts;\n};\n\nconst ReturnsTextsContext = createContext<ReturnsTextsContextValue>({\n locale: \"pl-PL\",\n texts: resolveReturnsTexts(\"pl-PL\"),\n});\n\n/**\n * Returns scoped texts provider. Carries the `texts` overrides and the\n * `locale` prop down to the returns tree.\n */\nexport function ReturnsTextsProvider({\n texts,\n locale,\n children,\n}: {\n texts?: Partial<ReturnsTexts>;\n locale?: string;\n children: ReactNode;\n}) {\n const activeLocale = locale ?? getLocale();\n const value = useMemo(\n () => ({\n locale: activeLocale,\n texts: resolveReturnsTexts(activeLocale, texts),\n }),\n [activeLocale, texts],\n );\n\n return (\n <ReturnsTextsContext.Provider value={value}>\n {children}\n </ReturnsTextsContext.Provider>\n );\n}\n\n/**\n * Returns a lookup for the returns strings: the caller override when provided,\n * otherwise the default for the locale. Optional `values` fill `{placeholders}`.\n */\nexport function useReturnsText(): (\n key: ReturnsTextKey,\n values?: Record<string, string | number>,\n) => string {\n const { texts } = useContext(ReturnsTextsContext);\n\n return useCallback(\n (key, values) =>\n values == null ? texts[key] : fillText(texts[key], values),\n [texts],\n );\n}\n\n/** Active locale of the returns views, for date and money formatting. */\nexport function useReturnsLocale(): string {\n return useContext(ReturnsTextsContext).locale;\n}\n","import { createClient } from \"@connectrpc/connect\";\nimport {\n createConnectQueryKey,\n TransportProvider,\n} from \"@connectrpc/connect-query\";\nimport {\n QueryClient,\n QueryClientContext,\n QueryClientProvider,\n useQueryClient,\n} from \"@tanstack/react-query\";\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport type { CSSProperties, ReactNode } from \"react\";\nimport { Environment } from \"@/src/gen/proto/common/v1/environment_pb\";\nimport { ReturnsService } from \"@/src/gen/proto/public/v1/returns_pb\";\nimport { cn } from \"@/src/lib/utils\";\nimport { getRpcTransport, getTransportHost } from \"@/src/rpc-provider\";\nimport type { Transport } from \"@connectrpc/connect\";\nimport type { ReturnsAppearance } from \"./appearance\";\nimport {\n ReturnsAppearanceProvider,\n useReturnsAppearance,\n useReturnsSlot,\n} from \"./appearance.context\";\nimport {\n clearStoredSession,\n expiryToMillis,\n getBrowserSessionStorage,\n readStoredSession,\n writeStoredSession,\n type StoredReturnsSession,\n} from \"./session-storage\";\nimport {\n mapLegacyTexts,\n resolveBrandAppearance,\n resolveReturnsEnvironment,\n type LegacyReturnsTheme,\n type ReturnsEnvironmentInput,\n type ReturnsTextsInput,\n} from \"./legacy\";\nimport { ReturnsTextsProvider } from \"./texts.context\";\n\n/**\n * Backend environment the returns calls run against. The library has no other\n * environment switch for public API calls, so this defaults to `\"production\"`.\n */\nexport type ReturnsEnvironment = \"production\" | \"test\";\n\nexport type ReturnsSessionStatus =\n /** Server render and first client render: storage has not been read yet. */\n | \"hydrating\"\n /** A `panelAccessToken` is being exchanged for a returns session. */\n | \"exchanging\"\n | \"anonymous\"\n | \"authenticated\";\n\n/** A pending email verification. */\nexport type ReturnsChallenge = {\n challengeId: string;\n email: string;\n /** Unix milliseconds when the next code may be requested. */\n resendAvailableAt: number;\n};\n\nexport type ReturnsContextValue = {\n projectID: string;\n environment: Environment;\n status: ReturnsSessionStatus;\n /** Session token. Never log it. */\n token: string | undefined;\n /** Failure of the last panel token exchange, if any. */\n exchangeError: unknown;\n challenge: ReturnsChallenge | undefined;\n setChallenge: (challenge: ReturnsChallenge | undefined) => void;\n /** Stores a freshly issued session in state and `sessionStorage`. */\n authenticate: (session: StoredReturnsSession) => void;\n /** Drops the session, the pending challenge and cached customer data. */\n clearSession: () => void;\n};\n\nconst ReturnsContext = createContext<ReturnsContextValue | undefined>(\n undefined,\n);\n\n/**\n * Context of the nearest `ReturnsProvider`. Throws a clear error outside of\n * it, naming the component or hook that was misplaced.\n */\nexport function useReturnsContext(name: string): ReturnsContextValue {\n const value = useContext(ReturnsContext);\n\n if (value == null) {\n throw new Error(`${name} must be rendered inside <ReturnsProvider>`);\n }\n\n return value;\n}\n\nexport type ReturnsProviderProps = {\n /** Bitsnap project ID. */\n projectID: string;\n /**\n * API host. Defaults to the host set with `setCustomHost`/`setHost`, then to\n * `https://bitsnap.pl`. Each provider keeps its own transport.\n */\n host?: string;\n /**\n * Backend environment, `\"production\"` unless set to `\"test\"`. The proto\n * `Environment` enum is accepted too.\n */\n environment?: ReturnsEnvironmentInput;\n /** Theme, tokens and per-element overrides. */\n appearance?: ReturnsAppearance;\n /**\n * Text overrides, applied whatever the locale. The keys of `bitsnap-react`\n * 1.6.0 (`title`, `email`, `sendCode`, ...) are accepted too; our own keys\n * win when both are given.\n */\n texts?: ReturnsTextsInput;\n /** `bitsnap-react` 1.6.0 brand color. Explicit `appearance.tokens` win. */\n theme?: LegacyReturnsTheme;\n /** Locale of texts, dates and money. Defaults to the library locale. */\n locale?: string;\n /**\n * Customer panel access token. When set, it is exchanged for a returns\n * session on mount, so the customer needs no second verification code.\n * Changing or removing it drops the session.\n */\n panelAccessToken?: string;\n /** Class of the themed root element. */\n className?: string;\n children?: ReactNode;\n};\n\n/** Key prefix that matches every returns query, for invalidation and removal. */\nexport function returnsQueryKey(): readonly unknown[] {\n return createConnectQueryKey({\n schema: ReturnsService,\n cardinality: undefined,\n });\n}\n\n/** Longest delay `setTimeout` accepts. */\nconst MAX_TIMEOUT_MS = 2 ** 31 - 1;\n\nfunction SessionProvider({\n projectID,\n environment,\n transport,\n panelAccessToken,\n className,\n children,\n}: {\n projectID: string;\n environment: Environment;\n transport: Transport;\n panelAccessToken?: string;\n className?: string;\n children?: ReactNode;\n}) {\n const queryClient = useQueryClient();\n const { boundaryClassName, boundaryStyle } = useReturnsAppearance();\n const root = useReturnsSlot(\"root\");\n\n const [session, setSession] = useState<{\n status: ReturnsSessionStatus;\n token?: string;\n expiresAt?: number;\n }>({ status: \"hydrating\" });\n const [exchangeError, setExchangeError] = useState<unknown>();\n const [challenge, setChallenge] = useState<ReturnsChallenge>();\n const previousPanelToken = useRef<string | undefined>(undefined);\n\n const dropCachedData = useCallback(() => {\n // Query inputs carry the session token, so cached customer data must not\n // outlive the session. Only returns queries are touched.\n queryClient.removeQueries({ queryKey: returnsQueryKey() });\n }, [queryClient]);\n\n const clearSession = useCallback(() => {\n clearStoredSession(getBrowserSessionStorage(), projectID);\n setChallenge(undefined);\n setSession({ status: \"anonymous\" });\n dropCachedData();\n }, [projectID, dropCachedData]);\n\n const authenticate = useCallback(\n (next: StoredReturnsSession) => {\n writeStoredSession(getBrowserSessionStorage(), projectID, next);\n setExchangeError(undefined);\n setChallenge(undefined);\n setSession({\n status: \"authenticated\",\n token: next.token,\n expiresAt: next.expiresAt,\n });\n },\n [projectID],\n );\n\n // Hydrates from `sessionStorage`, or exchanges the panel token. Runs after\n // mount, so render never touches `window`.\n useEffect(() => {\n let cancelled = false;\n const storage = getBrowserSessionStorage();\n\n if (panelAccessToken == null || panelAccessToken === \"\") {\n const hadPanelToken = previousPanelToken.current != null;\n previousPanelToken.current = undefined;\n\n if (hadPanelToken) {\n clearSession();\n return;\n }\n\n const stored = readStoredSession(storage, projectID);\n setSession(\n stored != null\n ? {\n status: \"authenticated\",\n token: stored.token,\n expiresAt: stored.expiresAt,\n }\n : { status: \"anonymous\" },\n );\n return;\n }\n\n previousPanelToken.current = panelAccessToken;\n clearStoredSession(storage, projectID);\n dropCachedData();\n setExchangeError(undefined);\n setSession({ status: \"exchanging\" });\n\n createClient(ReturnsService, transport)\n .exchangePanelSession({\n projectId: projectID,\n accessToken: panelAccessToken,\n environment,\n })\n .then((response) => {\n if (cancelled) {\n return;\n }\n const expiresAt = expiryToMillis(response.expiresAt);\n if (response.sessionToken === \"\" || expiresAt == null) {\n throw new Error(\"EMPTY_SESSION\");\n }\n authenticate({ token: response.sessionToken, expiresAt });\n })\n .catch((error: unknown) => {\n if (cancelled) {\n return;\n }\n setExchangeError(error);\n setSession({ status: \"anonymous\" });\n });\n\n return () => {\n cancelled = true;\n };\n // `clearSession`, `authenticate` and `dropCachedData` only change with the\n // project or the query client, which are already covered.\n }, [panelAccessToken, projectID, environment, transport]);\n\n // Expired sessions are dropped even when the page stays open.\n useEffect(() => {\n if (session.status !== \"authenticated\" || session.expiresAt == null) {\n return;\n }\n const remaining = session.expiresAt - Date.now();\n if (remaining <= 0) {\n clearSession();\n return;\n }\n const timer = setTimeout(\n clearSession,\n Math.min(remaining, MAX_TIMEOUT_MS),\n );\n return () => clearTimeout(timer);\n }, [session.status, session.expiresAt, clearSession]);\n\n const value = useMemo<ReturnsContextValue>(\n () => ({\n projectID,\n environment,\n status: session.status,\n token: session.token,\n exchangeError,\n challenge,\n setChallenge,\n authenticate,\n clearSession,\n }),\n [\n projectID,\n environment,\n session.status,\n session.token,\n exchangeError,\n challenge,\n authenticate,\n clearSession,\n ],\n );\n\n return (\n <ReturnsContext.Provider value={value}>\n <div\n data-bitsnap-returns=\"root\"\n data-bitsnap-returns-slot=\"root\"\n className={cn(\"bitsnap-react\", boundaryClassName, className, root.className)}\n style={{ ...boundaryStyle, ...root.style } as CSSProperties}\n >\n {children}\n </div>\n </ReturnsContext.Provider>\n );\n}\n\n/**\n * Holds everything the returns views share: the per-instance transport, the\n * query client (when the app has none), appearance, texts and the returns\n * session. It renders the themed root element, so step components composed\n * under it are themed without extra markup.\n *\n * ```tsx\n * <ReturnsProvider projectID=\"…\" appearance={brand}>\n * <ReturnsOrderList onSelectOrder={setOrderId} />\n * </ReturnsProvider>\n * ```\n */\nexport function ReturnsProvider({\n projectID,\n host,\n environment,\n appearance,\n texts,\n theme,\n locale,\n panelAccessToken,\n className,\n children,\n}: ReturnsProviderProps) {\n const existingQueryClient = useContext(QueryClientContext);\n const [ownQueryClient] = useState(() =>\n existingQueryClient == null\n ? new QueryClient({ defaultOptions: { queries: { staleTime: 5000 } } })\n : undefined,\n );\n\n const resolvedHost = host ?? getTransportHost();\n const transport = useMemo(\n () => getRpcTransport(resolvedHost),\n [resolvedHost],\n );\n\n const brandColor = theme?.brandColor;\n const resolvedAppearance = useMemo(\n () => resolveBrandAppearance(appearance, { brandColor }),\n [appearance, brandColor],\n );\n const resolvedTexts = useMemo(() => mapLegacyTexts(texts), [texts]);\n\n const content = (\n <TransportProvider transport={transport}>\n <ReturnsAppearanceProvider appearance={resolvedAppearance}>\n <ReturnsTextsProvider texts={resolvedTexts} locale={locale}>\n <SessionProvider\n projectID={projectID}\n environment={resolveReturnsEnvironment(environment)}\n transport={transport}\n panelAccessToken={panelAccessToken}\n className={className}\n >\n {children}\n </SessionProvider>\n </ReturnsTextsProvider>\n </ReturnsAppearanceProvider>\n </TransportProvider>\n );\n\n return existingQueryClient == null && ownQueryClient != null ? (\n <QueryClientProvider client={ownQueryClient}>{content}</QueryClientProvider>\n ) : (\n content\n );\n}\n\n/** Name of {@link ReturnsProvider} in `bitsnap-react` 1.6.0. */\nexport const BitsnapReturnsProvider = ReturnsProvider;\n\nexport type BitsnapReturnsProviderProps = ReturnsProviderProps;\n","import { useMutation, useQuery } from \"@connectrpc/connect-query\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport type {\n CreateReturnRequestResponse,\n GetReturnableOrderResponse,\n ListMyReturnsResponse,\n ListReturnOrdersResponse,\n StartReturnSessionResponse,\n VerifyReturnSessionResponse,\n ReturnOrderDetail,\n ReturnOrderSummary,\n ReturnHistoryEntry,\n ReturnRequestView,\n} from \"@/src/gen/proto/public/v1/returns_pb\";\nimport { rpcProvider } from \"@/src/rpc-provider\";\nimport { isSessionExpiredError, mapReturnsError } from \"./errors\";\nimport { createIdempotencyKey } from \"./idempotency\";\nimport { resolvePagedArguments } from \"./legacy\";\nimport {\n returnsQueryKey,\n useReturnsContext,\n type ReturnsChallenge,\n type ReturnsSessionStatus,\n} from \"./ReturnsProvider\";\nimport { expiryToMillis } from \"./session-storage\";\nimport type { ReturnsTextKey } from \"./texts\";\n\n/** React Query style status shared by the query and mutation results. */\ntype QueryStatus = \"pending\" | \"error\" | \"success\";\ntype MutationStatus = \"idle\" | QueryStatus;\n\n/** Anything thrown becomes an `Error`, as React Query results expose them. */\nfunction asError(error: unknown): Error | null {\n if (error == null) {\n return null;\n }\n return error instanceof Error ? error : new Error(String(error));\n}\n\n/** Text key of a failure, `undefined` while there is none. */\nfunction errorKeyOf(error: unknown): ReturnsTextKey | undefined {\n return error == null ? undefined : mapReturnsError(error);\n}\n\n/**\n * Drops the session when a request failed with `SESSION_EXPIRED`. The flow\n * returns to its start because every step that needs a session is gone.\n */\nfunction useDropSessionOnExpiry(error: unknown, clearSession: () => void) {\n useEffect(() => {\n if (isSessionExpiredError(error)) {\n clearSession();\n }\n }, [error, clearSession]);\n}\n\n/** Page tokens of the pages visited so far; the first page has no token. */\nfunction usePageTokens(resetKey: unknown) {\n const [tokens, setTokens] = useState<string[]>([\"\"]);\n\n useEffect(() => {\n setTokens([\"\"]);\n }, [resetKey]);\n\n return {\n pageToken: tokens[tokens.length - 1] ?? \"\",\n page: tokens.length,\n push: (token: string) => setTokens((current) => [...current, token]),\n pop: () =>\n setTokens((current) =>\n current.length > 1 ? current.slice(0, -1) : current,\n ),\n };\n}\n\nexport type UseReturnSessionResult = {\n status: ReturnsSessionStatus;\n isAuthenticated: boolean;\n /** Pending email verification, set after `start` succeeded. */\n challenge: ReturnsChallenge | undefined;\n isStarting: boolean;\n isVerifying: boolean;\n /** Last failure of `start` or `verify`, or of the panel token exchange. */\n error: Error | null;\n errorKey: ReturnsTextKey | undefined;\n /** Same as `isStarting` (`bitsnap-react` 1.6.0 name). */\n starting: boolean;\n /** Same as `isVerifying` (`bitsnap-react` 1.6.0 name). */\n verifying: boolean;\n /**\n * `bitsnap-react` 1.6.0 API: sends a code and resolves with the response\n * (including `challengeId`). Rejects on failure. Also stores the challenge\n * like `start`.\n */\n startSession: (email: string) => Promise<StartReturnSessionResponse>;\n /**\n * `bitsnap-react` 1.6.0 API: verifies a code, stores the session like\n * `verify` and resolves with the response. Rejects on failure.\n */\n verifySession: (input: {\n challengeId: string;\n code: string;\n }) => Promise<VerifyReturnSessionResponse>;\n /** Sends a code to `email`. Resolves to `true` when the code was sent. */\n start: (email: string) => Promise<boolean>;\n /** Verifies the code of the pending challenge. Resolves to `true` on success. */\n verify: (code: string) => Promise<boolean>;\n /** Sends a new code to the email of the pending challenge. */\n resend: () => Promise<boolean>;\n /** Drops the session and the pending challenge. */\n logout: () => void;\n};\n\n/** Email verification and the returns session of the nearest provider. */\nexport function useReturnSession(): UseReturnSessionResult {\n const ctx = useReturnsContext(\"useReturnSession\");\n const startMutation = useMutation(rpcProvider.returns.startReturnSession);\n const verifyMutation = useMutation(rpcProvider.returns.verifyReturnSession);\n const { setChallenge, authenticate, clearSession } = ctx;\n\n const startSession = useCallback(\n async (email: string) => {\n verifyMutation.reset();\n const trimmed = email.trim();\n const response = await startMutation.mutateAsync({\n projectId: ctx.projectID,\n email: trimmed,\n environment: ctx.environment,\n });\n setChallenge({\n challengeId: response.challengeId,\n email: trimmed,\n resendAvailableAt:\n Date.now() + Math.max(0, response.resendAfterSeconds) * 1000,\n });\n return response;\n },\n [ctx.projectID, ctx.environment, setChallenge, startMutation, verifyMutation],\n );\n\n const verifySession = useCallback(\n async (input: { challengeId: string; code: string }) => {\n const response = await verifyMutation.mutateAsync({\n projectId: ctx.projectID,\n challengeId: input.challengeId,\n code: input.code,\n environment: ctx.environment,\n });\n const expiresAt = expiryToMillis(response.expiresAt);\n if (response.sessionToken === \"\" || expiresAt == null) {\n throw new Error(\"EMPTY_SESSION\");\n }\n authenticate({ token: response.sessionToken, expiresAt });\n return response;\n },\n [ctx.projectID, ctx.environment, authenticate, verifyMutation],\n );\n\n const start = useCallback(\n async (email: string) => {\n try {\n await startSession(email);\n return true;\n } catch {\n return false;\n }\n },\n [startSession],\n );\n\n const verify = useCallback(\n async (code: string) => {\n if (ctx.challenge == null) {\n return false;\n }\n try {\n await verifySession({\n challengeId: ctx.challenge.challengeId,\n code: code.trim(),\n });\n return true;\n } catch {\n return false;\n }\n },\n [ctx.challenge, verifySession],\n );\n\n const resend = useCallback(\n () => (ctx.challenge != null ? start(ctx.challenge.email) : Promise.resolve(false)),\n [ctx.challenge, start],\n );\n\n const error = asError(\n startMutation.error ?? verifyMutation.error ?? ctx.exchangeError,\n );\n\n return {\n status: ctx.status,\n isAuthenticated: ctx.status === \"authenticated\",\n challenge: ctx.challenge,\n isStarting: startMutation.isPending,\n isVerifying: verifyMutation.isPending,\n starting: startMutation.isPending,\n verifying: verifyMutation.isPending,\n error,\n errorKey: errorKeyOf(error),\n start,\n startSession,\n verifySession,\n verify,\n resend,\n logout: clearSession,\n };\n}\n\ntype PagedOptions = {\n /** Items per page. Defaults to 10. */\n pageSize?: number;\n};\n\nexport type UseReturnOrdersResult = {\n orders: ReturnOrderSummary[];\n /** Total number of returnable orders. */\n total: number;\n /** Response for the requested page (React Query style). */\n data: ListReturnOrdersResponse | undefined;\n isLoading: boolean;\n isFetching: boolean;\n error: Error | null;\n errorKey: ReturnsTextKey | undefined;\n status: QueryStatus;\n isError: boolean;\n isSuccess: boolean;\n /** 1-based number of the current page. */\n page: number;\n hasNext: boolean;\n hasPrevious: boolean;\n next: () => void;\n previous: () => void;\n refetch: () => Promise<unknown>;\n};\n\n/**\n * `true` while the session is still being restored or a panel token is being\n * exchanged. A logged out customer is not \"loading\", as in 1.6.0.\n */\nfunction isSessionPending(ctx: { status: string }): boolean {\n return ctx.status === \"hydrating\" || ctx.status === \"exchanging\";\n}\n\n/**\n * Orders of the signed-in customer that have lines to return, page by page.\n * Call it with `{ pageSize }` (pages are walked with `next`/`previous`) or, as\n * in `bitsnap-react` 1.6.0, with `(pageSize, pageToken)`; then the explicit\n * token is requested and `data.nextPageToken` drives paging.\n */\nexport function useReturnOrders(options?: PagedOptions): UseReturnOrdersResult;\nexport function useReturnOrders(\n pageSize?: number,\n pageToken?: string,\n): UseReturnOrdersResult;\nexport function useReturnOrders(\n first?: number | PagedOptions,\n token?: string,\n): UseReturnOrdersResult {\n const ctx = useReturnsContext(\"useReturnOrders\");\n const { pageSize, explicitPageToken } = resolvePagedArguments(first, token);\n const pages = usePageTokens(ctx.token);\n\n const query = useQuery(\n rpcProvider.returns.listReturnOrders,\n {\n projectId: ctx.projectID,\n sessionToken: ctx.token ?? \"\",\n pageSize,\n pageToken: explicitPageToken ?? pages.pageToken,\n },\n { enabled: ctx.token != null },\n );\n useDropSessionOnExpiry(query.error, ctx.clearSession);\n\n const nextPageToken = query.data?.nextPageToken ?? \"\";\n\n return {\n orders: query.data?.orders ?? [],\n total: query.data?.total ?? 0,\n data: query.data,\n isLoading: isSessionPending(ctx) || query.isLoading,\n isFetching: query.isFetching,\n error: asError(query.error),\n errorKey: errorKeyOf(query.error),\n status: query.status,\n isError: query.isError,\n isSuccess: query.isSuccess,\n page: pages.page,\n hasNext: nextPageToken !== \"\",\n hasPrevious: pages.page > 1,\n next: () => {\n if (nextPageToken !== \"\") {\n pages.push(nextPageToken);\n }\n },\n previous: pages.pop,\n refetch: () => query.refetch(),\n };\n}\n\nexport type UseReturnableOrderResult = {\n order: ReturnOrderDetail | undefined;\n /** Earlier return requests for this order. */\n returnHistory: ReturnHistoryEntry[];\n /** Response (React Query style): `data.order` is the order. */\n data: GetReturnableOrderResponse | undefined;\n isLoading: boolean;\n error: Error | null;\n errorKey: ReturnsTextKey | undefined;\n status: QueryStatus;\n isError: boolean;\n isSuccess: boolean;\n refetch: () => Promise<unknown>;\n};\n\n/**\n * One order with the eligibility of each line. Without an `orderId` the query\n * is disabled.\n */\nexport function useReturnableOrder(orderId?: string): UseReturnableOrderResult {\n const ctx = useReturnsContext(\"useReturnableOrder\");\n\n const query = useQuery(\n rpcProvider.returns.getReturnableOrder,\n {\n projectId: ctx.projectID,\n sessionToken: ctx.token ?? \"\",\n canonicalOrderId: orderId ?? \"\",\n },\n { enabled: ctx.token != null && orderId != null && orderId !== \"\" },\n );\n useDropSessionOnExpiry(query.error, ctx.clearSession);\n\n return {\n order: query.data?.order,\n returnHistory: query.data?.returnHistory ?? [],\n data: query.data,\n isLoading:\n orderId != null && orderId !== \"\" && (isSessionPending(ctx) || query.isLoading),\n error: asError(query.error),\n errorKey: errorKeyOf(query.error),\n status: query.status,\n isError: query.isError,\n isSuccess: query.isSuccess,\n refetch: () => query.refetch(),\n };\n}\n\nexport type CreateReturnInput = {\n orderId: string;\n items: { lineId: string; quantity: number }[];\n note?: string;\n};\n\n/** Input of the `bitsnap-react` 1.6.0 `mutateAsync`/`mutate`. */\nexport type LegacyCreateReturnInput = {\n canonicalOrderID: string;\n items: { lineId: string; quantity: number }[];\n note?: string;\n /** Used as given. A fresh key is generated per call when omitted. */\n idempotencyKey?: string;\n};\n\nexport type UseCreateReturnResult = {\n /**\n * Submits the return request. Resolves to the created request, or\n * `undefined` when it failed (see `error`). Retrying reuses the same\n * idempotency key, so a retry can never create a second request.\n */\n submit: (input: CreateReturnInput) => Promise<ReturnRequestView | undefined>;\n isPending: boolean;\n error: Error | null;\n errorKey: ReturnsTextKey | undefined;\n /**\n * `bitsnap-react` 1.6.0 API (React Query mutation semantics): resolves with\n * the response (`result.request`) and rejects on failure.\n */\n mutateAsync: (\n input: LegacyCreateReturnInput,\n ) => Promise<CreateReturnRequestResponse>;\n /** Fire and forget version of `mutateAsync`; failures land in `error`. */\n mutate: (\n input: LegacyCreateReturnInput,\n options?: {\n onSuccess?: (response: CreateReturnRequestResponse) => void;\n onError?: (error: Error) => void;\n },\n ) => void;\n /** Response of the last successful request. */\n data: CreateReturnRequestResponse | undefined;\n reset: () => void;\n status: MutationStatus;\n isError: boolean;\n isSuccess: boolean;\n};\n\n/**\n * Creates a return request. With `submit` the idempotency key is generated\n * once per hook instance, which is once per confirmation screen, and reused on\n * retry.\n */\nexport function useCreateReturn(): UseCreateReturnResult {\n const ctx = useReturnsContext(\"useCreateReturn\");\n const queryClient = useQueryClient();\n const mutation = useMutation(rpcProvider.returns.createReturnRequest);\n const idempotencyKey = useRef<string | undefined>(undefined);\n const { clearSession } = ctx;\n\n const send = useCallback(\n async (input: CreateReturnInput, key: string) => {\n try {\n const response = await mutation.mutateAsync({\n projectId: ctx.projectID,\n sessionToken: ctx.token ?? \"\",\n canonicalOrderId: input.orderId,\n items: input.items,\n note: input.note ?? \"\",\n idempotencyKey: key,\n });\n // Quantities and the list of returns changed.\n void queryClient.invalidateQueries({ queryKey: returnsQueryKey() });\n return response;\n } catch (error) {\n if (isSessionExpiredError(error)) {\n clearSession();\n }\n throw error;\n }\n },\n [ctx.projectID, ctx.token, mutation, queryClient, clearSession],\n );\n\n const submit = useCallback(\n async (input: CreateReturnInput) => {\n idempotencyKey.current ??= createIdempotencyKey();\n try {\n const response = await send(input, idempotencyKey.current);\n idempotencyKey.current = undefined;\n return response.request;\n } catch {\n return undefined;\n }\n },\n [send],\n );\n\n const mutateAsync = useCallback(\n async (input: LegacyCreateReturnInput) => {\n if (ctx.token == null) {\n throw new Error(\"Verify your email to continue.\");\n }\n return send(\n {\n orderId: input.canonicalOrderID,\n items: input.items,\n note: input.note,\n },\n input.idempotencyKey ?? createIdempotencyKey(),\n );\n },\n [ctx.token, send],\n );\n\n const mutate = useCallback(\n (\n input: LegacyCreateReturnInput,\n options?: {\n onSuccess?: (response: CreateReturnRequestResponse) => void;\n onError?: (error: Error) => void;\n },\n ) => {\n mutateAsync(input).then(\n (response) => options?.onSuccess?.(response),\n (error: unknown) => options?.onError?.(asError(error) as Error),\n );\n },\n [mutateAsync],\n );\n\n return {\n submit,\n isPending: mutation.isPending,\n error: asError(mutation.error),\n errorKey: errorKeyOf(mutation.error),\n mutateAsync,\n mutate,\n data: mutation.data,\n reset: mutation.reset,\n status: mutation.status,\n isError: mutation.isError,\n isSuccess: mutation.isSuccess,\n };\n}\n\nexport type UseMyReturnsResult = {\n returns: ReturnRequestView[];\n total: number;\n /** Response for the requested page (React Query style). */\n data: ListMyReturnsResponse | undefined;\n isLoading: boolean;\n isFetching: boolean;\n error: Error | null;\n errorKey: ReturnsTextKey | undefined;\n status: QueryStatus;\n isError: boolean;\n isSuccess: boolean;\n page: number;\n hasNext: boolean;\n hasPrevious: boolean;\n next: () => void;\n previous: () => void;\n refetch: () => Promise<unknown>;\n};\n\n/**\n * Return requests of the signed-in customer, page by page. Accepts\n * `{ pageSize }` or the `bitsnap-react` 1.6.0 `(pageSize, pageToken)` form,\n * like `useReturnOrders`.\n */\nexport function useMyReturns(options?: PagedOptions): UseMyReturnsResult;\nexport function useMyReturns(\n pageSize?: number,\n pageToken?: string,\n): UseMyReturnsResult;\nexport function useMyReturns(\n first?: number | PagedOptions,\n token?: string,\n): UseMyReturnsResult {\n const ctx = useReturnsContext(\"useMyReturns\");\n const { pageSize, explicitPageToken } = resolvePagedArguments(first, token);\n const pages = usePageTokens(ctx.token);\n\n const query = useQuery(\n rpcProvider.returns.listMyReturns,\n {\n projectId: ctx.projectID,\n sessionToken: ctx.token ?? \"\",\n pageSize,\n pageToken: explicitPageToken ?? pages.pageToken,\n },\n { enabled: ctx.token != null },\n );\n useDropSessionOnExpiry(query.error, ctx.clearSession);\n\n const nextPageToken = query.data?.nextPageToken ?? \"\";\n\n return {\n returns: query.data?.returns ?? [],\n total: query.data?.total ?? 0,\n data: query.data,\n isLoading: isSessionPending(ctx) || query.isLoading,\n isFetching: query.isFetching,\n error: asError(query.error),\n errorKey: errorKeyOf(query.error),\n status: query.status,\n isError: query.isError,\n isSuccess: query.isSuccess,\n page: pages.page,\n hasNext: nextPageToken !== \"\",\n hasPrevious: pages.page > 1,\n next: () => {\n if (nextPageToken !== \"\") {\n pages.push(nextPageToken);\n }\n },\n previous: pages.pop,\n refetch: () => query.refetch(),\n };\n}\n\nexport type UseMyReturnResult = {\n request: ReturnRequestView | undefined;\n isLoading: boolean;\n error: unknown;\n errorKey: ReturnsTextKey | undefined;\n refetch: () => void;\n};\n\n/** One return request of the signed-in customer. */\nexport function useMyReturn(returnId: string): UseMyReturnResult {\n const ctx = useReturnsContext(\"useMyReturn\");\n\n const query = useQuery(\n rpcProvider.returns.getMyReturn,\n {\n projectId: ctx.projectID,\n sessionToken: ctx.token ?? \"\",\n returnId,\n },\n { enabled: ctx.token != null },\n );\n useDropSessionOnExpiry(query.error, ctx.clearSession);\n\n return {\n request: query.data?.request,\n isLoading: isSessionPending(ctx) || query.isLoading,\n error: query.error,\n errorKey: errorKeyOf(query.error),\n refetch: () => query.refetch(),\n };\n}\n","import type { CSSProperties, ReactNode } from \"react\";\nimport { Button } from \"@/src/ui/button\";\nimport { Skeleton } from \"@/src/ui/skeleton\";\nimport { cn } from \"@/src/lib/utils\";\nimport { useReturnsSlot } from \"./appearance.context\";\nimport { refundStatusTextKey, statusTextKey, type ReturnsTextKey } from \"./texts\";\nimport { useReturnsText } from \"./texts.context\";\n\n/*\n * Built-in colors read the returns tokens through arbitrary values. They are\n * utilities, so `twMerge` replaces the primitive's own `bg-primary`/`dark:`\n * classes and the tokens win in both themes. Slot overrides are merged last.\n */\n\nexport const PRIMARY_BUTTON_CLASS =\n \"bg-[var(--bitsnap-returns-button-background,#18181b)] text-[color:var(--bitsnap-returns-button-foreground,#fafafa)] hover:bg-[var(--bitsnap-returns-button-hover-background,#000000)] focus-visible:ring-[color:var(--bitsnap-returns-focus-ring,#71717a)]/50\";\n\nexport const SECONDARY_BUTTON_CLASS =\n \"border border-[color:var(--bitsnap-returns-border,#e4e4e7)] bg-transparent text-[color:var(--bitsnap-returns-foreground,#18181b)] hover:bg-[var(--bitsnap-returns-hover-surface,#f4f4f5)] focus-visible:ring-[color:var(--bitsnap-returns-focus-ring,#71717a)]/50\";\n\nexport const INPUT_CLASS =\n \"bg-[var(--bitsnap-returns-input-background,#ffffff)] dark:bg-[var(--bitsnap-returns-input-background,#ffffff)] border-[color:var(--bitsnap-returns-border,#e4e4e7)] text-[color:var(--bitsnap-returns-foreground,#18181b)] placeholder:text-[color:var(--bitsnap-returns-muted-foreground,#71717a)] focus-visible:border-[color:var(--bitsnap-returns-focus-ring,#71717a)] focus-visible:ring-[color:var(--bitsnap-returns-focus-ring,#71717a)]/50\";\n\nexport type SlotProps = { className?: string; style?: CSSProperties };\n\n/** Frame shared by every step: back button, title and description. */\nexport function StepFrame({\n title,\n description,\n onBack,\n className,\n children,\n}: {\n title: ReactNode;\n description?: ReactNode;\n onBack?: () => void;\n className?: string;\n children?: ReactNode;\n}) {\n const text = useReturnsText();\n const header = useReturnsSlot(\"header\");\n const titleSlot = useReturnsSlot(\"title\");\n const descriptionSlot = useReturnsSlot(\"description\");\n const backButton = useReturnsSlot(\"backButton\");\n\n return (\n <section className={cn(\"flex flex-col gap-5\", className)}>\n <div\n data-bitsnap-returns-slot=\"header\"\n className={cn(\"flex flex-col gap-2\", header.className)}\n style={header.style}\n >\n {onBack != null && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n data-bitsnap-returns-slot=\"backButton\"\n className={cn(\n \"self-start -ml-3 text-[color:var(--bitsnap-returns-muted-foreground,#71717a)] hover:bg-[var(--bitsnap-returns-hover-surface,#f4f4f5)]\",\n backButton.className,\n )}\n style={backButton.style}\n onClick={onBack}\n >\n {text(\"back\")}\n </Button>\n )}\n <h2\n data-bitsnap-returns-slot=\"title\"\n className={cn(\"text-2xl font-semibold\", titleSlot.className)}\n style={titleSlot.style}\n >\n {title}\n </h2>\n {description != null && (\n <p\n data-bitsnap-returns-slot=\"description\"\n className={cn(\"text-sm\", descriptionSlot.className)}\n style={descriptionSlot.style}\n >\n {description}\n </p>\n )}\n </div>\n {children}\n </section>\n );\n}\n\n/** Error message with an optional retry action. */\nexport function ErrorMessage({\n errorKey,\n onRetry,\n}: {\n errorKey: ReturnsTextKey;\n onRetry?: () => void;\n}) {\n const text = useReturnsText();\n const error = useReturnsSlot(\"error\");\n const secondaryButton = useReturnsSlot(\"secondaryButton\");\n\n return (\n <div\n role=\"alert\"\n data-bitsnap-returns-slot=\"error\"\n className={cn(\"flex flex-col items-start gap-2 text-sm\", error.className)}\n style={error.style}\n >\n <p>{text(errorKey)}</p>\n {onRetry != null && (\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n data-bitsnap-returns-slot=\"secondaryButton\"\n className={cn(SECONDARY_BUTTON_CLASS, secondaryButton.className)}\n style={secondaryButton.style}\n onClick={onRetry}\n >\n {text(\"errorRetry\")}\n </Button>\n )}\n </div>\n );\n}\n\n/** Empty list placeholder. */\nexport function EmptyState({ children }: { children: ReactNode }) {\n const emptyState = useReturnsSlot(\"emptyState\");\n\n return (\n <p\n data-bitsnap-returns-slot=\"emptyState\"\n className={cn(\"py-6 text-center text-sm\", emptyState.className)}\n style={emptyState.style}\n >\n {children}\n </p>\n );\n}\n\n/** Loading placeholder. `aria-busy` marks the region for assistive tech. */\nexport function SkeletonRows({ rows = 3 }: { rows?: number }) {\n const text = useReturnsText();\n const skeleton = useReturnsSlot(\"skeleton\");\n\n return (\n <div\n role=\"status\"\n aria-busy=\"true\"\n aria-label={text(\"loading\")}\n className=\"flex flex-col gap-3\"\n >\n {Array.from({ length: rows }, (_, index) => (\n <Skeleton\n key={index}\n data-bitsnap-returns-slot=\"skeleton\"\n className={cn(\n \"h-16 w-full bg-[var(--bitsnap-returns-hover-surface,#f4f4f5)]\",\n skeleton.className,\n )}\n style={skeleton.style}\n />\n ))}\n </div>\n );\n}\n\n/** Status chip of a return request. Unknown statuses use the fallback text. */\nexport function StatusBadge({ status }: { status: string }) {\n const text = useReturnsText();\n const badge = useReturnsSlot(\"statusBadge\");\n\n return (\n <span\n data-bitsnap-returns-slot=\"statusBadge\"\n data-status={status}\n className={cn(\n \"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium\",\n badge.className,\n )}\n style={badge.style}\n >\n {text(statusTextKey(status))}\n </span>\n );\n}\n\n/** Text of a refund status. */\nexport function useRefundStatusText(): (status: string) => string {\n const text = useReturnsText();\n\n return (status) => text(refundStatusTextKey(status));\n}\n\n/** Previous/next controls for paged lists. */\nexport function Pagination({\n page,\n total,\n hasNext,\n hasPrevious,\n isFetching,\n onNext,\n onPrevious,\n}: {\n page: number;\n total: number;\n hasNext: boolean;\n hasPrevious: boolean;\n isFetching: boolean;\n onNext: () => void;\n onPrevious: () => void;\n}) {\n const text = useReturnsText();\n const pagination = useReturnsSlot(\"pagination\");\n const secondaryButton = useReturnsSlot(\"secondaryButton\");\n\n if (!hasNext && !hasPrevious) {\n return null;\n }\n\n return (\n <nav\n data-bitsnap-returns-slot=\"pagination\"\n className={cn(\n \"flex items-center justify-between gap-3 text-sm\",\n pagination.className,\n )}\n style={pagination.style}\n >\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n data-bitsnap-returns-slot=\"secondaryButton\"\n className={cn(SECONDARY_BUTTON_CLASS, secondaryButton.className)}\n style={secondaryButton.style}\n disabled={!hasPrevious || isFetching}\n onClick={onPrevious}\n >\n {text(\"paginationPrevious\")}\n </Button>\n <span aria-live=\"polite\">{text(\"paginationInfo\", { page, total })}</span>\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n data-bitsnap-returns-slot=\"secondaryButton\"\n className={cn(SECONDARY_BUTTON_CLASS, secondaryButton.className)}\n style={secondaryButton.style}\n disabled={!hasNext || isFetching}\n onClick={onNext}\n >\n {text(\"paginationNext\")}\n </Button>\n </nav>\n );\n}\n","import { useEffect, useState } from \"react\";\nimport type { FormEvent } from \"react\";\nimport { Button } from \"@/src/ui/button\";\nimport { Input } from \"@/src/ui/input\";\nimport { Label } from \"@/src/ui/label\";\nimport { Spinner } from \"@/src/ui/spinner\";\nimport { cn } from \"@/src/lib/utils\";\nimport { useReturnsSlot } from \"./appearance.context\";\nimport { useReturnSession } from \"./hooks\";\nimport {\n ErrorMessage,\n INPUT_CLASS,\n PRIMARY_BUTTON_CLASS,\n SECONDARY_BUTTON_CLASS,\n StepFrame,\n} from \"./internal\";\nimport { useReturnsContext } from \"./ReturnsProvider\";\nimport { useReturnsText } from \"./texts.context\";\n\nexport type ReturnsEmailStepProps = {\n /** Called after the verification code was sent, with the trimmed email. */\n onSubmitted?: (email: string) => void;\n className?: string;\n};\n\n/** First step: asks for the email the order was placed with. */\nexport function ReturnsEmailStep({\n onSubmitted,\n className,\n}: ReturnsEmailStepProps) {\n useReturnsContext(\"ReturnsEmailStep\");\n const text = useReturnsText();\n const session = useReturnSession();\n const [email, setEmail] = useState(\"\");\n const form = useReturnsSlot(\"emailForm\");\n const input = useReturnsSlot(\"emailInput\");\n const submitButton = useReturnsSlot(\"submitButton\");\n\n async function handleSubmit(event: FormEvent<HTMLFormElement>) {\n event.preventDefault();\n if (session.isStarting) {\n return;\n }\n if (await session.start(email)) {\n onSubmitted?.(email.trim());\n }\n }\n\n return (\n <StepFrame\n className={className}\n title={text(\"emailStepTitle\")}\n description={text(\"emailStepDescription\")}\n >\n <form\n data-bitsnap-returns-slot=\"emailForm\"\n className={cn(\"flex flex-col gap-4\", form.className)}\n style={form.style}\n onSubmit={handleSubmit}\n >\n <div className=\"flex flex-col gap-2\">\n <Label htmlFor=\"bitsnap-returns-email\">{text(\"emailLabel\")}</Label>\n <Input\n id=\"bitsnap-returns-email\"\n type=\"email\"\n name=\"email\"\n autoComplete=\"email\"\n required\n value={email}\n placeholder={text(\"emailPlaceholder\")}\n disabled={session.isStarting}\n data-bitsnap-returns-slot=\"emailInput\"\n className={cn(INPUT_CLASS, input.className)}\n style={input.style}\n onChange={(event) => setEmail(event.target.value)}\n />\n </div>\n {session.errorKey != null && <ErrorMessage errorKey={session.errorKey} />}\n <Button\n type=\"submit\"\n disabled={session.isStarting}\n data-bitsnap-returns-slot=\"submitButton\"\n className={cn(PRIMARY_BUTTON_CLASS, submitButton.className)}\n style={submitButton.style}\n >\n {session.isStarting && <Spinner />}\n {text(\"emailSubmit\")}\n </Button>\n </form>\n </StepFrame>\n );\n}\n\n/** Seconds left until `availableAt`, ticking once a second. */\nfunction useCountdown(availableAt: number | undefined): number {\n const [now, setNow] = useState<number>();\n\n useEffect(() => {\n if (availableAt == null) {\n return;\n }\n setNow(Date.now());\n const timer = setInterval(() => {\n const current = Date.now();\n setNow(current);\n if (current >= availableAt) {\n clearInterval(timer);\n }\n }, 1000);\n return () => clearInterval(timer);\n }, [availableAt]);\n\n return availableAt != null && now != null\n ? Math.max(0, Math.ceil((availableAt - now) / 1000))\n : 0;\n}\n\nexport type ReturnsCodeStepProps = {\n /** Called once the code was accepted and the session exists. */\n onVerified?: () => void;\n /** Shows a back button, for example to change the email. */\n onBack?: () => void;\n className?: string;\n};\n\n/** Second step: asks for the code that was emailed to the customer. */\nexport function ReturnsCodeStep({\n onVerified,\n onBack,\n className,\n}: ReturnsCodeStepProps) {\n useReturnsContext(\"ReturnsCodeStep\");\n const text = useReturnsText();\n const session = useReturnSession();\n const [code, setCode] = useState(\"\");\n const secondsLeft = useCountdown(session.challenge?.resendAvailableAt);\n const form = useReturnsSlot(\"codeForm\");\n const input = useReturnsSlot(\"codeInput\");\n const submitButton = useReturnsSlot(\"submitButton\");\n const resendButton = useReturnsSlot(\"resendButton\");\n const isBusy = session.isVerifying || session.isStarting;\n\n async function handleSubmit(event: FormEvent<HTMLFormElement>) {\n event.preventDefault();\n if (isBusy) {\n return;\n }\n if (await session.verify(code)) {\n onVerified?.();\n }\n }\n\n return (\n <StepFrame\n className={className}\n onBack={onBack}\n title={text(\"codeStepTitle\")}\n description={text(\"codeStepDescription\", {\n email: session.challenge?.email ?? \"\",\n })}\n >\n <form\n data-bitsnap-returns-slot=\"codeForm\"\n className={cn(\"flex flex-col gap-4\", form.className)}\n style={form.style}\n onSubmit={handleSubmit}\n >\n <div className=\"flex flex-col gap-2\">\n <Label htmlFor=\"bitsnap-returns-code\">{text(\"codeLabel\")}</Label>\n <Input\n id=\"bitsnap-returns-code\"\n name=\"code\"\n inputMode=\"numeric\"\n autoComplete=\"one-time-code\"\n required\n value={code}\n disabled={isBusy}\n data-bitsnap-returns-slot=\"codeInput\"\n className={cn(INPUT_CLASS, input.className)}\n style={input.style}\n onChange={(event) => setCode(event.target.value)}\n />\n </div>\n {session.errorKey != null && <ErrorMessage errorKey={session.errorKey} />}\n <div className=\"flex flex-wrap items-center gap-3\">\n <Button\n type=\"submit\"\n disabled={isBusy || session.challenge == null}\n data-bitsnap-returns-slot=\"submitButton\"\n className={cn(PRIMARY_BUTTON_CLASS, submitButton.className)}\n style={submitButton.style}\n >\n {session.isVerifying && <Spinner />}\n {text(\"codeSubmit\")}\n </Button>\n <Button\n type=\"button\"\n variant=\"secondary\"\n disabled={isBusy || secondsLeft > 0 || session.challenge == null}\n data-bitsnap-returns-slot=\"resendButton\"\n className={cn(SECONDARY_BUTTON_CLASS, resendButton.className)}\n style={resendButton.style}\n onClick={() => void session.resend()}\n >\n {secondsLeft > 0\n ? text(\"resendIn\", { seconds: secondsLeft })\n : text(\"resend\")}\n </Button>\n </div>\n </form>\n </StepFrame>\n );\n}\n\n/** Sign out button that drops the returns session. */\nexport function LogoutButton() {\n const text = useReturnsText();\n const session = useReturnSession();\n const logoutButton = useReturnsSlot(\"logoutButton\");\n\n return (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n data-bitsnap-returns-slot=\"logoutButton\"\n className={cn(\n \"text-[color:var(--bitsnap-returns-muted-foreground,#71717a)] hover:bg-[var(--bitsnap-returns-hover-surface,#f4f4f5)]\",\n logoutButton.className,\n )}\n style={logoutButton.style}\n onClick={session.logout}\n >\n {text(\"logout\")}\n </Button>\n );\n}\n","import { timestampDate, type Timestamp } from \"@bufbuild/protobuf/wkt\";\n\n/** Medium date of a protobuf timestamp in the given locale, empty when unset. */\nexport function formatDate(\n timestamp: Timestamp | undefined,\n locale: string,\n): string {\n if (timestamp == null) {\n return \"\";\n }\n\n const date = timestampDate(timestamp);\n\n try {\n return new Intl.DateTimeFormat(locale, { dateStyle: \"medium\" }).format(date);\n } catch {\n return date.toISOString().slice(0, 10);\n }\n}\n","/**\n * Formats an amount given in minor units (for example grosze) with the\n * currency and locale. The amount stays a `bigint` until the decimal string is\n * built, so large `int64` values never lose precision.\n */\nexport function formatMoney(\n minor: bigint | number,\n currency: string,\n locale: string,\n): string {\n const amount = typeof minor === \"bigint\" ? minor : BigInt(Math.trunc(minor));\n\n try {\n const formatter = new Intl.NumberFormat(locale, {\n style: \"currency\",\n currency,\n });\n const digits = formatter.resolvedOptions().maximumFractionDigits ?? 2;\n // Intl accepts exact decimal strings at runtime; the ES2022 typings only\n // know numbers.\n return formatter.format(\n toDecimalString(amount, digits) as unknown as number,\n );\n } catch {\n return `${toDecimalString(amount, 2)} ${currency}`;\n }\n}\n\n/** Decimal string of a minor unit amount, e.g. `12345n, 2` -> `\"123.45\"`. */\nexport function toDecimalString(amount: bigint, fractionDigits: number): string {\n const negative = amount < BigInt(0);\n const absolute = negative ? -amount : amount;\n\n if (fractionDigits <= 0) {\n return `${negative ? \"-\" : \"\"}${absolute}`;\n }\n\n const divisor = BigInt(10) ** BigInt(fractionDigits);\n const whole = absolute / divisor;\n const fraction = (absolute % divisor).toString().padStart(fractionDigits, \"0\");\n\n return `${negative ? \"-\" : \"\"}${whole}.${fraction}`;\n}\n","import type { SelectedReturnLine } from \"./state-machine\";\n\n/** Keeps a typed quantity inside `0..max`. Non-numeric input becomes `0`. */\nexport function clampQuantity(value: number, max: number): number {\n if (!Number.isFinite(value)) {\n return 0;\n }\n\n return Math.min(Math.max(0, Math.trunc(value)), Math.max(0, max));\n}\n\n/** A line can be selected only when it is eligible and has quantity left. */\nexport function isLineSelectable(line: {\n eligible: boolean;\n availableQuantity: number;\n}): boolean {\n return line.eligible && line.availableQuantity > 0;\n}\n\n/** Lines with a positive quantity, in the order of the order's lines. */\nexport function toSelectedLines(\n lineIds: readonly string[],\n quantities: Readonly<Record<string, number>>,\n): SelectedReturnLine[] {\n return lineIds\n .map((lineId) => ({ lineId, quantity: quantities[lineId] ?? 0 }))\n .filter((line) => line.quantity > 0);\n}\n","import { useState } from \"react\";\nimport type { FormEvent } from \"react\";\nimport type {\n ReturnOrderLine,\n ReturnRequestView,\n} from \"@/src/gen/proto/public/v1/returns_pb\";\nimport { Button } from \"@/src/ui/button\";\nimport { Label } from \"@/src/ui/label\";\nimport { Spinner } from \"@/src/ui/spinner\";\nimport { Textarea } from \"@/src/ui/textarea\";\nimport { cn } from \"@/src/lib/utils\";\nimport { useReturnsSlot } from \"./appearance.context\";\nimport { LogoutButton } from \"./AuthSteps\";\nimport { formatDate } from \"./date\";\nimport {\n useCreateReturn,\n useMyReturn,\n useReturnableOrder,\n useReturnOrders,\n} from \"./hooks\";\nimport {\n EmptyState,\n ErrorMessage,\n INPUT_CLASS,\n Pagination,\n PRIMARY_BUTTON_CLASS,\n SECONDARY_BUTTON_CLASS,\n SkeletonRows,\n StatusBadge,\n StepFrame,\n} from \"./internal\";\nimport { formatMoney } from \"./money\";\nimport { useReturnsContext } from \"./ReturnsProvider\";\nimport { clampQuantity, isLineSelectable, toSelectedLines } from \"./selection\";\nimport type { SelectedReturnLine } from \"./state-machine\";\nimport { useReturnsLocale, useReturnsText } from \"./texts.context\";\n\nexport type ReturnsOrderListProps = {\n /** Called with the canonical order ID of the chosen order. */\n onSelectOrder?: (orderId: string) => void;\n /** Shows a \"my returns\" button that calls this. */\n onOpenMyReturns?: () => void;\n /** Shows the sign out button. Defaults to `true`. */\n showLogout?: boolean;\n /** Orders per page. Defaults to 10. */\n pageSize?: number;\n className?: string;\n};\n\n/** Orders of the customer that still have products to return. */\nexport function ReturnsOrderList({\n onSelectOrder,\n onOpenMyReturns,\n showLogout = true,\n pageSize,\n className,\n}: ReturnsOrderListProps) {\n useReturnsContext(\"ReturnsOrderList\");\n const text = useReturnsText();\n const locale = useReturnsLocale();\n const orders = useReturnOrders({ pageSize });\n const list = useReturnsSlot(\"orderList\");\n const card = useReturnsSlot(\"orderCard\");\n const reference = useReturnsSlot(\"orderReference\");\n const date = useReturnsSlot(\"orderDate\");\n const total = useReturnsSlot(\"orderTotal\");\n const secondaryButton = useReturnsSlot(\"secondaryButton\");\n\n return (\n <StepFrame\n className={className}\n title={text(\"ordersTitle\")}\n description={text(\"ordersDescription\")}\n >\n {(showLogout || onOpenMyReturns != null) && (\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n {onOpenMyReturns != null ? (\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n data-bitsnap-returns-slot=\"secondaryButton\"\n className={cn(SECONDARY_BUTTON_CLASS, secondaryButton.className)}\n style={secondaryButton.style}\n onClick={onOpenMyReturns}\n >\n {text(\"myReturnsLink\")}\n </Button>\n ) : (\n <span />\n )}\n {showLogout && <LogoutButton />}\n </div>\n )}\n {orders.isLoading ? (\n <SkeletonRows />\n ) : orders.errorKey != null ? (\n <ErrorMessage errorKey={orders.errorKey} onRetry={orders.refetch} />\n ) : orders.orders.length === 0 ? (\n <EmptyState>{text(\"ordersEmpty\")}</EmptyState>\n ) : (\n <>\n <ul\n data-bitsnap-returns-slot=\"orderList\"\n className={cn(\"flex flex-col gap-3\", list.className)}\n style={list.style}\n >\n {orders.orders.map((order) => (\n <li\n key={order.canonicalOrderId}\n data-bitsnap-returns-slot=\"orderCard\"\n className={cn(\n \"flex flex-wrap items-center justify-between gap-3 border p-4\",\n card.className,\n )}\n style={card.style}\n >\n <div className=\"flex flex-col gap-1\">\n <span\n data-bitsnap-returns-slot=\"orderReference\"\n className={cn(\"font-medium\", reference.className)}\n style={reference.style}\n >\n {text(\"orderTitle\", { reference: order.displayReference })}\n </span>\n <span\n data-bitsnap-returns-slot=\"orderDate\"\n className={cn(\"text-sm\", date.className)}\n style={date.style}\n >\n {formatDate(order.purchasedAt, locale)}\n </span>\n <span className=\"text-sm\">\n {text(\"orderReturnableLines\", {\n count: order.returnableLineCount,\n })}\n </span>\n </div>\n <div className=\"flex items-center gap-4\">\n <span\n data-bitsnap-returns-slot=\"orderTotal\"\n className={cn(\"font-medium\", total.className)}\n style={total.style}\n >\n {formatMoney(order.totalMinor, order.currency, locale)}\n </span>\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n aria-label={`${text(\"orderSelect\")}: ${text(\"orderTitle\", {\n reference: order.displayReference,\n })}`}\n data-bitsnap-returns-slot=\"secondaryButton\"\n className={cn(\n SECONDARY_BUTTON_CLASS,\n secondaryButton.className,\n )}\n style={secondaryButton.style}\n onClick={() => onSelectOrder?.(order.canonicalOrderId)}\n >\n {text(\"orderSelect\")}\n </Button>\n </div>\n </li>\n ))}\n </ul>\n <Pagination\n page={orders.page}\n total={orders.total}\n hasNext={orders.hasNext}\n hasPrevious={orders.hasPrevious}\n isFetching={orders.isFetching}\n onNext={orders.next}\n onPrevious={orders.previous}\n />\n </>\n )}\n </StepFrame>\n );\n}\n\nexport type ReturnsOrderDetailProps = {\n /** Canonical order ID, as given to `onSelectOrder`. */\n orderId: string;\n /** Called with the selected lines and the note when the form is valid. */\n onContinue?: (selection: { items: SelectedReturnLine[]; note: string }) => void;\n onBack?: () => void;\n /** Selection to start with, for example when coming back from the confirmation. */\n initialItems?: SelectedReturnLine[];\n initialNote?: string;\n className?: string;\n};\n\n/** Line and quantity selection of one order. */\nexport function ReturnsOrderDetail({\n orderId,\n onContinue,\n onBack,\n initialItems,\n initialNote,\n className,\n}: ReturnsOrderDetailProps) {\n useReturnsContext(\"ReturnsOrderDetail\");\n const text = useReturnsText();\n const locale = useReturnsLocale();\n const { order, returnHistory, isLoading, errorKey, refetch } =\n useReturnableOrder(orderId);\n const [quantities, setQuantities] = useState<Record<string, number>>(() =>\n Object.fromEntries(\n (initialItems ?? []).map((item) => [item.lineId, item.quantity]),\n ),\n );\n const [note, setNote] = useState(initialNote ?? \"\");\n const [showEmptyError, setShowEmptyError] = useState(false);\n const lineList = useReturnsSlot(\"lineList\");\n const lineSlot = useReturnsSlot(\"line\");\n const lineName = useReturnsSlot(\"lineName\");\n const linePrice = useReturnsSlot(\"linePrice\");\n const quantityControl = useReturnsSlot(\"lineQuantityControl\");\n const quantityButton = useReturnsSlot(\"quantityButton\");\n const quantityInput = useReturnsSlot(\"quantityInput\");\n const ineligibleReason = useReturnsSlot(\"lineIneligibleReason\");\n const noteInput = useReturnsSlot(\"noteInput\");\n const submitButton = useReturnsSlot(\"submitButton\");\n const history = useReturnsSlot(\"history\");\n const historyEntry = useReturnsSlot(\"historyEntry\");\n\n function setQuantity(line: ReturnOrderLine, value: number) {\n setShowEmptyError(false);\n setQuantities((current) => ({\n ...current,\n [line.lineId]: clampQuantity(value, line.availableQuantity),\n }));\n }\n\n function handleSubmit(event: FormEvent<HTMLFormElement>) {\n event.preventDefault();\n if (order == null) {\n return;\n }\n const items = toSelectedLines(\n order.lines.filter(isLineSelectable).map((line) => line.lineId),\n quantities,\n );\n if (items.length === 0) {\n setShowEmptyError(true);\n return;\n }\n onContinue?.({ items, note: note.trim() });\n }\n\n return (\n <StepFrame\n className={className}\n onBack={onBack}\n title={text(\"orderDetailTitle\", {\n reference: order?.displayReference ?? \"\",\n })}\n description={text(\"orderDetailDescription\")}\n >\n {isLoading ? (\n <SkeletonRows />\n ) : errorKey != null ? (\n <ErrorMessage errorKey={errorKey} onRetry={refetch} />\n ) : order == null ? null : (\n <form className=\"flex flex-col gap-5\" onSubmit={handleSubmit}>\n <ul\n data-bitsnap-returns-slot=\"lineList\"\n className={cn(\"flex flex-col gap-3\", lineList.className)}\n style={lineList.style}\n >\n {order.lines.map((line) => {\n const selectable = isLineSelectable(line);\n const quantity = quantities[line.lineId] ?? 0;\n const inputId = `bitsnap-returns-quantity-${line.lineId}`;\n\n return (\n <li\n key={line.lineId}\n data-bitsnap-returns-slot=\"line\"\n data-selected={quantity > 0 ? \"\" : undefined}\n data-ineligible={selectable ? undefined : \"\"}\n className={cn(\n \"flex flex-col gap-3 border p-4\",\n lineSlot.className,\n )}\n style={lineSlot.style}\n >\n <div className=\"flex flex-wrap items-baseline justify-between gap-2\">\n <span\n data-bitsnap-returns-slot=\"lineName\"\n className={cn(\"font-medium\", lineName.className)}\n style={lineName.style}\n >\n {line.name}\n </span>\n <span\n data-bitsnap-returns-slot=\"linePrice\"\n className={cn(\"text-sm\", linePrice.className)}\n style={linePrice.style}\n >\n {formatMoney(line.paidUnitMinor, line.currency, locale)}\n </span>\n </div>\n {selectable ? (\n <div\n role=\"group\"\n aria-label={text(\"quantityLabel\", { name: line.name })}\n data-bitsnap-returns-slot=\"lineQuantityControl\"\n className={cn(\n \"flex items-center gap-2\",\n quantityControl.className,\n )}\n style={quantityControl.style}\n >\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"icon-sm\"\n aria-label={text(\"quantityDecrease\", {\n name: line.name,\n })}\n aria-controls={inputId}\n disabled={quantity <= 0}\n data-bitsnap-returns-slot=\"quantityButton\"\n className={cn(\n SECONDARY_BUTTON_CLASS,\n quantityButton.className,\n )}\n style={quantityButton.style}\n onClick={() => setQuantity(line, quantity - 1)}\n >\n <span aria-hidden=\"true\">-</span>\n </Button>\n <input\n id={inputId}\n type=\"number\"\n inputMode=\"numeric\"\n min={0}\n max={line.availableQuantity}\n step={1}\n value={quantity}\n aria-label={text(\"quantityLabel\", { name: line.name })}\n data-bitsnap-returns-slot=\"quantityInput\"\n className={cn(\n \"h-8 w-16 rounded-md border px-2 text-center text-sm outline-none focus-visible:ring-[3px]\",\n INPUT_CLASS,\n quantityInput.className,\n )}\n style={quantityInput.style}\n onChange={(event) =>\n setQuantity(line, event.target.valueAsNumber)\n }\n />\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"icon-sm\"\n aria-label={text(\"quantityIncrease\", {\n name: line.name,\n })}\n aria-controls={inputId}\n disabled={quantity >= line.availableQuantity}\n data-bitsnap-returns-slot=\"quantityButton\"\n className={cn(\n SECONDARY_BUTTON_CLASS,\n quantityButton.className,\n )}\n style={quantityButton.style}\n onClick={() => setQuantity(line, quantity + 1)}\n >\n <span aria-hidden=\"true\">+</span>\n </Button>\n <span className=\"text-sm\">\n {text(\"quantityOfAvailable\", {\n available: line.availableQuantity,\n })}\n </span>\n </div>\n ) : (\n <p\n data-bitsnap-returns-slot=\"lineIneligibleReason\"\n className={cn(\"text-sm\", ineligibleReason.className)}\n style={ineligibleReason.style}\n >\n {line.exclusionReason !== \"\"\n ? line.exclusionReason\n : text(\"lineIneligibleFallback\")}\n </p>\n )}\n </li>\n );\n })}\n </ul>\n <div className=\"flex flex-col gap-2\">\n <Label htmlFor=\"bitsnap-returns-note\">{text(\"noteLabel\")}</Label>\n <Textarea\n id=\"bitsnap-returns-note\"\n name=\"note\"\n rows={3}\n maxLength={1000}\n value={note}\n placeholder={text(\"notePlaceholder\")}\n data-bitsnap-returns-slot=\"noteInput\"\n className={cn(\n INPUT_CLASS,\n \"dark:border-[color:var(--bitsnap-returns-border,#e4e4e7)] dark:placeholder:text-[color:var(--bitsnap-returns-muted-foreground,#71717a)] dark:focus-visible:ring-[color:var(--bitsnap-returns-focus-ring,#71717a)]\",\n noteInput.className,\n )}\n style={noteInput.style}\n onChange={(event) => setNote(event.target.value)}\n />\n </div>\n {showEmptyError && <ErrorMessage errorKey=\"selectionEmpty\" />}\n <Button\n type=\"submit\"\n data-bitsnap-returns-slot=\"submitButton\"\n className={cn(PRIMARY_BUTTON_CLASS, submitButton.className)}\n style={submitButton.style}\n >\n {text(\"selectionContinue\")}\n </Button>\n {returnHistory.length > 0 && (\n <div className=\"flex flex-col gap-2\">\n <h3 className=\"text-sm font-medium\">\n {text(\"previousReturnsTitle\")}\n </h3>\n <ul\n data-bitsnap-returns-slot=\"history\"\n className={cn(\"flex flex-col gap-2\", history.className)}\n style={history.style}\n >\n {returnHistory.map((entry) => (\n <li\n key={entry.id}\n data-bitsnap-returns-slot=\"historyEntry\"\n className={cn(\n \"flex flex-wrap items-center justify-between gap-2 text-sm\",\n historyEntry.className,\n )}\n style={historyEntry.style}\n >\n <span>{entry.reference}</span>\n <span>{formatDate(entry.createdAt, locale)}</span>\n <StatusBadge status={entry.status} />\n </li>\n ))}\n </ul>\n </div>\n )}\n </form>\n )}\n </StepFrame>\n );\n}\n\nexport type ReturnsConfirmationProps = {\n /** Canonical order ID. */\n orderId: string;\n /** Lines chosen in the order detail step. */\n items: SelectedReturnLine[];\n note?: string;\n /** Called with the new return's ID and the created request. */\n onSubmitted?: (returnId: string, request: ReturnRequestView) => void;\n onBack?: () => void;\n className?: string;\n};\n\n/** Review of the selected lines and the submit action. */\nexport function ReturnsConfirmation({\n orderId,\n items,\n note,\n onSubmitted,\n onBack,\n className,\n}: ReturnsConfirmationProps) {\n useReturnsContext(\"ReturnsConfirmation\");\n const text = useReturnsText();\n const locale = useReturnsLocale();\n const { order, isLoading, errorKey: orderErrorKey, refetch } =\n useReturnableOrder(orderId);\n const create = useCreateReturn();\n const summary = useReturnsSlot(\"summary\");\n const lineSlot = useReturnsSlot(\"line\");\n const lineName = useReturnsSlot(\"lineName\");\n const linePrice = useReturnsSlot(\"linePrice\");\n const submitButton = useReturnsSlot(\"submitButton\");\n\n async function handleSubmit(event: FormEvent<HTMLFormElement>) {\n event.preventDefault();\n if (create.isPending) {\n return;\n }\n const request = await create.submit({\n orderId,\n items: items.map((item) => ({\n lineId: item.lineId,\n quantity: item.quantity,\n })),\n note,\n });\n if (request != null) {\n onSubmitted?.(request.id, request);\n }\n }\n\n return (\n <StepFrame\n className={className}\n onBack={onBack}\n title={text(\"confirmationTitle\")}\n description={text(\"confirmationDescription\")}\n >\n {isLoading ? (\n <SkeletonRows rows={2} />\n ) : orderErrorKey != null ? (\n <ErrorMessage errorKey={orderErrorKey} onRetry={refetch} />\n ) : (\n <form className=\"flex flex-col gap-5\" onSubmit={handleSubmit}>\n <div\n data-bitsnap-returns-slot=\"summary\"\n className={cn(\"flex flex-col gap-3 border p-4\", summary.className)}\n style={summary.style}\n >\n <h3 className=\"text-sm font-medium\">\n {text(\"confirmationSummary\")}\n </h3>\n <ul className=\"flex flex-col gap-3\">\n {items.map((item) => {\n const line = order?.lines.find(\n (candidate) => candidate.lineId === item.lineId,\n );\n\n return (\n <li\n key={item.lineId}\n data-bitsnap-returns-slot=\"line\"\n className={cn(\n \"flex flex-wrap items-baseline justify-between gap-2\",\n lineSlot.className,\n )}\n style={lineSlot.style}\n >\n <span\n data-bitsnap-returns-slot=\"lineName\"\n className={cn(\"font-medium\", lineName.className)}\n style={lineName.style}\n >\n {line?.name ?? item.lineId}\n </span>\n <span\n data-bitsnap-returns-slot=\"linePrice\"\n className={cn(\"text-sm\", linePrice.className)}\n style={linePrice.style}\n >\n {text(\"confirmationQuantity\", { quantity: item.quantity })}\n {line != null &&\n ` · ${formatMoney(\n line.paidUnitMinor * BigInt(item.quantity),\n line.currency,\n locale,\n )}`}\n </span>\n </li>\n );\n })}\n </ul>\n {note != null && note !== \"\" && (\n <div className=\"flex flex-col gap-1 text-sm\">\n <span className=\"font-medium\">{text(\"confirmationNote\")}</span>\n <span className=\"whitespace-pre-wrap\">{note}</span>\n </div>\n )}\n </div>\n {create.errorKey != null && <ErrorMessage errorKey={create.errorKey} />}\n <Button\n type=\"submit\"\n disabled={create.isPending || items.length === 0}\n data-bitsnap-returns-slot=\"submitButton\"\n className={cn(PRIMARY_BUTTON_CLASS, submitButton.className)}\n style={submitButton.style}\n >\n {create.isPending && <Spinner />}\n {text(\"confirmationSubmit\")}\n </Button>\n </form>\n )}\n </StepFrame>\n );\n}\n\nexport type ReturnsResultProps = {\n /** ID of the created return, as given to `onSubmitted`. */\n returnId: string;\n /** Called by the primary button, normally to go back to the orders. */\n onContinue?: () => void;\n /** Shows a \"my returns\" button that calls this. */\n onOpenMyReturns?: () => void;\n className?: string;\n};\n\n/** Success screen with the reference and the return instructions. */\nexport function ReturnsResult({\n returnId,\n onContinue,\n onOpenMyReturns,\n className,\n}: ReturnsResultProps) {\n useReturnsContext(\"ReturnsResult\");\n const text = useReturnsText();\n const { request, isLoading, errorKey, refetch } = useMyReturn(returnId);\n const success = useReturnsSlot(\"successState\");\n const reference = useReturnsSlot(\"returnReference\");\n const instructions = useReturnsSlot(\"returnInstructions\");\n const submitButton = useReturnsSlot(\"submitButton\");\n const secondaryButton = useReturnsSlot(\"secondaryButton\");\n\n return (\n <section className={cn(\"flex flex-col gap-5\", className)}>\n <div\n role=\"status\"\n data-bitsnap-returns-slot=\"successState\"\n className={cn(\"flex flex-col gap-4 border p-5\", success.className)}\n style={success.style}\n >\n <h2 className=\"text-2xl font-semibold\">{text(\"successTitle\")}</h2>\n <p className=\"text-sm\">{text(\"successDescription\")}</p>\n {isLoading ? (\n <SkeletonRows rows={2} />\n ) : errorKey != null ? (\n <ErrorMessage errorKey={errorKey} onRetry={refetch} />\n ) : (\n request != null && (\n <>\n <div className=\"flex flex-col gap-1\">\n <span className=\"text-sm\">{text(\"successReference\")}</span>\n <span\n data-bitsnap-returns-slot=\"returnReference\"\n className={cn(\"text-lg font-semibold\", reference.className)}\n style={reference.style}\n >\n {request.reference}\n </span>\n </div>\n {request.returnInstructions !== \"\" && (\n <div className=\"flex flex-col gap-1\">\n <span className=\"text-sm font-medium\">\n {text(\"successInstructions\")}\n </span>\n <p\n data-bitsnap-returns-slot=\"returnInstructions\"\n className={cn(\n \"whitespace-pre-wrap border p-3 text-sm\",\n instructions.className,\n )}\n style={instructions.style}\n >\n {request.returnInstructions}\n </p>\n </div>\n )}\n </>\n )\n )}\n </div>\n <div className=\"flex flex-wrap gap-3\">\n <Button\n type=\"button\"\n data-bitsnap-returns-slot=\"submitButton\"\n className={cn(PRIMARY_BUTTON_CLASS, submitButton.className)}\n style={submitButton.style}\n onClick={onContinue}\n >\n {text(\"successDone\")}\n </Button>\n {onOpenMyReturns != null && (\n <Button\n type=\"button\"\n variant=\"secondary\"\n data-bitsnap-returns-slot=\"secondaryButton\"\n className={cn(SECONDARY_BUTTON_CLASS, secondaryButton.className)}\n style={secondaryButton.style}\n onClick={onOpenMyReturns}\n >\n {text(\"myReturnsLink\")}\n </Button>\n )}\n </div>\n </section>\n );\n}\n","import { Button } from \"@/src/ui/button\";\nimport { cn } from \"@/src/lib/utils\";\nimport { useReturnsSlot } from \"./appearance.context\";\nimport { formatDate } from \"./date\";\nimport { useMyReturn, useMyReturns } from \"./hooks\";\nimport {\n EmptyState,\n ErrorMessage,\n Pagination,\n SECONDARY_BUTTON_CLASS,\n SkeletonRows,\n StatusBadge,\n StepFrame,\n useRefundStatusText,\n} from \"./internal\";\nimport { formatMoney } from \"./money\";\nimport { useReturnsContext } from \"./ReturnsProvider\";\nimport { useReturnsLocale, useReturnsText } from \"./texts.context\";\n\nexport type ReturnsMyReturnsListProps = {\n /** Called with the ID of the chosen return. */\n onSelectReturn?: (returnId: string) => void;\n onBack?: () => void;\n /** Returns per page. Defaults to 10. */\n pageSize?: number;\n className?: string;\n};\n\n/** Return requests the customer has submitted, with their status. */\nexport function ReturnsMyReturnsList({\n onSelectReturn,\n onBack,\n pageSize,\n className,\n}: ReturnsMyReturnsListProps) {\n useReturnsContext(\"ReturnsMyReturnsList\");\n const text = useReturnsText();\n const locale = useReturnsLocale();\n const refundText = useRefundStatusText();\n const myReturns = useMyReturns({ pageSize });\n const list = useReturnsSlot(\"returnList\");\n const card = useReturnsSlot(\"returnCard\");\n const reference = useReturnsSlot(\"returnReference\");\n const secondaryButton = useReturnsSlot(\"secondaryButton\");\n\n return (\n <StepFrame\n className={className}\n onBack={onBack}\n title={text(\"myReturnsTitle\")}\n description={text(\"myReturnsDescription\")}\n >\n {myReturns.isLoading ? (\n <SkeletonRows />\n ) : myReturns.errorKey != null ? (\n <ErrorMessage errorKey={myReturns.errorKey} onRetry={myReturns.refetch} />\n ) : myReturns.returns.length === 0 ? (\n <EmptyState>{text(\"myReturnsEmpty\")}</EmptyState>\n ) : (\n <>\n <ul\n data-bitsnap-returns-slot=\"returnList\"\n className={cn(\"flex flex-col gap-3\", list.className)}\n style={list.style}\n >\n {myReturns.returns.map((item) => (\n <li\n key={item.id}\n data-bitsnap-returns-slot=\"returnCard\"\n className={cn(\n \"flex flex-wrap items-center justify-between gap-3 border p-4\",\n card.className,\n )}\n style={card.style}\n >\n <div className=\"flex flex-col gap-1\">\n <span\n data-bitsnap-returns-slot=\"returnReference\"\n className={cn(\"font-medium\", reference.className)}\n style={reference.style}\n >\n {item.reference}\n </span>\n <span className=\"text-sm\">\n {formatDate(item.createdAt, locale)}\n </span>\n <span className=\"text-sm\">\n {text(\"myReturnRefund\")}: {refundText(item.refundStatus)}\n </span>\n </div>\n <div className=\"flex items-center gap-3\">\n <StatusBadge status={item.status} />\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n aria-label={`${text(\"myReturnOpen\")}: ${item.reference}`}\n data-bitsnap-returns-slot=\"secondaryButton\"\n className={cn(\n SECONDARY_BUTTON_CLASS,\n secondaryButton.className,\n )}\n style={secondaryButton.style}\n onClick={() => onSelectReturn?.(item.id)}\n >\n {text(\"myReturnOpen\")}\n </Button>\n </div>\n </li>\n ))}\n </ul>\n <Pagination\n page={myReturns.page}\n total={myReturns.total}\n hasNext={myReturns.hasNext}\n hasPrevious={myReturns.hasPrevious}\n isFetching={myReturns.isFetching}\n onNext={myReturns.next}\n onPrevious={myReturns.previous}\n />\n </>\n )}\n </StepFrame>\n );\n}\n\nexport type ReturnsMyReturnDetailProps = {\n /** ID of the return to show. */\n returnId: string;\n onBack?: () => void;\n className?: string;\n};\n\n/** Status, lines, refund and history of one return request. */\nexport function ReturnsMyReturnDetail({\n returnId,\n onBack,\n className,\n}: ReturnsMyReturnDetailProps) {\n useReturnsContext(\"ReturnsMyReturnDetail\");\n const text = useReturnsText();\n const locale = useReturnsLocale();\n const refundText = useRefundStatusText();\n const { request, isLoading, errorKey, refetch } = useMyReturn(returnId);\n const summary = useReturnsSlot(\"summary\");\n const lineList = useReturnsSlot(\"lineList\");\n const lineSlot = useReturnsSlot(\"line\");\n const lineName = useReturnsSlot(\"lineName\");\n const instructions = useReturnsSlot(\"returnInstructions\");\n const history = useReturnsSlot(\"history\");\n const historyEntry = useReturnsSlot(\"historyEntry\");\n\n return (\n <StepFrame\n className={className}\n onBack={onBack}\n title={\n request != null\n ? text(\"myReturnTitle\", { reference: request.reference })\n : text(\"myReturnDetailTitle\")\n }\n >\n {isLoading ? (\n <SkeletonRows />\n ) : errorKey != null ? (\n <ErrorMessage errorKey={errorKey} onRetry={refetch} />\n ) : (\n request != null && (\n <div className=\"flex flex-col gap-5\">\n <div\n data-bitsnap-returns-slot=\"summary\"\n className={cn(\n \"flex flex-col gap-2 border p-4 text-sm\",\n summary.className,\n )}\n style={summary.style}\n >\n <div className=\"flex items-center justify-between gap-2\">\n <StatusBadge status={request.status} />\n <span>\n {text(\"myReturnCreatedAt\")}:{\" \"}\n {formatDate(request.createdAt, locale)}\n </span>\n </div>\n <span>\n {text(\"myReturnRefund\")}: {refundText(request.refundStatus)}\n {request.refundAmountMinor > BigInt(0) &&\n ` · ${formatMoney(request.refundAmountMinor, request.currency, locale)}`}\n </span>\n {request.customerNote !== \"\" && (\n <span className=\"whitespace-pre-wrap\">\n {text(\"myReturnNote\")}: {request.customerNote}\n </span>\n )}\n </div>\n {request.returnInstructions !== \"\" && (\n <p\n data-bitsnap-returns-slot=\"returnInstructions\"\n className={cn(\n \"whitespace-pre-wrap border p-3 text-sm\",\n instructions.className,\n )}\n style={instructions.style}\n >\n {request.returnInstructions}\n </p>\n )}\n <div className=\"flex flex-col gap-2\">\n <h3 className=\"text-sm font-medium\">{text(\"myReturnLines\")}</h3>\n <ul\n data-bitsnap-returns-slot=\"lineList\"\n className={cn(\"flex flex-col gap-3\", lineList.className)}\n style={lineList.style}\n >\n {request.lines.map((line) => (\n <li\n key={line.lineId}\n data-bitsnap-returns-slot=\"line\"\n className={cn(\n \"flex flex-wrap items-baseline justify-between gap-2 border p-4\",\n lineSlot.className,\n )}\n style={lineSlot.style}\n >\n <span\n data-bitsnap-returns-slot=\"lineName\"\n className={cn(\"font-medium\", lineName.className)}\n style={lineName.style}\n >\n {line.name}\n </span>\n <span className=\"text-sm\">\n {text(\"myReturnLineQuantities\", {\n requested: line.requestedQuantity,\n approved: line.approvedQuantity,\n received: line.receivedQuantity,\n })}\n </span>\n </li>\n ))}\n </ul>\n </div>\n {request.history.length > 0 && (\n <div className=\"flex flex-col gap-2\">\n <h3 className=\"text-sm font-medium\">{text(\"myReturnHistory\")}</h3>\n <ul\n data-bitsnap-returns-slot=\"history\"\n className={cn(\"flex flex-col gap-2\", history.className)}\n style={history.style}\n >\n {request.history.map((entry) => (\n <li\n key={entry.id}\n data-bitsnap-returns-slot=\"historyEntry\"\n className={cn(\n \"flex flex-wrap items-center justify-between gap-2 text-sm\",\n historyEntry.className,\n )}\n style={historyEntry.style}\n >\n <StatusBadge status={entry.status} />\n <span>{formatDate(entry.createdAt, locale)}</span>\n </li>\n ))}\n </ul>\n </div>\n )}\n </div>\n )\n )}\n </StepFrame>\n );\n}\n","import { useEffect, useState } from \"react\";\nimport {\n ReturnsConfirmation,\n ReturnsOrderDetail,\n ReturnsOrderList,\n ReturnsResult,\n} from \"../../components/returns/OrderSteps\";\nimport {\n ReturnsMyReturnDetail,\n ReturnsMyReturnsList,\n} from \"../../components/returns/MyReturns\";\nimport {\n ReturnsProvider,\n useReturnsContext,\n} from \"../../components/returns/ReturnsProvider\";\nimport { SkeletonRows } from \"../../components/returns/internal\";\nimport { isSessionExpiredError, mapReturnsError } from \"../../components/returns/errors\";\nimport { useReturnsText } from \"../../components/returns/texts.context\";\nimport type { SelectedReturnLine } from \"../../components/returns/state-machine\";\nimport type { ReturnsAppearance } from \"../../components/returns/appearance\";\nimport type { ReturnsTexts } from \"../../components/returns/texts\";\nimport { Button } from \"../../ui/button\";\nimport { clearPanelSession } from \"../session-storage\";\nimport type { PanelScreen, PanelSearchParamsType } from \"../types\";\n\ntype Props = {\n projectID: string;\n host?: string;\n accessToken: string;\n loginURL: string;\n appearance?: ReturnsAppearance;\n texts?: Partial<ReturnsTexts>;\n screen: PanelScreen;\n params: PanelSearchParamsType;\n setParams: (params: Partial<PanelSearchParamsType>) => void;\n setActiveScreen: (screen: PanelScreen) => void;\n};\n\ntype Draft = { items: SelectedReturnLine[]; note: string };\n\nfunction redirectToLogin(\n loginURL: string,\n dropToken: boolean,\n projectID: string,\n host?: string,\n) {\n if (typeof window === \"undefined\") return;\n if (dropToken) {\n clearPanelSession(projectID, host);\n }\n window.location.href = loginURL;\n}\n\nfunction ReturnsScreens({\n projectID,\n host,\n loginURL,\n screen,\n params,\n setParams,\n setActiveScreen,\n}: Pick<\n Props,\n \"projectID\" | \"host\" | \"loginURL\" | \"screen\" | \"params\" | \"setParams\" | \"setActiveScreen\"\n>) {\n const { status, exchangeError } = useReturnsContext(\"PanelReturns\");\n const text = useReturnsText();\n\n // The panel token is the login, so there is no email or code step. A failed\n // exchange or a dropped session means the panel session is no longer valid.\n const expired =\n status === \"anonymous\" &&\n (exchangeError == null || isSessionExpiredError(exchangeError));\n useEffect(() => {\n if (expired) {\n redirectToLogin(loginURL, exchangeError != null, projectID, host);\n }\n }, [expired, loginURL, exchangeError, projectID, host]);\n\n const [view, setView] = useState<\"orders\" | \"myReturns\" | \"confirmation\" | \"result\">(\n \"orders\",\n );\n const [draft, setDraft] = useState<Draft>({ items: [], note: \"\" });\n const [createdReturnId, setCreatedReturnId] = useState<string>();\n\n if (status === \"anonymous\" && !expired) {\n return (\n <div role=\"alert\" className=\"flex flex-col items-start gap-3\">\n <p className=\"text-sm\">{text(mapReturnsError(exchangeError))}</p>\n <Button type=\"button\" onClick={() => window.location.reload()}>\n {text(\"errorRetry\")}\n </Button>\n </div>\n );\n }\n\n if (status !== \"authenticated\") {\n return <SkeletonRows />;\n }\n\n const openReturns = (next: \"orders\" | \"myReturns\") => {\n setView(next);\n setParams({ state: \"returns\", orderId: undefined, returnId: undefined });\n setActiveScreen(\"returns\");\n };\n\n if (screen === \"return-details\" && params.returnId) {\n return (\n <ReturnsMyReturnDetail\n returnId={params.returnId}\n onBack={() => openReturns(\"myReturns\")}\n />\n );\n }\n\n if (view === \"myReturns\") {\n return (\n <ReturnsMyReturnsList\n onBack={() => openReturns(\"orders\")}\n onSelectReturn={(returnId) => {\n setParams({ state: \"return-details\", returnId, orderId: undefined });\n setActiveScreen(\"return-details\");\n }}\n />\n );\n }\n\n if (view === \"result\" && createdReturnId != null) {\n return (\n <ReturnsResult\n returnId={createdReturnId}\n onContinue={() => openReturns(\"orders\")}\n onOpenMyReturns={() => openReturns(\"myReturns\")}\n />\n );\n }\n\n if (params.orderId) {\n const orderId = params.orderId;\n\n if (view === \"confirmation\") {\n return (\n <ReturnsConfirmation\n orderId={orderId}\n items={draft.items}\n note={draft.note}\n onBack={() => setView(\"orders\")}\n onSubmitted={(returnId) => {\n setCreatedReturnId(returnId);\n setDraft({ items: [], note: \"\" });\n setView(\"result\");\n setParams({ orderId: undefined });\n }}\n />\n );\n }\n\n return (\n <ReturnsOrderDetail\n orderId={orderId}\n initialItems={draft.items.length > 0 ? draft.items : undefined}\n initialNote={draft.note}\n onBack={() => {\n setDraft({ items: [], note: \"\" });\n setParams({ orderId: undefined });\n }}\n onContinue={(selection) => {\n setDraft(selection);\n setView(\"confirmation\");\n }}\n />\n );\n }\n\n return (\n <ReturnsOrderList\n showLogout={false}\n onSelectOrder={(orderId) => {\n setDraft({ items: [], note: \"\" });\n setView(\"orders\");\n setParams({ orderId });\n }}\n onOpenMyReturns={() => openReturns(\"myReturns\")}\n />\n );\n}\n\n/**\n * Panel Returns screen: the exported returns step components under a\n * `ReturnsProvider` that exchanges the panel access token for a returns\n * session.\n */\nexport default function PanelReturns({\n accessToken,\n appearance,\n texts,\n ...rest\n}: Props) {\n return (\n <ReturnsProvider\n projectID={rest.projectID}\n host={rest.host}\n appearance={appearance}\n texts={texts}\n panelAccessToken={accessToken}\n >\n <ReturnsScreens {...rest} />\n </ReturnsProvider>\n );\n}\n","const URL_REGEX =\n /https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)/g;\n\ntype Replacements = {\n url: string;\n startIndex: number;\n endIndex: number;\n replacementText?: string;\n};\n\nconst findURLIndices = (text: string) => {\n const matches = [...text.matchAll(URL_REGEX)];\n return matches.map(\n (match) =>\n ({\n url: match[0],\n startIndex: match.index,\n endIndex: match.index + match[0].length - 1,\n }) as Replacements,\n );\n};\n\nconst replaceTextByIndices = (\n originalText: string,\n replacements: Replacements[],\n) => {\n let result = \"\";\n let lastIndex = 0;\n\n // Sort replacements by startIndex to handle them in order\n replacements.sort((a, b) => a.startIndex - b.startIndex);\n\n for (const { startIndex, endIndex, replacementText } of replacements) {\n // Append text before the current replacement\n result += originalText.slice(lastIndex, startIndex);\n // Append the replacement text\n result += replacementText;\n // Update lastIndex to after the replaced segment\n lastIndex = endIndex + 1;\n }\n\n // Append any remaining text after the last replacement\n result += originalText.slice(lastIndex);\n\n return result;\n};\n\nexport const renderText = (txt: string) => {\n const urlIndices = findURLIndices(txt);\n\n return (\n <p\n dangerouslySetInnerHTML={{\n __html: replaceTextByIndices(\n txt,\n urlIndices.map((el) => {\n el[\"replacementText\"] =\n `<a key=${el.url} href=${el.url} style=\"text-decoration: underline;\" target=\"_blank\">\n ${el.url}\n </a>`;\n return el;\n }),\n ),\n }}\n ></p>\n );\n};\n","export function mediaSessionPlay() {\n if (\n typeof navigator == \"undefined\" ||\n typeof navigator.mediaSession == \"undefined\"\n )\n return;\n navigator.mediaSession.playbackState = \"playing\";\n}\n\nexport function mediaSessionPause() {\n if (\n typeof navigator == \"undefined\" ||\n typeof navigator.mediaSession == \"undefined\"\n )\n return;\n navigator.mediaSession.playbackState = \"paused\";\n}\n\nexport function mediaSessionUpdateDurationAndPosition(\n duration: number | undefined,\n currentTime: number | undefined,\n) {\n if (\n typeof navigator == \"undefined\" ||\n typeof navigator.mediaSession == \"undefined\"\n )\n return;\n if (duration != null && isNaN(duration)) {\n return;\n }\n if (currentTime != null && isNaN(currentTime)) {\n return;\n }\n navigator.mediaSession.setPositionState({\n playbackRate: 1,\n duration: duration,\n position: currentTime,\n });\n}\n\nexport function startMediaSessionCoordinator(args: {\n title: string;\n artwork?: string;\n\n action: (details: MediaSessionActionDetails) => void;\n}) {\n if (\n typeof navigator == \"undefined\" ||\n typeof navigator.mediaSession == \"undefined\"\n )\n return;\n navigator.mediaSession.metadata = new MediaMetadata({\n title: args.title,\n artwork: args.artwork\n ? [\n {\n type: \"image/png\",\n src: args.artwork,\n },\n ]\n : undefined,\n });\n\n navigator.mediaSession.setActionHandler(\"play\", (e) => {\n args.action(e);\n });\n navigator.mediaSession.setActionHandler(\"pause\", (e) => {\n args.action(e);\n });\n navigator.mediaSession.setActionHandler(\"stop\", (e) => {\n args.action(e);\n });\n navigator.mediaSession.setActionHandler(\"seekbackward\", (e) => {\n args.action(e);\n });\n navigator.mediaSession.setActionHandler(\"seekforward\", (e) => {\n args.action(e);\n });\n navigator.mediaSession.setActionHandler(\"seekto\", (e) => {\n args.action(e);\n });\n}\n\nexport function stopMediaSessionCoordinator() {\n navigator.mediaSession.metadata = null;\n}\n",".bitsnap-react #audio-player-container {\n --seek-before-width: 0%;\n --buffered-width: 0%;\n}\n\n.bitsnap-react input[type=\"range\"] {\n position: relative;\n -webkit-appearance: none;\n width: 100%;\n margin: 0;\n padding: 0;\n height: 19px;\n float: left;\n outline: none;\n background: transparent;\n}\n.bitsnap-react input[type=\"range\"]::-webkit-slider-runnable-track {\n width: 100%;\n height: 3px;\n cursor: pointer;\n /*background: linear-gradient(to right, rgba(0, 125, 181, 0.6) var(--buffered-width), rgba(0, 125, 181, 0.2) var(--buffered-width));*/\n background: #d9d9d9;\n}\n.bitsnap-react input[type=\"range\"]::before {\n position: absolute;\n content: \"\";\n top: 8px;\n left: 0;\n width: var(--seek-before-width);\n height: 3px;\n background-color: #8c8c8c;\n cursor: pointer;\n}\n.bitsnap-react input[type=\"range\"]::-webkit-slider-thumb {\n position: relative;\n -webkit-appearance: none;\n box-sizing: content-box;\n border: 1px solid #d9d9d9;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background-color: #8c8c8c;\n cursor: pointer;\n margin: -7px 0 0 0;\n}\n.bitsnap-react input[type=\"range\"]:active::-webkit-slider-thumb {\n transform: scale(1.2);\n background: #e2e8f0;\n}\n.bitsnap-react input[type=\"range\"]::-moz-range-track {\n width: 100%;\n height: 3px;\n cursor: pointer;\n background: linear-gradient(\n to right,\n rgba(0, 125, 181, 0.6) var(--buffered-width),\n rgba(0, 125, 181, 0.2) var(--buffered-width)\n );\n}\n.bitsnap-react input[type=\"range\"]::-moz-range-progress {\n background-color: #007db5;\n}\n.bitsnap-react input[type=\"range\"]::-moz-focus-outer {\n border: 0;\n}\n.bitsnap-react input[type=\"range\"]::-moz-range-thumb {\n box-sizing: content-box;\n border: 1px solid #007db5;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background-color: #fff;\n cursor: pointer;\n}\n.bitsnap-react input[type=\"range\"]:active::-moz-range-thumb {\n transform: scale(1.2);\n background: #007db5;\n}\n.bitsnap-react input[type=\"range\"]::-ms-track {\n width: 100%;\n height: 3px;\n cursor: pointer;\n background: transparent;\n border: solid transparent;\n color: transparent;\n}\n.bitsnap-react input[type=\"range\"]::-ms-fill-lower {\n background-color: #007db5;\n}\n.bitsnap-react input[type=\"range\"]::-ms-fill-upper {\n background: linear-gradient(\n to right,\n rgba(0, 125, 181, 0.6) var(--buffered-width),\n rgba(0, 125, 181, 0.2) var(--buffered-width)\n );\n}\n.bitsnap-react input[type=\"range\"]::-ms-thumb {\n box-sizing: content-box;\n border: 1px solid #007db5;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background-color: #fff;\n cursor: pointer;\n}\n.bitsnap-react input[type=\"range\"]:active::-ms-thumb {\n transform: scale(1.2);\n background: #007db5;\n}\n\n.bitsnap-react .SliderRoot {\n position: relative;\n display: flex;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n touch-action: none;\n width: 200px;\n height: 20px;\n}\n\n.bitsnap-react .SliderTrack {\n background-color: var(--black-a10);\n position: relative;\n flex-grow: 1;\n border-radius: 9999px;\n height: 3px;\n}\n\n.bitsnap-react .SliderRange {\n position: absolute;\n background-color: white;\n border-radius: 9999px;\n height: 100%;\n}\n\n.bitsnap-react .SliderThumb {\n display: block;\n width: 20px;\n height: 20px;\n background-color: white;\n box-shadow: 0 2px 10px var(--black-a7);\n border-radius: 10px;\n}\n.bitsnap-react .SliderThumb:hover {\n background-color: var(--violet-3);\n}\n.bitsnap-react .SliderThumb:focus {\n outline: none;\n box-shadow: 0 0 0 5px var(--black-a8);\n}\n","import Hls from \"hls.js\";\nimport { Pause, Play } from \"lucide-react\";\nimport {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n type CSSProperties,\n} from \"react\";\nimport { Button } from \"../../ui/button\";\nimport LoadingIndicator from \"../LoadingIndicator\";\nimport {\n mediaSessionPause,\n mediaSessionPlay,\n mediaSessionUpdateDurationAndPosition,\n startMediaSessionCoordinator,\n stopMediaSessionCoordinator,\n} from \"./media.session.coordinator\";\n\nimport \"./audio-player.css\";\n\ntype ChapterWithPublicUrl = {\n id: string;\n multimediaId?: string;\n name: string;\n description?: string;\n publicUrl: string;\n downloadableUrl?: string;\n duration?: number;\n};\n\nexport type AudioPlayerMethods = {\n selectChapter: (chapter: ChapterWithPublicUrl) => void;\n};\n\ntype AudioPlayerProps = {\n chapters: ChapterWithPublicUrl[];\n styles: CSSProperties;\n updateCurrentTime?: (currentTime: number) => void;\n\n title?: string;\n imageURL?: string;\n\n setCurrentTimeHandler?: (seekTo: (second: number) => void) => void;\n uniqueProductID: string;\n\n onChapterChange?: (chapter: ChapterWithPublicUrl) => void;\n};\n\nconst AudioPlayer = forwardRef<AudioPlayerMethods, AudioPlayerProps>(\n (\n {\n chapters,\n styles,\n updateCurrentTime,\n setCurrentTimeHandler,\n title,\n imageURL,\n uniqueProductID,\n onChapterChange,\n },\n ref,\n ) => {\n enum PlayState {\n Playing,\n Paused,\n }\n\n const [playState, setPlayState] = useState<PlayState>(PlayState.Paused);\n\n useEffect(() => {\n switch (playState) {\n case PlayState.Playing:\n mediaSessionPlay();\n break;\n case PlayState.Paused:\n mediaSessionPause();\n break;\n }\n }, [playState]);\n\n useImperativeHandle(ref, () => {\n return {\n selectChapter: (chapter: ChapterWithPublicUrl) => {\n playChapter(chapter);\n },\n };\n });\n\n const [currentTime, setCurrentTime] = useState<number | undefined>(\n undefined,\n );\n const [duration, setDuration] = useState<number | undefined>(undefined);\n\n const videoRef = useRef<HTMLVideoElement | null>(null);\n const hlsRef = useRef<Hls | undefined>(undefined);\n const timerRef = useRef<number | undefined>(undefined);\n\n const audioPlayerContainerRef = useRef<HTMLDivElement>(null!);\n\n const currentChapterRef = useRef<ChapterWithPublicUrl | null>(null);\n\n const [playWhenReady, setPlayWhenReady] = useState(true);\n const [isStarted, setIsStarted] = useState(false);\n const [isLoading, setIsLoading] = useState(!isSafari());\n\n function saveLastPlayedTime(timeInSeconds: number) {\n if (timeInSeconds < 10) {\n return;\n }\n localStorage.setItem(\n `__player__${uniqueProductID}_${currentChapterRef.current?.id}`,\n `${timeInSeconds}`,\n );\n }\n\n function getLastPlayedTime(): number | undefined {\n const time = localStorage.getItem(\n `__player__${uniqueProductID}_${currentChapterRef.current?.id}`,\n );\n\n if (time == null) {\n return undefined;\n }\n try {\n const result = parseInt(time);\n\n if (isNaN(result) || result < 0) {\n return undefined;\n }\n\n return result;\n } catch (e) {\n return undefined;\n }\n }\n\n function getLastSelectedChapterID(): string | undefined {\n const lastSelectedChapterID = localStorage.getItem(\n `__player__${uniqueProductID}_last_chapter`,\n );\n if (lastSelectedChapterID == null) {\n return undefined;\n }\n return lastSelectedChapterID;\n }\n\n function setLastSelectedChapterID(chapterID: string) {\n localStorage.setItem(\n `__player__${uniqueProductID}_last_chapter`,\n chapterID,\n );\n }\n\n function deleteMemoryChapter(chapterID: string) {\n localStorage.removeItem(`__player__${uniqueProductID}_${chapterID}`);\n }\n\n function setupObservers() {\n if (videoRef.current == null) {\n return;\n }\n videoRef.current.onloadeddata = () => {\n if (videoRef.current == null) {\n return;\n }\n if (videoRef.current.readyState < 2) {\n setIsLoading(true);\n }\n if (videoRef.current.readyState >= 2) {\n setIsLoading(false);\n }\n\n if (!isStarted) {\n const lastPlayedTime = getLastPlayedTime();\n if (lastPlayedTime != undefined) {\n seekTo(lastPlayedTime);\n }\n setIsStarted(true);\n }\n if (playWhenReady) {\n setPlayWhenReady(false);\n try {\n play();\n } catch (e) {\n console.log(\"play error\", e);\n }\n }\n };\n videoRef.current.onplay = () => {};\n\n videoRef.current.onseeked = () => {};\n videoRef.current.onseeking = () => {};\n\n videoRef.current.onpause = () => {};\n\n videoRef.current.onended = () => {\n playNextChapter();\n };\n\n startMediaSessionCoordinator({\n title: title ?? \"\",\n artwork: imageURL,\n action: (details) => {\n switch (details.action) {\n case \"play\":\n play();\n break;\n case \"pause\":\n pause();\n break;\n case \"seekbackward\":\n seekBy(-15);\n break;\n case \"seekforward\":\n seekBy(15);\n break;\n case \"seekto\":\n if (details.seekTime) {\n seekTo(details.seekTime);\n }\n break;\n case \"stop\":\n pause();\n break;\n default:\n break;\n }\n },\n });\n\n startTimer();\n }\n\n function playNextChapter() {\n if (chapters == null || chapters.length == 0) {\n return;\n }\n const currentChapterIndex = chapters.findIndex(\n (chapter) => chapter.id == currentChapterRef.current?.id,\n );\n if (currentChapterIndex == -1) {\n return;\n }\n deleteMemoryChapter(chapters[currentChapterIndex].id);\n const nextChapterIndex = currentChapterIndex + 1;\n if (nextChapterIndex >= chapters.length) {\n return;\n }\n playChapter(chapters[currentChapterIndex + 1]);\n }\n\n function startTimer() {\n updatePlayerDetails();\n if (timerRef.current != null) return;\n\n timerRef.current = setTimeout(() => {\n updatePlayerDetails();\n timerRef.current = undefined;\n startTimer();\n }, 500) as unknown as number;\n }\n\n function stopTimer() {\n if (timerRef.current == null) return;\n clearTimeout(timerRef.current as unknown as number);\n }\n\n function updatePlayerDetails() {\n if (videoRef.current == null) {\n return;\n }\n setPlayState(\n videoRef.current.paused ? PlayState.Paused : PlayState.Playing,\n );\n setDuration(videoRef.current.duration);\n setCurrentTime(videoRef.current.currentTime);\n saveLastPlayedTime(videoRef.current.currentTime);\n mediaSessionUpdateDurationAndPosition(\n videoRef.current.duration,\n videoRef.current.currentTime,\n );\n if (\n videoRef.current.networkState === videoRef.current.NETWORK_LOADING &&\n videoRef.current.readyState <= videoRef.current.HAVE_FUTURE_DATA\n ) {\n setIsLoading(true);\n } else {\n setIsLoading(false);\n }\n if (updateCurrentTime) {\n updateCurrentTime(videoRef.current.currentTime);\n }\n }\n\n function play() {\n videoRef.current?.play().then().catch();\n updatePlayerDetails();\n }\n\n function pause() {\n videoRef.current?.pause();\n updatePlayerDetails();\n }\n\n function togglePlayState() {\n if (playState === PlayState.Playing) {\n pause();\n return;\n }\n play();\n }\n\n function seekBy(seconds: number) {\n if (videoRef.current == null) {\n return;\n }\n const newTime = videoRef.current.currentTime + seconds;\n if (newTime < 0) {\n videoRef.current.currentTime = 0;\n return;\n }\n if (newTime > videoRef.current.duration) {\n videoRef.current.currentTime = videoRef.current.duration;\n return;\n }\n videoRef.current.currentTime += seconds;\n }\n\n function seekTo(toSecond: number) {\n if (videoRef.current == null) {\n return;\n }\n setCurrentTime(toSecond);\n if (toSecond < 0) {\n videoRef.current.currentTime = 0;\n return;\n }\n if (toSecond > videoRef.current.duration) {\n videoRef.current.currentTime = videoRef.current.duration;\n return;\n }\n videoRef.current.currentTime = toSecond;\n }\n\n function destroyPlayer() {\n if (videoRef.current == null) {\n return;\n }\n videoRef.current.onplay = null;\n videoRef.current.onseeked = null;\n videoRef.current.onseeking = null;\n videoRef.current.onpause = null;\n videoRef.current.onended = null;\n videoRef.current.src = \"\";\n hlsRef.current?.destroy();\n }\n\n function loadChapters(chapters: ChapterWithPublicUrl[]) {\n if (chapters.length == 0) {\n return;\n }\n\n const chapterID = getLastSelectedChapterID();\n if (chapterID == null) {\n playChapter(chapters[0]);\n return;\n }\n\n const chapter = chapters.find((chapter) => chapter.id == chapterID);\n if (chapter == null) {\n playChapter(chapters[0]);\n return;\n }\n\n playChapter(chapter);\n }\n\n function playChapter(chapter: ChapterWithPublicUrl) {\n setIsStarted(false);\n setPlayWhenReady(true);\n currentChapterRef.current = chapter;\n playURL(chapter.publicUrl);\n onChapterChange?.(chapter);\n setLastSelectedChapterID(chapter.id);\n }\n\n function playURL(src: string) {\n if (videoRef.current == null) {\n return;\n }\n if (videoRef.current.canPlayType(\"application/vnd.apple.mpegurl\")) {\n videoRef.current.src = src;\n } else if (Hls.isSupported()) {\n if (hlsRef.current == null) {\n hlsRef.current = new Hls();\n hlsRef.current?.attachMedia(videoRef.current);\n }\n hlsRef.current?.loadSource(src);\n }\n }\n\n useEffect(() => {\n if (videoRef.current == null) {\n return;\n }\n setupObservers();\n loadChapters(chapters);\n }, [videoRef.current]);\n\n useEffect(() => {\n loadChapters(chapters);\n }, [chapters]);\n\n useEffect(() => {\n if (setCurrentTimeHandler != null) {\n setCurrentTimeHandler(seekTo);\n }\n\n return () => {\n setCurrentTime(undefined);\n videoRef.current?.pause();\n destroyPlayer();\n stopMediaSessionCoordinator();\n };\n }, []);\n\n const calculateTime = (secs: number) => {\n const hours = Math.floor(secs / 3600);\n const minutes = Math.floor(secs / 60) % 60;\n const seconds = Math.floor(secs % 60);\n const returnedHours =\n hours > 0 ? (hours < 10 ? `0${hours}:` : `${hours}:`) : \"\";\n const returnedSeconds = seconds < 10 ? `0${seconds}` : `${seconds}`;\n if (isNaN(seconds) || isNaN(minutes) || isNaN(hours)) {\n return \"\";\n }\n return `${returnedHours}${minutes}:${returnedSeconds}`;\n };\n\n const showRangeProgress = (rangeInput: HTMLInputElement) => {\n const barProgress =\n (parseFloat(rangeInput.value) / parseFloat(rangeInput.max)) * 100;\n audioPlayerContainerRef.current.style.setProperty(\n \"--seek-before-width\",\n barProgress + \"%\",\n );\n\n const selectedTime = (duration! * barProgress) / 100;\n seekTo(selectedTime);\n };\n\n return (\n <div\n id=\"audio-player-container\"\n className=\"flex flex-col\"\n style={styles}\n ref={audioPlayerContainerRef}\n >\n <video\n ref={videoRef}\n className=\"hidden\"\n poster={imageURL}\n title={title}\n ></video>\n\n <input\n type=\"range\"\n min=\"0\"\n max={duration != undefined ? Math.floor(duration).toString() : 100}\n value={currentTime ?? 0}\n onChange={(e) => showRangeProgress(e.target as HTMLInputElement)}\n className=\"w-full\"\n />\n\n <section className=\"flex w-full items-center justify-between text-sm font-medium\">\n <span id=\"current-time\">{calculateTime(currentTime!)}</span>\n <span id=\"duration\">{calculateTime(duration!)}</span>\n </section>\n <div className=\"mt-6 flex items-center justify-center gap-x-12\">\n <Button\n variant=\"outline\"\n onClick={() => seekBy(-10)}\n aria-label=\"Rewind 10 Seconds\"\n >\n -10\n </Button>\n <Button\n variant=\"outline\"\n onClick={togglePlayState}\n aria-label=\"Play Or Pause\"\n >\n {playState === PlayState.Paused && <Play className=\"h-5 w-5\" />}\n {playState === PlayState.Playing && <Pause className=\"h-5 w-5\" />}\n </Button>\n <Button\n variant=\"outline\"\n onClick={() => seekBy(10)}\n aria-label=\"Fast Forward 10 Seconds\"\n >\n +10\n </Button>\n </div>\n {isLoading && (\n <div className=\"mt-2 flex w-full justify-center\">\n <LoadingIndicator />\n </div>\n )}\n </div>\n );\n },\n);\n\nfunction isSafari() {\n return navigator.userAgent.toLowerCase().indexOf(\"safari/\") > -1;\n}\n\nexport default AudioPlayer;\n","export function ProgressBar() {\n const [progress, setProgress] = React.useState(13);\n\n React.useEffect(() => {\n const timer = setTimeout(() => setProgress(66), 500);\n return () => clearTimeout(timer);\n }, []);\n\n return (\n <div className=\"w-[60%] h-2 bg-gray-200 rounded-full overflow-hidden\">\n <div \n className=\"h-full bg-blue-600 transition-all duration-300\"\n style={{ width: `${progress}%` }}\n />\n </div>\n );\n}\n\nimport * as React from \"react\";\n","import { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport { ChevronLeft, Download } from \"lucide-react\";\nimport { useEffect, useRef, useState, type CSSProperties } from \"react\";\nimport {\n UserProductType,\n type UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetails,\n type UserProduct,\n} from \"../../gen/proto/public/v1/public_api_pb\";\nimport { cn } from \"../../lib/utils\";\nimport { rpcProvider, useMutation } from \"../../rpc-provider\";\nimport { Button } from \"../../ui/button\";\nimport AudioPlayer, {\n type AudioPlayerMethods,\n} from \"../audio-player/AudioPlayer\";\nimport LoadingIndicator from \"../LoadingIndicator\";\n\nimport { ProgressBar } from \"./ProgressBar\";\n\ninterface PanelProductDetailsProps {\n accessToken: string;\n product: UserProduct;\n styles: CSSProperties;\n reveal: (product?: UserProduct) => void;\n}\n\nfunction warn(message: string, ...args: unknown[]) {\n console.warn(message, ...args);\n}\n\nfunction error(message: string) {\n console.error(message);\n}\n\nconst PanelProductDetails = ({\n accessToken,\n product,\n styles,\n reveal,\n}: PanelProductDetailsProps) => {\n const productType: UserProductType = product.productType;\n\n const audioPlayerRef = useRef<AudioPlayerMethods>(null!);\n const [filesRefAnimation] = useAutoAnimate();\n const [filesResponse, setFilesResponse] = useState<string[] | null>(null);\n const { mutateAsync: fileDetailsAsync, isPending: isFileLoading } =\n useMutation(rpcProvider.publicApi.userPanelGetFileDetails);\n\n const audioPlayerSeekToHandler = useRef<\n ((second: number) => void) | undefined\n >(undefined);\n const [audioResponse, setAudioResponse] = useState<Record<\n string,\n unknown\n > | null>(null);\n const [audioDownloadURLs, setAudioDownloadURLs] = useState<\n | UserPanelGetAudiobookDetailsDownloadURLsResponse_AudiobookDownloadDetails[]\n | null\n >(null);\n const [\n isAvailableToDownloadInMobileApp,\n setIsAvailableToDownloadInMobileApp,\n ] = useState(false);\n const [isCourseLoading, setIsCourseLoading] = useState(false);\n const [courseError, setCourseError] = useState<string | null>(null);\n const { mutateAsync: audioDetailsAsync, isPending: isAudioLoading } =\n useMutation(rpcProvider.publicApi.userPanelGetAudiobookDetails);\n const {\n mutateAsync: audioDetailsDownloadURLsAsync,\n isPending: isAudioDownloadURLsLoading,\n } = useMutation(\n rpcProvider.publicApi.userPanelGetAudiobookDetailsDownloadURLs,\n );\n const { mutateAsync: courseDetailsAsync } = useMutation(\n rpcProvider.publicApi.userPanelGetCourseDetails,\n );\n\n type ChapterWithPublicUrl = {\n id: string;\n multimediaId?: string;\n name: string;\n description?: string;\n publicUrl: string;\n downloadableUrl?: string;\n duration?: number;\n };\n\n const [selectedChapter, setSelectedChapter] =\n useState<ChapterWithPublicUrl | null>(null);\n const [chapters, setChapters] = useState<ChapterWithPublicUrl[] | null>(null);\n\n async function handleFileDownload() {\n try {\n const filesResult = await fileDetailsAsync({\n accessId: product.accessId,\n accessToken: accessToken as string,\n });\n\n if (filesResult.result.case === \"success\") {\n setFilesResponse(filesResult.result.value.files);\n return;\n } else {\n warn(\"Pobranie plików nie powiodło się. Zalecamy kontakt.\");\n warn(\"Kod błędu: \", filesResult.result.value);\n }\n } catch (err) {\n warn(\"Nieoczekiwany błąd. Spróbuj ponownie za chwilę.\");\n error(\"Błąd podczas pobierania danych:\" + err);\n }\n }\n\n async function handleAudioDownload() {\n try {\n const audioResult = await audioDetailsAsync({\n accessId: product.accessId,\n accessToken: accessToken as string,\n });\n\n if (audioResult.result.case === \"audiobook\") {\n setAudioResponse(\n audioResult.result.value as unknown as Record<string, unknown>,\n );\n return;\n } else {\n warn(\"Pobranie plików nie powiodło się. Zalecamy kontakt.\");\n warn(\"Kod błędu: \", audioResult.result.value);\n }\n } catch (err) {\n warn(\"Nieoczekiwany błąd. Spróbuj ponownie za chwilę.\");\n error(\"Błąd podczas pobierania danych:\" + err);\n }\n }\n\n async function handleAudioURLsDownload() {\n try {\n const audioURLsResult = await audioDetailsDownloadURLsAsync({\n accessId: product.accessId,\n accessToken: accessToken as string,\n isBrowser: true,\n });\n\n if (audioURLsResult.result.case === \"success\") {\n setAudioDownloadURLs(\n audioURLsResult.result.value.audiobookDownloadDetails,\n );\n setIsAvailableToDownloadInMobileApp(\n audioURLsResult.result.value.isAvailableToDownloadInMobileApp ===\n true,\n );\n return;\n } else {\n warn(\"Pobranie plików nie powiodło się. Zalecamy kontakt.\");\n warn(\"Kod błędu: \", audioURLsResult.result.value);\n }\n } catch (err) {\n warn(\"Nieoczekiwany błąd. Spróbuj ponownie za chwilę.\");\n error(\"Błąd podczas pobierania danych:\" + err);\n }\n }\n\n useEffect(() => {\n if (productType === UserProductType.AUDIO) {\n handleAudioDownload().then().catch();\n handleAudioURLsDownload().then().catch();\n }\n }, []);\n\n useEffect(() => {\n if (productType !== UserProductType.COURSE) return;\n\n async function handleCourseRedirect() {\n setIsCourseLoading(true);\n setCourseError(null);\n try {\n const courseResult = await courseDetailsAsync({\n accessId: product.accessId,\n accessToken: accessToken as string,\n });\n\n if (courseResult.result.case === \"redirectUrl\") {\n window.location.href = courseResult.result.value;\n } else {\n setCourseError(\n \"Wystąpił błąd, proszę skontaktować się z pomocą techniczną.\",\n );\n }\n } catch {\n setCourseError(\n \"Wystąpił błąd, proszę skontaktować się z pomocą techniczną.\",\n );\n } finally {\n setIsCourseLoading(false);\n }\n }\n\n handleCourseRedirect();\n }, []);\n\n useEffect(() => {\n if (audioResponse != null && audioDownloadURLs != null) {\n const audioChapters = (\n audioResponse as { chapters?: ChapterWithPublicUrl[] }\n ).chapters;\n if (!audioChapters) return;\n\n const mappedChapters = audioChapters\n .map((chapter) => {\n const details = audioDownloadURLs?.find(\n (el) => el.chapterId === chapter.id,\n );\n if (details == null) {\n return undefined;\n }\n return {\n ...chapter,\n publicUrl: details.publicUrl,\n downloadableUrl: details.downloadableUrl,\n duration: details.duration,\n } as ChapterWithPublicUrl;\n })\n .filter((el) => el != null);\n\n if (mappedChapters != undefined && mappedChapters.length > 0) {\n setChapters(mappedChapters);\n }\n }\n }, [audioResponse, audioDownloadURLs]);\n\n return (\n <div>\n <div className=\"mb-3 space-y-4 rounded bg-white p-4 dark:bg-black\">\n <Button onClick={() => reveal()} variant=\"ghost\" className=\"w-fit\">\n <ChevronLeft className=\"h-6 w-6\" />\n <span className=\"font-inter text-sm font-medium\">Wróć</span>\n </Button>\n </div>\n\n <main className=\"grid grid-cols-1 justify-center gap-6 sm:justify-start lg:grid-cols-2\">\n <div className=\"flex w-full max-w-xl flex-col gap-6\">\n {productType === UserProductType.FILE && (\n <div\n ref={filesRefAnimation}\n className=\"flex flex-col space-y-4 rounded bg-white p-6 drop-shadow-xl dark:border dark:border-neutral-700 dark:bg-neutral-800 dark:drop-shadow-none\"\n >\n <div className=\"flex items-center justify-between gap-x-4\">\n <h4 className=\"text-xl font-semibold\">Twoje pliki</h4>\n {(filesResponse == null || filesResponse.length == 0) && (\n <Button\n onClick={handleFileDownload}\n aria-label=\"Download Product\"\n className=\"text-sm font-medium transition-opacity duration-300 ease-in-out hover:opacity-80 active:opacity-80\"\n style={styles}\n >\n {isFileLoading ? <LoadingIndicator /> : \"Wyświetl\"}\n </Button>\n )}\n </div>\n\n {isFileLoading && (\n <div className=\"flex flex-col items-start gap-2\">\n <ProgressBar />\n <p className=\"font-bold transition hover:text-blue-600\">\n Trwa przygotowanie plików...\n </p>\n </div>\n )}\n\n {filesResponse != null && filesResponse.length > 0 && (\n <div className=\"flex flex-col items-start justify-start gap-2\">\n {filesResponse.map((el, index) => (\n <a\n key={index}\n target=\"_blank\"\n className=\"flex w-fit items-center gap-2 rounded-md bg-neutral-800 px-3 py-2 text-neutral-200 dark:bg-neutral-200 dark:text-neutral-800\"\n href={el}\n download\n >\n {`Plik numer ${index + 1}`}\n <Download width={14} height={14} />\n </a>\n ))}\n </div>\n )}\n </div>\n )}\n\n {productType === UserProductType.COURSE && (\n <div className=\"flex flex-col items-center justify-center rounded-xl bg-white p-6 drop-shadow-xl dark:bg-neutral-900 dark:drop-shadow-none\">\n {isCourseLoading && (\n <div className=\"flex flex-col items-center gap-3\">\n <LoadingIndicator />\n <p className=\"text-lg font-semibold\">\n Trwa przekierowanie do kursu...\n </p>\n </div>\n )}\n {courseError && (\n <p className=\"text-center text-sm font-medium text-red-600 dark:text-red-400\">\n {courseError}\n </p>\n )}\n </div>\n )}\n\n {productType === UserProductType.AUDIO && (\n <>\n <div className=\"flex flex-col space-y-6 rounded-xl bg-white p-3 drop-shadow-xl dark:bg-neutral-900 dark:drop-shadow-none\">\n <h4 className=\"text-xl font-semibold\">\n {selectedChapter?.name ?? \"Odtwarzacz\"}\n </h4>\n {selectedChapter?.description && (\n <p className=\"text-sm\">{selectedChapter?.description}</p>\n )}\n <>\n {isAudioLoading ? (\n <div className=\"flex gap-2\">\n <LoadingIndicator />\n <p className=\"text-xl font-semibold\">\n Trwa pobierania audiobooka...\n </p>\n </div>\n ) : (\n <>\n {chapters != null ? (\n <>\n <AudioPlayer\n ref={audioPlayerRef}\n chapters={chapters}\n title={\n (audioResponse as { name?: string })?.name ??\n product.productName ??\n undefined\n }\n imageURL={\n (audioResponse as { coverImage?: string })\n ?.coverImage ??\n product.productImageUrl ??\n undefined\n }\n styles={styles}\n setCurrentTimeHandler={(handler) => {\n audioPlayerSeekToHandler.current = handler;\n }}\n uniqueProductID={product.productId}\n onChapterChange={(chapter) => {\n setSelectedChapter(chapter);\n }}\n />\n </>\n ) : (\n <p className=\"mt-2\">\n Wybierz rozdział, który cię interesuje.\n </p>\n )}\n </>\n )}\n </>\n <div className=\"rounded-xl bg-neutral-100 p-3 dark:bg-neutral-800\">\n <p className=\"mt-3 mb-3 text-xs\">\n {isAvailableToDownloadInMobileApp\n ? \"Możesz słuchać tego audiobooka w aplikacji również bez dostępu do internetu.\"\n : \"Możesz słuchać tego audiobooka w aplikacji.\"}\n </p>\n <div className=\"flex gap-3\">\n <a href=\"https://apps.apple.com/us/app/bitsnap/id6741902807\">\n <img\n width=\"100\"\n src=\"https://bitsnap.pl/appstore.svg\"\n alt=\"Pobierz aplikacje z AppStore\"\n />\n </a>\n\n <a href=\"https://docs.bitsnap.pl/guides/audiobook\">\n <img\n width=\"100\"\n src=\"https://bitsnap.pl/playstore.svg\"\n alt=\"Pobierz aplikację z GooglePlay\"\n />\n </a>\n </div>\n </div>\n </div>\n </>\n )}\n\n <div className=\"flex items-center justify-center rounded-xl bg-white p-3 drop-shadow-xl dark:bg-neutral-900 dark:drop-shadow-none\">\n {productType === UserProductType.AUDIO && (\n <div className=\"max-h-96 w-full overflow-y-auto\">\n {isAudioLoading ? (\n <div className=\"jusitfy-center flex flex-col items-center gap-2\">\n <LoadingIndicator />\n <p>Ładowanie rozdziałów...</p>\n </div>\n ) : (\n <div>\n <h2 className=\"mb-3 text-xl font-semibold\">Rozdziały</h2>\n {chapters == null ? (\n <p>Brak rozdziałów do wyświetlenia.</p>\n ) : (\n <ul className=\"flex w-full flex-col gap-2\">\n {chapters.map((chapter, index) => (\n <li\n key={index}\n className=\"flex items-center justify-between\"\n >\n <button\n className={cn(\n \"w-full rounded-lg p-2 text-left transition hover:bg-neutral-200 active:bg-neutral-200 dark:hover:bg-neutral-700 dark:active:bg-neutral-700\",\n selectedChapter?.id == chapter.id\n ? \"bg-neutral-200 dark:bg-neutral-700\"\n : \"bg-neutral-100 dark:bg-neutral-800 dark:text-neutral-300\",\n )}\n onClick={() => {\n audioPlayerRef.current.selectChapter(chapter);\n }}\n >\n <div className=\"flex items-center justify-between\">\n <p className=\"text-sm font-medium\">\n {chapter.name}\n </p>\n {chapter.duration && (\n <span className=\"text-xs text-neutral-500\">\n {Math.floor(chapter.duration / 60)}:\n {String(\n Math.floor(chapter.duration % 60),\n ).padStart(2, \"0\")}\n </span>\n )}\n </div>\n {chapter.description && (\n <p className=\"mt-3 text-xs\">\n {chapter.description}\n </p>\n )}\n </button>\n\n {audioResponse &&\n (audioResponse as { isDownloadable?: boolean })\n .isDownloadable &&\n chapter.downloadableUrl && (\n <a href={chapter.downloadableUrl}>\n <Download width={14} height={14} />\n </a>\n )}\n </li>\n ))}\n </ul>\n )}\n </div>\n )}\n </div>\n )}\n </div>\n </div>\n\n <div className=\"w-full max-w-3xl space-y-6 rounded-xl bg-white p-6 drop-shadow-xl dark:bg-neutral-900 dark:drop-shadow-none\">\n <h2 className=\"text-3xl font-semibold\">{product.productName}</h2>\n <p className=\"text-sm font-normal text-neutral-600 dark:text-neutral-300\">\n {product.productDescription}\n </p>\n\n <img\n src={product.productImageUrl}\n alt=\"Product Photo\"\n width={384}\n height={384}\n className=\"max-h-sm max-w-sm\"\n draggable={false}\n />\n </div>\n </main>\n </div>\n );\n};\n\nexport default PanelProductDetails;\n","import { useState, type CSSProperties } from \"react\";\nimport {\n UserProductSchema,\n UserProductType,\n type UserProduct,\n} from \"../../gen/proto/public/v1/public_api_pb\";\nimport { rpcProvider, useQuery } from \"../../rpc-provider\";\nimport { Button } from \"../../ui/button\";\nimport LoadingIndicator from \"../LoadingIndicator\";\n\nimport { renderText } from \"@/src/lib/render.text\";\nimport { fromJsonString, toJsonString } from \"@bufbuild/protobuf\";\nimport type { PanelScreen, PanelSearchParamsType } from \"../types\";\nimport PanelProductDetails from \"./PanelProductDetails\";\nimport { clearPanelSession } from \"../session-storage\";\n\ninterface PanelProductGridComponentProps {\n projectID: string;\n accessToken: string;\n loginURL: string;\n styles: CSSProperties;\n activeScreen: PanelScreen;\n params: PanelSearchParamsType;\n setParams: (params: PanelSearchParamsType) => void;\n}\n\nconst PanelProductGridComponent = ({\n accessToken,\n projectID,\n loginURL,\n styles,\n activeScreen,\n params,\n setParams,\n}: PanelProductGridComponentProps) => {\n const { data: products, isLoading: isProductsLoading } = useQuery(\n rpcProvider.publicApi.userPanelGetProducts,\n {\n accessToken: accessToken,\n },\n );\n\n if (isProductsLoading) {\n return (\n <div className=\"flex items-center gap-2 bg-white p-2 dark:bg-black\">\n <p className=\"text-dark font-inter font-medium dark:text-white\">\n Ładowanie...\n </p>\n <LoadingIndicator />\n </div>\n );\n }\n\n if (products && products.result.case === \"failure\") {\n console.warn(\"error:\", `Kod błędu: ${products.result.value}`);\n clearPanelSession(projectID);\n window.location.href = loginURL;\n return null;\n }\n\n const productsList =\n products && products.result.case === \"success\"\n ? products.result.value.products\n : [];\n\n return (\n <ProductsComponent\n accessToken={accessToken}\n products={productsList}\n styles={styles}\n loginURL={loginURL}\n activeScreen={activeScreen}\n params={params}\n setParams={setParams}\n />\n );\n};\n\nexport default PanelProductGridComponent;\n\ninterface ProductsComponentProps {\n accessToken: string;\n products: UserProduct[];\n styles: CSSProperties;\n loginURL: string;\n activeScreen: PanelScreen;\n params: PanelSearchParamsType;\n setParams: (params: PanelSearchParamsType) => void;\n}\n\nconst ProductsComponent = ({\n accessToken,\n products,\n styles,\n loginURL,\n activeScreen,\n params,\n setParams,\n}: ProductsComponentProps) => {\n if (products.length === 0) {\n window.location.href = loginURL;\n return null;\n }\n\n const [selectedProduct, setSelectedProduct] = useState<\n UserProduct | undefined\n >(\n params.product\n ? fromJsonString(UserProductSchema, params.product)\n : undefined,\n );\n\n const reveal = (product?: UserProduct) => {\n if (product == null) {\n setSelectedProduct(undefined);\n setParams({\n product: undefined,\n state: \"products\",\n });\n } else {\n setParams({\n product: toJsonString(UserProductSchema, product),\n state: \"products\",\n });\n }\n };\n\n function getProductTypeName(type: UserProductType) {\n switch (type) {\n case UserProductType.AUDIO:\n return \"Audio\";\n case UserProductType.FILE:\n return \"Plik\";\n case UserProductType.TICKET:\n return \"Bilet\";\n case UserProductType.COURSE:\n return \"Kurs\";\n default:\n return undefined;\n }\n }\n\n function handleSelectedProduct(product: UserProduct) {\n setSelectedProduct(product);\n reveal(product);\n }\n\n if (activeScreen === \"products\" && selectedProduct != undefined) {\n return (\n <PanelProductDetails\n accessToken={accessToken}\n product={selectedProduct}\n styles={styles}\n reveal={reveal}\n />\n );\n }\n\n return (\n <>\n <h3 className=\"text-2xl\">Hej 👋</h3>\n <p className=\"text-sm text-neutral-500\">\n Poniżej znajdziesz swoje produkty\n </p>\n <div className=\"mt-6 flex flex-wrap items-center justify-center gap-9 sm:justify-start\">\n {products?.map((product, index) => (\n <section\n onClick={() => handleSelectedProduct(product)}\n key={index}\n className=\"w-full max-w-xs cursor-pointer rounded drop-shadow-xl dark:border dark:border-slate-600 dark:drop-shadow-none\"\n >\n <section className=\"flex flex-col items-center space-y-2 rounded bg-slate-100 p-4 dark:bg-neutral-900\">\n {product.productType && (\n <div className=\"w-fit self-end rounded bg-red-900 px-4 py-1\">\n <span className=\"text-sm font-medium text-white dark:text-slate-100\">\n {getProductTypeName(product.productType)}\n </span>\n </div>\n )}\n <div className=\"jusitfy-center flex max-h-40 items-center\">\n <img\n src={product.productImageUrl}\n alt={`Product ${index} Photo`}\n draggable={false}\n className=\"aspect-auto max-h-40\"\n />\n </div>\n </section>\n <div className=\"space-y-4 rounded bg-white p-4 dark:bg-black\">\n <h2 className=\"text-xl font-semibold\">{product.productName}</h2>\n <p\n title={product.productDescription}\n className=\"line-clamp-3 text-sm font-normal text-neutral-600 dark:text-neutral-300\"\n >\n {renderText(product.productDescription)}\n </p>\n <Button\n onClick={(e) => {\n e.stopPropagation();\n handleSelectedProduct(product);\n }}\n className=\"w-full text-sm font-medium transition-opacity duration-300 ease-in-out hover:opacity-80 active:opacity-80\"\n style={styles}\n >\n Zobacz\n </Button>\n </div>\n </section>\n ))}\n </div>\n </>\n );\n};\n","import { getLocale } from \"../components/checkout/locale\";\nimport { pickLocaleTable, type LocaleTables } from \"../lib/texts\";\n\n/** Panel strings that are not part of the returns views. */\nexport type PanelTexts = {\n returnsNavLabel: string;\n};\n\nconst PANEL_TEXT_TABLES: LocaleTables<keyof PanelTexts> = {\n pl: { returnsNavLabel: \"Zwroty\" },\n en: { returnsNavLabel: \"Returns\" },\n};\n\n/** Panel strings for the library locale (`setLocale`), Polish by default. */\nexport function getPanelTexts(locale: string = getLocale()): PanelTexts {\n return pickLocaleTable(PANEL_TEXT_TABLES, locale);\n}\n","import { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport { LogOut, Undo2 } from \"lucide-react\";\nimport { useState, type CSSProperties, type ReactNode } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../../ui/button\";\nimport type { GetThemeOutput } from \"../types\";\n\nimport type { PanelScreen } from \"../types\";\nimport { getPanelTexts } from \"../texts\";\n\ninterface PanelProductHeaderComponentProps {\n activeScreen: PanelScreen;\n setActiveScreen: (screen: PanelScreen) => void;\n setParams: (params: { product?: string; state: PanelScreen }) => void;\n styles: CSSProperties;\n theme?: GetThemeOutput;\n logout: () => void;\n}\n\nfunction PanelProductHeaderComponent({\n activeScreen,\n setActiveScreen,\n setParams,\n styles: _styles,\n theme,\n logout,\n}: PanelProductHeaderComponentProps) {\n return (\n <header className=\"md:border-r-neutral-150 md:bg-beige-50 fixed right-0 bottom-0 left-0 z-10 flex h-12 w-full items-center bg-neutral-800 md:static md:z-0 md:min-h-screen md:w-auto md:border-r dark:md:border-r-neutral-900\">\n <MobileMenu\n activeScreen={activeScreen}\n setActiveScreen={setActiveScreen}\n setParams={setParams}\n />\n\n <SidebarMenu\n activeScreen={activeScreen}\n setActiveScreen={setActiveScreen}\n setParams={setParams}\n theme={theme}\n logout={logout}\n />\n </header>\n );\n}\n\nexport default PanelProductHeaderComponent;\n\ninterface MobileMenuProps {\n activeScreen: PanelScreen;\n setActiveScreen: (screen: PanelScreen) => void;\n setParams: (params: { product?: string; state: PanelScreen }) => void;\n}\n\nfunction MobileMenu({\n activeScreen,\n setActiveScreen,\n setParams,\n}: MobileMenuProps) {\n const { returnsNavLabel } = getPanelTexts();\n\n return (\n <nav className=\"flex w-full items-center justify-evenly gap-4 md:hidden\">\n <MobileButton\n panelScreen=\"products\"\n label=\"Produkty\"\n imageURL=\"/icons/bitsnap-24x24.svg\"\n activeScreen={activeScreen}\n setActiveScreen={setActiveScreen}\n setParams={setParams}\n />\n\n <MobileButton\n panelScreen=\"orders\"\n label=\"Faktury\"\n imageURL=\"/icons/category-24x24.svg\"\n activeScreen={activeScreen}\n setActiveScreen={setActiveScreen}\n setParams={setParams}\n />\n\n <MobileButton\n panelScreen=\"returns\"\n label={returnsNavLabel}\n icon={<Undo2 className=\"h-5 w-5 text-white\" aria-hidden />}\n activeScreen={activeScreen}\n setActiveScreen={setActiveScreen}\n setParams={setParams}\n />\n\n <MobileButton\n panelScreen=\"profile\"\n label=\"Profil\"\n imageURL=\"/icons/profile-24x24.svg\"\n activeScreen={activeScreen}\n setActiveScreen={setActiveScreen}\n setParams={setParams}\n />\n </nav>\n );\n}\n\ninterface MobileButtonProps {\n panelScreen: PanelScreen;\n label: string;\n imageURL?: string;\n icon?: ReactNode;\n activeScreen: PanelScreen;\n setActiveScreen: (screen: PanelScreen) => void;\n setParams: (params: { product?: string; state: PanelScreen }) => void;\n}\n\nfunction MobileButton({\n panelScreen,\n label,\n imageURL,\n icon,\n activeScreen,\n setActiveScreen,\n setParams,\n}: MobileButtonProps) {\n return (\n <Button\n onClick={() => {\n setActiveScreen(panelScreen);\n setParams({\n product: undefined,\n state: panelScreen,\n });\n }}\n aria-label={label}\n variant={null}\n className={cn(\n \"flex flex-col gap-0\",\n activeScreen === panelScreen ? \"opacity-100\" : \"opacity-50\",\n )}\n >\n {icon ?? <img src={imageURL} alt={label} className=\"scale-75\" />}\n <span className=\"text-xs font-normal text-white\">{label}</span>\n </Button>\n );\n}\n\ninterface SidebarButtonProps {\n panelScreen: PanelScreen;\n label: string;\n imageURL?: string;\n darkImageURL?: string;\n icon?: ReactNode;\n activeScreen: PanelScreen;\n setActiveScreen: (screen: PanelScreen) => void;\n setParams: (params: { product?: string; state: PanelScreen }) => void;\n isExpanded: boolean;\n}\n\nfunction SidebarButton({\n panelScreen,\n label,\n imageURL,\n darkImageURL,\n icon,\n activeScreen,\n setActiveScreen,\n setParams,\n isExpanded,\n}: SidebarButtonProps) {\n return (\n <Button\n onClick={() => {\n setActiveScreen(panelScreen);\n setParams({\n product: undefined,\n state: panelScreen,\n });\n }}\n variant={activeScreen === panelScreen ? \"secondary\" : \"ghost\"}\n className=\"justify-start\"\n >\n {icon != null ? (\n <span\n className={cn(\n \"inline-flex h-5 w-5 items-center justify-center\",\n isExpanded ? \"mr-4\" : \"mr-2\",\n )}\n >\n {icon}\n </span>\n ) : (\n <>\n <img\n src={imageURL}\n alt={label}\n className={cn(\n \"aspect-auto h-5 w-5 dark:hidden\",\n isExpanded ? \"mr-4\" : \"mr-2\",\n )}\n />\n <img\n src={darkImageURL}\n alt={label}\n className={cn(\n \"hidden aspect-auto h-5 w-5 dark:inline\",\n isExpanded ? \"mr-4\" : \"mr-2\",\n )}\n />\n </>\n )}\n {isExpanded && (\n <span className=\"md:text-medium hidden md:inline\">{label}</span>\n )}\n </Button>\n );\n}\n\ninterface SidebarMenuProps {\n activeScreen: PanelScreen;\n setActiveScreen: (screen: PanelScreen) => void;\n setParams: (params: { product?: string; state: PanelScreen }) => void;\n theme?: GetThemeOutput;\n logout: () => void;\n}\n\nfunction SidebarMenu({\n activeScreen,\n setActiveScreen,\n setParams,\n theme,\n logout,\n}: SidebarMenuProps) {\n const [sidebarExpandRef] = useAutoAnimate();\n const [isExpanded, setIsExpanded] = useState(true);\n const { returnsNavLabel } = getPanelTexts();\n\n return (\n <div\n ref={sidebarExpandRef}\n className={cn(\n \"hidden px-4 pt-4 pb-12 md:flex md:h-full md:flex-col dark:bg-neutral-900\",\n isExpanded ? \"md:w-52\" : \"md:w-16\",\n )}\n >\n <div className=\"flex items-center justify-between\">\n <CompanyLogo theme={theme} isExpanded={isExpanded} />\n </div>\n\n <SidebarSeparator className=\"my-6\" />\n\n <div className=\"flex flex-1 flex-col gap-2\">\n <SidebarButton\n panelScreen=\"products\"\n label=\"Produkty\"\n imageURL=\"/icons/bitsnap-dark-24x24.svg\"\n darkImageURL=\"/icons/bitsnap-24x24.svg\"\n activeScreen={activeScreen}\n setActiveScreen={setActiveScreen}\n setParams={setParams}\n isExpanded={isExpanded}\n />\n\n <SidebarButton\n panelScreen=\"orders\"\n label=\"Zamówienia\"\n imageURL=\"/icons/category-dark-24x24.svg\"\n darkImageURL=\"/icons/category-24x24.svg\"\n activeScreen={activeScreen}\n setActiveScreen={setActiveScreen}\n setParams={setParams}\n isExpanded={isExpanded}\n />\n\n <SidebarButton\n panelScreen=\"returns\"\n label={returnsNavLabel}\n icon={<Undo2 className=\"h-5 w-5\" aria-hidden />}\n activeScreen={activeScreen}\n setActiveScreen={setActiveScreen}\n setParams={setParams}\n isExpanded={isExpanded}\n />\n\n <SidebarButton\n panelScreen=\"profile\"\n label=\"Profil\"\n imageURL=\"/icons/profile-dark-24x24.svg\"\n darkImageURL=\"/icons/profile-24x24.svg\"\n activeScreen={activeScreen}\n setActiveScreen={setActiveScreen}\n setParams={setParams}\n isExpanded={isExpanded}\n />\n </div>\n\n <SidebarSeparator className=\"mb-6\" />\n\n <Button onClick={logout}>\n <LogOut className=\"mr-2\" width={16} height={16} />\n {isExpanded && (\n <p className=\"md:text-medium hidden md:inline md:text-center\">\n Wyloguj się\n </p>\n )}\n </Button>\n </div>\n );\n}\n\ninterface SidebarSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nfunction SidebarSeparator({ className }: SidebarSeparatorProps) {\n return (\n <div className={cn(\"relative h-px w-full bg-neutral-300\", className)}>\n <div className=\"absolute -top-px left-0 h-1 w-1 rounded-full bg-neutral-500\"></div>\n <div className=\"absolute -top-px right-0 h-1 w-1 rounded-full bg-neutral-500\"></div>\n </div>\n );\n}\n\ninterface CompanyLogoProps {\n theme?: GetThemeOutput;\n isExpanded: boolean;\n}\n\nfunction CompanyLogo({ theme, isExpanded: _isExpanded }: CompanyLogoProps) {\n return (\n <>\n {theme == null && (\n <p className=\"text-xl tracking-wider md:inline dark:text-neutral-200\">\n bitsnap.\n </p>\n )}\n {(theme?.logoDarkURL || theme?.logoURL) && (\n <img\n src={theme.logoDarkURL ?? theme.logoURL}\n alt=\"Company Logo\"\n className=\"hidden h-6 w-6 dark:inline\"\n draggable={false}\n />\n )}\n\n {theme?.logoURL && (\n <img\n src={theme.logoURL}\n alt=\"Company Logo\"\n className=\"h-6 w-6 dark:hidden\"\n draggable={false}\n />\n )}\n </>\n );\n}\n","import { Button } from \"../../ui/button\";\nimport { LogOut } from \"lucide-react\";\n\ninterface PanelProfileComponentProps {\n email: string | null;\n logout: () => void;\n}\n\nfunction PanelProfileComponent({ email, logout }: PanelProfileComponentProps) {\n return (\n <>\n <h3 className=\"text-2xl\">Profil</h3>\n <div className=\"mt-6 flex-1 md:flex-none\">\n <span className=\"text-sm text-neutral-500\">Email</span>\n <p className=\"mt-2 text-base\">{email ? email : \"Brak danych\"}</p>\n </div>\n <div className=\"flex w-full flex-col items-center space-y-2\">\n <Button onClick={logout} className=\"max-w-64 md:hidden\">\n <LogOut className=\"mr-2\" width={16} height={16} />\n <p className=\"text-medium inline text-center\">Wyloguj się</p>\n </Button>\n </div>\n </>\n );\n}\n\nexport default PanelProfileComponent;\n","import {\n AlertCircle,\n CheckCircle2,\n ChevronLeft,\n Loader2,\n Lock,\n Package,\n Truck,\n} from \"lucide-react\";\nimport { useState, type CSSProperties } from \"react\";\nimport { rpcProvider, useMutation, useQuery } from \"../../rpc-provider\";\nimport { Button } from \"../../ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"../../ui/card\";\nimport { Input } from \"../../ui/input\";\nimport { Label } from \"../../ui/label\";\nimport { Textarea } from \"../../ui/textarea\";\n\nimport { usePanelConfig } from \"../PanelProvider\";\n\ninterface Props {\n orderID: string;\n initialEmail?: string;\n accessToken?: string;\n onBack?: () => void;\n}\n\nfunction StatusBadge({ status }: { status: string }) {\n const statusConfig: Record<\n string,\n { color: string; icon: typeof AlertCircle | null }\n > = {\n created: { color: \"bg-neutral-100 text-neutral-700\", icon: null },\n paid: { color: \"bg-green-100 text-green-700\", icon: CheckCircle2 },\n completed: { color: \"bg-blue-100 text-blue-700\", icon: CheckCircle2 },\n canceled: { color: \"bg-red-100 text-red-700\", icon: AlertCircle },\n sent: { color: \"bg-purple-100 text-purple-700\", icon: Truck },\n processing: { color: \"bg-yellow-100 text-yellow-700\", icon: Loader2 },\n };\n\n const config = statusConfig[status] || statusConfig.created;\n const Icon = config.icon;\n\n const statusLabels: Record<string, string> = {\n created: \"Utworzone\",\n paid: \"Opłacone\",\n completed: \"Zakończone\",\n canceled: \"Anulowane\",\n sent: \"Wysłane\",\n processing: \"Przetwarzane\",\n };\n\n return (\n <span\n className={`inline-flex items-center gap-1 rounded-full px-3 py-1 text-sm font-medium ${config.color}`}\n >\n {Icon && <Icon className=\"h-4 w-4\" />}\n {statusLabels[status] || status}\n </span>\n );\n}\n\nfunction AddCommentForm({\n orderID,\n email,\n}: {\n orderID: string;\n email: string;\n}) {\n const [message, setMessage] = useState(\"\");\n const addCommentMutation = useMutation(\n rpcProvider.publicApi.addPublicOrderComment,\n );\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n if (!message.trim()) return;\n\n try {\n await addCommentMutation.mutateAsync({\n projectId: \"\",\n orderId: orderID,\n message: message.trim(),\n accessToken: email,\n });\n setMessage(\"\");\n } catch (error) {\n console.error(\"Failed to add comment:\", error);\n }\n };\n\n return (\n <form onSubmit={handleSubmit} className=\"mt-4 space-y-2\">\n <Label htmlFor=\"comment\">Dodaj komentarz</Label>\n <Textarea\n id=\"comment\"\n value={message}\n onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) =>\n setMessage(e.target.value)\n }\n placeholder=\"Wpisz komentarz...\"\n rows={3}\n disabled={addCommentMutation.isPending}\n />\n <Button\n type=\"submit\"\n disabled={!message.trim() || addCommentMutation.isPending}\n >\n {addCommentMutation.isPending ? (\n <>\n <Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n Wysyłanie...\n </>\n ) : (\n \"Dodaj komentarz\"\n )}\n </Button>\n </form>\n );\n}\n\nfunction formatDate(timestamp: { seconds: bigint } | undefined): string {\n if (!timestamp) return \"N/A\";\n const date = new Date(Number(timestamp.seconds) * 1000);\n return date.toLocaleDateString(\"pl-PL\", {\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n });\n}\n\nfunction formatCurrency(amount: number, currency: string): string {\n return new Intl.NumberFormat(\"pl-PL\", {\n style: \"currency\",\n currency: currency.toUpperCase(),\n }).format(amount / 100);\n}\n\nfunction PublicOrderPageContent({\n orderID,\n initialEmail,\n onBack,\n accessToken,\n}: Props) {\n const { theme, projectID } = usePanelConfig();\n\n const [verifyEmail, setVerifyEmail] = useState(initialEmail || \"\");\n const [isVerifyDialogOpen, setIsVerifyDialogOpen] = useState(false);\n\n const {\n data: orderData,\n isLoading,\n error,\n refetch,\n } = useQuery(\n rpcProvider.publicApi.getPublicOrderDetails,\n {\n projectId: projectID ?? \"\",\n orderId: orderID,\n email: verifyEmail || undefined,\n accessToken: accessToken,\n },\n { enabled: !!orderID },\n );\n\n const order =\n orderData?.result.case === \"order\" ? orderData.result.value : null;\n const isVerified = order?.isVerified ?? false;\n\n const handleVerifyEmail = () => {\n refetch();\n setIsVerifyDialogOpen(false);\n };\n\n const styles = {\n \"--button-background-color\": theme?.colors?.brand ?? \"#000000\",\n \"--button-background-color-dark\": theme?.colors?.brandDark ?? \"#ffffff\",\n \"--button-text-color\": theme?.colors?.brandDark ?? \"#000000\",\n \"--button-text-color-dark\": theme?.colors?.brand ?? \"#000000\",\n } as CSSProperties;\n\n if (isLoading) {\n return (\n <div className=\"flex min-h-screen items-center justify-center\">\n <div className=\"text-center\">\n <Loader2 className=\"mx-auto h-8 w-8 animate-spin text-neutral-400\" />\n <p className=\"mt-2 text-neutral-600 dark:text-neutral-400\">\n Ładowanie zamówienia...\n </p>\n </div>\n </div>\n );\n }\n\n if (error || !order) {\n return (\n <div className=\"flex min-h-screen items-center justify-center\">\n <Card className=\"w-full max-w-md\">\n <CardContent className=\"pt-6\">\n <div className=\"text-center\">\n <AlertCircle className=\"mx-auto h-12 w-12 text-red-500\" />\n <h2 className=\"mt-4 text-xl font-semibold\">\n Zamówienie nie znalezione\n </h2>\n <p className=\"mt-2 text-neutral-600 dark:text-neutral-400\">\n Nie znaleziono zamówienia o podanym numerze.\n </p>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n }\n\n return (\n <div className=\"w-full bg-white py-8 dark:bg-black\" style={styles}>\n <div className=\"w-full px-4\">\n {onBack && (\n <Button onClick={onBack} variant=\"ghost\" className=\"mb-4 w-fit\">\n <ChevronLeft className=\"h-4 w-4\" />\n Wróć do historii zamówień\n </Button>\n )}\n <div className=\"mb-6 flex items-center gap-4\">\n {theme?.logoURL && (\n <>\n <img\n src={theme.logoURL}\n alt=\"Project logo\"\n className={`h-12 w-auto ${theme.logoDarkURL ? \"dark:hidden\" : \"\"}`}\n />\n {theme.logoDarkURL && (\n <img\n src={theme.logoDarkURL}\n alt=\"Project logo\"\n className=\"hidden h-12 w-auto dark:block\"\n />\n )}\n </>\n )}\n <div>\n <h1 className=\"text-3xl font-bold\">Zamówienie</h1>\n <p className=\"text-neutral-600 dark:text-neutral-400\">\n Numer zamówienia: #{order.orderId}\n </p>\n </div>\n </div>\n\n <Card className=\"mb-6\">\n <CardHeader>\n <CardTitle className=\"flex items-center\">\n <Package className=\"mr-2 h-5 w-5\" />\n Status zamówienia\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-6\">\n <div>\n <div className=\"flex items-center gap-2\">\n <StatusBadge status={order.status} />\n {order.processingStatus && (\n <span className=\"text-sm text-neutral-600\">\n · {order.processingStatus}\n </span>\n )}\n </div>\n <p className=\"mt-2 text-sm text-neutral-600\">\n Zamówienie złożone {formatDate(order.createdAt)}\n </p>\n </div>\n\n <div className=\"border-t pt-4\">\n <h3 className=\"mb-3 font-semibold\">Dane klienta</h3>\n <div className=\"space-y-2\">\n <div>\n <span className=\"font-medium\">Imię i nazwisko:</span>{\" \"}\n <span className={!isVerified ? \"text-neutral-500\" : \"\"}>\n {order.customerName}\n </span>\n </div>\n <div>\n <span className=\"font-medium\">Email:</span>{\" \"}\n <span className={!isVerified ? \"text-neutral-500\" : \"\"}>\n {order.customerEmail}\n </span>\n </div>\n {order.customerPhone && (\n <div>\n <span className=\"font-medium\">Telefon:</span>{\" \"}\n <span className={!isVerified ? \"text-neutral-500\" : \"\"}>\n {order.customerPhone}\n </span>\n </div>\n )}\n </div>\n </div>\n\n {!isVerified && (\n <div className=\"border-t pt-4\">\n <Button\n onClick={() => setIsVerifyDialogOpen(true)}\n variant=\"outline\"\n className=\"w-full\"\n >\n <Lock className=\"mr-2 h-4 w-4\" />\n Zweryfikuj swój email\n </Button>\n </div>\n )}\n </CardContent>\n </Card>\n\n <Card className=\"mb-6\">\n <CardHeader>\n <CardTitle>Produkty</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-6\">\n <div className=\"space-y-4\">\n {order.items.map((item, index) => (\n <div key={index} className=\"flex items-center gap-4\">\n {item.imageUrl && (\n <img\n src={item.imageUrl}\n alt={item.name}\n className=\"h-16 w-16 rounded object-cover\"\n />\n )}\n <div className=\"flex-1\">\n <p className=\"font-medium\">{item.name}</p>\n <p className=\"text-sm text-neutral-600\">\n Ilość: {item.quantity}\n </p>\n </div>\n <div className=\"text-right\">\n <p className=\"font-medium\">\n {formatCurrency(Number(item.price), item.currency)}\n </p>\n </div>\n </div>\n ))}\n </div>\n\n {(order.deliveryAddress || order.deliveryMethod) && (\n <div className=\"border-t pt-4\">\n <h3 className=\"mb-3 flex items-center font-semibold\">\n <Truck className=\"mr-2 h-5 w-5\" />\n Informacje o dostawie\n </h3>\n <div className=\"space-y-2\">\n {order.deliveryAddress && (\n <div>\n <span className=\"font-medium\">Adres:</span>{\" \"}\n <span className={!isVerified ? \"text-neutral-500\" : \"\"}>\n {order.deliveryAddress}\n </span>\n </div>\n )}\n {order.deliveryMethod && (\n <div>\n <span className=\"font-medium\">Metoda:</span>{\" \"}\n {order.deliveryMethod}\n </div>\n )}\n {order.trackingNumber && isVerified && (\n <div>\n <span className=\"font-medium\">Tracking:</span>{\" \"}\n {order.trackingNumber}\n </div>\n )}\n </div>\n </div>\n )}\n\n <div className=\"border-t pt-4\">\n <div className=\"flex justify-between text-lg font-bold\">\n <span>Suma:</span>\n <span>\n {formatCurrency(Number(order.totalAmount), order.currency)}\n </span>\n </div>\n </div>\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>\n Komentarze {order.commentCount > 0 && `(${order.commentCount})`}\n </CardTitle>\n </CardHeader>\n <CardContent>\n {order.comments.length > 0 ? (\n <div className=\"space-y-4\">\n {order.comments.map((comment) => (\n <div\n key={comment.id}\n className=\"border-b pb-4 last:border-b-0\"\n >\n <div className=\"mb-1 flex items-center gap-2\">\n <span className=\"font-medium\">\n {comment.authorName || \"System\"}\n </span>\n <span className=\"text-xs text-neutral-500\">\n {formatDate(comment.createdAt)}\n </span>\n {comment.authorType === \"admin\" && (\n <span className=\"rounded bg-blue-100 px-2 py-0.5 text-xs text-blue-700\">\n Admin\n </span>\n )}\n </div>\n <p className={!isVerified ? \"text-neutral-500\" : \"\"}>\n {comment.message}\n </p>\n </div>\n ))}\n </div>\n ) : (\n <p className=\"text-neutral-600\">Brak komentarzy.</p>\n )}\n\n {isVerified ? (\n <AddCommentForm orderID={order.orderId} email={verifyEmail} />\n ) : (\n <div className=\"mt-4\">\n <Button\n onClick={() => setIsVerifyDialogOpen(true)}\n variant=\"outline\"\n className=\"w-full\"\n >\n <Lock className=\"mr-2 h-4 w-4\" />\n Zweryfikuj swój email\n </Button>\n </div>\n )}\n </CardContent>\n </Card>\n\n {isVerifyDialogOpen && (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-black/50\">\n <Card className=\"w-full max-w-md\">\n <CardHeader>\n <CardTitle>Zweryfikuj swój email</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <p className=\"text-sm text-neutral-700\">\n Podaj adres email użyty przy składaniu zamówienia.\n </p>\n <div className=\"space-y-2\">\n <Label htmlFor=\"verify-email\">Adres email</Label>\n <Input\n id=\"verify-email\"\n type=\"email\"\n placeholder=\"twoj@email.com\"\n value={verifyEmail}\n onChange={(e) => setVerifyEmail(e.target.value)}\n />\n </div>\n <div className=\"flex gap-2\">\n <Button\n variant=\"outline\"\n onClick={() => setIsVerifyDialogOpen(false)}\n className=\"flex-1\"\n >\n Anuluj\n </Button>\n <Button onClick={handleVerifyEmail} className=\"flex-1\">\n Zweryfikuj\n </Button>\n </div>\n </CardContent>\n </Card>\n </div>\n )}\n </div>\n </div>\n );\n}\n\nfunction PublicOrderPage(props: Props) {\n return <PublicOrderPageContent {...props} />;\n}\nexport default PublicOrderPage;\n","import { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport { useEffect, useState, type CSSProperties } from \"react\";\nimport { rpcProvider, useMutation } from \"../../rpc-provider\";\nimport { useUrlSearchParams } from \"../hooks/useUrlSearchParams\";\nimport { usePanelConfig } from \"../PanelProvider\";\nimport { resolvePanelReturnsAppearance } from \"../returns-appearance\";\nimport type { PanelProps } from \"../types\";\nimport {\n buildAccessTokenRedirect,\n getReturnURLFromSearch,\n persistReturnURL,\n readPersistedReturnURL,\n} from \"../return-url\";\n\nimport PanelNotificationsComponent from \"./PanelNotifications\";\nimport PanelOrderHistoryComponent from \"./PanelOrderHistory\";\nimport PanelPlansComponent from \"./PanelPlans\";\nimport PanelReturnsComponent from \"./PanelReturns\";\nimport PanelProductGridComponent from \"./PanelProductGrid\";\nimport PanelProductHeaderComponent from \"./PanelProductHeader\";\nimport PanelProfileComponent from \"./PanelProfile\";\nimport PublicOrderPage from \"./PublicOrderPage\";\nimport { clearPanelSession, getPanelEmail, getPanelSession } from \"../session-storage\";\n\nexport type PanelScreen =\n | \"products\"\n | \"notifications\"\n | \"profile\"\n | \"plans\"\n | \"orders\"\n | \"order-details\"\n | \"returns\"\n | \"return-details\";\n\nexport type PanelSearchParamsType = {\n product?: string;\n state: PanelScreen;\n orderId?: string;\n returnId?: string;\n};\n\nconst PanelPage = ({\n returnsAppearance,\n returnsTexts,\n}: Pick<PanelProps, \"returnsAppearance\" | \"returnsTexts\"> = {}) => {\n const { projectID, theme, loginURL, host } = usePanelConfig();\n\n const accessToken = getPanelSession(projectID, host);\n const email = getPanelEmail(projectID, host);\n\n const { mutateAsync: logoutUserAsync } = useMutation(\n rpcProvider.publicApi.userPanelLogout,\n );\n\n async function logout() {\n if (accessToken) {\n await logoutUserAsync({\n accessToken: accessToken as string,\n });\n }\n if (typeof window !== \"undefined\") {\n clearPanelSession(projectID, host);\n window.location.reload();\n }\n }\n\n const [panelParentRef] = useAutoAnimate();\n const isScreen = (value: unknown): value is PanelScreen =>\n [\n \"products\",\n \"notifications\",\n \"profile\",\n \"plans\",\n \"orders\",\n \"order-details\",\n \"returns\",\n \"return-details\",\n ].includes(value as string);\n\n const [params, setParams] = useUrlSearchParams<PanelSearchParamsType>({\n product: undefined,\n state: \"products\",\n orderId: undefined,\n returnId: undefined,\n });\n\n const [activeScreen, setActiveScreen] = useState<PanelScreen>(\n isScreen(params.state) ? params.state : \"products\",\n );\n\n const handleOpenOrderDetails = (orderID: string) => {\n setParams({\n state: \"order-details\",\n orderId: orderID,\n });\n setActiveScreen(\"order-details\");\n };\n\n const handleBackToOrders = () => {\n setParams({\n state: \"orders\",\n orderId: undefined,\n });\n setActiveScreen(\"orders\");\n };\n\n // Navigation starts a screen from scratch, so ids of the previous screen\n // must not leak into it.\n const navigate = (next: { product?: string; state: PanelScreen }) =>\n setParams({ orderId: undefined, returnId: undefined, ...next });\n\n const styles = {\n \"--button-background-color\": theme?.colors?.brand ?? \"#000000\",\n \"--button-background-color-dark\": theme?.colors?.brandDark ?? \"#ffffff\",\n \"--button-text-color\": theme?.colors?.brandDark ?? \"#000000\",\n \"--button-text-color-dark\": theme?.colors?.brand ?? \"#000000\",\n } as CSSProperties;\n\n useEffect(() => {\n if (accessToken == null || accessToken.length === 0) {\n window.location.href = loginURL ?? \"/panel/login\";\n return;\n }\n }, []);\n\n useEffect(() => {\n if (accessToken == null || accessToken.length === 0) {\n window.location.href = loginURL ?? \"/panel/login\";\n return;\n }\n }, [activeScreen]);\n\nuseEffect(() => {\n if (typeof window === \"undefined\") return;\n if (window.parent !== window) return;\n if (!accessToken) return;\n\n const queryReturnURL = getReturnURLFromSearch(window.location.search);\n if (queryReturnURL) {\n persistReturnURL(queryReturnURL);\n }\n\n const returnURL = queryReturnURL ?? readPersistedReturnURL();\n if (!returnURL) return;\n\n window.location.href = buildAccessTokenRedirect(returnURL, accessToken);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [accessToken]);\n\n return (\n <div\n ref={panelParentRef}\n className=\"font-inter relative min-h-screen w-screen bg-beige-100 text-black dark:bg-black dark:text-white md:flex\"\n >\n <PanelProductHeaderComponent\n activeScreen={activeScreen}\n setActiveScreen={setActiveScreen}\n setParams={navigate}\n styles={styles}\n theme={theme}\n logout={logout}\n />\n\n <main className=\"flex h-[calc(100vh-80px)] flex-col overflow-y-auto w-full p-5 md:h-screen\">\n {activeScreen === \"products\" && (\n <PanelProductGridComponent\n projectID={projectID ?? \"\"}\n accessToken={accessToken!}\n loginURL={loginURL ?? \"/panel/login\"}\n styles={styles}\n activeScreen={activeScreen}\n params={params as PanelSearchParamsType}\n setParams={setParams}\n />\n )}\n\n {activeScreen === \"notifications\" && <PanelNotificationsComponent />}\n\n {activeScreen === \"plans\" && (\n <PanelPlansComponent projectID={projectID ?? \"\"} />\n )}\n\n {activeScreen === \"orders\" && (\n <PanelOrderHistoryComponent\n projectID={projectID ?? \"\"}\n accessToken={accessToken ?? \"\"}\n openOrderDetails={handleOpenOrderDetails}\n />\n )}\n\n {activeScreen === \"order-details\" && params.orderId && (\n <PublicOrderPage\n orderID={params.orderId}\n onBack={handleBackToOrders}\n />\n )}\n\n {(activeScreen === \"returns\" || activeScreen === \"return-details\") &&\n accessToken && (\n <PanelReturnsComponent\n projectID={projectID ?? \"\"}\n host={host}\n accessToken={accessToken}\n loginURL={loginURL ?? \"/panel/login\"}\n appearance={resolvePanelReturnsAppearance(\n returnsAppearance,\n theme?.colors?.brand,\n )}\n texts={returnsTexts}\n screen={activeScreen}\n params={params as PanelSearchParamsType}\n setParams={setParams}\n setActiveScreen={setActiveScreen}\n />\n )}\n\n {activeScreen === \"profile\" && (\n <PanelProfileComponent email={email} logout={logout} />\n )}\n </main>\n </div>\n );\n};\n\nexport default PanelPage;\n","export { PanelLogin } from \"./components/PanelLogin\";\nexport { default as Panel } from \"./components/PanelPage\";\nexport { default as PublicOrderPage } from \"./components/PublicOrderPage\";\n\nexport {\n getAllowedReturnOrigins,\n getPanelConfig,\n setAllowedReturnOrigins,\n setHost,\n setLoginURL,\n setPanelConfig,\n setProjectID,\n setTheme,\n} from \"./config\";\nexport { PanelProvider, usePanelConfig } from \"./PanelProvider\";\nexport {\n buildAccessTokenRedirect,\n getReturnURLFromSearch,\n persistReturnURL,\n readPersistedReturnURL,\n} from \"./return-url\";\n\nexport type { PanelConfig } from \"./config\";\nexport type {\n GetThemeOutput,\n PanelLoginProps,\n PanelProps,\n PanelScreen,\n PanelSearchParamsType,\n} from \"./types\";\n","export function round(num: number, numberOfDecimals: number = 2): number {\n return Number(\n +(\n Math.round(Number(num + \"e+\" + numberOfDecimals)) +\n \"e-\" +\n numberOfDecimals\n )\n );\n}\n\nexport function formatCurrency(amount: number, currency: string): string {\n const language = typeof navigator === \"undefined\" ? \"pl-PL\" : navigator.language;\n const formatter = Intl.NumberFormat(language, {\n style: \"currency\",\n currency: currency,\n currencyDisplay: \"symbol\",\n });\n\n return formatter.format(amount / 100);\n}\n\nexport function formatPriceWithoutCurrency(amount: number, currency: string) {\n let language = \"pl\";\n if (typeof navigator != \"undefined\") {\n language = navigator.language;\n }\n const result = new Intl.NumberFormat(language, {\n style: \"currency\",\n currency,\n currencyDisplay: \"code\",\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n })\n .formatToParts(amount / 100)\n .filter((x) => x.type !== \"currency\")\n .filter((x) => x.type !== \"literal\" || x.value.trim().length !== 0)\n .map((x) => x.value)\n .join(\"\");\n\n const regex = new RegExp(`(\\\\.00)(?=\\\\D*$)`);\n return result.replace(regex, \"\");\n}\n","import zod from \"zod\";\nimport { round } from \"./lib/round.number\";\n\nconst eventPayload = zod.object({\n event: zod.enum([\n \"purchase\",\n \"addToCart\",\n \"customizeProduct\",\n \"viewCart\",\n \"removeFromCart\",\n \"initiateCheckout\",\n \"lead\",\n ]),\n step: zod.string().optional(),\n value: zod.number().optional(),\n currency: zod.string().optional(),\n content_name: zod.string().optional(),\n items: zod\n .array(\n zod.object({\n id: zod.string(),\n name: zod.string(),\n price: zod.number().default(0),\n currency: zod.string().default(\"PLN\"),\n quantity: zod.number().default(1),\n })\n )\n .optional(),\n});\ntype EventPayload = zod.infer<typeof eventPayload>;\n\nexport function sendAnalyticEvent(payload: EventPayload) {\n if (typeof window == \"undefined\") {\n return;\n }\n\n sendGoogleAnalyticsEvent(payload);\n sendPixelAnalyticsEvent(payload);\n sendTikTokAnalyticsEvent(payload);\n}\n\nfunction sendGoogleAnalyticsEvent(payload: EventPayload) {\n try {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (typeof window.dataLayer == \"undefined\") {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n window.dataLayer = [];\n }\n\n const ga4Event = mapToGA4EcommerceEvent(payload);\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n window.dataLayer.push(ga4Event);\n } catch (e) {\n console.warn(\"cannot send google analytics event\", e);\n }\n}\n\nfunction mapToGA4EcommerceEvent(payload: EventPayload) {\n // Calculate total value from items if not provided\n const totalValue =\n payload.value ??\n payload.items?.reduce(\n (sum, item) => sum + (item.price || 0) * (item.quantity || 1),\n 0\n ) ??\n 0;\n\n // Map items to GA4 format\n const items = payload.items?.map((item) => ({\n item_id: item.id,\n item_name: item.name || item.id,\n price: round((item.price || 0) / 100, 2),\n quantity: item.quantity || 1,\n }));\n\n // Build base ecommerce object\n const ecommerce: Record<string, unknown> = {\n currency: payload.currency || \"PLN\",\n value: round(totalValue / 100, 2),\n };\n\n if (items && items.length > 0) {\n ecommerce.items = items;\n }\n\n // Map event names to GA4 ecommerce events\n let eventName: string;\n switch (payload.event) {\n case \"purchase\":\n eventName = \"purchase\";\n // Purchase events require transaction_id, but we'll use a timestamp-based one if not provided\n ecommerce.transaction_id = payload.step || `txn_${Date.now()}`;\n break;\n case \"addToCart\":\n eventName = \"add_to_cart\";\n break;\n case \"viewCart\":\n eventName = \"view_cart\";\n break;\n case \"removeFromCart\":\n eventName = \"remove_from_cart\";\n break;\n case \"initiateCheckout\":\n eventName = \"begin_checkout\";\n break;\n case \"customizeProduct\":\n // Customize product is not a standard GA4 ecommerce event\n // We'll send it as a custom event with ecommerce data\n eventName = \"customize_product\";\n break;\n default:\n eventName = payload.event;\n }\n\n return {\n event: eventName,\n ecommerce,\n // Include step if provided for additional context\n ...(payload.step && { step: payload.step }),\n // Include content_name if provided\n ...(payload.content_name && { content_name: payload.content_name }),\n };\n}\n\nfunction sendPixelAnalyticsEvent(payload: EventPayload) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (typeof window.fbq == \"undefined\") {\n return;\n }\n\n let eventType = \"\";\n let eventName = \"\";\n let eventPayload: unknown = {};\n\n switch (payload.event) {\n case \"purchase\":\n eventType = \"track\";\n eventName = \"Purchase\";\n eventPayload = {\n category_name: payload.step,\n ...payload,\n };\n break;\n case \"lead\":\n eventType = \"track\";\n eventName = \"Lead\";\n eventPayload = {\n category_name: payload.step,\n ...payload,\n };\n break;\n case \"addToCart\":\n eventType = \"track\";\n eventName = \"Add to Cart\";\n eventPayload = {\n category_name: payload.step,\n ...payload,\n };\n break;\n case \"customizeProduct\":\n eventType = \"track\";\n eventName = \"Customize Product\";\n eventPayload = {\n category_name: payload.step,\n ...payload,\n };\n break;\n case \"viewCart\":\n eventType = \"track\";\n eventName = \"View Cart\";\n eventPayload = {\n category_name: payload.step,\n ...payload,\n };\n break;\n case \"removeFromCart\":\n eventType = \"track\";\n eventName = \"Remove from Cart\";\n eventPayload = {\n category_name: payload.step,\n ...payload,\n };\n break;\n case \"initiateCheckout\":\n eventType = \"track\";\n eventName = \"Initiate Checkout\";\n eventPayload = {\n category_name: payload.step,\n ...payload,\n };\n break;\n default:\n break;\n }\n\n if (window.location.search.includes(\"analytics\")) {\n console.log(\"Pushing FB event\", eventType, eventName, eventPayload);\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n window.fbq(eventType, eventName, eventPayload);\n}\n\nfunction sendTikTokAnalyticsEvent(payload: EventPayload) {\n try {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (typeof window.ttq == \"undefined\") {\n return;\n }\n\n const tiktokEvent = mapToTikTokEvent(payload);\n\n if (!tiktokEvent) {\n return;\n }\n\n if (window.location.search.includes(\"analytics\")) {\n console.log(\n \"Pushing TikTok event\",\n tiktokEvent.eventName,\n tiktokEvent.eventPayload\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n window.ttq.track(tiktokEvent.eventName, tiktokEvent.eventPayload);\n } catch (e) {\n console.warn(\"cannot send tiktok analytics event\", e);\n }\n}\n\nfunction mapToTikTokEvent(payload: EventPayload) {\n // Calculate total value from items if not provided\n const totalValue =\n payload.value ??\n payload.items?.reduce(\n (sum, item) => sum + (item.price || 0) * (item.quantity || 1),\n 0\n ) ??\n 0;\n\n // Map items to TikTok contents format\n const contents =\n payload.items?.map((item) => ({\n content_id: item.id,\n content_type: \"product\",\n content_name: item.name || item.id,\n quantity: item.quantity || 1,\n price: round((item.price || 0) / 100, 2),\n })) || [];\n\n // If no items but we have content_name, create a single content entry\n if (contents.length === 0 && payload.content_name) {\n contents.push({\n content_id: payload.step || \"unknown\",\n content_type: \"product\",\n content_name: payload.content_name,\n quantity: 1,\n price: round(totalValue / 100, 2),\n });\n }\n\n // Build base event payload\n const eventPayload: Record<string, unknown> = {\n currency: payload.currency || \"PLN\",\n value: round(totalValue / 100, 2),\n };\n\n if (contents.length > 0) {\n eventPayload.contents = contents;\n }\n\n // Map event names to TikTok events\n let eventName: string | null = null;\n switch (payload.event) {\n case \"purchase\":\n eventName = \"Purchase\";\n break;\n case \"addToCart\":\n eventName = \"AddToCart\";\n break;\n case \"initiateCheckout\":\n eventName = \"InitiateCheckout\";\n break;\n case \"customizeProduct\":\n eventName = \"CustomizeProduct\";\n break;\n case \"viewCart\":\n return undefined;\n // // TikTok doesn't have a ViewCart event, use ViewContent as fallback\n // eventName = 'ViewContent'\n break;\n case \"removeFromCart\":\n return undefined;\n // // TikTok doesn't have a RemoveFromCart event, use ViewContent as fallback\n // eventName = 'ViewContent'\n break;\n case \"lead\":\n return undefined;\n // // TikTok doesn't have a standard Lead event, use ViewContent as fallback\n // eventName = 'ViewContent'\n break;\n default:\n return null;\n }\n\n return {\n eventName,\n eventPayload,\n };\n}\n","import { GetPreOrderDetailsResponse } from \"src/gen/proto/public/v1/public_api_pb\";\nimport { Checkout, GooglePayConfig } from \"./CartProvider\";\nimport { formatCurrency, round } from \"./lib/round.number\";\nimport { SingleProduct } from \"./product.details.model\";\n\nexport function mapGooglePayConfiguration(args: {\n items: {\n id: string;\n productID: string;\n quantity: number;\n metadata?: {\n [key: string]: string | undefined;\n };\n details?: SingleProduct;\n }[];\n googlePayConfig: GooglePayConfig;\n checkout: Checkout;\n result: GetPreOrderDetailsResponse;\n cartRequiresShipping: boolean;\n}): google.payments.api.PaymentDataRequest | undefined {\n const { items, googlePayConfig, checkout, result, cartRequiresShipping } =\n args;\n if (result.totalAmount == null) {\n return undefined;\n }\n let intents: google.payments.api.CallbackIntent[] = [];\n if (cartRequiresShipping) {\n intents.push(\"SHIPPING_ADDRESS\");\n intents.push(\"SHIPPING_OPTION\");\n }\n\n const returnValue: google.payments.api.PaymentDataRequest = {\n apiVersion: 2,\n apiVersionMinor: 0,\n callbackIntents: intents,\n allowedPaymentMethods: [\n {\n type: \"CARD\",\n parameters: {\n allowedAuthMethods: [\"PAN_ONLY\", \"CRYPTOGRAM_3DS\"],\n allowedCardNetworks: [\"MASTERCARD\", \"VISA\"],\n },\n tokenizationSpecification: {\n type: \"PAYMENT_GATEWAY\",\n parameters: {\n gateway: googlePayConfig.gateway,\n gatewayMerchantId: googlePayConfig.gatewayId,\n },\n },\n },\n ],\n emailRequired: true,\n shippingAddressParameters: {\n phoneNumberRequired: cartRequiresShipping,\n },\n shippingAddressRequired: cartRequiresShipping,\n shippingOptionRequired: cartRequiresShipping,\n shippingOptionParameters: cartRequiresShipping\n ? {\n shippingOptions: result.methods.slice(0, 5).map((method) => ({\n id: method.id,\n label:\n method.name +\n \" - \" +\n `${formatCurrency(method.amount, result.currency)}`,\n description: method.description ?? \"\",\n })),\n defaultSelectedOptionId: result.selectedDeliveryMethod,\n }\n : undefined,\n merchantInfo: {\n merchantId: googlePayConfig.merchantId + \"\",\n merchantName: googlePayConfig.merchantName,\n },\n transactionInfo: {\n totalPriceStatus: \"FINAL\",\n totalPriceLabel: \"Płatność za koszyk\",\n totalPrice: `${round(result.totalAmount / 100, 2)}`,\n currencyCode: result.currency,\n countryCode: result.country,\n checkoutOption: \"COMPLETE_IMMEDIATE_PURCHASE\",\n displayItems: mapGooglePayDisplayItems(\n items,\n result.methods,\n result.selectedDeliveryMethod ??\n (result.methods.length > 0 ? result.methods[0].id : undefined),\n checkout.couponCode,\n result.couponValue\n ),\n },\n };\n return returnValue;\n}\n\nfunction mapGooglePayDisplayItems(\n items: {\n id: string;\n productID: string;\n quantity: number;\n metadata?: {\n [key: string]: string | undefined;\n };\n details?: SingleProduct;\n }[],\n methods: GetPreOrderDetailsResponse[\"methods\"],\n deliveryMethod?: string,\n couponCode?: string,\n couponValue?: number\n): google.payments.api.DisplayItem[] {\n const displayItems: google.payments.api.DisplayItem[] = [];\n\n let subtotalAmount = 0;\n for (const item of items) {\n if (item.details == null) {\n continue;\n }\n subtotalAmount += item.details.price * item.quantity;\n displayItems.push({\n label: item.details.name + \" x \" + item.quantity,\n price: `${round(item.details.price / 100, 2)}`,\n type: \"LINE_ITEM\",\n status: \"FINAL\",\n });\n }\n\n const selectedDeliveryMethod = methods.find(\n (method) => method.id === deliveryMethod\n );\n if (selectedDeliveryMethod != null) {\n displayItems.push({\n label: selectedDeliveryMethod.name,\n price: `${round(selectedDeliveryMethod.amount / 100, 2)}`,\n type: \"SHIPPING_OPTION\",\n status: \"FINAL\",\n });\n }\n\n if (couponCode != null && couponValue != null) {\n displayItems.push({\n label: `Kupon ${couponCode}`,\n price: `${round(couponValue / 100, 2)}`,\n type: \"DISCOUNT\",\n status: \"FINAL\",\n });\n }\n if (subtotalAmount > 0) {\n displayItems.push({\n label: \"Subtotal\",\n price: `${round(subtotalAmount / 100, 2)}`,\n type: \"SUBTOTAL\",\n status: \"FINAL\",\n });\n }\n\n return displayItems;\n}\n","import { HOST } from \"./constants\";\n\nexport function buildURL(projectID: string, path: string): string {\n return `${HOST}/api/integrations/${projectID}/public-commerce${path}`;\n}\n","// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport type Err = {\n ERR: true;\n error: unknown;\n type?: ErrTypes;\n data?: unknown;\n};\n\ntype ErrTypes = \"internal\" | \"badInput\" | \"notFound\";\n\nexport function isErr(x: unknown): x is Err {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return typeof x === \"object\" && x != null && \"ERR\" in x;\n}\n\nexport function Err(message: string, type?: ErrTypes, data?: unknown): Err {\n return { ERR: true, error: message, type: type, data: data };\n}\n\nexport async function tryFail<T>(\n f: (() => Promise<T>) | (() => T)\n): Promise<T | Err> {\n try {\n return await f();\n } catch (e) {\n return { ERR: true, error: e };\n }\n}\n\nexport function assertOk<T>(x: T | Err) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isErr(x)) throw Error((x.error as any).toString());\n}\n","type MatchableProduct = {\n id: string;\n variants?: { id: string }[] | null;\n};\n\n/**\n * The product from a `/products` response that serves a cart item: the\n * product itself or the product that has it as a variant.\n */\nexport function findProductForCartItem<T extends MatchableProduct>(\n productID: string,\n products: T[] | undefined,\n): T | undefined {\n return products?.find(\n (el) =>\n el.id === productID ||\n (el.variants?.some((variant) => variant.id === productID) ?? false),\n );\n}\n\n/** Requested product IDs that the backend did not resolve. */\nexport function findMissingProductIDs(\n requested: string[],\n resolved: { productID: string }[],\n): string[] {\n const found = new Set(resolved.map((el) => el.productID));\n return Array.from(new Set(requested.filter((id) => !found.has(id))));\n}\n","import { create } from 'zustand';\n\ninterface CheckoutStore {\n isCartVisible: boolean;\n numberOfProductsInCart: number;\n showCart: () => void;\n hideCart: () => void;\n setNumberOfProductsInCart: (numberOfProductsInCart: number) => void;\n}\n\nexport const useCheckoutStore = create<CheckoutStore>((set) => ({\n isCartVisible: false,\n numberOfProductsInCart: 0,\n showCart: () => set((state) => ({ ...state, isCartVisible: true })),\n hideCart: () => set((state) => ({ ...state, isCartVisible: false })),\n setNumberOfProductsInCart: (numberOfProductsInCart: number) => set((state) => ({ ...state, numberOfProductsInCart: numberOfProductsInCart })),\n}))\n","import { getCheckoutMethods, getLocale, getProjectID } from \"./CartProvider\";\nimport { HOST } from \"./constants\";\nimport { buildURL } from \"./helper.methods\";\nimport { Err } from \"./lib/err\";\nimport { LinkRequest } from \"./link.request.schema\";\nimport { useCheckoutStore } from \"./state\";\n\nexport namespace Bitsnap {\n /**\n * Adds a product or variant to the cart. Returns an `Err` instead of adding\n * anything when the backend does not know the id\n * (`item-ids-not-found`, with the unknown ids in `data`).\n */\n export async function addProductToCart(\n id: string,\n quantity: number = 1,\n metadata?: Record<string, string | undefined>,\n // Those fields are used to send the price and currency to the analytics\n args?: {\n name?: string;\n price?: number;\n currency?: string;\n },\n ) {\n const projectID = getProjectID();\n if (projectID == null) {\n throw new Error(\"No project ID found\");\n }\n\n const methods = getCheckoutMethods(projectID);\n\n const err = await methods.addProduct({\n productID: id,\n quantity: quantity,\n metadata: metadata,\n ...args,\n });\n if (err != null) {\n return err;\n }\n\n return undefined;\n }\n\n export function showCart() {\n useCheckoutStore.setState({ isCartVisible: true });\n }\n\n export function hideCart() {\n useCheckoutStore.setState({ isCartVisible: false });\n }\n}\n\nexport async function createPaymentURL(request: LinkRequest) {\n const projectID = getProjectID();\n if (projectID == null) {\n throw new Error(\"No project ID found\");\n }\n\n request = injectReferenceToRequestIfNeeded(request);\n request.locale ??= getLocale();\n\n const result = await fetch(buildURL(projectID, \"/buy\"), {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(request),\n });\n\n if (result.status != 200) {\n if (result.headers.get(\"Content-Type\")?.includes(\"application/json\")) {\n try {\n const payload = await result.json();\n if (\"itemIds\" in payload && Array.isArray(payload.itemIds)) {\n const itemIds: string[] = payload.itemIds;\n return Err(\"item-ids-not-found\", \"badInput\", itemIds);\n }\n } catch (error) {}\n return Err(\"internal-error\", \"internal\");\n } else {\n console.warn(\n \"result\",\n await result.text(),\n result.status,\n result.statusText,\n );\n }\n return Err(\"internal-error\", \"internal\");\n }\n\n const response: { url: string; sessionID: string } = await result.json();\n\n return {\n url: response.url,\n };\n}\n\nexport async function createCheckout(\n request: LinkRequest & { apiKey?: string; testMode?: boolean },\n) {\n const projectID = getProjectID();\n if (projectID == null) {\n throw new Error(\"No project ID found\");\n }\n\n const headers = {\n \"Content-Type\": \"application/json\",\n ...(request.apiKey != null\n ? { Authorization: `Bearer ${request.apiKey}` }\n : {}),\n };\n\n const path = request.testMode\n ? `/api/payment/link/auto/${projectID}/test`\n : `/api/payment/link/auto/${projectID}`;\n\n delete request.apiKey;\n delete request.testMode;\n request.locale ??= getLocale();\n\n const response = await fetch(HOST + path, {\n method: \"POST\",\n headers,\n body: JSON.stringify(request),\n });\n\n const payload: {\n url: string;\n } = await response.json();\n\n return {\n status: \"ok\",\n redirectURL: payload.url,\n };\n}\n\nexport function getReferenceIfPossible(): string | undefined {\n if (typeof localStorage == \"undefined\") {\n return undefined;\n }\n const refLink = localStorage.getItem(\"bitsnap-ref\");\n if (refLink == null) {\n return undefined;\n }\n return refLink;\n}\n\nexport function injectReferenceToRequestIfNeeded(\n request: LinkRequest,\n): LinkRequest {\n const ref = getReferenceIfPossible();\n if (ref == null) {\n return request;\n }\n\n if (request.metadata == null) {\n request.metadata = {};\n }\n request.metadata[\"ref\"] = ref;\n return request;\n}\n","import { setAllowedReturnOrigins, setPanelConfig } from \"@/src/panel\";\nimport { create } from \"@bufbuild/protobuf\";\nimport { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\nimport { createContext, useContext, useEffect } from \"react\";\nimport {\n AddressSchema,\n BillingAddressSchema,\n} from \"src/gen/proto/common/v1/address_pb\";\nimport {\n GetPreOrderDetailsRequestSchema,\n OneClickAuthorizePaymentRequest_Gateway,\n PreOrderItemSchema,\n} from \"src/gen/proto/public/v1/public_api_pb\";\nimport { PublicApiClient } from \"src/public.api.client\";\nimport zod from \"zod\";\nimport { HOST, setCustomHost } from \"./constants\";\nimport { sendAnalyticEvent } from \"./frontent.analytics\";\nimport { mapGooglePayConfiguration } from \"./google.pay.mapper\";\nimport { buildURL } from \"./helper.methods\";\nimport { Err, isErr } from \"./lib/err\";\nimport { findMissingProductIDs, findProductForCartItem } from \"./cart-items\";\nimport { round } from \"./lib/round.number\";\nimport { LinkRequest } from \"./link.request.schema\";\nimport {\n createPaymentURL,\n getReferenceIfPossible,\n injectReferenceToRequestIfNeeded,\n} from \"./methods\";\nimport { SingleProduct } from \"./product.details.model\";\nimport { useCheckoutStore } from \"./state\";\nimport { getLocale } from \"./locale\";\n\nexport const MARKETING_AGREEMENT_ID = \"__m_a\";\n\ntype CartProduct = {\n productID: string;\n quantity: number;\n metadata?: { [key: string]: string | undefined };\n\n // Those fields are used to send the price and currency to the analytics\n name?: string;\n price?: number;\n currency?: string;\n priceVersion?: string;\n};\n\nexport interface CartMethods {\n checkIfApplePayIsAvailable(): Promise<boolean>;\n getGooglePayConfiguration(args: { items: CartProduct[] }): Promise<\n | {\n isAvailable: true;\n config: google.payments.api.PaymentDataRequest;\n }\n | {\n isAvailable: false;\n }\n >;\n\n addProduct(args: CartProduct): Promise<Err | void>;\n\n getProducts: () => Promise<\n | Err\n | {\n id: string;\n productID: string;\n quantity: number;\n metadata?: { [key: string]: string | undefined };\n details?: SingleProduct;\n }[]\n >;\n\n updateQuantity(args: { id: string; quantity: number }): Promise<Err | void>;\n\n removeProductFromCart: (args: { id: string }) => Promise<Err | void>;\n\n clearCart: () => Promise<Err | void>;\n\n getNumberOfElementsInCart: () => Promise<number>;\n\n setCouponCodeIfPossible: (couponCode?: string) => Promise<Err | void>;\n setDeliveryMethod: (deliveryMethod?: string) => Promise<Err | void>;\n setPostalCode: (postalCode?: string) => Promise<Err | void>;\n setEmail: (email?: string) => Promise<Err | void>;\n setCountry: (country: string) => Promise<Err | void>;\n getCountry: () => Promise<Err | string>;\n getAvailableCountries: () => Promise<Err | { name: string; code: string }[]>;\n\n redirectToNextStep: () => Promise<Err | { url: string }>;\n\n getApplePayPaymentRequest: (args?: {\n expectedItems?: CartProduct[];\n }) => Promise<Err | ApplePayJS.ApplePayPaymentRequest>;\n completeApplePayPayment: (args: {\n token: ApplePayJS.ApplePayPaymentToken;\n shippingContact?: ApplePayJS.ApplePayPaymentContact;\n billingContact?: ApplePayJS.ApplePayPaymentContact;\n }) => Promise<\n | Err\n | {\n isSuccess: boolean;\n redirectURL?: string;\n }\n >;\n completeGooglePayPayment: (args: {\n paymentData: google.payments.api.PaymentData;\n }) => Promise<\n | Err\n | {\n isSuccess: boolean;\n redirectURL?: string;\n }\n >;\n\n justRedirectToPayment: (args: {\n email?: string;\n productID: string;\n name?: string;\n country?: string;\n marketingAgreement?: boolean;\n locale?: string;\n }) => Promise<\n | Err\n | {\n url: string;\n }\n >;\n}\n\nconst CartProviderContext = createContext<CartMethods | undefined>(undefined);\n\nexport var bitsnapProjectID: string | undefined = undefined;\nexport function setProjectID(projectID: string) {\n setPanelConfig({\n projectID,\n });\n bitsnapProjectID = projectID;\n if (typeof window !== \"undefined\") {\n setAllowedReturnOrigins([window.location.origin]);\n }\n}\n\nexport function getProjectID(): string | undefined {\n if (bitsnapProjectID != null) {\n return bitsnapProjectID;\n }\n const me = document.querySelector(\n 'script[data-id][data-name=\"internal-cart\"]',\n );\n const projectID = me?.getAttribute(\"data-id\");\n return projectID ?? undefined;\n}\n\nexport { getLocale, setLocale } from \"./locale\";\n\nfunction getNewHostIfExist(): string | undefined {\n const me = document.querySelector(\n 'script[data-id][data-name=\"internal-cart\"]',\n );\n const customHost = me?.getAttribute(\"data-custom-host\");\n return customHost ?? undefined;\n}\n\nconst CartProvider = ({\n children,\n locale,\n}: {\n children: React.ReactNode;\n locale?: string;\n}) => {\n const queryClient = new QueryClient();\n\n useEffect(() => {\n updateNumberOfProductsInCart();\n }, []);\n\n const projectID = getProjectID();\n if (projectID == null) {\n return <></>;\n }\n\n const checkoutMethods = getCheckoutMethods(projectID, locale);\n\n return (\n <QueryClientProvider client={queryClient}>\n <CartProviderContext.Provider value={checkoutMethods}>\n {children}\n </CartProviderContext.Provider>\n </QueryClientProvider>\n );\n};\n\n// @ts-ignore\nconst getProducts: (\n projectID: string,\n args?: { items?: CheckoutProduct[]; locale?: string },\n) => Promise<\n | Err\n | {\n id: string;\n productID: string;\n quantity: number;\n metadata?: { [key: string]: string | undefined };\n details?: SingleProduct;\n }[]\n> = async (\n projectID: string,\n args?: { items?: CheckoutProduct[]; locale?: string },\n) => {\n let products: CheckoutProduct[] = [];\n\n if (args?.items != null && args.items.length > 0) {\n products = args.items;\n } else {\n products = getCheckout()?.products ?? [];\n }\n\n const productIds = Array.from(\n new Set(products.map((product) => product.productID)),\n );\n\n const params = new URLSearchParams();\n params.set(\"ids\", productIds.join(\",\"));\n params.set(\"locale\", args?.locale ?? getLocale());\n\n const result = await fetch(\n buildURL(projectID, `/products?${params.toString()}`),\n {\n method: \"GET\",\n },\n );\n\n if (result.status != 200) {\n return [];\n }\n\n const payload: {\n success: boolean;\n message?: string | undefined;\n result?: SingleProduct[] | undefined;\n } = await result.json();\n\n // Items the backend does not know (removed product, wrong id) are dropped.\n return products.flatMap((product) => {\n const details = findProductForCartItem(product.productID, payload.result);\n if (details == null) {\n return [];\n }\n return [\n {\n ...product,\n details: resolveProductDetailsFromSingleProduct(\n product.productID,\n details,\n ),\n },\n ];\n });\n};\n\nexport const useCartProvider = () => {\n const context = useContext(CartProviderContext);\n\n if (context === undefined) {\n throw new Error(\"useCartProvider must be used within a CartProvider\");\n }\n\n return context;\n};\n\nexport default CartProvider;\n\nconst googlePayConfigSchema = zod.object({\n isAvailable: zod.boolean(),\n merchantId: zod.string(),\n merchantName: zod.string(),\n gateway: zod.string(),\n gatewayId: zod.string(),\n});\nconst checkoutProduct = zod.object({\n id: zod.string(),\n productID: zod.string(),\n quantity: zod.number(),\n priceVersion: zod.string().optional(),\n metadata: zod.record(zod.string(), zod.string().optional()).optional(),\n});\ntype CheckoutProduct = zod.infer<typeof checkoutProduct>;\nconst checkoutSchema = zod.object({\n country: zod.string().optional(),\n couponCode: zod.string().optional(),\n selectedDeliveryMethod: zod.string().optional(),\n postalCode: zod.string().optional(),\n email: zod.string().optional(),\n products: zod.array(checkoutProduct).optional(),\n googlePayConfig: googlePayConfigSchema.optional(),\n});\nexport type GooglePayConfig = zod.infer<typeof googlePayConfigSchema>;\nconst emptyCheckout: Checkout = {\n country: undefined,\n couponCode: undefined,\n email: undefined,\n selectedDeliveryMethod: undefined,\n postalCode: undefined,\n products: [],\n googlePayConfig: undefined,\n};\nexport type Checkout = zod.infer<typeof checkoutSchema>;\n\nconst checkoutKey = \"checkout\";\n\nfunction getCheckout(): Checkout {\n try {\n const value = localStorage.getItem(checkoutKey);\n if (value == null) {\n return emptyCheckout;\n }\n return checkoutSchema.parse(JSON.parse(value));\n } catch (e) {\n return emptyCheckout;\n }\n}\n\nasync function addProducts(projectID: string, products: CartProduct[]) {\n const latestProducts = await getProducts(projectID, {\n items: products.map((item, index) => ({ ...item, id: `price-check-${index}` })),\n });\n if (isErr(latestProducts)) return latestProducts;\n const missingIDs = findMissingProductIDs(\n products.map((el) => el.productID),\n latestProducts,\n );\n if (missingIDs.length > 0) {\n return Err(\"item-ids-not-found\", \"notFound\", missingIDs);\n }\n\n const checkout = getCheckout();\n if (checkout.products == null) {\n checkout.products = [];\n }\n checkout.products.push(\n ...products.map((el) => ({\n id: Math.random().toString(36).substring(7),\n productID: el.productID,\n quantity: el.quantity,\n priceVersion: latestProducts.find((product) => product.productID === el.productID)?.details?.pricing?.priceVersion,\n metadata: el.metadata,\n })),\n );\n sendAnalyticEvent({\n event: \"addToCart\",\n currency: \"PLN\",\n items: products.map((el) => ({\n id: el.productID,\n name: el.name ?? \"\",\n price: el.price ?? 0,\n quantity: el.quantity,\n currency: el.currency ?? \"PLN\",\n })),\n });\n saveCheckout(checkout);\n updateNumberOfProductsInCart();\n return undefined;\n}\n\nfunction removeProductFromCheckout(ids: string[]) {\n const checkout = getCheckout();\n const newCheckout = {\n ...checkout,\n products: checkout?.products?.filter(\n (product) =>\n !ids.includes(product.productID) && !ids.includes(product.id),\n ),\n };\n sendAnalyticEvent({\n event: \"removeFromCart\",\n items: ids.map((id) => ({\n id: id,\n name: \"\",\n price: 0,\n quantity: 1,\n currency: \"PLN\",\n })),\n });\n saveCheckout(newCheckout);\n updateNumberOfProductsInCart();\n}\n\nfunction saveCheckout(model: Checkout) {\n localStorage.setItem(checkoutKey, JSON.stringify(model));\n}\n\nexport const getCheckoutMethods: (\n projectID: string,\n locale?: string,\n) => CartMethods = (projectID, locale = getLocale()) => {\n const newHost = getNewHostIfExist();\n if (newHost != null) {\n setCustomHost(newHost);\n }\n return {\n async checkIfApplePayIsAvailable(): Promise<boolean> {\n if (typeof window == \"undefined\" || typeof document == \"undefined\") {\n return false;\n }\n if (\"ApplePaySession\" in window === false) {\n return false;\n }\n\n try {\n const result = await PublicApiClient.get(\n HOST,\n ).isOneClickPaymentAvailable({\n projectId: projectID,\n });\n\n return result.applePay;\n } catch (e) {\n console.error(\"Error checking if Apple Pay is available\", e);\n return false;\n }\n },\n async getGooglePayConfiguration(args: { items: CartProduct[] }): Promise<\n | {\n isAvailable: true;\n config: google.payments.api.PaymentDataRequest;\n }\n | {\n isAvailable: false;\n }\n > {\n if (typeof window == \"undefined\" || typeof document == \"undefined\") {\n return {\n isAvailable: false,\n };\n }\n\n try {\n const googlePayConfig = await resolveGooglePayConfiguration(projectID);\n if (googlePayConfig?.isAvailable != true) {\n return {\n isAvailable: false,\n };\n }\n\n const checkout = getCheckout();\n if (checkout == null) {\n console.log(\"checkout is null\");\n return {\n isAvailable: false,\n };\n }\n\n const products = await getProducts(projectID, {\n locale,\n items: args.items.map((el) => {\n return {\n id: Math.random().toString(36).substring(7),\n quantity: el.quantity,\n metadata: el.metadata,\n productID: el.productID,\n };\n }),\n });\n\n if (isErr(products)) {\n return {\n isAvailable: false,\n };\n }\n const result = await PublicApiClient.get(HOST).getPreOrderDetails({\n items: products.map((el) =>\n create(PreOrderItemSchema, {\n id: el.productID,\n quantity: el.quantity,\n }),\n ),\n projectId: projectID,\n // we can detect 5 the closest inpost pickup point based on shipping address.\n postCode: checkout.postalCode,\n couponCode: checkout.couponCode,\n countryCode: checkout.country,\n selectedDeliveryMethod: checkout.selectedDeliveryMethod,\n });\n if (result.totalAmount == null) {\n return {\n isAvailable: false,\n };\n }\n const cartRequiresShipping =\n products.find((el) => el.details?.isDeliverable == true) != null;\n\n const mappedPaymentRequest = await mapGooglePayConfiguration({\n items: products,\n googlePayConfig: googlePayConfig,\n checkout: checkout,\n cartRequiresShipping: cartRequiresShipping,\n result: result,\n });\n if (mappedPaymentRequest == null) {\n return {\n isAvailable: false,\n };\n }\n\n return {\n isAvailable: true,\n config: mappedPaymentRequest,\n };\n } catch (e) {\n console.error(\"Error resolving Google Pay configuration\", e);\n return {\n isAvailable: false,\n };\n }\n },\n async clearCart(): Promise<Err | void> {\n const empty = structuredClone(emptyCheckout);\n empty.country = getCheckout()?.country;\n saveCheckout(empty);\n updateNumberOfProductsInCart();\n },\n\n async getAvailableCountries(): Promise<\n Err | { name: string; code: string }[]\n > {\n const result = await fetch(buildURL(projectID, \"/countries\"), {\n method: \"GET\",\n });\n\n if (result.status != 200) {\n return [];\n }\n\n try {\n return zod\n .array(\n zod.object({\n name: zod.string(),\n code: zod.string(),\n }),\n )\n .parse(await result.json());\n } catch (e) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n return Err(e.toString(), \"internal\");\n }\n },\n\n async getCountry(): Promise<Err | string> {\n let country = getCheckout()?.country;\n if (country == null) {\n country = \"PL\";\n const checkout = getCheckout();\n checkout.country = country;\n saveCheckout(checkout);\n }\n\n return country;\n },\n\n async getNumberOfElementsInCart(): Promise<number> {\n return (\n getCheckout()?.products?.reduce(\n (acc, product) => acc + product.quantity,\n 0,\n ) ?? 0\n );\n },\n\n async getProducts(): Promise<\n | Err\n | {\n id: string;\n productID: string;\n quantity: number;\n metadata?: {\n [p: string]: string | undefined;\n };\n details?: SingleProduct;\n }[]\n > {\n return await getProducts(projectID, { locale });\n },\n\n async removeProductFromCart(args: { id: string }): Promise<Err | void> {\n return removeProductFromCheckout([args.id]);\n },\n\n async setCountry(country: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.country = country;\n saveCheckout(checkout);\n },\n\n async setCouponCodeIfPossible(couponCode?: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.couponCode = couponCode;\n saveCheckout(checkout);\n },\n\n async setPostalCode(postalCode?: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.postalCode = postalCode;\n saveCheckout(checkout);\n },\n\n async setDeliveryMethod(deliveryMethod?: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.selectedDeliveryMethod = deliveryMethod;\n saveCheckout(checkout);\n },\n\n async setEmail(email?: string): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.email = email;\n saveCheckout(checkout);\n },\n\n async addProduct(args: CartProduct): Promise<Err | void> {\n return await addProducts(projectID, [args]);\n },\n\n async updateQuantity(args: {\n id: string;\n quantity: number;\n }): Promise<Err | void> {\n const checkout = getCheckout();\n checkout.products = checkout.products?.map((product) => {\n if (product.id === args.id) {\n product.quantity = args.quantity;\n }\n return product;\n });\n saveCheckout(checkout);\n updateNumberOfProductsInCart();\n },\n\n async redirectToNextStep(): Promise<Err | { url: string }> {\n const checkout = getCheckout();\n\n if (checkout.products == null || checkout.products.length == 0) {\n return Err(\"cart-is-empty\", \"badInput\");\n }\n const mergedMetadata = checkout.products.reduce(\n (acc, product) => {\n if (product.metadata != null) {\n Object.keys(product.metadata).forEach((key) => {\n const value = product.metadata?.[key];\n if (value != null) {\n acc[key] = value;\n }\n });\n }\n return acc;\n },\n {} as Record<string, string>,\n );\n\n const payload: LinkRequest = {\n items: checkout.products.map((el) => {\n return {\n id: el.productID,\n quantity: el.quantity,\n priceVersion: el.priceVersion,\n };\n }),\n askForNote: true,\n countries: checkout.country ? [checkout.country] : undefined,\n metadata: mergedMetadata,\n locale,\n };\n\n const paymentResponse = await createPaymentURL(payload);\n\n if (isErr(paymentResponse)) {\n console.warn(\"cannot create payment URL\", paymentResponse.error);\n return paymentResponse;\n }\n\n return {\n url: paymentResponse.url,\n };\n },\n\n async justRedirectToPayment(args: {\n email?: string;\n productID: string;\n name?: string;\n country?: string;\n marketingAgreement?: boolean;\n locale?: string;\n }): Promise<Err | { url: string }> {\n let payload: LinkRequest = {\n items: [\n {\n id: args.productID,\n quantity: 1,\n },\n ],\n askForNote: false,\n details:\n args.email || args.name\n ? {\n name: args.name,\n email: args.email,\n }\n : undefined,\n locale: args.locale ?? locale,\n };\n\n payload = injectReferenceToRequestIfNeeded(payload);\n\n if (args.country == null) {\n args.country = \"pl\";\n }\n\n if (payload.details == null) {\n payload.details = {};\n }\n if (payload.details.address == null) {\n payload.details.address = {};\n }\n payload.details.address.country = args.country;\n\n if (args.marketingAgreement === true) {\n payload.additionalAgreements = [\n {\n id: MARKETING_AGREEMENT_ID,\n name: \"\",\n required: true,\n answer: true,\n },\n ];\n }\n\n const result = await createPaymentURL(payload);\n\n if (isErr(result)) {\n return result;\n } else {\n return {\n url: result.url,\n };\n }\n },\n\n async completeApplePayPayment(args: {\n token: ApplePayJS.ApplePayPaymentToken;\n shippingContact?: ApplePayJS.ApplePayPaymentContact;\n billingContact?: ApplePayJS.ApplePayPaymentContact;\n }): Promise<\n | Err\n | {\n isSuccess: boolean;\n redirectURL?: string;\n }\n > {\n const checkout = getCheckout();\n if (checkout == null) {\n return Err(\"Checkout not found\");\n }\n\n const products = await getProducts(projectID, { locale });\n\n if (isErr(products)) {\n return products;\n }\n\n try {\n let shippingName = args.shippingContact?.givenName;\n if (args.shippingContact?.familyName != null) {\n shippingName += \" \" + args.shippingContact?.familyName;\n } else if (args.billingContact?.familyName != null) {\n shippingName += \" \" + args.billingContact?.familyName;\n }\n\n let metadata: Record<string, string> = {};\n\n const ref = getReferenceIfPossible();\n if (ref != null) {\n metadata[\"ref\"] = ref;\n }\n\n const result = await PublicApiClient.get(HOST).authorizeOneClickPayment(\n {\n gateway: OneClickAuthorizePaymentRequest_Gateway.APPLE_PAY,\n paymentData: JSON.stringify(args.token.paymentData),\n paymentMethod: JSON.stringify(args.token.paymentMethod),\n transactionIdentifier: args.token.transactionIdentifier,\n order: create(GetPreOrderDetailsRequestSchema, {\n items: products.map((el) => ({\n id: el.productID,\n quantity: el.quantity,\n })),\n couponCode: checkout.couponCode,\n email:\n args.shippingContact?.emailAddress ??\n args.billingContact?.emailAddress ??\n checkout.email ??\n undefined,\n phone:\n args.shippingContact?.phoneNumber ??\n args.billingContact?.phoneNumber ??\n undefined,\n selectedDeliveryMethod: checkout.selectedDeliveryMethod,\n postCode: checkout.postalCode,\n projectId: projectID,\n }),\n shippingAddress: create(AddressSchema, {\n line1: args.shippingContact?.addressLines?.[0] ?? \"\",\n city: args.shippingContact?.locality ?? \"\",\n country: args.shippingContact?.countryCode ?? \"\",\n zipCode: args.shippingContact?.postalCode ?? \"\",\n name: shippingName,\n }),\n billingAddress: create(BillingAddressSchema, {\n name:\n args.billingContact?.givenName ??\n \"\" + \" \" + (args.billingContact?.familyName ?? \"\"),\n line1: args.billingContact?.addressLines?.[0] ?? \"\",\n city: args.billingContact?.locality ?? \"\",\n country: args.billingContact?.countryCode ?? \"\",\n zipCode: args.billingContact?.postalCode ?? \"\",\n }),\n metadata:\n Object.keys(metadata).length > 0\n ? JSON.stringify(metadata)\n : undefined,\n },\n );\n\n return {\n isSuccess: result.isSuccess,\n redirectURL: result.redirectUrl,\n };\n } catch (error) {\n console.error(error);\n return Err(\"Failed to authorize payment\");\n }\n },\n\n async completeGooglePayPayment(args: {\n paymentData: google.payments.api.PaymentData;\n }): Promise<\n | Err\n | {\n isSuccess: boolean;\n redirectURL?: string;\n }\n > {\n const checkout = getCheckout();\n if (checkout == null) {\n return Err(\"Checkout not found\");\n }\n\n const products = await getProducts(projectID, { locale });\n\n if (isErr(products)) {\n return products;\n }\n\n try {\n let shippingName = args.paymentData.shippingAddress?.name;\n\n let metadata: Record<string, string> = {};\n\n const ref = getReferenceIfPossible();\n if (ref != null) {\n metadata[\"ref\"] = ref;\n }\n\n const result = await PublicApiClient.get(HOST).authorizeOneClickPayment(\n {\n gateway: OneClickAuthorizePaymentRequest_Gateway.GOOGLE_PAY,\n paymentData:\n args.paymentData.paymentMethodData.tokenizationData.token,\n paymentMethod: args.paymentData.paymentMethodData.type,\n transactionIdentifier: \"\",\n order: create(GetPreOrderDetailsRequestSchema, {\n items: products.map((el) => ({\n id: el.productID,\n quantity: el.quantity,\n })),\n couponCode: checkout.couponCode,\n email: args.paymentData.email ?? undefined,\n phone: args.paymentData.shippingAddress?.phoneNumber ?? undefined,\n selectedDeliveryMethod:\n args.paymentData.shippingOptionData?.id ??\n checkout.selectedDeliveryMethod,\n postCode: args.paymentData.shippingAddress?.postalCode,\n projectId: projectID,\n }),\n shippingAddress: create(AddressSchema, {\n line1: args.paymentData.shippingAddress?.address1 ?? \"\",\n city: args.paymentData.shippingAddress?.locality ?? \"\",\n country: args.paymentData.shippingAddress?.countryCode ?? \"\",\n zipCode: args.paymentData.shippingAddress?.postalCode ?? \"\",\n name: shippingName,\n }),\n billingAddress: create(BillingAddressSchema, {\n name: args.paymentData.paymentMethodData.info?.billingAddress\n ?.name,\n line1:\n args.paymentData.paymentMethodData.info?.billingAddress\n ?.address1 ?? \"\",\n city:\n args.paymentData.paymentMethodData.info?.billingAddress\n ?.locality ?? \"\",\n country:\n args.paymentData.paymentMethodData.info?.billingAddress\n ?.countryCode ?? \"\",\n zipCode:\n args.paymentData.paymentMethodData.info?.billingAddress\n ?.postalCode ?? \"\",\n }),\n metadata:\n Object.keys(metadata).length > 0\n ? JSON.stringify(metadata)\n : undefined,\n },\n );\n\n return {\n isSuccess: result.isSuccess,\n redirectURL: result.redirectUrl,\n };\n } catch (error) {\n console.error(error);\n return Err(\"Failed to authorize payment\");\n }\n\n return {\n isSuccess: true,\n };\n },\n\n async getApplePayPaymentRequest(args?: {\n expectedItems?: CartProduct[];\n }): Promise<Err | ApplePayJS.ApplePayPaymentRequest> {\n const checkout = getCheckout();\n if (checkout == null) {\n return Err(\"Checkout not found\");\n }\n if (args && args.expectedItems != null && args.expectedItems.length > 0) {\n if (checkout.products) {\n removeProductFromCheckout(\n checkout.products.map((el) => el.productID),\n );\n }\n await addProducts(projectID, args.expectedItems);\n }\n\n const products = await getProducts(projectID, { locale });\n\n if (isErr(products)) {\n return products;\n }\n\n const result = await PublicApiClient.get(HOST).getPreOrderDetails({\n items: products.map((el) =>\n create(PreOrderItemSchema, {\n id: el.productID,\n quantity: el.quantity,\n }),\n ),\n projectId: projectID,\n // we can detect 5 the closest inpost pickup point based on shipping address.\n postCode: checkout.postalCode,\n couponCode: checkout.couponCode,\n countryCode: checkout.country,\n selectedDeliveryMethod: checkout.selectedDeliveryMethod,\n });\n\n const items = products.map((el) => {\n return {\n amount: `${round((el.quantity * (el.details?.price ?? 0)) / 100, 2)}`,\n label: el.details?.name + \" - \" + el.quantity,\n type: \"final\" as ApplePayJS.ApplePayLineItemType,\n };\n });\n\n if (result.selectedDeliveryMethod != null) {\n const deliveryMethod = result.methods.find(\n (el) => el.id == result.selectedDeliveryMethod,\n );\n if (deliveryMethod != null) {\n items.push({\n amount: `${round(deliveryMethod.amount / 100, 2)}`,\n label: deliveryMethod.name,\n type: \"final\" as ApplePayJS.ApplePayLineItemType,\n });\n }\n }\n\n if (result.couponCode != null && result.couponValue != null) {\n items.push({\n amount: `-${round(result.couponValue / 100, 2)}`,\n label: result.couponCode,\n type: \"final\" as ApplePayJS.ApplePayLineItemType,\n });\n }\n\n return {\n countryCode: checkout.country ?? \"PL\",\n merchantCapabilities: [\n \"supports3DS\",\n \"supportsCredit\",\n \"supportsDebit\",\n ],\n supportedNetworks: [\"visa\", \"masterCard\"],\n total: {\n amount: `${round((result.totalAmount ?? 0) / 100, 2)}`,\n label: \"Płatność za koszyk\",\n type: \"final\",\n },\n shippingMethods: result.methods.map((el) => ({\n amount: `${round(el.amount / 100, 2)}`,\n detail: el.description ?? \"\",\n identifier: el.id,\n label: el.name,\n dateComponentsRange: {\n startDateComponents: {\n days: el.minDays ?? 1,\n hours: 0,\n months: 0,\n years: 0,\n } satisfies ApplePayJS.ApplePayDateComponents,\n endDateComponents: {\n days: el.maxDays ?? 14,\n hours: 0,\n months: 0,\n years: 0,\n } satisfies ApplePayJS.ApplePayDateComponents,\n },\n })),\n lineItems: items,\n currencyCode: \"PLN\",\n };\n },\n };\n};\n\nasync function resolveGooglePayConfiguration(projectID: string) {\n const checkout = getCheckout();\n if (checkout.googlePayConfig?.isAvailable != true) {\n const result = await PublicApiClient.get(HOST).isOneClickPaymentAvailable({\n projectId: projectID,\n });\n if (result.googlePay == true && result.googlePayConfig != null) {\n checkout.googlePayConfig = {\n isAvailable: true,\n gateway: result.googlePayConfig.gateway,\n gatewayId: result.googlePayConfig.gatewayMerchantId,\n merchantName: result.googlePayConfig.merchantName,\n merchantId: result.googlePayConfig.merchantId,\n };\n } else {\n checkout.googlePayConfig = {\n isAvailable: false,\n gateway: \"\",\n gatewayId: \"\",\n merchantName: \"\",\n merchantId: \"\",\n };\n }\n }\n saveCheckout(checkout);\n return checkout.googlePayConfig;\n}\n\nfunction resolveProductDetailsFromSingleProduct(\n id: string,\n product: SingleProduct,\n) {\n if (id == product.id) {\n const variantIndex = product.variants?.findIndex((v) => v.id === id);\n if (variantIndex != null && variantIndex != -1) {\n const variant = product.variants![variantIndex];\n return {\n ...product,\n availableQuantity: variant.availableQuantity,\n isDeliverable: variant.isDeliverable,\n images: variant.images ?? product.images,\n name: product.name + \" \" + variant.name,\n price: variant.price,\n currency: variant.currency,\n pricing: variant.pricing,\n };\n }\n return product;\n }\n\n const variant = product.variants?.find((v) => v.id === id);\n if (variant == null) {\n return product;\n }\n\n return {\n ...product,\n id: variant.id,\n name: product.name + \" \" + variant.name,\n price: variant.price,\n currency: variant.currency,\n pricing: variant.pricing,\n metadata: product.metadata,\n availableQuantity: variant.availableQuantity,\n isDeliverable: variant.isDeliverable,\n images: variant.images ?? product.images,\n };\n}\n\ntype ApplePaySessionArgs = {\n postCode?: string;\n email?: string;\n couponCode?: string;\n};\n\nfunction updateNumberOfProductsInCart() {\n const checkout = getCheckout();\n let numberOfProductsInCart = 0;\n if (checkout == null) {\n useCheckoutStore.setState((state) => ({\n ...state,\n numberOfProductsInCart,\n }));\n return;\n }\n numberOfProductsInCart =\n checkout.products?.reduce((acc, product) => acc + product.quantity, 0) ?? 0;\n useCheckoutStore.setState((state) => ({ ...state, numberOfProductsInCart }));\n}\n","import \"./global.css\";\nimport \"./components/checkout/checkout.css\";\nimport \"./components/returns/returns.css\";\nimport \"./components/products/products.css\";\n\nexport * from \"./components\";\n","import ApplePayButton from \"apple-pay-button\";\nimport { PublicApiClient } from \"src/public.api.client\";\nimport CartProvider, { getProjectID, useCartProvider } from \"./CartProvider\";\nimport { HOST } from \"./constants\";\nimport { isErr } from \"./lib/err\";\nimport { round } from \"./lib/round.number\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport { sendAnalyticEvent } from \"./frontent.analytics\";\n\ntype AppleButtonType =\n | \"plain\"\n | \"add-money\"\n | \"book\"\n | \"buy\"\n | \"check-out\"\n | \"continue\"\n | \"contribute\"\n | \"donate\"\n | \"order\"\n | \"pay\"\n | \"reload\"\n | \"rent\"\n | \"set-up\"\n | \"subscribe\"\n | \"support\"\n | \"tip\"\n | \"top-up\";\ntype ColorType = \"black\" | \"white\" | \"white-outline\";\n\nexport type Props = {\n style?: {\n width?: string;\n height?: string;\n borderRadius?: string;\n padding?: string;\n boxSizing?: string;\n };\n buttonType?: AppleButtonType;\n colorType?: ColorType;\n items: {\n name: string;\n id: string;\n price: number;\n quantity: number;\n isDeliverable?: boolean;\n metadata?: { [key: string]: string | undefined };\n }[];\n onClick?: () => Promise<void>;\n};\n\nfunction ApplePayButtonComponent({\n style,\n buttonType,\n colorType,\n items,\n onClick,\n}: Props) {\n const {\n checkIfApplePayIsAvailable,\n getApplePayPaymentRequest,\n completeApplePayPayment,\n setCountry,\n setCouponCodeIfPossible,\n setDeliveryMethod,\n setEmail,\n setPostalCode,\n clearCart,\n } = useCartProvider();\n const { data: isApplePayAvailable } = useQuery({\n queryKey: [\"is-apple-pay-available\"],\n queryFn: checkIfApplePayIsAvailable,\n });\n if (isApplePayAvailable != true) {\n return null;\n }\n\n const expectedItems = items.map((el) => ({\n productID: el.id,\n quantity: el.quantity,\n metadata: el.metadata,\n }));\n\n async function beginSession() {\n sendAnalyticEvent({\n event: \"initiateCheckout\",\n items: items.map((el) => ({\n id: el.id,\n name: el.name,\n price: el.price,\n quantity: el.quantity,\n currency: \"PLN\",\n })),\n });\n const requiresShipping =\n items.find((el) => el.isDeliverable === true) != null;\n const session = new ApplePaySession(14, {\n countryCode: \"PL\",\n merchantCapabilities: [\"supports3DS\"],\n supportedNetworks: [\"visa\", \"masterCard\"],\n currencyCode: \"PLN\",\n total: {\n amount: `${round(\n items.reduce((acc, item) => acc + item.price * item.quantity, 0) /\n 100,\n 2\n )}`,\n label: \"Płatność za koszyk\",\n type: \"pending\",\n },\n lineItems: [\n ...items.map(\n (item) =>\n ({\n amount: `${round((item.price * item.quantity) / 100, 2)}`,\n label: item.name,\n type: \"final\",\n } as ApplePayJS.ApplePayLineItem)\n ),\n requiresShipping\n ? ({\n amount: `16.99`,\n type: \"pending\",\n label: \"Dostawa\",\n } as ApplePayJS.ApplePayLineItem)\n : undefined,\n ].filter((el) => el != null),\n ...(requiresShipping\n ? {\n shippingMethods: [],\n supportsCouponCode: true,\n requiredBillingContactFields: [\n \"name\",\n \"email\",\n \"postalAddress\",\n \"phone\",\n ],\n requiredShippingContactFields: [\n \"name\",\n \"email\",\n \"postalAddress\",\n \"phone\",\n ],\n }\n : {}),\n });\n await onClick?.();\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n if (isErr(apRequest)) {\n console.error(\"Error creating ApplePaySession:\", apRequest.error);\n return;\n }\n\n session.oncancel = (event) => {\n console.log(\"ApplePaySession cancelled\", event);\n };\n\n session.onvalidatemerchant = async (event) => {\n try {\n const result = await PublicApiClient.get(HOST).applePayValidateMerchant(\n {\n validationUrl: event.validationURL,\n projectId: getProjectID(),\n }\n );\n console.log(\"merchantSession\", result.merchantSession);\n if (result.merchantSession.length > 0) {\n console.log(\"completing merchant session\");\n session.completeMerchantValidation(\n JSON.parse(result.merchantSession)\n );\n } else {\n session.abort();\n }\n } catch (error) {\n session.abort;\n }\n };\n\n session.onshippingmethodselected = async (event) => {\n console.log(\"shipping method selected\", event);\n await setDeliveryMethod(event.shippingMethod.identifier);\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n console.log(\"apRequest\", apRequest);\n if (isErr(apRequest)) {\n session.abort();\n throw new Error(\"Failed to get Apple Pay payment request\");\n }\n\n session.completeShippingMethodSelection({\n newTotal: apRequest.total,\n newLineItems: apRequest.lineItems,\n newShippingMethods: apRequest.shippingMethods,\n });\n };\n session.onshippingcontactselected = async (event) => {\n try {\n if (event.shippingContact.countryCode != null) {\n await setCountry(event.shippingContact.countryCode);\n }\n if (event.shippingContact.postalCode != null) {\n await setPostalCode(event.shippingContact.postalCode);\n }\n if (event.shippingContact.phoneNumber != null) {\n await setEmail(event.shippingContact.emailAddress);\n }\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n if (isErr(apRequest)) {\n session.abort();\n throw new Error(\"Failed to get Apple Pay payment request\");\n }\n\n console.log(\"apRequest\", apRequest);\n session.completeShippingContactSelection({\n newLineItems: apRequest.lineItems,\n newTotal: apRequest.total,\n newShippingMethods: apRequest.shippingMethods,\n });\n } catch (error) {\n console.log(\"shipping contact selected error\", error);\n session.abort();\n }\n };\n\n session.oncouponcodechanged = async (event) => {\n try {\n console.log(\"coupon code changed\", event);\n const result = await setCouponCodeIfPossible(event.couponCode);\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n console.log(\"apRequest\", apRequest);\n if (isErr(apRequest)) {\n session.abort();\n throw new Error(\"Failed to get Apple Pay payment request\");\n }\n\n session.completeCouponCodeChange({\n errors: isErr(result)\n ? [new ApplePayError(\"couponCodeInvalid\")]\n : undefined,\n newTotal: apRequest.total,\n newLineItems: apRequest.lineItems,\n newShippingMethods: apRequest.shippingMethods,\n });\n } catch (error) {\n console.log(\"coupon code changed error\", error);\n session.abort();\n }\n };\n\n session.onpaymentauthorized = async (event) => {\n try {\n const result = await completeApplePayPayment({\n token: event.payment.token,\n billingContact: event.payment.billingContact,\n shippingContact: event.payment.shippingContact,\n });\n if (isErr(result)) {\n console.log(\"apple pay error\", result);\n session.completePayment({\n status: ApplePaySession.STATUS_FAILURE,\n });\n return;\n }\n\n if (result.redirectURL) {\n setTimeout(() => {\n open(result.redirectURL, \"_self\");\n }, 2000);\n }\n session.completePayment({\n status: result.isSuccess\n ? ApplePaySession.STATUS_SUCCESS\n : ApplePaySession.STATUS_FAILURE,\n });\n\n result.isSuccess && clearCart();\n } catch (e) {\n session.completePayment({\n status: ApplePaySession.STATUS_FAILURE,\n });\n }\n // event.complete(ApplePaySession.STATUS_SUCCESS);\n };\n\n session.begin();\n }\n\n return (\n <ApplePayButton\n style={style}\n buttonStyle={colorType}\n type={buttonType}\n onClick={beginSession}\n />\n );\n}\n\nfunction Wrapper(props: Props) {\n return (\n <>\n <CartProvider>\n <ApplePayButtonComponent {...props} />\n </CartProvider>\n </>\n );\n}\nexport default Wrapper;\n","import { useEffect } from \"react\";\nimport zod from \"zod\";\nimport type { CheckoutAppearance } from \"./appearance\";\nimport type { CheckoutTexts } from \"./texts\";\nimport CartComponent from \"./CartComponent\";\nimport { getCheckoutMethods, getProjectID, setProjectID } from \"./CartProvider\";\nimport { sendAnalyticEvent } from \"./frontent.analytics\";\nimport { isErr } from \"./lib/err\";\nimport { useCheckoutStore } from \"./state\";\nimport { setLocale } from \"./locale\";\n\nenum CartEvent {\n ADD_TO_CART = \"ADD_TO_CART\",\n}\n\nconst cartAddToCartSchema = zod.object({\n id: zod.string(),\n isSubscription: zod.boolean().default(false),\n quantity: zod.number(),\n metadata: zod.record(zod.string(), zod.string().optional()).optional(),\n});\n\ntype CartAddToCartEvent = zod.infer<typeof cartAddToCartSchema>;\n\nexport type BitsnapCartProps = {\n projectID: string;\n locale?: string;\n children?: React.ReactNode;\n onVisibleChange?: (isVisible: boolean) => void;\n className?: string;\n numberOfProductsInCartOptions?: {\n style?: React.CSSProperties;\n isVisible?: boolean;\n };\n /**\n * Optional checkout appearance. Omitting it (or passing `{}`) keeps the\n * current presentation; every token and element slot is partial.\n */\n appearance?: CheckoutAppearance;\n /**\n * Optional text overrides. Any key given here replaces the built-in string\n * whatever the locale; omitted keys keep the `pl`/`en` defaults.\n */\n texts?: Partial<CheckoutTexts>;\n};\n\nfunction BitsnapCart({\n projectID,\n locale,\n children,\n onVisibleChange,\n className,\n numberOfProductsInCartOptions,\n appearance,\n texts,\n}: BitsnapCartProps) {\n const { isCartVisible, showCart, hideCart, numberOfProductsInCart } =\n useCheckoutStore();\n\n function sentPostMessageToIframe(msg: unknown) {\n const iframes = document.querySelectorAll(\"iframe\");\n\n iframes.forEach((iframe) => {\n iframe.contentWindow?.postMessage(msg, \"*\");\n });\n }\n\n useEffect(() => {\n onVisibleChange?.(isCartVisible);\n if (isCartVisible) {\n sendAnalyticEvent({\n event: \"viewCart\",\n });\n }\n }, [isCartVisible]);\n\n useEffect(() => {\n setProjectID(projectID);\n }, [projectID]);\n\n useEffect(() => {\n setLocale(locale);\n }, [locale]);\n\n useEffect(() => {\n if (!(\"cart\" in window)) {\n const projectID = getProjectID();\n if (projectID == null) {\n console.warn(\"There is no project ID configured.\");\n return;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n window[\"cart\"] = {\n buyProduct: async (args: unknown) => {\n try {\n const payload = zod\n .object({\n productID: zod.string(),\n email: zod.string().optional(),\n name: zod.string().optional(),\n country: zod.string().optional(),\n marketingAgreement: zod.boolean().optional(),\n locale: zod.string().optional(),\n })\n .parse(args);\n const methods = getCheckoutMethods(projectID);\n try {\n const products = await methods.getProducts();\n if (isErr(products) == false) {\n sendAnalyticEvent({\n event: \"initiateCheckout\",\n items: products.map((el) => ({\n id: el.productID,\n name: el.details?.name ?? \"\",\n price: el.details?.price ?? 0,\n quantity: el.quantity,\n currency: el.details?.currency ?? \"PLN\",\n })),\n });\n }\n } catch (e) {}\n\n const result = await methods.justRedirectToPayment(payload);\n\n console.log(\"result\", result);\n if (isErr(result) == false) {\n window.location.href = result.url;\n } else {\n alert(\n \"Nie udało się przekierować do płatności. Spróbuj ponownie później.\",\n );\n }\n } catch (e) {\n console.warn(e);\n }\n },\n };\n }\n }, []);\n\n async function handleAddingToCart(id: string, payload?: unknown) {\n const projectID = getProjectID();\n if (projectID == null) {\n console.warn(\"There is no project ID configured.\");\n return;\n }\n\n try {\n const data = cartAddToCartSchema.parse(payload);\n\n if (data.isSubscription) {\n await handleAddingSubscriptionToCart(projectID, data);\n return;\n }\n\n const methods = getCheckoutMethods(projectID);\n\n await methods.addProduct({\n productID: data.id,\n quantity: data.quantity,\n metadata: data.metadata,\n });\n\n sentPostMessageToIframe({\n id: id,\n type: CartEvent.ADD_TO_CART,\n success: true,\n });\n showCart();\n } catch (e) {\n console.warn(\"cannot add item to cart\", e);\n }\n }\n\n async function handleAddingSubscriptionToCart(\n projectID: string,\n event: CartAddToCartEvent,\n ) {\n alert(\n `TODO, nie jest to jeszcze zrobione ${projectID} ${event.id} ${event.quantity}`,\n );\n }\n\n function setupEventListener() {\n if (\"__cart_is_listening\" in window) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n window[\"__cart_is_listening\"] = true;\n window.addEventListener(\"message\", (event) => {\n if (\n typeof event.data[\"id\"] != \"undefined\" &&\n typeof event.data[\"type\"] != \"undefined\"\n ) {\n const { id, type } = event.data;\n switch (type) {\n case CartEvent.ADD_TO_CART.toString():\n handleAddingToCart(id, event.data[\"payload\"]).then().catch();\n break;\n default:\n break;\n }\n }\n });\n }\n\n useEffect(() => {\n setupEventListener();\n\n if (typeof window !== \"undefined\") {\n try {\n const parsedParams = new URLSearchParams(window.location.search);\n const refLink =\n parsedParams.get(\"ref\") ?? parsedParams.get(\"utm-source\");\n if (\n typeof localStorage != \"undefined\" &&\n refLink &&\n refLink.length > 0\n ) {\n localStorage.setItem(\"bitsnap-ref\", refLink);\n }\n } catch (e) {\n return;\n }\n }\n }, []);\n\n return (\n <>\n <button\n onClick={() => (isCartVisible ? hideCart() : showCart())}\n style={{ position: \"relative\" }}\n className={[\n \"bitsnap-react\",\n className ?? \"rounded-full hover:bg-neutral-300 transition p-1\",\n ].join(\" \")}\n >\n {children ? (\n <>{children}</>\n ) : (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"lucide lucide-shopping-cart\"\n >\n <circle cx=\"8\" cy=\"21\" r=\"1\" />\n <circle cx=\"19\" cy=\"21\" r=\"1\" />\n <path d=\"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12\" />\n </svg>\n )}\n {numberOfProductsInCartOptions?.isVisible != false &&\n numberOfProductsInCart > 0 && (\n <div\n style={{\n position: \"absolute\",\n bottom: -5,\n right: -5,\n background: \"black\",\n color: \"white\",\n borderRadius: \"50%\",\n width: \"22px\",\n height: \"22px\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n fontSize: \"13px\",\n fontWeight: 600,\n boxShadow: \"0 2px 8px rgba(0, 0, 0, 0.25)\",\n ...numberOfProductsInCartOptions?.style,\n }}\n >\n {numberOfProductsInCart}\n </div>\n )}\n </button>\n <CartComponent\n isVisible={isCartVisible}\n locale={locale}\n appearance={appearance}\n texts={texts}\n shouldHide={() => {\n hideCart();\n }}\n />\n </>\n );\n}\n\nexport default BitsnapCart;\n","import { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport { createPortal } from \"react-dom\";\nimport { cn } from \"@/src/lib/utils\";\nimport {\n CheckoutAppearanceProvider,\n useCheckoutAppearance,\n useCheckoutSlot,\n} from \"./appearance.context\";\nimport type { CheckoutAppearance } from \"./appearance\";\nimport CartComponentContent from \"./CartComponentContent\";\nimport CartProvider from \"./CartProvider\";\nimport { CheckoutTextsProvider, useCheckoutText } from \"./texts.context\";\nimport type { CheckoutTexts } from \"./texts\";\n\ninterface Props {\n isVisible: boolean;\n shouldHide: () => void;\n locale?: string;\n appearance?: CheckoutAppearance;\n texts?: Partial<CheckoutTexts>;\n}\n\nfunction CartComponent({ isVisible, shouldHide, locale }: Props) {\n const [parent] = useAutoAnimate(/* optional config */);\n const { boundaryClassName, boundaryStyle } = useCheckoutAppearance();\n const root = useCheckoutSlot(\"root\");\n const overlay = useCheckoutSlot(\"overlay\");\n const panel = useCheckoutSlot(\"panel\");\n const header = useCheckoutSlot(\"header\");\n const title = useCheckoutSlot(\"title\");\n const closeButton = useCheckoutSlot(\"closeButton\");\n const cartText = useCheckoutText(\"cart\");\n\n return (\n <div\n ref={parent}\n data-bitsnap-checkout=\"root\"\n data-bitsnap-checkout-slot=\"root\"\n className={cn(\"bitsnap-react\", boundaryClassName, root.className)}\n style={{ zIndex: 999999, ...boundaryStyle, ...root.style }}\n >\n {isVisible && (\n <>\n <div\n data-bitsnap-checkout-slot=\"overlay\"\n className={cn(\n \"fixed top-0 right-0 left-0 bottom-0 cursor-pointer z-10\",\n overlay.className,\n )}\n style={overlay.style}\n onClick={shouldHide}\n ></div>\n <div\n data-bitsnap-checkout-slot=\"panel\"\n className={cn(\n \"fixed z-20 top-0 right-0 bottom-0 w-full md:w-[350px] xl:w-[420px] flex flex-col\",\n panel.className,\n )}\n style={panel.style}\n >\n <div\n data-bitsnap-checkout-slot=\"header\"\n className={cn(\n \"mx-3 mt-7 flex justify-between items-center\",\n header.className,\n )}\n style={header.style}\n >\n <h1\n data-bitsnap-checkout-slot=\"title\"\n className={cn(\"text-2xl font-medium\", title.className)}\n style={title.style}\n >\n {cartText}\n </h1>\n <button\n data-bitsnap-checkout-slot=\"closeButton\"\n className={cn(\n \"rounded-xl p-2 transition\",\n closeButton.className,\n )}\n style={closeButton.style}\n onClick={shouldHide}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"lucide lucide-x\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </div>\n\n <CartComponentContent className={\"grow\"} locale={locale} />\n </div>\n </>\n )}\n </div>\n );\n}\n\nconst WrapperCartComponent = (props: Props) => {\n if (typeof window === \"undefined\") {\n return null;\n }\n\n return createPortal(\n <CheckoutAppearanceProvider appearance={props.appearance}>\n <CheckoutTextsProvider texts={props.texts} locale={props.locale}>\n <CartProvider locale={props.locale}>\n <CartComponent {...props} />\n </CartProvider>\n </CheckoutTextsProvider>\n </CheckoutAppearanceProvider>,\n document.body,\n );\n};\n\nexport default WrapperCartComponent;\n","import { createContext, useContext, useMemo } from \"react\";\nimport type { ReactNode } from \"react\";\nimport {\n getCheckoutSlotAppearance,\n resolveCheckoutAppearance,\n type CheckoutAppearance,\n type CheckoutSlotAppearance,\n type CheckoutSlotName,\n type ResolvedCheckoutAppearance,\n} from \"./appearance\";\n\nconst CheckoutAppearanceContext = createContext<ResolvedCheckoutAppearance>(\n resolveCheckoutAppearance(),\n);\n\n/**\n * Checkout scoped appearance provider. It only wraps the checkout drawer, so\n * the configuration never leaks into the panel, the notifications or any\n * global state.\n */\nexport function CheckoutAppearanceProvider({\n appearance,\n children,\n}: {\n appearance?: CheckoutAppearance;\n children: ReactNode;\n}) {\n const resolved = useMemo(\n () => resolveCheckoutAppearance(appearance),\n [appearance],\n );\n\n return (\n <CheckoutAppearanceContext.Provider value={resolved}>\n {children}\n </CheckoutAppearanceContext.Provider>\n );\n}\n\nexport function useCheckoutAppearance(): ResolvedCheckoutAppearance {\n return useContext(CheckoutAppearanceContext);\n}\n\n/**\n * Returns the caller overrides for a slot. The values are meant to be merged\n * with the built-in presentation:\n *\n * ```tsx\n * const slot = useCheckoutSlot(\"title\");\n *\n * return <h1 className={cn(\"text-2xl font-medium\", slot.className)} style={slot.style} />;\n * ```\n */\nexport function useCheckoutSlot(\n slot: CheckoutSlotName,\n): CheckoutSlotAppearance {\n const resolved = useCheckoutAppearance();\n\n return getCheckoutSlotAppearance(resolved, slot) ?? {};\n}\n","import type { CSSProperties } from \"react\";\nimport {\n getSlotAppearance,\n resolveAppearanceCore,\n type AppearanceElements,\n type ShadcnVariableMapping,\n type SlotAppearance,\n} from \"@/src/lib/appearance-core\";\n\n/**\n * Checkout appearance API.\n *\n * `CheckoutAppearance` is resolved once per render into plain data: a theme\n * name, the tokens that are actually in effect, the per-slot overrides and the\n * inline style that both theme boundaries (the drawer root and the portalled\n * country dropdown) have to receive. Everything here is pure so it can be\n * tested without a DOM.\n *\n * Backward compatibility: the resolver never invents values. A token is only\n * present in the resolved output when the caller provided it or when the\n * caller explicitly selected a theme preset, so every unset token keeps falling\n * back to the value the checkout renders today (see `checkout.css`).\n */\n\nexport type CheckoutTheme = \"dark\" | \"light\";\n\nexport type CheckoutAppearanceTokens = {\n /** Checkout wide font family. The library never loads fonts. */\n fontFamily?: string;\n /** Base font size of the checkout. */\n fontSize?: string;\n /** Panel background. */\n background?: string;\n /** Raised surfaces: country dropdown, search bar, loading skeletons. */\n surface?: string;\n /** Main text color. */\n foreground?: string;\n /** Secondary text: empty cart, delivery info, country label, search input. */\n mutedForeground?: string;\n /** Borders: country trigger, dropdown, product separators. */\n border?: string;\n /** Checkout button background. */\n buttonBackground?: string;\n /** Checkout button text. */\n buttonForeground?: string;\n /** Checkout button background on hover. */\n buttonHoverBackground?: string;\n /** Hover and selected surfaces: close button, country options. */\n hoverSurface?: string;\n /** Focus ring color. Also applied to shared UI primitives through `--ring`. */\n focusRing?: string;\n /** Error and unavailable state color. */\n error?: string;\n /** Drawer backdrop color. */\n overlay?: string;\n /** Corner radius, applied through `--radius`. */\n radius?: string;\n};\n\n/**\n * Stable slot names. They are exposed as `data-bitsnap-checkout-slot`\n * attributes so they can also be targeted from plain CSS.\n */\nexport const CHECKOUT_SLOT_NAMES = [\n \"root\",\n \"overlay\",\n \"panel\",\n \"header\",\n \"title\",\n \"closeButton\",\n \"productList\",\n \"product\",\n \"productImage\",\n \"productName\",\n \"productPrice\",\n \"quantityControl\",\n \"quantityInput\",\n \"quantityButton\",\n \"removeButton\",\n \"summary\",\n \"totalLabel\",\n \"totalValue\",\n \"deliveryText\",\n \"countryLabel\",\n \"countryTrigger\",\n \"countryDropdown\",\n \"countrySearch\",\n \"countryOption\",\n \"paymentButtons\",\n \"checkoutButton\",\n \"emptyState\",\n \"error\",\n \"skeleton\",\n] as const;\n\nexport type CheckoutSlotName = (typeof CHECKOUT_SLOT_NAMES)[number];\n\nexport type CheckoutSlotAppearance = SlotAppearance;\n\nexport type CheckoutAppearanceElements = AppearanceElements<CheckoutSlotName>;\n\nexport type CheckoutAppearance = {\n /**\n * `\"dark\"` keeps the current presentation, `\"light\"` applies the light preset.\n * Omitted means `\"dark\"`.\n */\n theme?: CheckoutTheme;\n /** Partial overrides. Anything omitted keeps today's value. */\n tokens?: CheckoutAppearanceTokens;\n /** Per element `className`/`style` overrides. */\n elements?: CheckoutAppearanceElements;\n};\n\nexport type ResolvedCheckoutAppearance = {\n theme: CheckoutTheme;\n /**\n * `true` as soon as the caller passed anything through `appearance`. The\n * country dropdown is portalled outside of the checkout root, so it only\n * receives the checkout boundary when the caller opted in - an omitted or\n * empty `appearance` keeps the previous (unthemed) dropdown untouched.\n */\n isCustomized: boolean;\n /** Tokens that are in effect. Empty entries were dropped. */\n tokens: CheckoutAppearanceTokens;\n elements: CheckoutAppearanceElements;\n /** Theme marker class for the theme boundaries. */\n boundaryClassName: string;\n /** Inline custom properties applied to the drawer root. */\n boundaryStyle: CSSProperties;\n /**\n * Extra properties for the portalled country dropdown. The shared select\n * content paints itself with `bg-popover`/`text-popover-foreground`, so those\n * variables have to carry the checkout colors over to the portal. They are\n * resolved eagerly because the dropdown is the only place where the built-in\n * defaults differ from the drawer.\n */\n dropdownStyle: CSSProperties;\n};\n\n/** CSS custom property used for each token. */\nexport const CHECKOUT_TOKEN_VARIABLES = {\n fontFamily: \"--bitsnap-checkout-font-family\",\n fontSize: \"--bitsnap-checkout-font-size\",\n background: \"--bitsnap-checkout-background\",\n surface: \"--bitsnap-checkout-surface\",\n foreground: \"--bitsnap-checkout-foreground\",\n mutedForeground: \"--bitsnap-checkout-muted-foreground\",\n border: \"--bitsnap-checkout-border\",\n buttonBackground: \"--bitsnap-checkout-button-background\",\n buttonForeground: \"--bitsnap-checkout-button-foreground\",\n buttonHoverBackground: \"--bitsnap-checkout-button-hover-background\",\n hoverSurface: \"--bitsnap-checkout-hover-surface\",\n focusRing: \"--bitsnap-checkout-focus-ring\",\n error: \"--bitsnap-checkout-error\",\n overlay: \"--bitsnap-checkout-overlay\",\n radius: \"--bitsnap-checkout-radius\",\n} as const;\n\nexport type CheckoutTokenName = keyof typeof CHECKOUT_TOKEN_VARIABLES;\n\n/**\n * Theme presets are intentionally partial. `\"dark\"` is empty because every\n * default already renders the current dark presentation; `\"light\"` only carries\n * the colors that have to change for a light checkout, so typography is never\n * reset implicitly.\n */\nexport const CHECKOUT_THEME_PRESETS: Record<\n CheckoutTheme,\n CheckoutAppearanceTokens\n> = {\n dark: {},\n light: {\n background: \"#ffffff\",\n surface: \"#f9fafb\",\n foreground: \"#18181b\",\n mutedForeground: \"#71717a\",\n border: \"#e4e4e7\",\n buttonBackground: \"#18181b\",\n buttonForeground: \"#fafafa\",\n buttonHoverBackground: \"#000000\",\n hoverSurface: \"#e4e4e7\",\n focusRing: \"#71717a\",\n error: \"#dc2626\",\n overlay: \"rgb(0 0 0 / 0.35)\",\n },\n};\n\n/**\n * Some shared UI primitives (`Button`, `SelectTrigger`, ...) read the shadcn\n * theme variables instead of checkout tokens. Those are remapped so a themed\n * dropdown and themed primitives stay consistent. They are only written when\n * the matching token is in effect, so untouched tokens change nothing.\n */\nconst CHECKOUT_SHADCN_VARIABLES: ShadcnVariableMapping<CheckoutTokenName> = [\n { token: \"background\", variable: \"--background\" },\n { token: \"foreground\", variable: \"--foreground\" },\n { token: \"surface\", variable: \"--card\" },\n { token: \"surface\", variable: \"--popover\" },\n { token: \"foreground\", variable: \"--popover-foreground\" },\n { token: \"mutedForeground\", variable: \"--muted-foreground\" },\n { token: \"border\", variable: \"--border\" },\n { token: \"border\", variable: \"--input\" },\n { token: \"focusRing\", variable: \"--ring\" },\n { token: \"error\", variable: \"--destructive\" },\n { token: \"radius\", variable: \"--radius\" },\n];\n\n/**\n * The portalled dropdown renders `bg-popover`/`text-popover-foreground` from the\n * shared primitives, so those two variables are resolved eagerly: without a\n * token they fall back to the dark values the checkout has always used.\n */\nfunction resolveDropdownStyle(tokens: CheckoutAppearanceTokens): CSSProperties {\n return {\n \"--popover\": tokens.surface ?? \"var(--color-neutral-800)\",\n \"--popover-foreground\": tokens.foreground ?? \"var(--color-neutral-200)\",\n } as CSSProperties;\n}\n\nexport function resolveCheckoutAppearance(\n appearance?: CheckoutAppearance,\n): ResolvedCheckoutAppearance {\n const resolved = resolveAppearanceCore<\n CheckoutTokenName,\n CheckoutTheme,\n CheckoutSlotName\n >(appearance, {\n defaultTheme: \"dark\",\n presets: CHECKOUT_THEME_PRESETS,\n variables: CHECKOUT_TOKEN_VARIABLES,\n shadcnVariables: CHECKOUT_SHADCN_VARIABLES,\n });\n\n return {\n theme: resolved.theme,\n isCustomized: resolved.isCustomized,\n tokens: resolved.tokens,\n elements: resolved.elements,\n boundaryClassName: resolved.theme,\n boundaryStyle: resolved.boundaryStyle,\n dropdownStyle: resolveDropdownStyle(resolved.tokens),\n };\n}\n\n/** Caller overrides for a single slot, if any were provided. */\nexport function getCheckoutSlotAppearance(\n resolved: ResolvedCheckoutAppearance,\n slot: CheckoutSlotName,\n): CheckoutSlotAppearance | undefined {\n return getSlotAppearance(resolved.elements, slot);\n}\n","import { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport React from \"react\";\nimport { useCartProvider } from \"./CartProvider\";\nimport CountrySelector from \"./CountrySelector\";\nimport { isErr } from \"./lib/err\";\nimport { formatCurrency } from \"./lib/round.number\";\nimport LoadingIndicator from \"./LoadingIndicator\";\nimport SingleProduct from \"./SingleProduct\";\nimport { Skeleton } from \"./Skeleton\";\nimport { ApplePayButton, GooglePayButton } from \"..\";\nimport { Spinner } from \"@/src/ui/spinner\";\nimport { useMutation, useQuery } from \"@tanstack/react-query\";\nimport { cn } from \"@/src/lib/utils\";\nimport { sendAnalyticEvent } from \"./frontent.analytics\";\nimport { getLocale } from \"./locale\";\nimport { useCheckoutText } from \"./texts.context\";\nimport { useCheckoutSlot } from \"./appearance.context\";\n\nconst CartComponentContent = ({\n className,\n locale,\n}: {\n className: string;\n locale?: string;\n}) => {\n const provider = useCartProvider();\n const currentLocale = locale ?? getLocale();\n\n const productList = useCheckoutSlot(\"productList\");\n const summary = useCheckoutSlot(\"summary\");\n const totalLabel = useCheckoutSlot(\"totalLabel\");\n const totalValue = useCheckoutSlot(\"totalValue\");\n const deliveryText = useCheckoutSlot(\"deliveryText\");\n const countryLabel = useCheckoutSlot(\"countryLabel\");\n const paymentButtons = useCheckoutSlot(\"paymentButtons\");\n const checkoutButton = useCheckoutSlot(\"checkoutButton\");\n const emptyState = useCheckoutSlot(\"emptyState\");\n const error = useCheckoutSlot(\"error\");\n const skeleton = useCheckoutSlot(\"skeleton\");\n\n const unavailableProductsText = useCheckoutText(\"unavailableProducts\");\n const emptyCartText = useCheckoutText(\"emptyCart\");\n const totalText = useCheckoutText(\"total\");\n const deliveryCopy = useCheckoutText(\"delivery\");\n const chooseCountryText = useCheckoutText(\"chooseCountry\");\n const nextStepText = useCheckoutText(\"nextStep\");\n\n const { mutateAsync: removeProduct } = useMutation({\n mutationFn: provider.removeProductFromCart,\n });\n const { mutateAsync: updateQuantity } = useMutation({\n mutationFn: provider.updateQuantity,\n });\n const { mutateAsync: setCountryAsync } = useMutation({\n mutationFn: provider.setCountry,\n });\n const { mutateAsync: clearCart } = useMutation({\n mutationFn: provider.clearCart,\n });\n\n const [errMsg, setErrMsg] = React.useState(\"\");\n const [missingItemIds, setMissingItemIds] = React.useState<string[]>([]);\n\n const [isCountryOpen, setIsCountryOpen] = React.useState(false);\n\n const {\n mutateAsync: continueToCheckoutAsync,\n isPending: isContinueToCheckoutLoading,\n } = useMutation({\n mutationFn: provider.redirectToNextStep,\n });\n\n const { data: availableCountries } = useQuery({\n queryKey: [\"cart-available-countries\"],\n queryFn: provider.getAvailableCountries,\n });\n const { data: isApplePayAvailable } = useQuery({\n queryKey: [\"cart-one-click-payment\"],\n queryFn: provider.checkIfApplePayIsAvailable,\n });\n const { data, isLoading, refetch } = useQuery({\n queryKey: [\"cart\", currentLocale],\n queryFn: provider.getProducts,\n });\n const { data: countryData, refetch: refetchCountry } = useQuery({\n queryKey: [\"cart-country\"],\n queryFn: provider.getCountry,\n });\n\n const [productsParent] = useAutoAnimate(/* optional config */);\n\n const products = isErr(data) ? undefined : data;\n\n const countries = isErr(availableCountries) ? [] : availableCountries;\n\n const sumOfProducts =\n products?.reduce((prev, curr) => {\n if (curr.details == null) {\n return prev;\n }\n return prev + (curr.details.pricing?.effectivePrice ?? curr.details.price) * curr.quantity;\n }, 0) ?? 0;\n const currency = products?.[0]?.details?.currency ?? \"PLN\";\n\n const isSomeProductDeliverable =\n products?.some((product) => product.details?.isDeliverable === true) ??\n false;\n\n const selectedCountry =\n countryData != null && !isErr(countryData) && countryData != \"\"\n ? countryData\n : undefined;\n\n async function shouldUpdate(id: string, newQuantity?: number) {\n if (newQuantity != null) {\n if (newQuantity <= 0) {\n await removeProduct({ id: id });\n await refetch();\n return;\n }\n\n await updateQuantity({\n id: id,\n quantity: newQuantity,\n });\n await refetch();\n return;\n }\n }\n\n async function continueToCheckout() {\n try {\n setErrMsg(\"\");\n\n if (products != null) {\n try {\n sendAnalyticEvent({\n event: \"initiateCheckout\",\n items: products?.map((el) => ({\n id: el.productID,\n name: el.details?.name ?? \"\",\n price: el.details?.price ?? 0,\n quantity: el.quantity,\n currency: el.details?.currency ?? \"PLN\",\n })),\n });\n } catch (e) {}\n }\n\n const response = await continueToCheckoutAsync();\n\n if (isErr(response)) {\n if (response.error == \"item-ids-not-found\") {\n setErrMsg(unavailableProductsText);\n if (\"data\" in response && Array.isArray(response.data)) {\n setMissingItemIds(response.data as string[]);\n }\n } else {\n setErrMsg(`${response.error}`);\n }\n return;\n }\n\n await clearCart();\n window.location.href = response.url;\n } catch (e: unknown) {\n setErrMsg(`${e}`);\n }\n }\n\n return (\n <div className={`${className} flex flex-col`} ref={productsParent}>\n {isLoading && (\n <div className={\"relative flex w-full justify-center flex-col gap-4\"}>\n <Skeleton\n data-bitsnap-checkout-slot=\"skeleton\"\n className={cn(\"w-full h-32\", skeleton.className)}\n style={skeleton.style}\n />\n <Skeleton\n data-bitsnap-checkout-slot=\"skeleton\"\n className={cn(\"w-full h-32\", skeleton.className)}\n style={skeleton.style}\n />\n </div>\n )}\n\n {!isLoading && (products == null || products.length == 0) && (\n <div className={\"flex flex-col gap-4 p-4\"}>\n <p\n data-bitsnap-checkout-slot=\"emptyState\"\n className={cn(emptyState.className)}\n style={emptyState.style}\n >\n {emptyCartText}\n </p>\n </div>\n )}\n\n <div\n data-bitsnap-checkout-slot=\"productList\"\n className={cn(\n \"max-h-[70vh] overflow-clip overflow-y-scroll\",\n productList.className,\n )}\n style={productList.style}\n >\n {products != null && products.length > 0 && (\n <ul className={\"mt-5\"}>\n {products.map((product) => (\n <React.Fragment key={product.id}>\n {product.details != null && (\n <li className={\"mb-3\"}>\n <SingleProduct\n isNotAvailable={missingItemIds.includes(\n product.productID,\n )}\n quantity={product.quantity}\n details={product.details}\n shouldUpdate={(newQuantity) => {\n shouldUpdate(product.id, newQuantity).then().catch();\n }}\n />\n <hr className=\"h-1\" />\n </li>\n )}\n </React.Fragment>\n ))}\n </ul>\n )}\n </div>\n\n <div className=\"grow\"></div>\n\n {sumOfProducts > 0 && currency != null && (\n <>\n <div\n data-bitsnap-checkout-slot=\"summary\"\n className={cn(\"mx-3 flex flex-col\", summary.className)}\n style={summary.style}\n >\n <div className={\"flex flex-row justify-between text-lg\"}>\n <p\n data-bitsnap-checkout-slot=\"totalLabel\"\n className={cn(\"text-xl\", totalLabel.className)}\n style={totalLabel.style}\n >\n {totalText}\n </p>\n <div className={\"flex flex-col items-end\"}>\n <p\n data-bitsnap-checkout-slot=\"totalValue\"\n className={cn(\"font-medium\", totalValue.className)}\n style={totalValue.style}\n >\n {formatCurrency(sumOfProducts, currency)}\n </p>\n {isSomeProductDeliverable && (\n <p\n data-bitsnap-checkout-slot=\"deliveryText\"\n className={cn(\n \"opacity-70 text-right text-base\",\n deliveryText.className,\n )}\n style={deliveryText.style}\n >\n {deliveryCopy}\n </p>\n )}\n </div>\n </div>\n </div>\n\n {countries && countries?.length > 1 && (\n <div>\n <h4\n data-bitsnap-checkout-slot=\"countryLabel\"\n className={cn(\"ml-3 text-sm\", countryLabel.className)}\n style={countryLabel.style}\n >\n {chooseCountryText}\n </h4>\n <CountrySelector\n id={Math.random().toString()}\n open={isCountryOpen}\n onToggle={() => {\n setIsCountryOpen(!isCountryOpen);\n }}\n onChange={(newValue) => {\n setCountryAsync(newValue).then(() => {\n refetchCountry().then().catch();\n });\n }}\n selectedValue={selectedCountry ?? \"\"}\n countries={countries}\n />\n </div>\n )}\n\n <div className={\"mb-3 flex flex-col\"}>\n {isApplePayAvailable && products != null && products.length > 0 && (\n <div\n data-bitsnap-checkout-slot=\"paymentButtons\"\n className={cn(\"w-full px-2\", paymentButtons.className)}\n style={paymentButtons.style}\n >\n <ApplePayButton\n colorType=\"white\"\n style={{ width: \"100%\" }}\n items={products?.map((el) => ({\n name: el.details?.name ?? \"\",\n id: el.productID,\n price: el.details?.pricing?.effectivePrice ?? el.details?.price ?? 0,\n quantity: el.quantity,\n isDeliverable: el.details?.isDeliverable ?? false,\n metadata: el.metadata,\n }))}\n />\n </div>\n )}\n {products != null && products.length > 0 && (\n <div\n data-bitsnap-checkout-slot=\"paymentButtons\"\n className={cn(\"w-full px-2\", paymentButtons.className)}\n style={paymentButtons.style}\n >\n <GooglePayButton\n buttonSizeMode=\"fill\"\n buttonColor=\"white\"\n style={{ width: \"100%\" }}\n items={products?.map((el) => ({\n name: el.details?.name ?? \"\",\n id: el.productID,\n price: el.details?.pricing?.effectivePrice ?? el.details?.price ?? 0,\n quantity: el.quantity,\n isDeliverable: el.details?.isDeliverable ?? false,\n metadata: el.metadata,\n }))}\n />\n </div>\n )}\n <button\n data-bitsnap-checkout-slot=\"checkoutButton\"\n onClick={continueToCheckout}\n disabled={\n isLoading ||\n isContinueToCheckoutLoading ||\n selectedCountry == null\n }\n className={cn(\n \"px-3 py-2 my-2 mx-2 rounded-md disabled:opacity-40 disabled:cursor-not-allowed transition font-bold\",\n checkoutButton.className,\n )}\n style={checkoutButton.style}\n >\n {isContinueToCheckoutLoading ? (\n <Spinner />\n ) : (\n nextStepText\n )}\n </button>\n {errMsg.length > 0 && (\n <p\n data-bitsnap-checkout-slot=\"error\"\n className={cn(\"text-sm text-center\", error.className)}\n style={error.style}\n >\n {errMsg}\n </p>\n )}\n </div>\n </>\n )}\n </div>\n );\n};\n\nexport default CartComponentContent;\n","import { useEffect, useState } from \"react\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/src/ui/select\";\nimport { cn } from \"@/src/lib/utils\";\nimport { useCheckoutAppearance, useCheckoutSlot } from \"./appearance.context\";\n\nexport interface CountrySelectorProps {\n id: string;\n open: boolean;\n disabled?: boolean;\n onToggle: () => void;\n onChange: (value: string) => void;\n selectedValue: string;\n countries: { name: string; code: string }[];\n}\n\nfunction CountrySelector({\n id,\n open,\n disabled = false,\n onToggle,\n onChange,\n selectedValue,\n countries,\n}: CountrySelectorProps) {\n const [query, setQuery] = useState(\"\");\n\n const {\n isCustomized,\n boundaryClassName,\n boundaryStyle,\n dropdownStyle,\n } = useCheckoutAppearance();\n const countryTrigger = useCheckoutSlot(\"countryTrigger\");\n const countryDropdown = useCheckoutSlot(\"countryDropdown\");\n const countrySearch = useCheckoutSlot(\"countrySearch\");\n const countryOption = useCheckoutSlot(\"countryOption\");\n\n useEffect(() => {\n if (selectedValue == null && countries.length > 0) {\n onChange(countries[0].code);\n }\n }, []);\n\n const filteredCountries = countries.filter((country) =>\n country.name.toLowerCase().startsWith(query.toLowerCase()),\n );\n\n const selectedCountry = countries.find((el) => el.code === selectedValue);\n\n return (\n <Select\n value={selectedValue}\n onValueChange={(value) => {\n onChange(value);\n setQuery(\"\");\n }}\n open={open}\n onOpenChange={(isOpen) => {\n if (isOpen !== open) {\n onToggle();\n }\n if (!isOpen) {\n setQuery(\"\");\n }\n }}\n disabled={disabled}\n >\n <SelectTrigger\n data-bitsnap-checkout-slot=\"countryTrigger\"\n theme=\"bare\"\n className={cn(\n disabled\n ? \"bg-neutral-100 dark:bg-neutral-800 dark:border-neutral-700\"\n : \"\",\n \"w-full rounded-md\",\n countryTrigger.className,\n )}\n style={countryTrigger.style}\n >\n <SelectValue>\n {selectedCountry && (\n <span className=\"truncate flex items-center\">\n <img\n alt={selectedValue}\n src={`https://purecatamphetamine.github.io/country-flag-icons/3x2/${selectedValue}.svg`}\n className=\"inline mr-2 h-4 rounded-sm\"\n />\n {selectedCountry.name}\n </span>\n )}\n </SelectValue>\n </SelectTrigger>\n <SelectContent\n data-bitsnap-checkout={isCustomized ? \"dropdown\" : undefined}\n data-bitsnap-checkout-slot={isCustomized ? \"countryDropdown\" : undefined}\n className={cn(\n // The dropdown is portalled outside of the checkout root, so it only\n // joins the checkout theme boundary once the caller opts into an\n // appearance. Without it the content renders exactly as before.\n isCustomized ? \"bitsnap-react\" : \"\",\n boundaryClassName,\n \"w-full max-h-80 max-w-[350px] z-[999999]\",\n countryDropdown.className,\n )}\n style={{\n ...(isCustomized ? { ...boundaryStyle, ...dropdownStyle } : undefined),\n ...countryDropdown.style,\n }}\n position=\"popper\"\n >\n <div\n data-bitsnap-checkout-slot=\"countrySearch\"\n className={cn(\"sticky top-0 z-10 p-1 border-b\", countrySearch.className)}\n style={countrySearch.style}\n >\n <input\n type=\"search\"\n name=\"search\"\n autoComplete=\"off\"\n className=\"block w-full outline-none sm:text-body-regular bg-transparent rounded-md px-2 py-1.5\"\n placeholder=\"Znajdź kraj\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => e.stopPropagation()}\n />\n </div>\n <div className=\"max-h-64 overflow-y-auto\">\n {filteredCountries.length === 0 ? (\n <div className=\"cursor-default select-none relative py-2 pl-3 pr-9 text-sm\">\n No countries found\n </div>\n ) : (\n filteredCountries.map((country) => (\n <SelectItem\n key={`${id}-${country.code}`}\n data-bitsnap-checkout-slot=\"countryOption\"\n value={country.code}\n className={cn(\n \"cursor-default select-none relative py-2 pl-3 pr-9 flex items-center transition\",\n countryOption.className,\n )}\n style={countryOption.style}\n >\n <img\n alt={country.code}\n src={`https://purecatamphetamine.github.io/country-flag-icons/3x2/${country.code}.svg`}\n className=\"inline mr-2 h-4 rounded-sm\"\n />\n <span className=\"font-normal truncate\">{country.name}</span>\n </SelectItem>\n ))\n )}\n </div>\n </SelectContent>\n </Select>\n );\n}\n\nexport default CountrySelector;\n","import * as React from \"react\"\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\"\n\nimport { cn } from \"@/src/lib/utils\"\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\n/**\n * Colors owned by the shared shadcn theme. They live in Tailwind's\n * `utilities` layer, so plain CSS can never win against them. Components that\n * theme themselves through their own stylesheet (the checkout and its\n * `appearance` tokens) opt out with `theme=\"bare\"`, which keeps the colors the\n * checkout owns (`background-color`, `border-color`) and leaves the rest alone.\n * The default is unchanged.\n */\nconst selectTriggerThemeClasses =\n \"border-input dark:bg-input/30 dark:hover:bg-input/50 bg-transparent\"\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n theme = \"default\",\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\"\n theme?: \"default\" | \"bare\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-fit items-center justify-between gap-2 rounded-md border px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n theme === \"bare\" ? \"\" : selectTriggerThemeClasses,\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"popper\",\n align = \"center\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"bg-border pointer-events-none -mx-1 my-1 h-px\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n","import { useEffect, useState } from \"react\";\nimport type { SingleProduct } from \"./product.details.model\";\nimport { Button } from \"@/src/ui/button\";\nimport { MinusIcon, PlusIcon } from \"lucide-react\";\nimport { ButtonGroup } from \"@/src/ui/button-group\";\nimport { cn } from \"@/src/lib/utils\";\nimport { useCheckoutSlot } from \"./appearance.context\";\nimport { ProductPrice } from \"./ProductPrice\";\n\nconst SingleProduct = ({\n isNotAvailable,\n quantity,\n details,\n shouldUpdate,\n}: {\n isNotAvailable: boolean;\n quantity: number;\n metadata?: { [key: string]: string | undefined };\n details: SingleProduct;\n shouldUpdate: (newQuantity?: number) => void;\n}) => {\n const product = useCheckoutSlot(\"product\");\n const productImage = useCheckoutSlot(\"productImage\");\n const productName = useCheckoutSlot(\"productName\");\n const productPrice = useCheckoutSlot(\"productPrice\");\n const removeButton = useCheckoutSlot(\"removeButton\");\n\n return (\n <div\n data-bitsnap-checkout-slot=\"product\"\n data-bitsnap-checkout-unavailable={isNotAvailable ? \"\" : undefined}\n className={cn(\n \"flex items-center gap-3 mx-3\",\n isNotAvailable ? \"outline outline-1 rounded-md m-1\" : \"\",\n product.className,\n )}\n style={product.style}\n >\n <img\n data-bitsnap-checkout-slot=\"productImage\"\n className={cn(\n \"aspect-auto max-w-[30%] max-w-32 max-h-32 py-2 overflow-hidden\",\n productImage.className,\n )}\n style={productImage.style}\n src={details.image_url ?? \"\"}\n alt={details.name}\n />\n\n <div className={\"flex flex-col w-full\"}>\n <p\n data-bitsnap-checkout-slot=\"productName\"\n className={cn(\"font-medium\", productName.className)}\n style={productName.style}\n >\n {details.name}\n </p>\n <p\n data-bitsnap-checkout-slot=\"productPrice\"\n className={cn(\"text-sm\", productPrice.className)}\n style={productPrice.style}\n suppressHydrationWarning\n >\n <ProductPrice\n price={details.price}\n currency={details.currency}\n pricing={details.pricing}\n quantity={quantity}\n />\n </p>\n <div className={\"flex justify-between\"}>\n <QuantityComponent\n className={\"\"}\n quantity={quantity}\n shouldUpdate={shouldUpdate}\n />\n <Button\n data-bitsnap-checkout-slot=\"removeButton\"\n variant=\"ghost\"\n size=\"sm\"\n className={removeButton.className}\n style={removeButton.style}\n onClick={() => shouldUpdate(0)}\n >\n Usuń\n </Button>\n </div>\n </div>\n </div>\n );\n};\n\nexport default SingleProduct;\n\nconst QuantityComponent = ({\n quantity,\n shouldUpdate,\n className,\n}: {\n quantity: number;\n shouldUpdate: (newQuantity: number) => void;\n className: string;\n}) => {\n const [quantityString, setQuantityString] = useState(quantity.toString());\n const [quantityValue, setQuantityValue] = useState(quantity);\n\n const quantityControl = useCheckoutSlot(\"quantityControl\");\n const quantityInput = useCheckoutSlot(\"quantityInput\");\n const quantityButton = useCheckoutSlot(\"quantityButton\");\n\n useEffect(() => {\n shouldUpdate(quantityValue);\n }, [quantityValue]);\n\n function setNewQuantity(newQuantity: string) {\n setQuantityString(newQuantity);\n if (newQuantity.length == 0) {\n return;\n }\n const parsedInt = parseInt(newQuantity);\n if (isNaN(parsedInt)) {\n setQuantityValue(1);\n setQuantityString(\"\");\n return;\n }\n if (parsedInt == 0 || parsedInt < 0) {\n setQuantityValue(1);\n setQuantityString(\"1\");\n return;\n }\n setQuantityValue(parsedInt);\n setQuantityString(parsedInt.toString());\n }\n\n function increaseQuantity() {\n setQuantityValue(quantity + 1);\n setQuantityString((quantity + 1).toString());\n }\n\n function decreaseQuantity() {\n if (quantity > 1) {\n setQuantityString((quantity - 1).toString());\n setQuantityValue(quantity - 1);\n return;\n }\n setQuantityString(quantity.toString());\n setQuantityValue(quantity);\n }\n\n return (\n <div\n data-bitsnap-checkout-slot=\"quantityControl\"\n className={cn(\"flex\", className, quantityControl.className)}\n style={quantityControl.style}\n >\n <ButtonGroup aria-label=\"Ilość\">\n <Button\n data-bitsnap-checkout-slot=\"quantityButton\"\n className={quantityButton.className}\n style={quantityButton.style}\n onClick={decreaseQuantity}\n >\n <MinusIcon />\n </Button>\n <input\n data-bitsnap-checkout-slot=\"quantityInput\"\n className={cn(\"w-8 bg-transparent text-center\", quantityInput.className)}\n style={quantityInput.style}\n value={quantityString}\n onInput={(e) => {\n setNewQuantity(e.currentTarget.value);\n }}\n type=\"text\"\n />\n <Button\n data-bitsnap-checkout-slot=\"quantityButton\"\n className={quantityButton.className}\n style={quantityButton.style}\n onClick={increaseQuantity}\n >\n <PlusIcon />\n </Button>\n </ButtonGroup>\n </div>\n );\n};\n","import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/src/lib/utils\";\nimport { Separator } from \"@/src/ui/separator\";\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n }\n);\n\nfunction ButtonGroup({\n className,\n orientation,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\nfunction ButtonGroupText({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n asChild?: boolean;\n}) {\n const Comp = asChild ? Slot : \"div\";\n\n return (\n <Comp\n className={cn(\n \"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction ButtonGroupSeparator({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n \"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto\",\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n ButtonGroup,\n ButtonGroupSeparator,\n ButtonGroupText,\n buttonGroupVariants,\n};\n","import type { ProductPricing } from \"./product.details.model\";\nimport { formatCurrency } from \"./lib/round.number\";\n\nexport function ProductPrice({\n price,\n currency,\n pricing,\n quantity = 1,\n}: {\n price: number;\n currency: string;\n pricing?: ProductPricing;\n quantity?: number;\n}) {\n const regular = pricing?.regularPrice ?? price;\n const effective = pricing?.effectivePrice ?? price;\n const onSale = pricing?.discount?.status === \"ACTIVE\" && effective < regular;\n\n return (\n <span>\n {onSale ? (\n <>\n <span className=\"mr-2 text-neutral-500 line-through\">\n {formatCurrency(regular * quantity, currency)}\n </span>\n <span className=\"font-semibold text-red-700\">\n {formatCurrency(effective * quantity, currency)}\n </span>\n <span className=\"mt-1 block text-xs text-neutral-600\">\n {pricing?.referencePrice.historyAvailable && pricing.referencePrice.amount != null\n ? `Najniższa cena z 30 dni: ${formatCurrency(pricing.referencePrice.amount, currency)}`\n : \"Brak danych o cenie z ostatnich 30 dni\"}\n </span>\n </>\n ) : (\n formatCurrency(effective * quantity, currency)\n )}\n </span>\n );\n}\n","function Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"skeleton\"\n className={\"bg-neutral-700 animate-pulse rounded-md\" + ' ' + className}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n","import { createContext, useContext, useMemo } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { getLocale } from \"./locale\";\nimport {\n getCheckoutText,\n type CheckoutTextKey,\n type CheckoutTexts,\n} from \"./texts\";\n\ntype CheckoutTextsContextValue = {\n locale?: string;\n texts?: Partial<CheckoutTexts>;\n};\n\nconst CheckoutTextsContext = createContext<CheckoutTextsContextValue>({});\n\n/**\n * Checkout scoped texts provider. Carries the `texts` overrides and the\n * `locale` prop down to the checkout tree, so nothing leaks outside of it.\n */\nexport function CheckoutTextsProvider({\n texts,\n locale,\n children,\n}: {\n texts?: Partial<CheckoutTexts>;\n locale?: string;\n children: ReactNode;\n}) {\n const value = useMemo(() => ({ texts, locale }), [texts, locale]);\n\n return (\n <CheckoutTextsContext.Provider value={value}>\n {children}\n </CheckoutTextsContext.Provider>\n );\n}\n\n/**\n * Returns the checkout string for `key`: the caller override when provided,\n * otherwise the default for the `locale` prop (or the active locale).\n */\nexport function useCheckoutText(key: CheckoutTextKey): string {\n const { texts, locale } = useContext(CheckoutTextsContext);\n\n return getCheckoutText(key, locale ?? getLocale(), texts);\n}\n","import {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport type { CSSProperties, ReactNode } from \"react\";\nimport { cn } from \"@/src/lib/utils\";\nimport { DEFAULT_LOCALE } from \"../checkout/locale\";\nimport { addProductToCart } from \"./add-to-cart\";\nimport {\n getProductListSlotAppearance,\n resolveProductListAppearance,\n type ProductListAppearance,\n type ProductListSlotName,\n type ResolvedProductListAppearance,\n} from \"./appearance\";\nimport { clampPageSize, type PublicListProduct } from \"./fetch\";\nimport { formatProductPrice } from \"./format\";\nimport {\n fillProductListText,\n resolveProductListTexts,\n type ProductListTexts,\n} from \"./texts\";\nimport { useProducts, type UseProductsOptions } from \"./useProducts\";\n\n/** What `renderItem` gets next to the product. */\nexport type ProductListItemContext = {\n /** Product page URL from `productHref`. */\n href: string;\n /** Price formatted for the locale and currency, without the \"from\" prefix. */\n price: string;\n /** Formatted regular price when the product is discounted. */\n compareAtPrice: string | null;\n texts: ProductListTexts;\n locale: string;\n /** Adds the product to the cart the way the built-in button does. */\n addToCart: () => Promise<void>;\n};\n\nexport type ProductListProps = UseProductsOptions & {\n /**\n * Product page URL. Defaults to the relative `/p/{uniqueSlug}`, which works\n * on a Bitsnap custom domain. Embedded on another site, return the full\n * URL of the product page.\n */\n productHref?: (product: PublicListProduct) => string;\n appearance?: ProductListAppearance;\n /** Text overrides, applied whatever the locale. */\n texts?: Partial<ProductListTexts>;\n /** Replaces the content of a card. The card frame stays. */\n renderItem?: (\n product: PublicListProduct,\n context: ProductListItemContext,\n ) => ReactNode;\n /**\n * Called by the \"Add to cart\" button instead of the default action\n * (`Bitsnap.addProductToCart`). A rejected promise shows the error message.\n */\n onAddToCart?: (product: PublicListProduct) => void | Promise<void>;\n /** Open the cart drawer after the default add to cart. Defaults to `true`. */\n showCartOnAdd?: boolean;\n className?: string;\n};\n\ntype ListContext = {\n appearance: ResolvedProductListAppearance;\n texts: ProductListTexts;\n locale: string;\n};\n\nconst ProductListContext = createContext<ListContext | undefined>(undefined);\n\nfunction useListContext(): ListContext {\n const value = useContext(ProductListContext);\n if (value == null) {\n throw new Error(\"ProductList parts must be rendered inside ProductList\");\n }\n return value;\n}\n\n/** Stable slot attribute, built-in classes and the caller overrides for a slot. */\nfunction useSlot(slot: ProductListSlotName, className?: string) {\n const { appearance } = useListContext();\n const override = getProductListSlotAppearance(appearance, slot);\n\n return {\n \"data-bitsnap-products-slot\": slot,\n className: cn(className, override?.className),\n style: override?.style,\n };\n}\n\nconst BUTTON_CLASS =\n \"inline-flex cursor-pointer items-center justify-center px-4 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50\";\nconst BLOCK_BUTTON_CLASS = `${BUTTON_CLASS} w-full`;\nconst LINK_BUTTON_CLASS = `${BLOCK_BUTTON_CLASS} no-underline`;\n\ntype AddStatus = \"idle\" | \"adding\" | \"added\" | \"error\";\n\nfunction AddToCartButton({\n product,\n onAdd,\n}: {\n product: PublicListProduct;\n onAdd: () => Promise<void>;\n}) {\n const { texts } = useListContext();\n const [status, setStatus] = useState<AddStatus>(\"idle\");\n const button = useSlot(\"addToCartButton\", BLOCK_BUTTON_CLASS);\n const message = useSlot(\"message\", \"mt-2 text-xs\");\n\n useEffect(() => {\n if (status !== \"added\") {\n return;\n }\n const timer = setTimeout(() => setStatus(\"idle\"), 2000);\n return () => clearTimeout(timer);\n }, [status]);\n\n const click = useCallback(async () => {\n setStatus(\"adding\");\n try {\n await onAdd();\n setStatus(\"added\");\n } catch (error) {\n console.error(\"bitsnap-react: could not add to the cart\", error);\n setStatus(\"error\");\n }\n }, [onAdd]);\n\n const label =\n status === \"adding\"\n ? texts.addingToCart\n : status === \"added\"\n ? texts.addedToCart\n : texts.addToCart;\n\n return (\n <>\n <button\n type=\"button\"\n {...button}\n disabled={status === \"adding\"}\n aria-label={`${label}: ${product.name}`}\n onClick={click}\n >\n {label}\n </button>\n {status === \"error\" ? (\n <p {...message} role=\"alert\">\n {texts.addToCartError}\n </p>\n ) : null}\n </>\n );\n}\n\nfunction ProductCard({\n product,\n href,\n onAdd,\n renderItem,\n}: {\n product: PublicListProduct;\n href: string;\n onAdd: () => Promise<void>;\n renderItem?: ProductListProps[\"renderItem\"];\n}) {\n const { texts, locale } = useListContext();\n const card = useSlot(\n \"card\",\n \"relative flex flex-col overflow-hidden border transition-colors\",\n );\n const cardLink = useSlot(\"cardLink\", \"flex flex-1 flex-col no-underline\");\n const imageFrame = useSlot(\"image\", \"aspect-square w-full overflow-hidden\");\n const placeholder = useSlot(\"imagePlaceholder\", \"aspect-square w-full\");\n const body = useSlot(\"body\", \"flex flex-1 flex-col gap-1 p-4\");\n const name = useSlot(\"name\", \"text-base font-medium leading-snug\");\n const description = useSlot(\"description\", \"line-clamp-2 text-sm\");\n const price = useSlot(\"price\", \"mt-auto pt-2 text-base font-semibold\");\n const comparePrice = useSlot(\"comparePrice\", \"ml-2 text-sm font-normal\");\n const badge = useSlot(\n \"badge\",\n \"absolute left-3 top-3 px-2 py-0.5 text-xs font-medium\",\n );\n const actions = useSlot(\"actions\", \"p-4 pt-0\");\n const selectButton = useSlot(\"selectButton\", LINK_BUTTON_CLASS);\n\n const formattedPrice = formatProductPrice(\n product.price,\n product.currency,\n locale,\n );\n const formattedCompare =\n product.compareAtPrice != null && product.compareAtPrice > product.price\n ? formatProductPrice(product.compareAtPrice, product.currency, locale)\n : null;\n\n if (renderItem != null) {\n return (\n <li {...card} data-unavailable={product.available ? undefined : \"\"}>\n {renderItem(product, {\n href,\n price: formattedPrice,\n compareAtPrice: formattedCompare,\n texts,\n locale,\n addToCart: onAdd,\n })}\n </li>\n );\n }\n\n const imageSource = product.image?.thumbnailUrl ?? product.image?.url;\n const badgeText = !product.available\n ? texts.unavailable\n : product.isRecurring\n ? texts.subscription\n : null;\n\n return (\n <li {...card} data-unavailable={product.available ? undefined : \"\"}>\n <a {...cardLink} href={href}>\n {imageSource != null ? (\n <div {...imageFrame}>\n <img\n src={imageSource}\n alt=\"\"\n loading=\"lazy\"\n decoding=\"async\"\n className=\"h-full w-full object-cover\"\n />\n </div>\n ) : (\n <div {...placeholder} aria-hidden=\"true\" />\n )}\n <div {...body}>\n <h3 {...name}>{product.name}</h3>\n {product.shortDescription ? (\n <p {...description}>{product.shortDescription}</p>\n ) : null}\n <p {...price}>\n {product.priceFrom\n ? fillProductListText(texts.priceFrom, { price: formattedPrice })\n : formattedPrice}\n {formattedCompare != null ? (\n <>\n <span className=\"sr-only\">{texts.originalPrice}: </span>\n <del {...comparePrice}>{formattedCompare}</del>\n </>\n ) : null}\n </p>\n </div>\n </a>\n {badgeText != null ? (\n <span\n {...badge}\n data-kind={product.available ? \"subscription\" : \"unavailable\"}\n >\n {badgeText}\n </span>\n ) : null}\n <div {...actions}>\n {!product.available ? (\n <button type=\"button\" {...selectButton} disabled>\n {texts.unavailable}\n </button>\n ) : product.addToCart ? (\n <AddToCartButton product={product} onAdd={onAdd} />\n ) : (\n <a {...selectButton} href={href}>\n {product.variantCount > 1 ? texts.chooseOptions : texts.viewProduct}\n </a>\n )}\n </div>\n </li>\n );\n}\n\nconst GRID_CLASS =\n \"m-0 grid list-none grid-cols-[repeat(auto-fill,minmax(min(100%,15rem),1fr))] gap-5 p-0\";\n\nfunction SkeletonGrid({ count, label }: { count: number; label: string }) {\n const grid = useSlot(\"grid\", GRID_CLASS);\n const skeleton = useSlot(\"skeleton\", \"aspect-[3/4] animate-pulse\");\n\n return (\n <div {...grid} role=\"status\" aria-busy=\"true\" aria-label={label}>\n {Array.from({ length: count }, (_, index) => (\n <div key={index} {...skeleton} aria-hidden=\"true\" />\n ))}\n </div>\n );\n}\n\nfunction Pagination({\n page,\n pageCount,\n isLoading,\n onPage,\n}: {\n page: number;\n pageCount: number;\n isLoading: boolean;\n onPage: (page: number) => void;\n}) {\n const { texts } = useListContext();\n const nav = useSlot(\n \"pagination\",\n \"mt-8 flex items-center justify-center gap-4\",\n );\n const button = useSlot(\"paginationButton\", BUTTON_CLASS);\n const indicator = useSlot(\"pageIndicator\", \"text-sm\");\n\n return (\n <nav {...nav} aria-label={texts.pagination}>\n <button\n type=\"button\"\n {...button}\n aria-disabled={isLoading || page <= 1}\n onClick={() => {\n if (!isLoading && page > 1) {\n onPage(page - 1);\n }\n }}\n >\n {texts.previousPage}\n </button>\n <span {...indicator} aria-live=\"polite\">\n {fillProductListText(texts.pageOf, { page, pageCount })}\n </span>\n <button\n type=\"button\"\n {...button}\n aria-disabled={isLoading || page >= pageCount}\n onClick={() => {\n if (!isLoading && page < pageCount) {\n onPage(page + 1);\n }\n }}\n >\n {texts.nextPage}\n </button>\n </nav>\n );\n}\n\nfunction ProductListContent({\n options,\n productHref,\n renderItem,\n onAddToCart,\n showCartOnAdd,\n}: {\n options: UseProductsOptions;\n productHref: (product: PublicListProduct) => string;\n renderItem?: ProductListProps[\"renderItem\"];\n onAddToCart?: ProductListProps[\"onAddToCart\"];\n showCartOnAdd: boolean;\n}) {\n const { texts } = useListContext();\n const { products, page, pageCount, setPage, isLoading, error, refetch } =\n useProducts(options);\n\n // After a page change by the user, move focus to the products (the button\n // that was pressed stays where it is, but the content above it changes) and\n // bring them into view once the page has loaded.\n const content = useRef<HTMLDivElement>(null);\n const movedPage = useRef(false);\n const changePage = useCallback(\n (next: number) => {\n movedPage.current = true;\n setPage(next);\n },\n [setPage],\n );\n useEffect(() => {\n if (isLoading || !movedPage.current) {\n return;\n }\n movedPage.current = false;\n content.current?.focus({ preventScroll: true });\n content.current?.scrollIntoView({ block: \"start\" });\n }, [isLoading]);\n\n const grid = useSlot(\"grid\", GRID_CLASS);\n const empty = useSlot(\"emptyState\", \"py-12 text-center text-sm\");\n const errorSlot = useSlot(\"error\", \"flex flex-col items-center gap-3 py-12 text-center text-sm\");\n const retry = useSlot(\"retryButton\", BUTTON_CLASS);\n\n const { projectID, host } = options;\n const addFor = useCallback(\n (product: PublicListProduct) => () =>\n onAddToCart != null\n ? Promise.resolve(onAddToCart(product))\n : addProductToCart(product, {\n projectID,\n host,\n showCart: showCartOnAdd,\n }),\n [onAddToCart, projectID, host, showCartOnAdd],\n );\n\n let body: ReactNode;\n if (isLoading && products.length === 0) {\n body = (\n <SkeletonGrid\n count={Math.min(clampPageSize(options.pageSize), 8)}\n label={texts.loading}\n />\n );\n } else if (error != null) {\n body = (\n <div {...errorSlot} role=\"alert\">\n <p>{texts.error}</p>\n <button type=\"button\" {...retry} onClick={refetch}>\n {texts.retry}\n </button>\n </div>\n );\n } else if (products.length === 0) {\n body = <p {...empty}>{texts.empty}</p>;\n } else {\n body = (\n <ul\n {...grid}\n aria-busy={isLoading || undefined}\n className={cn(grid.className, isLoading && \"opacity-60\")}\n >\n {products.map((product) => (\n <ProductCard\n key={product.id}\n product={product}\n href={productHref(product)}\n onAdd={addFor(product)}\n renderItem={renderItem}\n />\n ))}\n </ul>\n );\n }\n\n return (\n <div\n ref={content}\n tabIndex={-1}\n className=\"p-1 outline-none scroll-mt-4\"\n >\n {body}\n {pageCount > 1 && error == null ? (\n <Pagination\n page={page}\n pageCount={pageCount}\n isLoading={isLoading}\n onPage={changePage}\n />\n ) : null}\n </div>\n );\n}\n\nconst defaultProductHref = (product: PublicListProduct) =>\n `/p/${encodeURIComponent(product.uniqueSlug)}`;\n\n/**\n * Responsive grid of the shop's products with pagination, loading, empty and\n * error states. Cards link to the product page and can add to the cart.\n *\n * ```tsx\n * <ProductList projectID=\"…\" locale=\"pl-PL\" initialData={firstPage} />\n * ```\n *\n * It renders on the server: pass `initialData` (the first page, fetched on the\n * server) to have the products in the HTML; without it the server renders the\n * loading skeleton and the browser fetches the first page.\n */\nexport function ProductList({\n productHref = defaultProductHref,\n appearance,\n texts,\n renderItem,\n onAddToCart,\n showCartOnAdd = true,\n className,\n ...options\n}: ProductListProps) {\n const locale = options.locale ?? DEFAULT_LOCALE;\n const resolvedAppearance = useMemo(\n () => resolveProductListAppearance(appearance),\n [appearance],\n );\n const resolvedTexts = useMemo(\n () => resolveProductListTexts(locale, texts),\n [locale, texts],\n );\n const context = useMemo(\n () => ({ appearance: resolvedAppearance, texts: resolvedTexts, locale }),\n [resolvedAppearance, resolvedTexts, locale],\n );\n const root = getProductListSlotAppearance(resolvedAppearance, \"root\");\n\n return (\n <ProductListContext.Provider value={context}>\n <div\n data-bitsnap-products=\"root\"\n data-bitsnap-products-slot=\"root\"\n className={cn(\n \"bitsnap-react\",\n resolvedAppearance.boundaryClassName,\n className,\n root?.className,\n )}\n style={\n { ...resolvedAppearance.boundaryStyle, ...root?.style } as CSSProperties\n }\n >\n <ProductListContent\n options={options}\n productHref={productHref}\n renderItem={renderItem}\n onAddToCart={onAddToCart}\n showCartOnAdd={showCartOnAdd}\n />\n </div>\n </ProductListContext.Provider>\n );\n}\n","import { DEFAULT_HOST, HOST, setCustomHost } from \"../checkout/constants\";\nimport { planCartTarget } from \"./cart-target\";\nimport type { PublicListProduct } from \"./fetch\";\n\nexport type AddToCartTarget = {\n projectID: string;\n /** Backend origin the cart talks to. Omitted or empty keeps the current one. */\n host?: string;\n /** Open the cart drawer afterwards. */\n showCart: boolean;\n};\n\n/**\n * Default \"add to cart\" action of `ProductList`: `Bitsnap.addProductToCart`\n * with quantity 1, then the cart drawer.\n *\n * The checkout is a heavy module (RPC client, cart state, payment buttons), so\n * it is loaded on the first click and never ends up in the first paint of a\n * catalog page. The cart only knows one project and one host at a time, and\n * they are page-wide (the cart is kept in localStorage, `setProjectID` also\n * changes the panel configuration). So the list only fills them in when the\n * page has not set them yet; when the page already works for another project\n * or host, nothing is changed and the call fails (pass `onAddToCart` to the\n * list in that case).\n */\nexport async function addProductToCart(\n product: PublicListProduct,\n target: AddToCartTarget,\n): Promise<void> {\n const [{ Bitsnap }, { getProjectID, setProjectID }] = await Promise.all([\n import(\"../checkout/methods\"),\n import(\"../checkout/CartProvider\"),\n ]);\n\n const plan = planCartTarget(\n { projectID: getProjectID(), host: HOST, defaultHost: DEFAULT_HOST },\n target,\n );\n if (!plan.ok) {\n return failConflict(plan.reason);\n }\n if (plan.setProjectID != null) {\n setProjectID(plan.setProjectID);\n }\n if (plan.setHost != null) {\n setCustomHost(plan.setHost);\n }\n\n // Single-variant products are added by their variant, not the product ID.\n const error = await Bitsnap.addProductToCart(\n product.cartItemId ?? product.id,\n 1,\n undefined,\n {\n name: product.name,\n price: product.price,\n currency: product.currency,\n },\n );\n if (error != null) {\n throw new Error(\"Could not add the product to the cart\");\n }\n\n if (target.showCart) {\n Bitsnap.showCart();\n }\n}\n\nfunction failConflict(reason: string): never {\n console.warn(\n `bitsnap-react: ProductList did not add to the cart because ${reason}. ` +\n \"Pass onAddToCart to use another cart.\",\n );\n throw new Error(\"The page cart belongs to another project or host\");\n}\n","import type { BitsnapModels } from \"@/src/models\";\n\nexport type PublicListProduct = BitsnapModels.PublicListProduct;\nexport type ProductListData = BitsnapModels.ProductListResponse;\n\nexport const DEFAULT_PAGE_SIZE = 24;\nexport const MAX_PAGE_SIZE = 48;\n\nexport type ProductListQuery = {\n projectID: string;\n /** Origin of the Bitsnap backend (or of a custom domain), without a path. */\n host: string;\n locale?: string;\n search?: string;\n limit: number;\n offset: number;\n};\n\nexport class ProductListError extends Error {\n readonly status: number | undefined;\n\n constructor(message: string, status?: number) {\n super(message);\n this.name = \"ProductListError\";\n this.status = status;\n }\n}\n\n/** Page size within what the backend accepts (1 to 48, default 24). */\nexport function clampPageSize(pageSize?: number): number {\n if (pageSize == null || !Number.isFinite(pageSize)) {\n return DEFAULT_PAGE_SIZE;\n }\n return Math.min(MAX_PAGE_SIZE, Math.max(1, Math.floor(pageSize)));\n}\n\nexport function pageCountFor(totalCount: number, pageSize: number): number {\n return Math.max(1, Math.ceil(totalCount / pageSize));\n}\n\n/** Origin without trailing slashes, so equal hosts compare equal as strings. */\nexport function normalizeHost(host: string): string {\n return host.replace(/\\/+$/, \"\");\n}\n\nexport function buildProductListURL(query: ProductListQuery): string {\n const params = new URLSearchParams();\n params.set(\"limit\", String(query.limit));\n params.set(\"offset\", String(query.offset));\n if (query.locale) {\n params.set(\"locale\", query.locale);\n }\n const search = query.search?.trim();\n if (search) {\n params.set(\"search\", search);\n }\n\n const host = normalizeHost(query.host);\n return `${host}/api/integrations/${encodeURIComponent(\n query.projectID,\n )}/public-commerce/product-list?${params.toString()}`;\n}\n\nfunction isProductListData(value: unknown): value is ProductListData {\n return (\n typeof value === \"object\" &&\n value != null &&\n Array.isArray((value as ProductListData).items) &&\n typeof (value as ProductListData).totalCount === \"number\"\n );\n}\n\n/**\n * Loads one page of the catalog with a plain, credential-less `fetch`. It does\n * not touch the global project ID or host.\n */\nexport async function fetchProductList(\n query: ProductListQuery,\n signal?: AbortSignal,\n): Promise<ProductListData> {\n const response = await fetch(buildProductListURL(query), {\n method: \"GET\",\n credentials: \"omit\",\n headers: { Accept: \"application/json\" },\n signal,\n });\n\n if (!response.ok) {\n throw new ProductListError(\n `Could not load products (${response.status})`,\n response.status,\n );\n }\n\n const payload: unknown = await response.json();\n if (!isProductListData(payload)) {\n throw new ProductListError(\"Unexpected product list response\");\n }\n\n return payload;\n}\n","import { normalizeHost } from \"./fetch\";\n\nexport type CartState = {\n /** Project the page cart is set up for, `null` or `undefined` when none yet. */\n projectID: string | null | undefined;\n /** Backend origin the page cart currently talks to. */\n host: string;\n /** Backend origin used when the page did not choose another one. */\n defaultHost: string;\n};\n\nexport type CartTarget = {\n projectID: string;\n /** Omitted or empty keeps the current host. */\n host?: string;\n};\n\nexport type CartPlan =\n | { ok: true; setProjectID: string | null; setHost: string | null }\n | { ok: false; reason: string };\n\n/**\n * Decides, without changing anything, whether the page cart can serve the\n * target and what has to be filled in first. Both the project and the host are\n * checked before the caller changes either of them, so a refused click leaves\n * the page cart untouched.\n */\nexport function planCartTarget(state: CartState, target: CartTarget): CartPlan {\n if (state.projectID != null && state.projectID !== target.projectID) {\n return {\n ok: false,\n reason: `the page cart already belongs to project \"${state.projectID}\"`,\n };\n }\n\n let setHost: string | null = null;\n const targetHost = target.host ? normalizeHost(target.host) : \"\";\n const currentHost = normalizeHost(state.host);\n if (targetHost && targetHost !== currentHost) {\n if (currentHost !== normalizeHost(state.defaultHost)) {\n return {\n ok: false,\n reason: `the page cart already uses the host \"${state.host}\"`,\n };\n }\n setHost = targetHost;\n }\n\n return {\n ok: true,\n setProjectID: state.projectID == null ? target.projectID : null,\n setHost,\n };\n}\n","import type { CSSProperties } from \"react\";\nimport {\n getSlotAppearance,\n resolveAppearanceCore,\n type AppearanceElements,\n type ShadcnVariableMapping,\n type SlotAppearance,\n} from \"@/src/lib/appearance-core\";\n\n/**\n * Product list appearance API.\n *\n * It mirrors `CheckoutAppearance` and `ReturnsAppearance` (theme, tokens,\n * elements) so a shop can reuse one brand object for all of them. The resolver\n * is pure: it turns the caller input into a theme name, the tokens in effect,\n * the slot overrides and the inline style for the theme boundary.\n */\n\nexport type ProductListTheme = \"light\" | \"dark\";\n\nexport type ProductListAppearanceTokens = {\n /** Font family of the list. The library never loads fonts. */\n fontFamily?: string;\n /** Base font size. */\n fontSize?: string;\n /** List background. */\n background?: string;\n /** Raised surfaces: cards, image placeholders, skeletons. */\n surface?: string;\n /** Main text color. */\n foreground?: string;\n /** Secondary text: descriptions, the struck-through price. */\n mutedForeground?: string;\n /** Borders of cards and buttons. */\n border?: string;\n /** \"Add to cart\" button background. */\n buttonBackground?: string;\n /** \"Add to cart\" button text. */\n buttonForeground?: string;\n /** \"Add to cart\" button background on hover. */\n buttonHoverBackground?: string;\n /** Hover surface of cards and secondary buttons. */\n hoverSurface?: string;\n /** Focus ring color. */\n focusRing?: string;\n /** Error and unavailable state color. */\n error?: string;\n /** Badge background (subscription, unavailable). */\n badgeBackground?: string;\n /** Badge text. */\n badgeForeground?: string;\n /** Corner radius of cards, images and buttons. */\n radius?: string;\n};\n\n/**\n * Stable slot names. They are exposed as `data-bitsnap-products-slot`\n * attributes so they can also be targeted from plain CSS.\n */\nexport const PRODUCT_LIST_SLOT_NAMES = [\n \"root\",\n \"grid\",\n \"card\",\n \"cardLink\",\n \"image\",\n \"imagePlaceholder\",\n \"body\",\n \"name\",\n \"description\",\n \"price\",\n \"comparePrice\",\n \"badge\",\n \"actions\",\n \"addToCartButton\",\n \"selectButton\",\n \"message\",\n \"pagination\",\n \"paginationButton\",\n \"pageIndicator\",\n \"emptyState\",\n \"error\",\n \"retryButton\",\n \"skeleton\",\n] as const;\n\nexport type ProductListSlotName = (typeof PRODUCT_LIST_SLOT_NAMES)[number];\n\nexport type ProductListSlotAppearance = SlotAppearance;\n\nexport type ProductListAppearanceElements =\n AppearanceElements<ProductListSlotName>;\n\nexport type ProductListAppearance = {\n /** `\"light\"` or `\"dark\"`. Omitted means `\"light\"`. */\n theme?: ProductListTheme;\n /** Partial overrides applied over the theme preset. */\n tokens?: ProductListAppearanceTokens;\n /** Per element `className`/`style` overrides. */\n elements?: ProductListAppearanceElements;\n};\n\nexport type ResolvedProductListAppearance = {\n theme: ProductListTheme;\n /** Tokens that are in effect (the theme preset plus caller overrides). */\n tokens: ProductListAppearanceTokens;\n elements: ProductListAppearanceElements;\n /** Theme marker class for the theme boundary. */\n boundaryClassName: string;\n /** Inline custom properties applied to the list root. */\n boundaryStyle: CSSProperties;\n};\n\n/** CSS custom property used for each token. */\nexport const PRODUCT_LIST_TOKEN_VARIABLES = {\n fontFamily: \"--bitsnap-products-font-family\",\n fontSize: \"--bitsnap-products-font-size\",\n background: \"--bitsnap-products-background\",\n surface: \"--bitsnap-products-surface\",\n foreground: \"--bitsnap-products-foreground\",\n mutedForeground: \"--bitsnap-products-muted-foreground\",\n border: \"--bitsnap-products-border\",\n buttonBackground: \"--bitsnap-products-button-background\",\n buttonForeground: \"--bitsnap-products-button-foreground\",\n buttonHoverBackground: \"--bitsnap-products-button-hover-background\",\n hoverSurface: \"--bitsnap-products-hover-surface\",\n focusRing: \"--bitsnap-products-focus-ring\",\n error: \"--bitsnap-products-error\",\n badgeBackground: \"--bitsnap-products-badge-background\",\n badgeForeground: \"--bitsnap-products-badge-foreground\",\n radius: \"--bitsnap-products-radius\",\n} as const;\n\nexport type ProductListTokenName = keyof typeof PRODUCT_LIST_TOKEN_VARIABLES;\n\n/**\n * Complete palettes. They carry colors and radius only, so typography is never\n * reset implicitly. `products.css` falls back to the light values, which keeps\n * the list usable even when the boundary style is missing.\n */\nexport const PRODUCT_LIST_THEME_PRESETS: Record<\n ProductListTheme,\n ProductListAppearanceTokens\n> = {\n light: {\n background: \"#ffffff\",\n surface: \"#f9fafb\",\n foreground: \"#18181b\",\n mutedForeground: \"#71717a\",\n border: \"#e4e4e7\",\n buttonBackground: \"#18181b\",\n buttonForeground: \"#fafafa\",\n buttonHoverBackground: \"#000000\",\n hoverSurface: \"#f4f4f5\",\n focusRing: \"#71717a\",\n error: \"#dc2626\",\n badgeBackground: \"#f4f4f5\",\n badgeForeground: \"#3f3f46\",\n radius: \"8px\",\n },\n dark: {\n background: \"#18181b\",\n surface: \"#27272a\",\n foreground: \"#fafafa\",\n mutedForeground: \"#a1a1aa\",\n border: \"#3f3f46\",\n buttonBackground: \"#fafafa\",\n buttonForeground: \"#18181b\",\n buttonHoverBackground: \"#e4e4e7\",\n hoverSurface: \"#3f3f46\",\n focusRing: \"#a1a1aa\",\n error: \"#f87171\",\n badgeBackground: \"#3f3f46\",\n badgeForeground: \"#e4e4e7\",\n radius: \"8px\",\n },\n};\n\n/** The list renders its own elements, so no shared primitive needs remapping. */\nconst PRODUCT_LIST_SHADCN_VARIABLES: ShadcnVariableMapping<ProductListTokenName> =\n [];\n\nexport function resolveProductListAppearance(\n appearance?: ProductListAppearance,\n): ResolvedProductListAppearance {\n const resolved = resolveAppearanceCore<\n ProductListTokenName,\n ProductListTheme,\n ProductListSlotName\n >(appearance, {\n defaultTheme: \"light\",\n presets: PRODUCT_LIST_THEME_PRESETS,\n variables: PRODUCT_LIST_TOKEN_VARIABLES,\n shadcnVariables: PRODUCT_LIST_SHADCN_VARIABLES,\n });\n\n return {\n theme: resolved.theme,\n tokens: resolved.tokens,\n elements: resolved.elements,\n boundaryClassName: resolved.theme,\n boundaryStyle: resolved.boundaryStyle,\n };\n}\n\n/** Caller overrides for a single slot, if any were provided. */\nexport function getProductListSlotAppearance(\n resolved: ResolvedProductListAppearance,\n slot: ProductListSlotName,\n): ProductListSlotAppearance | undefined {\n return getSlotAppearance(resolved.elements, slot);\n}\n","import { DEFAULT_LOCALE } from \"../checkout/locale\";\n\nfunction createFormatter(\n locale: string,\n currency: string,\n): Intl.NumberFormat | undefined {\n try {\n return new Intl.NumberFormat(locale, {\n style: \"currency\",\n currency,\n currencyDisplay: \"symbol\",\n });\n } catch {\n // RangeError: invalid locale or currency code.\n return undefined;\n }\n}\n\n/**\n * Formats a price in minor units (grosze, cents) for the locale, the same way\n * the cart does (`amount / 100`). An unknown locale falls back to Polish and an\n * invalid currency code to a plain number followed by the code.\n */\nexport function formatProductPrice(\n amount: number,\n currency: string,\n locale: string = DEFAULT_LOCALE,\n): string {\n const value = amount / 100;\n const formatter =\n createFormatter(locale, currency) ??\n createFormatter(DEFAULT_LOCALE, currency);\n\n return formatter != null\n ? formatter.format(value)\n : `${value.toFixed(2)} ${currency}`;\n}\n","import {\n lookupText,\n resolveTexts,\n type LocaleTables,\n} from \"@/src/lib/texts\";\n\n/**\n * Every string `ProductList` renders. Pass a partial object through the\n * `texts` prop to override any of them, whatever the locale. Placeholders\n * (`{price}`, `{page}`, `{pageCount}`) are filled by the component.\n */\nexport type ProductListTexts = {\n /** \"Add to cart\" button of products that can be bought straight from the list. */\n addToCart: string;\n /** Button label while the product is being added. */\n addingToCart: string;\n /** Button label after the product was added. */\n addedToCart: string;\n /** Message shown when adding to the cart failed. */\n addToCartError: string;\n /** Link of products with variants, to pick one on the product page. */\n chooseOptions: string;\n /** Link of products that cannot be added from the list (subscriptions). */\n viewProduct: string;\n /** Label of products that are out of stock. */\n unavailable: string;\n /** Badge of subscription products. */\n subscription: string;\n /** Price of products whose variants differ in price. `{price}` is the lowest one. */\n priceFrom: string;\n /** Screen reader label of the struck-through regular price. */\n originalPrice: string;\n /** Accessible label of the loading skeleton. */\n loading: string;\n /** Shown when the shop has no products (or none matches the search). */\n empty: string;\n /** Shown when the products could not be loaded. */\n error: string;\n /** Retry button of the error state. */\n retry: string;\n /** Accessible label of the pagination. */\n pagination: string;\n previousPage: string;\n nextPage: string;\n /** Page indicator. `{page}` and `{pageCount}` are filled in. */\n pageOf: string;\n};\n\nexport type ProductListTextKey = keyof ProductListTexts;\n\nexport const PRODUCT_LIST_TEXT_TABLES: LocaleTables<ProductListTextKey> = {\n en: {\n addToCart: \"Add to cart\",\n addingToCart: \"Adding…\",\n addedToCart: \"Added to cart\",\n addToCartError: \"Could not add to the cart. Try again.\",\n chooseOptions: \"Choose\",\n viewProduct: \"View\",\n unavailable: \"Unavailable\",\n subscription: \"Subscription\",\n priceFrom: \"from {price}\",\n originalPrice: \"Original price\",\n loading: \"Loading products\",\n empty: \"There are no products to show.\",\n error: \"Could not load the products.\",\n retry: \"Try again\",\n pagination: \"Pagination\",\n previousPage: \"Previous\",\n nextPage: \"Next\",\n pageOf: \"Page {page} of {pageCount}\",\n },\n pl: {\n addToCart: \"Dodaj do koszyka\",\n addingToCart: \"Dodawanie…\",\n addedToCart: \"Dodano do koszyka\",\n addToCartError: \"Nie udało się dodać do koszyka. Spróbuj ponownie.\",\n chooseOptions: \"Wybierz\",\n viewProduct: \"Zobacz\",\n unavailable: \"Niedostępny\",\n subscription: \"Subskrypcja\",\n priceFrom: \"od {price}\",\n originalPrice: \"Cena przed obniżką\",\n loading: \"Ładowanie produktów\",\n empty: \"Brak produktów do wyświetlenia.\",\n error: \"Nie udało się załadować produktów.\",\n retry: \"Spróbuj ponownie\",\n pagination: \"Paginacja\",\n previousPage: \"Poprzednia\",\n nextPage: \"Następna\",\n pageOf: \"Strona {page} z {pageCount}\",\n },\n};\n\n/** Default texts for a locale merged with the caller overrides. */\nexport function resolveProductListTexts(\n locale: string,\n overrides?: Partial<ProductListTexts>,\n): ProductListTexts {\n return resolveTexts(PRODUCT_LIST_TEXT_TABLES, locale, overrides);\n}\n\nexport function getProductListText(\n key: ProductListTextKey,\n locale: string,\n overrides?: Partial<ProductListTexts>,\n): string {\n return lookupText(resolveProductListTexts(locale, overrides), key);\n}\n\n/** Replaces `{name}` placeholders. Unknown placeholders stay untouched. */\nexport function fillProductListText(\n text: string,\n values: Record<string, string | number>,\n): string {\n return text.replace(/\\{(\\w+)\\}/g, (match, name: string) =>\n name in values ? String(values[name]) : match,\n );\n}\n","import { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { HOST } from \"../checkout/constants\";\nimport {\n clampPageSize,\n fetchProductList,\n pageCountFor,\n type ProductListData,\n type PublicListProduct,\n} from \"./fetch\";\n\nexport type UseProductsOptions = {\n /** Project (shop) ID. */\n projectID: string;\n /**\n * Origin of the Bitsnap backend. Defaults to the library host\n * (`https://bitsnap.pl`, or what `setCustomHost` had set when the component\n * first rendered; later `setCustomHost` calls do not move an existing list).\n * On a custom domain pass the domain itself, or an empty string for\n * same-origin requests.\n */\n host?: string;\n locale?: string;\n /** Products per page, 1 to 48. Defaults to 24. */\n pageSize?: number;\n search?: string;\n /**\n * First page, loaded on the server. It is always used for the first request\n * of the mounted list (the first fetch is skipped and the products are\n * available on the first render), so it has to be the page the props ask\n * for: page 1 with the same `pageSize`, `locale` and `search`. Later changes\n * of the props fetch again.\n */\n initialData?: ProductListData;\n};\n\nexport type UseProductsResult = {\n /** Products of the current page. Keeps the previous page while loading. */\n products: PublicListProduct[];\n totalCount: number;\n /** Current page, starting at 1. */\n page: number;\n pageCount: number;\n setPage: (page: number) => void;\n /** `true` until the current page is available, also during server rendering. */\n isLoading: boolean;\n error: Error | undefined;\n /** Loads the current page again. */\n refetch: () => void;\n};\n\ntype Snapshot = {\n /** Request the data belongs to; empty when it is not tied to one. */\n requestKey: string;\n data: ProductListData | undefined;\n error: Error | undefined;\n};\n\n/**\n * Loads the product catalog page by page. It uses a plain `fetch` without\n * credentials, never reads global state (`setProjectID`, `setCustomHost`) other\n * than the default host, and does nothing during server rendering - pass\n * `initialData` to render products in the server HTML.\n */\nexport function useProducts(options: UseProductsOptions): UseProductsResult {\n const { projectID, locale, search, initialData } = options;\n // The library host is a mutable global; read it once so a later\n // `setCustomHost` does not change the query of a mounted list.\n const [defaultHost] = useState(() => HOST);\n const host = options.host ?? defaultHost;\n const pageSize = clampPageSize(options.pageSize);\n\n // Everything that identifies a list; a change resets the page.\n const queryKey = JSON.stringify([\n projectID,\n host,\n locale ?? null,\n search?.trim() ?? null,\n pageSize,\n ]);\n\n const [pageState, setPageState] = useState({ queryKey, page: 1 });\n if (pageState.queryKey !== queryKey) {\n // Another list: start from page 1 (adjusting state while rendering).\n setPageState({ queryKey, page: 1 });\n }\n const [reloads, setReloads] = useState(0);\n const [snapshot, setSnapshot] = useState<Snapshot>(() => ({\n requestKey: initialData != null ? `${queryKey}|1|0` : \"\",\n data: initialData,\n error: undefined,\n }));\n\n // A page past the end (the catalog shrank) falls back to the last page once\n // the total is known.\n const totalCount = snapshot.data?.totalCount ?? 0;\n const pageCount = pageCountFor(totalCount, pageSize);\n const requestedPage = pageState.queryKey === queryKey ? pageState.page : 1;\n const page = totalCount > 0 ? Math.min(requestedPage, pageCount) : requestedPage;\n\n const requestKey = `${queryKey}|${page}|${reloads}`;\n\n const isCurrent = snapshot.requestKey === requestKey;\n\n useEffect(() => {\n if (isCurrent) {\n return;\n }\n\n const controller = new AbortController();\n fetchProductList(\n {\n projectID,\n host,\n locale,\n search,\n limit: pageSize,\n offset: (page - 1) * pageSize,\n },\n controller.signal,\n ).then(\n (data) => {\n if (controller.signal.aborted) {\n return;\n }\n setSnapshot({ requestKey, data, error: undefined });\n },\n (error: unknown) => {\n if (controller.signal.aborted) {\n return;\n }\n setSnapshot((previous) => ({\n requestKey,\n data: previous.data,\n error: error instanceof Error ? error : new Error(String(error)),\n }));\n },\n );\n\n return () => controller.abort();\n // `requestKey` carries projectID, host, locale, search, pageSize, page and\n // the reload counter.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [requestKey, isCurrent]);\n\n const setPage = useCallback(\n (next: number) => {\n const target = Math.max(1, Math.floor(next));\n setPageState({\n queryKey,\n page: totalCount > 0 ? Math.min(target, pageCount) : target,\n });\n },\n [queryKey, totalCount, pageCount],\n );\n\n const refetch = useCallback(() => setReloads((value) => value + 1), []);\n\n return useMemo(\n () => ({\n products: snapshot.data?.items ?? [],\n totalCount,\n page,\n pageCount,\n setPage,\n isLoading: !isCurrent,\n error: isCurrent ? snapshot.error : undefined,\n refetch,\n }),\n [snapshot, totalCount, page, pageCount, setPage, isCurrent, refetch],\n );\n}\n","import { useEffect, useReducer } from \"react\";\nimport { cn } from \"@/src/lib/utils\";\nimport { useReturnsSlot } from \"./appearance.context\";\nimport { ReturnsCodeStep, ReturnsEmailStep } from \"./AuthSteps\";\nimport { SkeletonRows } from \"./internal\";\nimport { ReturnsMyReturnDetail, ReturnsMyReturnsList } from \"./MyReturns\";\nimport {\n ReturnsConfirmation,\n ReturnsOrderDetail,\n ReturnsOrderList,\n ReturnsResult,\n} from \"./OrderSteps\";\nimport {\n ReturnsProvider,\n useReturnsContext,\n type ReturnsProviderProps,\n} from \"./ReturnsProvider\";\nimport {\n initialReturnsStep,\n reduceReturnsStep,\n RETURNS_STEP_COUNT,\n returnsStepNumber,\n} from \"./state-machine\";\nimport { useReturnsText } from \"./texts.context\";\n\nexport type BitsnapReturnsProps = Omit<ReturnsProviderProps, \"children\">;\n\nfunction StepIndicator({ current }: { current: number }) {\n const text = useReturnsText();\n const slot = useReturnsSlot(\"stepIndicator\");\n\n return (\n <p\n data-bitsnap-returns-slot=\"stepIndicator\"\n className={cn(\"text-xs\", slot.className)}\n style={slot.style}\n >\n {text(\"stepIndicator\", { current, total: RETURNS_STEP_COUNT })}\n </p>\n );\n}\n\n/** Default step router. All transitions come from the pure state machine. */\nfunction ReturnsRouter({ panelToken }: { panelToken: boolean }) {\n const { status } = useReturnsContext(\"BitsnapReturns\");\n const [step, dispatch] = useReducer(\n reduceReturnsStep,\n initialReturnsStep(false),\n );\n\n // A valid session (verified code, stored session, exchanged panel token)\n // moves on to the orders; a dropped one returns to the start.\n useEffect(() => {\n if (status === \"authenticated\") {\n dispatch({ type: \"AUTHENTICATED\" });\n } else if (status === \"anonymous\") {\n dispatch({ type: \"SESSION_EXPIRED\" });\n }\n }, [status]);\n\n // Without a panel token the server render and the first client render show\n // the email step; a stored session switches to the orders after hydration.\n if (status === \"exchanging\" || (status === \"hydrating\" && panelToken)) {\n return <SkeletonRows />;\n }\n\n const stepNumber = returnsStepNumber(step.name);\n\n return (\n <div className=\"flex flex-col gap-4\">\n {stepNumber != null && <StepIndicator current={stepNumber} />}\n {step.name === \"email\" && (\n <ReturnsEmailStep onSubmitted={() => dispatch({ type: \"CODE_SENT\" })} />\n )}\n {step.name === \"code\" && (\n <ReturnsCodeStep\n onVerified={() => dispatch({ type: \"AUTHENTICATED\" })}\n onBack={() => dispatch({ type: \"BACK\" })}\n />\n )}\n {step.name === \"orders\" && (\n <ReturnsOrderList\n showLogout={!panelToken}\n onSelectOrder={(orderId) =>\n dispatch({ type: \"SELECT_ORDER\", orderId })\n }\n onOpenMyReturns={() => dispatch({ type: \"OPEN_MY_RETURNS\" })}\n />\n )}\n {step.name === \"order\" && (\n <ReturnsOrderDetail\n orderId={step.orderId}\n initialItems={step.items}\n initialNote={step.note}\n onBack={() => dispatch({ type: \"BACK\" })}\n onContinue={({ items, note }) =>\n dispatch({ type: \"REVIEW\", items, note })\n }\n />\n )}\n {step.name === \"confirmation\" && (\n <ReturnsConfirmation\n orderId={step.orderId}\n items={step.items}\n note={step.note}\n onBack={() => dispatch({ type: \"BACK\" })}\n onSubmitted={(returnId) =>\n dispatch({ type: \"SUBMITTED\", returnId })\n }\n />\n )}\n {step.name === \"result\" && (\n <ReturnsResult\n returnId={step.returnId}\n onContinue={() => dispatch({ type: \"CONTINUE\" })}\n onOpenMyReturns={() => dispatch({ type: \"OPEN_MY_RETURNS\" })}\n />\n )}\n {step.name === \"myReturns\" && (\n <ReturnsMyReturnsList\n onSelectReturn={(returnId) =>\n dispatch({ type: \"SELECT_RETURN\", returnId })\n }\n onBack={() => dispatch({ type: \"BACK\" })}\n />\n )}\n {step.name === \"myReturn\" && (\n <ReturnsMyReturnDetail\n returnId={step.returnId}\n onBack={() => dispatch({ type: \"BACK\" })}\n />\n )}\n </div>\n );\n}\n\n/**\n * Customer return flow: email, code, orders, line selection, confirmation and\n * result, plus the list of earlier returns. It is `ReturnsProvider` with the\n * default step router; compose your own page from the step components to\n * change the layout.\n *\n * ```tsx\n * <BitsnapReturns projectID=\"…\" appearance={brand} texts={{ emailStepTitle: \"Return a product\" }} />\n * ```\n */\nexport function BitsnapReturns(props: BitsnapReturnsProps) {\n return (\n <ReturnsProvider {...props}>\n <ReturnsRouter panelToken={props.panelAccessToken != null && props.panelAccessToken !== \"\"} />\n </ReturnsProvider>\n );\n}\n","/** One line chosen for return. */\nexport type SelectedReturnLine = {\n lineId: string;\n quantity: number;\n};\n\n/** Where the default flow of `BitsnapReturns` currently is. */\nexport type ReturnsStep =\n | { name: \"email\" }\n | { name: \"code\" }\n | { name: \"orders\" }\n | {\n name: \"order\";\n orderId: string;\n /** Selection to restore when coming back from the confirmation. */\n items?: SelectedReturnLine[];\n note?: string;\n }\n | {\n name: \"confirmation\";\n orderId: string;\n items: SelectedReturnLine[];\n note: string;\n }\n | { name: \"result\"; returnId: string }\n | { name: \"myReturns\" }\n | { name: \"myReturn\"; returnId: string };\n\nexport type ReturnsStepName = ReturnsStep[\"name\"];\n\nexport type ReturnsStepEvent =\n /** A verification code was requested. */\n | { type: \"CODE_SENT\" }\n /** The session became valid: code verified, stored session or panel token. */\n | { type: \"AUTHENTICATED\" }\n /** The session was dropped by the backend, expiry or logout. */\n | { type: \"SESSION_EXPIRED\" }\n | { type: \"SELECT_ORDER\"; orderId: string }\n | { type: \"REVIEW\"; items: SelectedReturnLine[]; note: string }\n | { type: \"SUBMITTED\"; returnId: string }\n | { type: \"OPEN_MY_RETURNS\" }\n | { type: \"SELECT_RETURN\"; returnId: string }\n | { type: \"BACK\" }\n /** Leave the result screen for the order list. */\n | { type: \"CONTINUE\" };\n\nconst STEPS_WITH_SESSION: readonly ReturnsStepName[] = [\n \"orders\",\n \"order\",\n \"confirmation\",\n \"result\",\n \"myReturns\",\n \"myReturn\",\n];\n\n/** Steps that cannot be shown without a returns session. */\nexport function stepRequiresSession(step: ReturnsStepName): boolean {\n return STEPS_WITH_SESSION.includes(step);\n}\n\n/** Starts at the orders when a session exists, otherwise at the email. */\nexport function initialReturnsStep(hasSession: boolean): ReturnsStep {\n return hasSession ? { name: \"orders\" } : { name: \"email\" };\n}\n\n/**\n * Pure transition function of the default flow. Events that do not apply to\n * the current step leave it unchanged.\n */\nexport function reduceReturnsStep(\n step: ReturnsStep,\n event: ReturnsStepEvent,\n): ReturnsStep {\n switch (event.type) {\n case \"SESSION_EXPIRED\":\n // Email and code do not need a session; keep a pending verification.\n return stepRequiresSession(step.name) ? { name: \"email\" } : step;\n case \"CODE_SENT\":\n return step.name === \"email\" ? { name: \"code\" } : step;\n case \"AUTHENTICATED\":\n return step.name === \"email\" || step.name === \"code\"\n ? { name: \"orders\" }\n : step;\n case \"SELECT_ORDER\":\n return step.name === \"orders\"\n ? { name: \"order\", orderId: event.orderId }\n : step;\n case \"REVIEW\":\n return step.name === \"order\"\n ? {\n name: \"confirmation\",\n orderId: step.orderId,\n items: event.items,\n note: event.note,\n }\n : step;\n case \"SUBMITTED\":\n return step.name === \"confirmation\"\n ? { name: \"result\", returnId: event.returnId }\n : step;\n case \"OPEN_MY_RETURNS\":\n return step.name === \"orders\" || step.name === \"result\"\n ? { name: \"myReturns\" }\n : step;\n case \"SELECT_RETURN\":\n return step.name === \"myReturns\"\n ? { name: \"myReturn\", returnId: event.returnId }\n : step;\n case \"CONTINUE\":\n return step.name === \"result\" ? { name: \"orders\" } : step;\n case \"BACK\":\n switch (step.name) {\n case \"code\":\n return { name: \"email\" };\n case \"order\":\n case \"myReturns\":\n return { name: \"orders\" };\n case \"confirmation\":\n return {\n name: \"order\",\n orderId: step.orderId,\n items: step.items,\n note: step.note,\n };\n case \"myReturn\":\n return { name: \"myReturns\" };\n default:\n return step;\n }\n }\n}\n\nconst STEP_NUMBERS: Partial<Record<ReturnsStepName, number>> = {\n email: 1,\n code: 2,\n orders: 3,\n order: 4,\n confirmation: 5,\n result: 6,\n};\n\nexport const RETURNS_STEP_COUNT = 6;\n\n/** Position of a step in the return flow, `undefined` for the \"my returns\" views. */\nexport function returnsStepNumber(step: ReturnsStepName): number | undefined {\n return STEP_NUMBERS[step];\n}\n","export {\n default as ApplePayButton,\n type Props as ApplePayButtonProps,\n} from \"./checkout/ApplePay\";\nexport {\n default as BitsnapCheckout,\n type BitsnapCartProps,\n} from \"./checkout/BitsnapCart\";\nexport {\n CHECKOUT_SLOT_NAMES,\n type CheckoutAppearance,\n type CheckoutAppearanceElements,\n type CheckoutAppearanceTokens,\n type CheckoutSlotAppearance,\n type CheckoutSlotName,\n type CheckoutTheme,\n} from \"./checkout/appearance\";\nexport { type CheckoutTexts } from \"./checkout/texts\";\nexport * from \"./products\";\nexport { BitsnapReturns, type BitsnapReturnsProps } from \"./returns/BitsnapReturns\";\nexport {\n BitsnapReturnsProvider,\n ReturnsProvider,\n type BitsnapReturnsProviderProps,\n type ReturnsChallenge,\n type ReturnsEnvironment,\n type ReturnsProviderProps,\n type ReturnsSessionStatus,\n} from \"./returns/ReturnsProvider\";\nexport {\n ReturnsCodeStep,\n ReturnsEmailStep,\n type ReturnsCodeStepProps,\n type ReturnsEmailStepProps,\n} from \"./returns/AuthSteps\";\nexport {\n ReturnsConfirmation,\n ReturnsOrderDetail,\n ReturnsOrderList,\n ReturnsResult,\n type ReturnsConfirmationProps,\n type ReturnsOrderDetailProps,\n type ReturnsOrderListProps,\n type ReturnsResultProps,\n} from \"./returns/OrderSteps\";\nexport {\n ReturnsMyReturnDetail,\n ReturnsMyReturnsList,\n type ReturnsMyReturnDetailProps,\n type ReturnsMyReturnsListProps,\n} from \"./returns/MyReturns\";\nexport {\n useCreateReturn,\n useMyReturn,\n useMyReturns,\n useReturnableOrder,\n useReturnOrders,\n useReturnSession,\n type CreateReturnInput,\n type LegacyCreateReturnInput,\n type UseCreateReturnResult,\n type UseMyReturnResult,\n type UseMyReturnsResult,\n type UseReturnableOrderResult,\n type UseReturnOrdersResult,\n type UseReturnSessionResult,\n} from \"./returns/hooks\";\nexport {\n RETURNS_SLOT_NAMES,\n type ReturnsAppearance,\n type ReturnsAppearanceElements,\n type ReturnsAppearanceTokens,\n type ReturnsSlotAppearance,\n type ReturnsSlotName,\n type ReturnsTheme,\n} from \"./returns/appearance\";\nexport {\n ReturnsAppearanceProvider,\n useReturnsAppearance,\n useReturnsSlot,\n} from \"./returns/appearance.context\";\nexport {\n type LegacyReturnsTexts,\n type LegacyReturnsTheme,\n type ReturnsEnvironmentInput,\n type ReturnsTextsInput,\n} from \"./returns/legacy\";\nexport { useReturnsText } from \"./returns/texts.context\";\nexport { type ReturnsTextKey, type ReturnsTexts } from \"./returns/texts\";\nexport { type SelectedReturnLine } from \"./returns/state-machine\";\nexport {\n default as GooglePayButton,\n type Props as GooglePayButtonProps,\n} from \"./checkout/GooglePay\";\nexport {\n default as NotificationsComponent,\n type Props as NotificationsComponentProps,\n} from \"./notifications/NotificationsComponentPublic\";\nexport {\n type ComponentClassNames,\n type CustomizationTexts,\n type NotificationGroup,\n type NotificationsComponentPublicProps,\n type PublicNotificationGroup,\n} from \"./notifications/types\";\n\nexport { setProjectID } from \"./checkout/CartProvider\";\nexport { getLocale, setLocale } from \"./checkout/locale\";\nexport { setCustomHost } from \"./checkout/constants\";\nexport { type LinkRequest } from \"./checkout/link.request.schema\";\nexport * from \"./checkout/methods\";\nexport { Environment } from \"../gen/proto/common/v1/environment_pb\";\nexport {\n buildAccessTokenRedirect,\n getAllowedReturnOrigins,\n getPanelConfig,\n getReturnURLFromSearch,\n Panel,\n PanelLogin,\n PanelProvider,\n persistReturnURL,\n PublicOrderPage,\n readPersistedReturnURL,\n setAllowedReturnOrigins,\n setHost,\n setLoginURL,\n setPanelConfig,\n setProjectID as setPanelProjectID,\n setTheme,\n usePanelConfig,\n} from \"../panel\";\nexport type {\n GetThemeOutput,\n PanelConfig,\n PanelLoginProps,\n PanelProps,\n PanelScreen,\n PanelSearchParamsType,\n} from \"../panel\";\n","import GooglePayButton from \"@google-pay/button-react\";\nimport CartProvider, { getProjectID, useCartProvider } from \"./CartProvider\";\nimport { isErr } from \"./lib/err\";\nimport { Spinner } from \"@/src/ui/spinner\";\nimport { useQuery, useMutation } from \"@tanstack/react-query\";\nimport { sendAnalyticEvent } from \"./frontent.analytics\";\n\nexport type Props = {\n test?: boolean;\n buttonSizeMode?: \"static\" | \"fill\";\n buttonColor?: \"white\" | \"black\";\n style?: {\n width?: string;\n };\n items: {\n name: string;\n id: string;\n price: number;\n quantity: number;\n isDeliverable?: boolean;\n metadata?: { [key: string]: string | undefined };\n }[];\n};\n\nfunction GooglePayButtonComponent({\n items,\n style,\n buttonColor,\n buttonSizeMode,\n test,\n}: Props) {\n const {\n getGooglePayConfiguration,\n completeGooglePayPayment,\n setCountry,\n setCouponCodeIfPossible,\n setDeliveryMethod,\n setEmail,\n setPostalCode,\n clearCart,\n } = useCartProvider();\n\n const { data: googlePayConfiguration } = useQuery({\n queryKey: [\n \"get-google-pay-configuration\",\n items.map((el) => el.id).join(\",\"),\n ],\n queryFn: () =>\n getGooglePayConfiguration({\n items: items.map((el) => ({\n ...el,\n id: undefined,\n productID: el.id,\n })),\n }),\n });\n\n const { mutateAsync: completeGooglePayPaymentAsync, isPending } = useMutation(\n {\n mutationFn: completeGooglePayPayment,\n }\n );\n if (\n googlePayConfiguration == null ||\n googlePayConfiguration.isAvailable != true\n ) {\n console.log(\n \"google pay configuration is not available\",\n googlePayConfiguration\n );\n return null;\n }\n\n return (\n <>\n <GooglePayButton\n buttonSizeMode={buttonSizeMode}\n buttonColor={buttonColor}\n style={style}\n existingPaymentMethodRequired={true}\n environment={test === true ? \"TEST\" : \"PRODUCTION\"}\n onPaymentDataChanged={async (paymentData) => {\n sendAnalyticEvent({\n event: \"initiateCheckout\",\n items: items.map((el) => ({\n id: el.id,\n name: el.name,\n price: el.price,\n quantity: el.quantity,\n currency: \"PLN\",\n })),\n });\n console.log(\"payment data changed\", paymentData);\n if (paymentData.shippingAddress?.postalCode != null) {\n await setPostalCode(paymentData.shippingAddress?.postalCode);\n }\n if (paymentData.shippingAddress?.countryCode != null) {\n await setCountry(paymentData.shippingAddress?.countryCode);\n }\n if (paymentData.shippingOptionData?.id != null) {\n await setDeliveryMethod(paymentData.shippingOptionData.id);\n }\n\n const config = await getGooglePayConfiguration({ items: [] });\n console.log(\"PAYMENT DATA CHANGED CONFIG\", config);\n if (config.isAvailable) {\n return {\n error: undefined,\n newShippingOptionParameters:\n config.config.shippingOptionParameters,\n newTransactionInfo: config.config.transactionInfo,\n };\n }\n\n return {\n error: undefined,\n };\n }}\n paymentRequest={googlePayConfiguration.config}\n onLoadPaymentData={async (paymentRequest) => {\n try {\n const result = await completeGooglePayPaymentAsync({\n paymentData: paymentRequest,\n });\n if (isErr(result)) {\n console.log(\"apple pay error\", result);\n return;\n }\n\n result.isSuccess && clearCart();\n if (result.redirectURL) {\n open(result.redirectURL, \"_self\");\n }\n } catch (e) {\n console.warn(\"error completing google pay payment\", e);\n }\n }}\n />\n {isPending ? <Spinner /> : null}\n </>\n );\n}\n\nfunction Wrapper(props: Props) {\n return (\n <>\n <CartProvider>\n <GooglePayButtonComponent {...props} />\n </CartProvider>\n </>\n );\n}\nexport default Wrapper;\n","import { useReducer, useRef, useEffect, useState } from \"react\";\nimport { cn } from \"@/src/lib/utils\";\nimport {\n rpcProvider,\n RpcProvider,\n useMutation,\n useQuery,\n} from \"src/rpc-provider\";\nimport { useQuery as UQ, useQueryClient } from \"@tanstack/react-query\";\nimport { Settings, X } from \"lucide-react\";\nimport type {\n NotificationsComponentPublicProps,\n NotificationGroup,\n CustomizationTexts,\n ComponentClassNames,\n PublicNotificationGroup,\n} from \"./types\";\nexport type {\n NotificationGroup,\n CustomizationTexts,\n ComponentClassNames,\n} from \"./types\";\nexport type Props = NotificationsComponentPublicProps;\nimport { DEFAULT_TEXTS } from \"./constants\";\nimport { NotificationHeader } from \"./NotificationHeader\";\nimport { NotificationGroupsList } from \"./NotificationGroupsList\";\nimport { QRCodeSection } from \"./QRCodeSection\";\nimport { AddUserToGroups } from \"./AddUserToGroups\";\nimport { ManageMyData } from \"./ManageMyData\";\nimport { LoginScreen } from \"./LoginScreen\";\nimport { Button } from \"@/src/ui/button\";\nimport { getProjectID } from \"../checkout/CartProvider\";\nimport { NotificationGroupHowOften } from \"@/src/gen/proto/common/v1/push_notifications_pb\";\nimport { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport { Spinner } from \"@/src/ui/spinner\";\n\ninterface State {\n isLoading: boolean;\n isUserGroupsUpdated: boolean;\n wasChanged: boolean;\n groupsProvided?: PublicNotificationGroup[];\n groups: NotificationGroup[];\n showSettings: boolean;\n isLoggedIn: boolean;\n userID: string | undefined;\n}\n\ntype Action =\n | { type: \"SET_IS_LOGGED_IN\"; value: boolean }\n | { type: \"SET_USER_ID\"; value: string | undefined }\n | { type: \"SET_LOADING\"; value: boolean }\n | { type: \"TOGGLE_GROUP\"; groupID: string }\n | { type: \"CHECK_ALL_GROUPS\" }\n | { type: \"SET_WAS_CHANGED\"; value: boolean }\n | { type: \"SET_IS_USER_GROUPS_UPDATED\"; value: boolean }\n | { type: \"RESET_UPDATE_STATE\" }\n | { type: \"SHOW_SETTINGS\" }\n | { type: \"SET_GROUPS\"; value: NotificationGroup[] }\n | { type: \"SET_PUBLIC_GROUPS\"; value?: PublicNotificationGroup[] }\n | { type: \"HIDE_SETTINGS\" };\n\nfunction reducer(state: State, action: Action): State {\n switch (action.type) {\n case \"SET_IS_LOGGED_IN\": {\n return {\n ...state,\n isLoggedIn: action.value,\n };\n }\n case \"SET_USER_ID\": {\n return {\n ...state,\n userID: action.value,\n };\n }\n case \"SET_LOADING\": {\n return {\n ...state,\n isLoading: action.value,\n };\n }\n case \"SET_PUBLIC_GROUPS\": {\n return {\n ...state,\n groupsProvided: action.value,\n groups:\n action.value != null && action.value.length > 0\n ? state.groups.filter(\n (group) => action.value?.find((g) => g.id === group.id) != null,\n )\n : state.groups,\n };\n }\n case \"SET_GROUPS\": {\n const isDefaultOn =\n state.isLoggedIn == false || state.groupsProvided != null;\n const newGroupsWithIsOn = action.value.map((group) => {\n if (state.isLoggedIn == true) {\n return group;\n }\n return {\n ...group,\n isOn:\n state.groupsProvided?.find((g) => g.id === group.id)?.isOn ??\n isDefaultOn,\n };\n });\n\n return {\n ...state,\n groups: newGroupsWithIsOn,\n };\n }\n case \"TOGGLE_GROUP\": {\n const updatedGroups = state.groups.map((group) => {\n if (group.id === action.groupID) {\n return {\n ...group,\n isOn: !group.isOn,\n };\n }\n return group;\n });\n return {\n ...state,\n wasChanged: true,\n groups: updatedGroups,\n };\n }\n case \"CHECK_ALL_GROUPS\": {\n const updated = state.groups.map((group) => {\n return {\n ...group,\n isOn: true,\n };\n });\n return {\n ...state,\n groups: updated,\n wasChanged: true,\n };\n }\n case \"SET_WAS_CHANGED\":\n return {\n ...state,\n wasChanged: action.value,\n };\n case \"SET_IS_USER_GROUPS_UPDATED\":\n return {\n ...state,\n isUserGroupsUpdated: action.value,\n };\n case \"RESET_UPDATE_STATE\":\n return {\n ...state,\n wasChanged: false,\n isUserGroupsUpdated: true,\n };\n case \"SHOW_SETTINGS\":\n return {\n ...state,\n showSettings: true,\n };\n case \"HIDE_SETTINGS\":\n return {\n ...state,\n showSettings: false,\n };\n default:\n return state;\n }\n}\n\nfunction NotificationsComponentPublic({\n slug: slugProp,\n userID,\n productID: _productID,\n projectName,\n projectLogo,\n projectLogoDark,\n groups,\n isManaging = false,\n texts,\n showQRCode = false,\n showPhoneInput = false,\n hiddenGroupIds = [],\n className,\n}: NotificationsComponentPublicProps) {\n const [parent] = useAutoAnimate();\n let slug =\n slugProp ??\n getProjectID() ??\n (typeof window !== \"undefined\" ? window.location.hostname : \"\");\n\n const { mutateAsync: updateUserGroups, isPending: isUpdating } = useMutation(\n rpcProvider.notifications.updateUserGroups,\n );\n\n const { data: userInfo, refetch: refetchAccessToken } = UQ({\n queryKey: [\"notifications_accessToken\"],\n queryFn: () => {\n if (typeof window !== \"undefined\") {\n return {\n accessToken:\n localStorage.getItem(\"notifications_accessToken\") ?? undefined,\n userID: localStorage.getItem(\"notifications_userID\") ?? undefined,\n };\n }\n return undefined;\n },\n });\n\n const {\n data: groupsDownloaded,\n isPending: isGroupsDownloading,\n refetch: refetchGroups,\n } = useQuery(rpcProvider.notifications.getUserGroups, {\n slug: slug,\n accessToken: userInfo?.accessToken,\n });\n\n const [state, dispatch] = useReducer(reducer, {\n isLoading: isGroupsDownloading,\n isUserGroupsUpdated: false,\n wasChanged: false,\n groupsProvided: groups,\n groups: [],\n showSettings: userInfo != null && isManaging == true,\n isLoggedIn: userInfo != null,\n userID: undefined,\n });\n\n useEffect(() => {\n dispatch({ type: \"SET_LOADING\", value: isUpdating || isGroupsDownloading });\n }, [isUpdating, isGroupsDownloading]);\n\n useEffect(() => {\n dispatch({\n type: \"SET_IS_LOGGED_IN\",\n value: userInfo?.accessToken != null,\n });\n dispatch({ type: \"SET_USER_ID\", value: userInfo?.userID });\n if (userInfo?.accessToken != null && isManaging == true) {\n dispatch({ type: \"SHOW_SETTINGS\" });\n }\n }, [userInfo, isManaging]);\n\n useEffect(() => {\n if (groupsDownloaded == null) {\n return;\n }\n let newGroups = groupsDownloaded.groups.map((group) => {\n let howOften = \"rarely\";\n switch (group.howOften) {\n case NotificationGroupHowOften.RARELY:\n howOften = \"rarely\";\n break;\n case NotificationGroupHowOften.OFTEN:\n howOften = \"often\";\n break;\n case NotificationGroupHowOften.VERY_OFTEN:\n howOften = \"veryOften\";\n break;\n }\n return {\n id: group.id,\n name: group.name,\n description: group.description,\n howOften: howOften,\n isOn: group.isOn ?? undefined,\n };\n });\n dispatch({ type: \"SET_GROUPS\", value: newGroups });\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [groupsDownloaded, isGroupsDownloading, groups]);\n\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(() => {\n let preparedGroups = groups?.map((el) => {\n if (el.id.startsWith(\"group_\")) {\n return el;\n }\n el.id = `group_${el.id}`;\n return el;\n });\n\n dispatch({ type: \"SET_PUBLIC_GROUPS\", value: preparedGroups });\n }, [groups]);\n\n const mergedTexts = { ...DEFAULT_TEXTS, ...texts };\n\n async function updateGroups() {\n await updateUserGroups({\n accessToken: userInfo?.accessToken,\n slug: slug,\n userId: userID,\n groupIds: state.groups\n .filter((el) => el.isOn === true)\n .map((el) => el.id),\n });\n dispatch({ type: \"RESET_UPDATE_STATE\" });\n\n // Clear existing timeout if any\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n // Set timeout to reset isUserGroupsUpdated after 2 seconds\n timeoutRef.current = setTimeout(() => {\n dispatch({ type: \"SET_IS_USER_GROUPS_UPDATED\", value: false });\n }, 2000);\n }\n\n function toggleGroup(groupID: string) {\n dispatch({ type: \"TOGGLE_GROUP\", groupID });\n }\n\n function checkAllGroups() {\n dispatch({ type: \"CHECK_ALL_GROUPS\" });\n }\n\n function handleSettingsClick() {\n dispatch({ type: \"SHOW_SETTINGS\" });\n }\n\n function handleCloseSettings() {\n dispatch({ type: \"HIDE_SETTINGS\" });\n }\n\n function handleLogout() {\n localStorage.removeItem(\"notifications_accessToken\");\n localStorage.removeItem(\"notifications_userID\");\n refetchAccessToken();\n dispatch({ type: \"SET_USER_ID\", value: undefined });\n dispatch({ type: \"SET_IS_LOGGED_IN\", value: false });\n dispatch({ type: \"HIDE_SETTINGS\" });\n }\n\n async function handleLoginSuccess(\n userID: string | undefined,\n accessToken: string,\n ) {\n if (typeof window !== \"undefined\") {\n localStorage.setItem(\"notifications_accessToken\", accessToken);\n if (userID != null) {\n localStorage.setItem(\"notifications_userID\", userID);\n }\n }\n dispatch({ type: \"SET_USER_ID\", value: userID });\n try {\n await refetchAccessToken();\n refetchGroups()\n .then()\n .catch()\n .finally(() => {\n if (isManaging == true) {\n // Automatically switch to managing view\n dispatch({ type: \"SHOW_SETTINGS\" });\n }\n });\n } catch (e) {\n console.log(`Error: ${e}`);\n }\n }\n\n // Cleanup timeout on unmount\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, []);\n\n const isManagingEnabled =\n isManaging == true && state.userID != null && userInfo?.accessToken != null;\n\n return (\n <main className={cn(\"bitsnap-react relative\", className?.container)}>\n {mergedTexts.title != null && (\n <h1 className=\"text-2xl font-semibold text-black md:text-3xl lg:text-4xl xl:text-5xl dark:text-neutral-100\">\n {mergedTexts.title}\n </h1>\n )}\n\n {/* Floating Settings Icon */}\n {!state.showSettings && isManaging && (\n <Button\n onClick={handleSettingsClick}\n variant=\"outline\"\n size=\"icon\"\n className=\"absolute bottom-6 right-6 z-50 h-12 w-12 rounded-full shadow-lg hover:shadow-xl md:bottom-8 md:right-8\"\n aria-label=\"Settings\"\n >\n <Settings className=\"h-5 w-5\" />\n </Button>\n )}\n\n <div\n className={cn(\n \"md:pt8 relative z-0 mt-6 overflow-hidden rounded-2xl bg-white px-3 pt-6 pb-3 md:px-5 md:pb-5 dark:bg-neutral-800\",\n className?.header,\n )}\n >\n {state.showSettings ? (\n // Settings View\n <div className=\"space-y-6\">\n {state.isLoggedIn && (\n // Managing Groups View (logged in)\n <div\n className={cn(\n \"grid grid-cols-1 gap-3 lg:gap-6\",\n isManagingEnabled ? \"md:grid-cols-2\" : \"\",\n )}\n >\n <div className={className?.groupsContainer}>\n <NotificationHeader\n projectName={projectName}\n projectLogo={projectLogo}\n projectLogoDark={projectLogoDark}\n description={mergedTexts.managingDescription}\n className={className}\n onLogout={handleLogout}\n />\n {isGroupsDownloading && (\n <div className=\"flex justify-center items-center py-8\">\n <Spinner />\n </div>\n )}\n\n <NotificationGroupsList\n groups={state.groups}\n hiddenGroupIds={hiddenGroupIds}\n isManaging={isManaging}\n onToggle={toggleGroup}\n onCheckAll={checkAllGroups}\n onUpdate={updateGroups}\n isUpdating={isUpdating}\n wasChanged={state.wasChanged}\n isUserGroupsUpdated={state.isUserGroupsUpdated}\n className={className}\n texts={mergedTexts}\n />\n </div>\n {isManagingEnabled && (\n <ManageMyData\n accessToken={userInfo.accessToken ?? \"\"}\n slug={slug}\n userID={state.userID ?? \"\"}\n className={className}\n texts={mergedTexts}\n />\n )}\n\n {showQRCode != false && (\n <QRCodeSection\n showQRCode={showQRCode}\n isManaging={true}\n className={className}\n texts={mergedTexts}\n />\n )}\n </div>\n )}\n </div>\n ) : (\n // Default View (Form only)\n <div className={cn(\"grid grid-cols-1 gap-3 lg:gap-6\")}>\n <AddUserToGroups\n slug={slug}\n onToggle={(id) => {\n dispatch({ type: \"TOGGLE_GROUP\", groupID: id });\n }}\n onCheckAll={() => {\n dispatch({ type: \"CHECK_ALL_GROUPS\" });\n }}\n onSuccess={(userAlreadyExists, userID, accessToken) => {\n if (accessToken != null) {\n handleLoginSuccess(userID, accessToken);\n }\n if (userAlreadyExists) {\n dispatch({ type: \"SHOW_SETTINGS\" });\n }\n }}\n groups={state.groups}\n showPhoneInput={showPhoneInput}\n agreementText={mergedTexts.agreementText}\n className={className}\n texts={mergedTexts}\n wasChanged={state.wasChanged}\n isUpdating={isUpdating}\n />\n </div>\n )}\n </div>\n <LoginScreen\n isOpen={state.showSettings && !state.isLoggedIn}\n slug={slug}\n onSuccess={handleLoginSuccess}\n texts={mergedTexts}\n onClose={handleCloseSettings}\n />\n </main>\n );\n}\n\nfunction Wrapper({\n slug,\n userID,\n productID,\n projectName,\n projectLogo,\n projectLogoDark,\n groups,\n isManaging,\n texts,\n showQRCode,\n showPhoneInput,\n hiddenGroupIds,\n className,\n}: Props) {\n return (\n <RpcProvider>\n <NotificationsComponentPublic\n slug={slug}\n userID={userID}\n productID={productID}\n projectName={projectName}\n projectLogo={projectLogo}\n projectLogoDark={projectLogoDark}\n groups={groups}\n isManaging={isManaging}\n texts={texts}\n showQRCode={showQRCode}\n showPhoneInput={showPhoneInput}\n hiddenGroupIds={hiddenGroupIds}\n className={className}\n />\n </RpcProvider>\n );\n}\nexport default Wrapper;\n","import type { CustomizationTexts } from \"./types\";\n\nexport const DEFAULT_TEXTS: Required<CustomizationTexts> = {\n title: null,\n description: null,\n managingDescription:\n \"Zarządzaj rodzajami powiadomień i sposobem dostarczania.\",\n formTitle: \"Podaj Email aby zapisać się do powiadomień\",\n formEmailLabel: \"Email\",\n formPhoneLabel: \"Numer telefonu\",\n formPhoneOptional: \"(opcjonalnie)\",\n formEmailPlaceholder: \"np. mail@gmail...\",\n formPhonePlaceholder: \"np. 663...\",\n formSubmitButton: \"Zapisz się\",\n formSuccessMessage: \"Zapisałeś się do powiadomień.\",\n agreementText: (\n <>\n <span style={{ color: \"red\" }}>*</span>\n Wyrażam zgodę na przetwarzanie moich danych w celach marketingowych\n zgodnie z{\" \"}\n <a\n href=\"/regulations/polityka-prywatnosci\"\n target=\"_blank\"\n className=\"cursor-alias font-bold hover:font-medium\"\n >\n regulaminem\n </a>{\" \"}\n <span className=\"text-xs font-light\">\n (zgodę można w każdej chwili wycofać)\n </span>\n </>\n ),\n qrCodeTitle: \"lub zainstaluj aplikację mobilną\",\n qrCodeSubtitle: \"Aplikacja mobilna\",\n qrCodeScanText: \"zeskanuj kod QR\",\n groupsNoSelectionWarning:\n \"Jeśli żadna z grup nie jest zaznaczona, nie otrzymasz żadnych powiadomień.\",\n groupsSelectAllButton: \"Zaznacz wszystkie\",\n groupsUpdateButton: \"Aktualizuj\",\n groupsUpdateSuccess: \"Zaktualizowano pomyślnie.\",\n groupsTitle: \"Zarządzaj grupami z których chcesz otrzymywać powiadomienia\",\n manageDataTitle: \"Ustawienia powiadomień\",\n manageDataDescription: \"W jaki sposób chcesz otrzymywać powiadomienia?\",\n manageDataUnsubscribeButton: \"Odsubskrybuj\",\n manageDataUpdatedMessage: \"Zaktualizowano\",\n manageDataUnsubscribeDescription:\n \"Wypisz mnie z wszystkich powiadomień i grup.\",\n loginEmailLabel: \"Email\",\n loginEmailPlaceholder: \"Wprowadź swój email\",\n loginSendCodeButton: \"Wyślij kod weryfikacyjny\",\n loginSendingButton: \"Wysyłanie...\",\n loginCodeLabel: \"Wprowadź kod weryfikacyjny\",\n loginCodeSentMessage: \"Wysłaliśmy kod weryfikacyjny na adres\",\n loginChangeEmailButton: \"Popraw email\",\n loginResendCodeButton: \"Wyślij kod ponownie\",\n loginInvalidEmailError: \"Wprowadź prawidłowy adres email\",\n loginSlugRequiredError: \"Wymagany jest identyfikator projektu\",\n loginInvalidCodeError: \"Nieprawidłowy kod weryfikacyjny\",\n loginVerificationFailedError:\n \"Weryfikacja nie powiodła się. Sprawdź swój kod.\",\n loginSendEmailError: \"Nie udało się wysłać kodu weryfikacyjnego\",\n loginVerifyCodeError: \"Nie udało się zweryfikować kodu\",\n loginResendEmailError: \"Nie udało się ponownie wysłać kodu weryfikacyjnego\",\n loginTitle: \"Wpisz email aby zarządzać powiadomieniami\",\n loginDescription: \"Dostaniesz kod weryfikacyjny na email.\",\n loginIHaveCode: \"Mam już kod\",\n};\n","import { cn } from \"@/src/lib/utils\";\nimport type { ComponentClassNames } from \"./types\";\nimport { Button } from \"@/src/ui/button\";\nimport { LogOutIcon } from \"lucide-react\";\n\ninterface NotificationHeaderProps {\n projectName?: string;\n projectLogo?: string;\n projectLogoDark?: string;\n description: string | null;\n className?: ComponentClassNames;\n onLogout?: () => void;\n}\n\nexport function NotificationHeader({\n projectName,\n projectLogo,\n projectLogoDark,\n description,\n className,\n onLogout,\n}: NotificationHeaderProps) {\n return (\n <>\n {projectLogo != null ||\n (projectName != null && (\n <h2\n className={cn(\n \"flex max-w-44 items-center gap-3 text-lg font-medium text-black sm:max-w-none md:text-xl lg:text-2xl xl:text-3xl dark:text-neutral-100\",\n className?.headerTitle\n )}\n >\n {projectLogo != null && (\n <>\n <img\n src={projectLogo}\n alt=\"\"\n className={cn(\n \"h-12 w-auto dark:hidden\",\n className?.headerLogo\n )}\n />\n <img\n src={projectLogoDark ?? projectLogo}\n alt=\"\"\n className={cn(\n \"hidden h-12 w-auto dark:inline\",\n className?.headerLogo\n )}\n />\n </>\n )}\n <span>{projectName}</span>\n </h2>\n ))}\n <div className=\"flex items-center gap-2\">\n {description && (\n <p\n className={cn(\n \"mt-4 font-medium text-left\",\n className?.headerDescription\n )}\n >\n {description}\n </p>\n )}\n <div className=\"grow\"></div>\n {onLogout && (\n <Button variant=\"ghost\" size=\"icon-sm\" onClick={onLogout}>\n <LogOutIcon className=\"h-5 w-5\" />\n </Button>\n )}\n </div>\n </>\n );\n}\n","import { Switch } from \"@/src/ui/switch\";\nimport { cn } from \"@/src/lib/utils\";\nimport { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport { CheckCircleIcon, TriangleAlertIcon } from \"lucide-react\";\nimport { Button } from \"@/src/ui/button\";\nimport { Spinner } from \"@/src/ui/spinner\";\nimport type {\n NotificationGroup,\n ComponentClassNames,\n CustomizationTexts,\n} from \"./types\";\nimport { DEFAULT_TEXTS } from \"./constants\";\nimport { HowOftenComponent } from \"./HowOftenComponent\";\nimport { rpcProvider, useQuery } from \"@/src/rpc-provider\";\nimport { NotificationGroupHowOften } from \"@/src/gen/proto/common/v1/push_notifications_pb\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/src/ui/card\";\n\ninterface NotificationGroupsListProps {\n groups: NotificationGroup[];\n hiddenGroupIds?: string[];\n isManaging?: boolean;\n onToggle: (groupID: string) => void;\n onCheckAll: () => void;\n onUpdate?: () => void;\n isUpdating?: boolean;\n wasChanged?: boolean;\n isUserGroupsUpdated?: boolean;\n className?: ComponentClassNames;\n texts?: CustomizationTexts;\n}\n\nexport function NotificationGroupsList({\n groups = [],\n isManaging,\n onToggle,\n onCheckAll,\n onUpdate,\n isUpdating,\n wasChanged,\n isUserGroupsUpdated,\n className,\n texts,\n}: NotificationGroupsListProps) {\n const [groupsParent] = useAutoAnimate();\n const [updateGroupsParent] = useAutoAnimate();\n\n const hasNoSelection =\n groups.filter((group) => group.isOn === false).length > 0;\n const hasUnchecked =\n groups.filter((group) => group.isOn === false).length > 0;\n\n if (groups.length <= 1 && isManaging != true) {\n return null;\n }\n\n const content = (\n <div\n ref={groupsParent}\n className={cn(\"my-5 flex flex-col gap-3\", className?.groupsList)}\n >\n {groups.map((group) => (\n <div\n id={group.id}\n role=\"button\"\n key={group.id}\n className={cn(\n group.isOn\n ? \"bg-neutral-50 hover:bg-transparent shadow-sm border-transparent dark:bg-neutral-800\"\n : \"border-neutral-200 hover:bg-neutral-50 dark:hover:border-neutral-800 shadow-sm dark:border-neutral-800\",\n \"active:bg-beige-300 flex w-full cursor-pointer items-center gap-3 rounded-xl border px-3 py-2 transition active:dark:bg-neutral-900\",\n className?.groupItem\n )}\n onClick={(e) => {\n if (e.target instanceof HTMLButtonElement) {\n return;\n }\n onToggle(group.id);\n }}\n >\n <Switch\n checked={group.isOn}\n className=\"data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-neutral-700\"\n onCheckedChange={() => {\n onToggle(group.id);\n }}\n />\n <div className=\"flex flex-col items-start justify-start\">\n <p className=\"font-medium text-sm\">{group.name}</p>\n {group.description && (\n <p className=\"text-xs font-light\">{group.description}</p>\n )}\n </div>\n <div className=\"grow\"></div>\n {group.howOften && <HowOftenComponent regularity={group.howOften} />}\n </div>\n ))}\n <div className=\"flex gap-2\">\n {isManaging === true && (\n <>\n <div\n ref={updateGroupsParent}\n className=\"flex flex-col items-start justify-start\"\n >\n {wasChanged && (\n <Button\n variant=\"default\"\n size=\"sm\"\n className=\"relative\"\n disabled={isUpdating}\n onClick={onUpdate}\n >\n {texts?.groupsUpdateButton ??\n DEFAULT_TEXTS.groupsUpdateButton}\n {isUpdating && (\n <div className=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\">\n <Spinner />\n </div>\n )}\n </Button>\n )}\n {isUserGroupsUpdated && (\n <p className=\"mt-3 flex items-center gap-2 text-sm text-green-500\">\n <CheckCircleIcon color=\"var(--color-green-500\" size={16} />{\" \"}\n {texts?.groupsUpdateSuccess ??\n DEFAULT_TEXTS.groupsUpdateSuccess}\n </p>\n )}\n </div>\n <div className=\"grow\"></div>\n </>\n )}\n {hasUnchecked && (\n <div className=\"flex justify-start\">\n <Button\n className=\"cursor-pointer dark:bg-neutral-700\"\n onClick={onCheckAll}\n size=\"sm\"\n variant=\"secondary\"\n type=\"button\"\n >\n {texts?.groupsSelectAllButton ??\n DEFAULT_TEXTS.groupsSelectAllButton}\n </Button>\n </div>\n )}\n </div>\n {hasNoSelection && (\n <div className=\"flex text-left gap-2 text-xs text-yellow-500\">\n <TriangleAlertIcon color=\"orange\" size={16} />\n {texts?.groupsNoSelectionWarning ??\n DEFAULT_TEXTS.groupsNoSelectionWarning}\n </div>\n )}\n </div>\n );\n\n if (isManaging == true) {\n return (\n <Card className=\"mt-5 text-left\">\n <CardHeader>\n <CardTitle>\n {texts?.groupsTitle ?? DEFAULT_TEXTS.groupsTitle}\n </CardTitle>\n </CardHeader>\n <CardContent>{content}</CardContent>\n </Card>\n );\n }\n\n return content;\n}\n","import * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"@/src/lib/utils\"\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverAnchor({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }\n","import { Popover, PopoverContent, PopoverTrigger } from \"@/src/ui/popover\";\nimport { ClockIcon } from \"lucide-react\";\n\nexport function HowOftenComponent({ regularity }: { regularity: string }) {\n let text = \"\";\n switch (regularity) {\n case \"rarely\":\n text = \"rzadko\";\n break;\n case \"often\":\n text = \"często\";\n break;\n case \"very_often\":\n text = \"codzienne\";\n break;\n }\n\n return (\n <Popover>\n <PopoverTrigger\n onClick={(e) => {\n e.stopPropagation();\n }}\n >\n <button\n type=\"button\"\n className=\"flex w-[30%] cursor-help flex-col items-center justify-center text-xs md:w-[25%] xl:w-[20%]\"\n >\n <ClockIcon size={12} />\n <span>{text}</span>\n </button>\n </PopoverTrigger>\n <PopoverContent className=\"w-80\">\n <div className=\"grid gap-4\">\n <div className=\"space-y-2\">\n <h4 className=\"leading-none font-medium\">Co to oznacza?</h4>\n <ul className=\"list-inside list-disc text-sm\">\n <li>\n <span className=\"font-semibold\">Rzadko</span> – powiadomienia\n będą wysyłane maksymalnie kilka razy w miesiącu.\n </li>\n <li>\n <span className=\"font-semibold\">Często</span> – powiadomienia\n mogę być wysyłane kilka razy w tygodniu.\n </li>\n <li>\n <span className=\"font-semibold\">Codzienne</span> – powiadomienia\n będą wysyłane nawet codziennie.\n </li>\n </ul>\n </div>\n <div className=\"grid gap-2\"></div>\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n","import { cn } from \"@/src/lib/utils\";\nimport type { ComponentClassNames, CustomizationTexts } from \"./types\";\nimport { DEFAULT_TEXTS } from \"./constants\";\nimport { HOST } from \"../checkout/constants\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/src/ui/card\";\n\ninterface QRCodeSectionProps {\n showQRCode?: boolean;\n isManaging?: boolean;\n className?: ComponentClassNames;\n texts?: CustomizationTexts;\n}\n\nexport function QRCodeSection({\n showQRCode = true,\n isManaging: _isManaging,\n className,\n texts,\n}: QRCodeSectionProps) {\n const isBrowser = typeof window !== \"undefined\";\n const darkMode = isBrowser\n ? window.matchMedia?.(\"(prefers-color-scheme: dark)\").matches\n ? true\n : false\n : false;\n\n function getURL(isBrowser: boolean) {\n if (isBrowser) {\n return window.location.href;\n }\n return \"\";\n }\n\n if (!showQRCode) {\n return null;\n }\n\n return (\n <Card\n className={cn(\n \"bg-beige-100 rounded-xl p-4 dark:bg-neutral-700\",\n className?.qrCodeSection\n )}\n >\n <CardHeader>\n <CardTitle\n className={cn(\n \"mb-3 text-base font-medium lg:text-lg\",\n className?.qrCodeTitle\n )}\n >\n {texts?.qrCodeSubtitle ?? DEFAULT_TEXTS.qrCodeSubtitle}\n {\" \" + (texts?.qrCodeTitle ?? DEFAULT_TEXTS.qrCodeTitle)}\n </CardTitle>\n </CardHeader>\n <CardContent className=\"flex flex-col items-center gap-2\">\n <div className=\"mt-1.5 mb-3 flex items-center gap-x-2\">\n <a\n href=\"https://apps.apple.com/us/app/bitsnap/id6741902807\"\n target=\"_blank\"\n className=\"max-w-28 flex-1 basis-1/2 lg:max-w-36\"\n >\n <img\n className=\"h-auto w-full\"\n src={HOST + \"/app-store-logo.png\"}\n alt=\"Download on App Store\"\n />\n </a>\n <a\n href=\"https://play.google.com/store/apps/details?id=com.bitsnap.Bitsnap&pli=1\"\n target=\"_blank\"\n className=\"max-w-28 flex-1 basis-1/2 lg:max-w-36\"\n >\n <img\n className=\"h-auto w-full\"\n src={HOST + \"/google-play-logo.png\"}\n alt=\"Get in on Google Play\"\n />\n </a>\n </div>\n {isBrowser && (\n <div className=\"flex items-center justify-center\">\n <div\n className={cn(\n \"flex min-w-[40%] flex-col items-center gap-2 rounded-xl bg-white p-2 dark:bg-neutral-900\",\n className?.qrCodeContainer\n )}\n >\n <img\n className=\"mt-3 w-[80%] p-1 pt-3\"\n src={\n HOST +\n `/api/qr-gen?url=${getURL(isBrowser)}&bgColor=${\n !darkMode ? \"F6F4F0\" : \"171717\"\n }&textColor=${!darkMode ? \"000000\" : \"ffffff\"}&margin=0`\n }\n />\n <p className=\"text-xs md:text-sm\">\n {texts?.qrCodeScanText ?? DEFAULT_TEXTS.qrCodeScanText}\n </p>\n </div>\n </div>\n )}\n </CardContent>\n </Card>\n );\n}\n","import { useState } from \"react\";\nimport { isValidPhoneNumber } from \"react-phone-number-input\";\nimport { cn } from \"@/src/lib/utils\";\nimport { rpcProvider, useMutation } from \"src/rpc-provider\";\nimport { FailureMessage } from \"@/src/gen/proto/dashboard/v1/notifications_pb\";\nimport type {\n ComponentClassNames,\n CustomizationTexts,\n NotificationGroup,\n} from \"./types\";\nimport { DEFAULT_TEXTS } from \"./constants\";\nimport { FormInput } from \"./FormInput\";\nimport type { ReactNode } from \"react\";\nimport { NotificationGroupsList } from \"./NotificationGroupsList\";\n\nconst emailRegex =\n /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\ninterface AddUserToGroupsProps {\n slug: string;\n groups: NotificationGroup[];\n isUpdating?: boolean;\n wasChanged?: boolean;\n onToggle?: (id: string) => void;\n onCheckAll?: () => void;\n showPhoneInput?: boolean;\n agreementText?: string | ReactNode;\n className?: ComponentClassNames;\n texts?: CustomizationTexts;\n onSuccess?: (\n userAlreadyExists: boolean,\n userID: string | undefined,\n accessToken: string | undefined\n ) => void;\n}\n\nexport function AddUserToGroups({\n groups,\n onToggle,\n onCheckAll,\n slug,\n showPhoneInput = false,\n agreementText,\n className,\n texts,\n isUpdating,\n wasChanged,\n onSuccess,\n}: AddUserToGroupsProps) {\n const [errMsg, setErrMsg] = useState(\"\");\n const [warnMsg, setWarnMsg] = useState(\"\");\n const [isSubmited, setIsSubmited] = useState(false);\n const [agreementLack, setAgreementLack] = useState(false);\n const [emailLack, setEmailLack] = useState(false);\n const {\n mutateAsync: createNotificationUserMutation,\n isPending: isCreateNotificationUserPending,\n } = useMutation(rpcProvider.notifications.createNotificationUser);\n\n function validatePhoneNumber(phone: string): boolean {\n if (phone == null) {\n return false;\n }\n return isValidPhoneNumber(phone, \"PL\");\n }\n\n async function save(email: string, phone: string, agreement: boolean) {\n setErrMsg(\"\");\n setWarnMsg(\"\");\n setEmailLack(false);\n setIsSubmited(false);\n setAgreementLack(false);\n\n if (!agreement) {\n setAgreementLack(true);\n const msg = \"Zgoda w tym przypadku jest wymagana.\";\n setErrMsg(msg);\n return;\n }\n\n if (emailRegex.test(email) === false) {\n setErrMsg(\"Email jest nieprawidłowy.\");\n setEmailLack(true);\n return;\n }\n\n if (phone.length > 0) {\n if (validatePhoneNumber(phone) === false) {\n const msg =\n \"Numer telefonu może być nieprawidłowy. Zapisaliśmy go ale jeśli jest nieprawidłowy to wpisz jeszcze raz i kliknij przycisk.\";\n setWarnMsg(msg);\n }\n }\n\n try {\n const newNotificationUser = await createNotificationUserMutation({\n slug: slug,\n email: email,\n phone: phone,\n groups: groups.filter((el) => el.isOn == true).map((el) => el.id),\n mobileNotificationEnabled: true,\n emailNotificationEnabled: true,\n smsNotificationEnabled: true,\n });\n\n if (newNotificationUser.result.case === \"success\") {\n setIsSubmited(true);\n setTimeout(() => {\n onSuccess?.(\n false,\n newNotificationUser.userId,\n newNotificationUser.accessToken\n );\n }, 1000);\n return;\n } else {\n setIsSubmited(true);\n const failureMessage = newNotificationUser.result.value;\n\n if (failureMessage != null) {\n if (\n failureMessage == FailureMessage.NOTIFICATION_USER_ALREADY_EXIST\n ) {\n onSuccess?.(true, undefined, undefined);\n return;\n }\n console.log(`Code error: ${FailureMessage[failureMessage]}`);\n setErrMsg(\"Wystąpił błąd: \" + FailureMessage[failureMessage]);\n return;\n }\n\n return;\n }\n } catch (e) {\n setErrMsg(\"Wystąpił błąd podczas zapisywania. Spróbuj ponownie.\");\n console.log(`Error: ${e}`);\n }\n }\n\n const text = texts?.formTitle ?? DEFAULT_TEXTS.formTitle;\n\n return (\n <div\n className={cn(\n \"bg-beige-100 rounded-xl p-4 dark:bg-neutral-700\",\n className?.formSection\n )}\n >\n {text.length > 0 && (\n <h3\n className={cn(\n \"mb-3 text-base font-medium lg:text-lg\",\n className?.formTitle\n )}\n >\n {text}\n </h3>\n )}\n\n <NotificationGroupsList\n groups={groups}\n isManaging={false}\n onToggle={onToggle ?? (() => {})}\n onCheckAll={onCheckAll ?? (() => {})}\n isUpdating={isUpdating ?? false}\n wasChanged={wasChanged ?? false}\n isUserGroupsUpdated={false}\n className={className}\n texts={texts}\n />\n\n <FormInput\n errMsg={errMsg}\n emailLack={emailLack}\n warnMsg={warnMsg}\n submit={save}\n isLoading={isCreateNotificationUserPending}\n isSubmited={isSubmited}\n agreementLack={agreementLack}\n showPhoneInput={showPhoneInput}\n agreementText={\n agreementText ?? texts?.agreementText ?? DEFAULT_TEXTS.agreementText\n }\n className={className}\n texts={texts}\n />\n </div>\n );\n}\n","import { Input } from \"@/src/ui/input\";\nimport { cn } from \"@/src/lib/utils\";\nimport { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport { Label } from \"@radix-ui/react-label\";\nimport {\n CheckCircleIcon,\n CircleAlertIcon,\n TriangleAlertIcon,\n} from \"lucide-react\";\nimport { useState, type FormEvent } from \"react\";\nimport { Button } from \"@/src/ui/button\";\nimport { Spinner } from \"@/src/ui/spinner\";\nimport type { ComponentClassNames, CustomizationTexts } from \"./types\";\nimport { DEFAULT_TEXTS } from \"./constants\";\nimport type { ReactNode } from \"react\";\n\ninterface FormInputProps {\n isLoading: boolean;\n submit: (email: string, phone: string, agreement: boolean) => void;\n errMsg: string;\n agreementLack?: boolean;\n emailLack?: boolean;\n warnMsg: string;\n isSubmited: boolean;\n showPhoneInput?: boolean;\n agreementText?: string | ReactNode;\n className?: ComponentClassNames;\n texts?: CustomizationTexts;\n}\n\nexport function FormInput({\n submit,\n isLoading,\n errMsg,\n emailLack,\n warnMsg,\n isSubmited,\n agreementLack,\n showPhoneInput = false,\n agreementText,\n className,\n texts,\n}: FormInputProps) {\n const [email, setEmail] = useState(\"\");\n const [phone, setPhone] = useState(\"\");\n const [isChecked, setIsChecked] = useState(false);\n\n const [parent] = useAutoAnimate();\n\n function submitForm(e: FormEvent) {\n e.preventDefault();\n submit(email, phone, isChecked);\n }\n\n return (\n <form\n ref={parent}\n onSubmit={submitForm}\n className={cn(\"flex flex-col gap-3 text-left\", className?.formContainer)}\n >\n <div className=\"flex flex-col gap-1 text-left\">\n <Label className=\"text-sm\" htmlFor=\"bts-notifications-form-email\">\n {texts?.formEmailLabel ?? DEFAULT_TEXTS.formEmailLabel}\n </Label>\n <Input\n value={email}\n onChange={(newVal) => {\n setEmail(newVal.currentTarget.value);\n }}\n id=\"bts-notifications-form-email\"\n className={cn(emailLack === true ? \"border-red-400\" : \"\")}\n type=\"email\"\n placeholder={\n texts?.formEmailPlaceholder ?? DEFAULT_TEXTS.formEmailPlaceholder\n }\n />\n </div>\n\n {showPhoneInput && (\n <div className=\"flex flex-col gap-1 text-left\">\n <Label className=\"text-sm\" htmlFor=\"bts-notifications-form-phone\">\n {texts?.formPhoneLabel ?? DEFAULT_TEXTS.formPhoneLabel}{\" \"}\n <span className=\"text-neutral-500 dark:text-neutral-500\">\n {texts?.formPhoneOptional ?? DEFAULT_TEXTS.formPhoneOptional}\n </span>\n </Label>\n <Input\n value={phone}\n onChange={(newVal) => {\n setPhone(newVal.currentTarget.value);\n }}\n id=\"bts-notifications-form-phone\"\n className=\"\"\n type=\"tel\"\n autoComplete=\"tel\"\n autoCorrect=\"off\"\n placeholder={\n texts?.formPhonePlaceholder ?? DEFAULT_TEXTS.formPhonePlaceholder\n }\n />\n </div>\n )}\n <div className=\"flex items-start gap-x-1.5\">\n <input\n className=\"cursor-pointer\"\n id=\"bts-notifications-form-marketing-consent\"\n type=\"checkbox\"\n checked={isChecked}\n onChange={() => {\n setIsChecked(!isChecked);\n }}\n />\n <label\n htmlFor=\"bts-notifications-form-marketing-consent\"\n className={cn(\n \"cursor-pointer text-xs leading-4 transition-colors md:text-sm md:leading-4\",\n agreementLack === true ? \"text-yellow-700\" : \"\"\n )}\n >\n {agreementText}\n </label>\n </div>\n {errMsg.length > 0 && (\n <p className=\"mb-3 flex items-center gap-1 text-sm text-red-400\">\n <TriangleAlertIcon color=\"#ff6467\" size={16} /> {errMsg}\n </p>\n )}\n {warnMsg.length > 0 && (\n <p className=\"mb-3 flex items-center gap-1 text-sm text-amber-400\">\n <CircleAlertIcon color=\"var(--color-amber-400)\" size={16} /> {warnMsg}\n </p>\n )}\n {isSubmited == false && (\n <div className=\"flex justify-start\">\n <Button\n variant=\"default\"\n disabled={isLoading}\n className={cn(\n isLoading ? \"cursor-not-allowed text-transparent\" : \"\",\n \"relative\"\n )}\n >\n {texts?.formSubmitButton ?? DEFAULT_TEXTS.formSubmitButton}\n {isLoading && (\n <div className=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\">\n <Spinner />\n </div>\n )}\n </Button>\n </div>\n )}\n {isSubmited && (\n <div className=\"flex items-center gap-3 text-sm text-green-400\">\n <CheckCircleIcon size={16} />{\" \"}\n {texts?.formSuccessMessage ?? DEFAULT_TEXTS.formSuccessMessage}\n </div>\n )}\n </form>\n );\n}\n","import { useEffect, useState } from \"react\";\nimport { Skeleton } from \"@/src/ui/skeleton\";\nimport { Switch } from \"@/src/ui/switch\";\nimport { cn } from \"@/src/lib/utils\";\nimport { Label } from \"@radix-ui/react-label\";\nimport { MessageCircleWarningIcon } from \"lucide-react\";\nimport { rpcProvider, useMutation, useQuery } from \"src/rpc-provider\";\nimport { useDebouncedCallback } from \"use-debounce\";\nimport { UnsubscribeDialog } from \"./UnsubscribeDialog\";\nimport { Button } from \"@/src/ui/button\";\nimport { Spinner } from \"@/src/ui/spinner\";\nimport type { ComponentClassNames, CustomizationTexts } from \"./types\";\nimport { DEFAULT_TEXTS } from \"./constants\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/src/ui/card\";\nimport { useAutoAnimate } from \"@formkit/auto-animate/react\";\n\ninterface ManageMyDataProps {\n accessToken: string;\n slug: string;\n userID: string;\n className?: ComponentClassNames;\n texts?: CustomizationTexts;\n}\n\nexport function ManageMyData({\n accessToken,\n slug,\n userID,\n className,\n texts,\n}: ManageMyDataProps) {\n const [parent] = useAutoAnimate();\n const [parentCard] = useAutoAnimate();\n const { mutateAsync: deleteMyData, isPending: isDeleting } = useMutation(\n rpcProvider.notifications.deleteNotificationUser\n );\n const { mutateAsync: updateNotificationUser, isPending: isUpdating } =\n useMutation(rpcProvider.notifications.updateNotificationUser);\n\n const { data: userSettings, isFetching: isLoading } = useQuery(\n rpcProvider.notifications.getNotificationUserSettings,\n {\n userId: userID,\n slug: slug,\n accessToken: accessToken,\n }\n );\n\n const [email, setEmail] = useState(false);\n const [phone, setPhone] = useState(false);\n const [isDataUpdated, setIsDataUpdated] = useState(false);\n const [push, setPush] = useState(false);\n const [isDialogOpen, setIsDialogOpen] = useState(false);\n\n const details =\n userSettings?.result.case === \"success\"\n ? userSettings?.result?.value\n : undefined;\n\n function deleteData() {\n setIsDialogOpen(true);\n }\n\n async function handleConfirmDelete() {\n await deleteMyData({\n accessToken: accessToken,\n slug: slug,\n userId: userID,\n });\n setIsDialogOpen(false);\n }\n\n async function updateData() {\n await updateNotificationUser({\n accessToken: accessToken,\n slug: slug,\n notificationUserId: userID,\n mobileNotificationEnabled: push,\n emailNotificationEnabled: email,\n smsNotificationEnabled: phone,\n });\n setIsDataUpdated(true);\n setTimeout(() => {\n setIsDataUpdated(false);\n }, 3000);\n }\n const debouncedUpdateData = useDebouncedCallback((_: boolean) => {\n updateData();\n }, 300);\n\n useEffect(() => {\n const details =\n userSettings?.result.case === \"success\"\n ? userSettings?.result?.value\n : undefined;\n\n setEmail(details?.emailNotificationEnabled ?? false);\n setPhone(details?.smsNotificationEnabled ?? false);\n setPush(details?.mobileNotificationEnabled ?? false);\n }, [userSettings]);\n\n function setData(key: \"email\" | \"phone\" | \"push\", value: boolean) {\n if (key === \"email\") {\n setEmail(value);\n }\n if (key === \"phone\") {\n setPhone(value);\n }\n if (key === \"push\") {\n setPush(value);\n }\n debouncedUpdateData(true);\n }\n\n return (\n <div\n className={cn(\n \"bg-beige-100 rounded-xl p-4 dark:bg-neutral-700\",\n className?.manageDataSection\n )}\n >\n <div className=\"flex justify-start\">\n <h3\n className={cn(\n \"mb-3 text-base font-medium lg:text-lg\",\n className?.manageDataTitle\n )}\n >\n {texts?.manageDataTitle ?? DEFAULT_TEXTS.manageDataTitle}\n </h3>\n </div>\n\n {isLoading ? (\n <Skeleton className=\"h-64 w-full\" />\n ) : (\n <Card ref={parentCard} className={cn(isUpdating && \"relative\")}>\n <CardHeader>\n <CardTitle>\n <p className=\"text-sm text-left\">\n {texts?.manageDataDescription ??\n DEFAULT_TEXTS.manageDataDescription}\n </p>\n </CardTitle>\n </CardHeader>\n <CardContent ref={parent}>\n <div\n className={cn(\n isUpdating && \"opacity-50 pointer-events-none\",\n \"flex flex-col gap-2\"\n )}\n >\n <div className=\"flex flex-col items-start gap-5 gap-x-2\">\n {details?.emailNotificationAvailable && (\n <div className=\"flex items-center gap-3\">\n <Switch\n id=\"email-enabled\"\n className=\"data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-neutral-600\"\n checked={email}\n onCheckedChange={() => {\n setData(\"email\", !email);\n }}\n />\n <Label htmlFor=\"email-enabled\" className=\"text-sm\">\n Email\n </Label>\n </div>\n )}\n {details?.smsNotificationAvailable && (\n <div className=\"flex items-center gap-3\">\n <Switch\n id=\"sms-enabled\"\n className=\"data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-neutral-600\"\n checked={phone}\n onCheckedChange={() => {\n setData(\"phone\", !phone);\n }}\n />\n <Label htmlFor=\"sms-enabled\" className=\"text-sm\">\n SMS\n </Label>\n </div>\n )}\n {details?.mobileNotificationAvailable && (\n <>\n <div className=\"flex items-center gap-3\">\n <Switch\n id=\"push-enabled\"\n className=\"data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-neutral-600\"\n checked={push}\n onCheckedChange={() => {\n setData(\"push\", !push);\n }}\n />\n <Label htmlFor=\"push-enabled\" className=\"text-sm\">\n Powiadomienia na telefon\n </Label>\n </div>\n {details?.hasUserInstalledApp === false && (\n <div className=\"flex items-center gap-3\">\n <MessageCircleWarningIcon\n color=\"var(--color-amber-500)\"\n size={26}\n />\n <p className=\"text-xs text-amber-500\">\n Wygląda na to, że nie masz zainstalowanej aplikacji\n mobilnej. Zainstaluj i wyraź zgodę na otrzymywanie\n powiadomień na telefon.\n </p>\n </div>\n )}\n </>\n )}\n </div>\n </div>\n\n <div className=\"mt-5 flex flex-col gap-2 text-left\">\n <hr />\n {isDataUpdated && (\n <p className=\"text-xs text-green-500\">\n {texts?.manageDataUpdatedMessage ??\n DEFAULT_TEXTS.manageDataUpdatedMessage}\n </p>\n )}\n <div className=\"flex items-center gap-x-2\">\n <Button\n size=\"sm\"\n variant=\"link\"\n className={cn(\n \"pl-0 ml-0\",\n isDeleting && \"cursor-not-allowed\"\n )}\n onClick={deleteData}\n >\n {texts?.manageDataUnsubscribeButton ??\n DEFAULT_TEXTS.manageDataUnsubscribeButton}\n {isDeleting && (\n <div className=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\">\n <Spinner />\n </div>\n )}\n </Button>\n </div>\n </div>\n </CardContent>\n {isUpdating && (\n <div className=\"bg-black/30 absolute inset-0 rounded-xl\">\n <div className=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\">\n <Spinner />\n </div>\n </div>\n )}\n </Card>\n )}\n <UnsubscribeDialog\n open={isDialogOpen}\n onOpenChange={setIsDialogOpen}\n onConfirm={handleConfirmDelete}\n isDeleting={isDeleting}\n />\n </div>\n );\n}\n","import { cn } from \"../../lib/utils\";\nimport { TriangleAlertIcon, XIcon } from \"lucide-react\";\nimport { createPortal } from \"react-dom\";\nimport { useEffect, useState } from \"react\";\nimport { Button } from \"@/src/ui/button\";\n\ninterface UnsubscribeDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n onConfirm: () => void;\n isDeleting?: boolean;\n}\n\nexport function UnsubscribeDialog({\n open,\n onOpenChange,\n onConfirm,\n isDeleting = false,\n}: UnsubscribeDialogProps) {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n return () => setMounted(false);\n }, []);\n\n useEffect(() => {\n if (open) {\n document.body.style.overflow = \"hidden\";\n } else {\n document.body.style.overflow = \"\";\n }\n return () => {\n document.body.style.overflow = \"\";\n };\n }, [open]);\n\n if (!mounted || !open) {\n return null;\n }\n\n const handleBackdropClick = (e: React.MouseEvent<HTMLDivElement>) => {\n if (e.target === e.currentTarget) {\n onOpenChange(false);\n }\n };\n\n const handleConfirm = () => {\n onConfirm();\n };\n\n return createPortal(\n <div\n className=\"fixed inset-0 z-[9999] flex items-center justify-center bg-black/50 p-4\"\n onClick={handleBackdropClick}\n >\n <div\n className={cn(\n \"relative w-full max-w-md rounded-2xl bg-white p-6 shadow-lg\",\n \"dark:bg-neutral-800\",\n \"animate-in fade-in-0 zoom-in-95 duration-200\"\n )}\n onClick={(e) => e.stopPropagation()}\n >\n <button\n onClick={() => onOpenChange(false)}\n className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none dark:ring-offset-neutral-950 dark:focus:ring-neutral-300\"\n disabled={isDeleting}\n >\n <XIcon className=\"h-4 w-4\" />\n <span className=\"sr-only\">Zamknij</span>\n </button>\n\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-start gap-3\">\n <div className=\"flex-shrink-0\">\n <TriangleAlertIcon\n className=\"h-6 w-6 text-amber-500\"\n aria-hidden=\"true\"\n />\n </div>\n <div className=\"flex-1\">\n <h2 className=\"text-lg font-semibold text-black dark:text-neutral-100\">\n Czy na pewno chcesz się wypisać?\n </h2>\n </div>\n </div>\n\n <p className=\"text-sm text-neutral-600 dark:text-neutral-400\">\n Kliknięcie tego przycisku spowoduje wypisanie z wszelkich\n powiadomień i grup, które zapisałeś.\n </p>\n\n <div className=\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => onOpenChange(false)}\n disabled={isDeleting}\n className=\"sm:min-w-[100px]\"\n >\n Anuluj\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n onClick={handleConfirm}\n disabled={isDeleting}\n className={cn(\n isDeleting && \"cursor-not-allowed text-transparent\",\n \"relative sm:min-w-[100px]\"\n )}\n >\n Usuń\n {isDeleting && (\n <div className=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\">\n <div className=\"h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent\" />\n </div>\n )}\n </Button>\n </div>\n </div>\n </div>\n </div>,\n document.body\n );\n}\n","import { useState } from \"react\";\nimport { rpcProvider, RpcProvider, useMutation } from \"src/rpc-provider\";\nimport { getProjectID } from \"../checkout/CartProvider\";\nimport { Input } from \"@/src/ui/input\";\nimport { Label } from \"@/src/ui/label\";\nimport { Button } from \"@/src/ui/button\";\nimport { InputOTP, InputOTPGroup, InputOTPSlot } from \"@/src/ui/input-otp\";\nimport { cn } from \"@/src/lib/utils\";\nimport { DEFAULT_TEXTS } from \"./constants\";\nimport type { CustomizationTexts } from \"./types\";\nimport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"@/src/ui/card\";\nimport { ArrowLeft, X } from \"lucide-react\";\nimport { useAutoAnimate } from \"@formkit/auto-animate/react\";\nimport { Dialog, DialogContent } from \"@/src/ui/dialog\";\nimport { ConnectError } from \"@connectrpc/connect\";\nimport { Spinner } from \"@/src/ui/spinner\";\n\nexport type LoginScreenTexts = Pick<\n CustomizationTexts,\n | \"loginTitle\"\n | \"loginDescription\"\n | \"loginEmailLabel\"\n | \"loginEmailPlaceholder\"\n | \"loginSendCodeButton\"\n | \"loginSendingButton\"\n | \"loginCodeLabel\"\n | \"loginCodeSentMessage\"\n | \"loginIHaveCode\"\n | \"loginChangeEmailButton\"\n | \"loginResendCodeButton\"\n | \"loginInvalidEmailError\"\n | \"loginInvalidCodeError\"\n | \"loginSlugRequiredError\"\n | \"loginVerificationFailedError\"\n | \"loginSendEmailError\"\n | \"loginVerifyCodeError\"\n | \"loginResendEmailError\"\n>;\n\ninterface LoginScreenProps {\n /**\n * Unique identifier for the project (if not provided, productID will be used via CartProvider).\n */\n slug: string;\n\n /**\n * Callback function called when login is successful with the access token.\n */\n onSuccess?: (userID: string | undefined, accessToken: string) => void;\n\n /**\n * Callback function called when an error occurs.\n */\n onError?: (error: Error) => void;\n\n /**\n * Callback function called when the close button is clicked.\n */\n onClose?: () => void;\n\n /**\n * If true, the dialog is open.\n */\n isOpen: boolean;\n\n /**\n * Custom CSS class names for styling.\n */\n className?: string;\n\n /**\n * Custom texts used throughout the component for i18n or personalisation.\n */\n texts: LoginScreenTexts;\n}\n\nexport function LoginScreen({\n slug,\n onSuccess,\n onError,\n className: _className,\n isOpen,\n onClose,\n texts,\n}: LoginScreenProps) {\n const [parentContent] = useAutoAnimate();\n const [parentHeader] = useAutoAnimate();\n const [email, setEmail] = useState(\"\");\n const [code, setCode] = useState(\"\");\n const [isEmailSent, setIsEmailSent] = useState(false);\n const [error, setError] = useState<string | null>(null);\n\n const { mutateAsync: verifyUserEmail, isPending: isVerifying } = useMutation(\n rpcProvider.notifications.verifyUserEmail\n );\n\n const handleSendEmail = async (e: React.FormEvent) => {\n e.preventDefault();\n setError(null);\n\n if (!email || !email.includes(\"@\")) {\n setError(texts.loginInvalidEmailError ?? \"\");\n return;\n }\n\n try {\n await verifyUserEmail({\n email,\n slug: slug,\n });\n setIsEmailSent(true);\n } catch (err) {\n const error =\n err instanceof Error ? err : new Error(texts.loginSendEmailError);\n setError(error.message);\n onError?.(error);\n }\n };\n\n const handleVerifyCode = async (value: string) => {\n setCode(value);\n setError(null);\n\n // Only verify when all 6 digits are entered\n if (value.length === 6) {\n try {\n const response = await verifyUserEmail({\n email: undefined,\n code: value,\n slug: slug,\n });\n\n if (response.ok && response.accessToken) {\n onSuccess?.(response.userId, response.accessToken);\n } else {\n setError(texts.loginVerificationFailedError ?? \"\");\n onError?.(new Error(texts.loginVerificationFailedError));\n }\n } catch (err) {\n const error =\n err instanceof Error ? err : new Error(texts.loginVerifyCodeError);\n if (error.message.includes(\"Invalid code\")) {\n setError(texts.loginInvalidCodeError ?? error.message);\n setCode(\"\");\n return;\n }\n setError(error.message);\n onError?.(error);\n // Clear the code on error so user can retry\n setCode(\"\");\n }\n }\n };\n\n const handleResendEmail = async () => {\n setCode(\"\");\n setError(null);\n\n if (!email || !slug) {\n setError(texts.loginSlugRequiredError ?? \"\");\n return;\n }\n\n try {\n await verifyUserEmail({\n email,\n slug: slug,\n });\n // Keep isEmailSent as true, just clear the code\n } catch (err) {\n const error =\n err instanceof Error ? err : new Error(texts.loginResendEmailError);\n setError(error.message);\n onError?.(error);\n }\n };\n\n const handleChangeEmail = () => {\n setIsEmailSent(false);\n setCode(\"\");\n setError(null);\n };\n\n return (\n <Dialog open={isOpen} onOpenChange={onClose}>\n <DialogContent className=\"sm:max-w-[425px] min-h-[250px]\">\n <div className=\"flex flex-col min-h-[250px] h-full\">\n {/* Header */}\n <div ref={parentHeader} className=\"flex items-start gap-2 mb-2\">\n {isEmailSent && (\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n onClick={() => {\n setIsEmailSent(false);\n }}\n >\n <ArrowLeft className=\"h-5 w-5\" />\n </Button>\n )}\n <div>\n <CardTitle>\n {isEmailSent\n ? texts.loginCodeLabel ?? \"\"\n : texts.loginTitle ?? \"\"}\n </CardTitle>\n </div>\n </div>\n {/* Description */}\n <CardDescription className=\"mb-4\">\n {isEmailSent ? (\n <>\n {texts.loginCodeSentMessage ?? \"\"} {email}\n </>\n ) : (\n texts.loginDescription ?? \"\"\n )}\n </CardDescription>\n\n {/* Main form area */}\n <div className=\"flex-1 flex flex-col\">\n {!isEmailSent ? (\n <form onSubmit={handleSendEmail} className=\"flex flex-col flex-1\">\n <div className=\"space-y-2\">\n <Label htmlFor=\"email\">{texts.loginEmailLabel ?? \"\"}</Label>\n <Input\n id=\"email\"\n type=\"email\"\n placeholder={texts.loginEmailPlaceholder ?? \"\"}\n value={email}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setEmail(e.target.value)\n }\n required\n disabled={isVerifying}\n aria-invalid={error ? \"true\" : \"false\"}\n />\n </div>\n {error && (\n <div\n className=\"text-sm text-destructive mt-2 mb-1\"\n role=\"alert\"\n >\n {error}\n </div>\n )}\n <div className=\"grow\" />\n {/* Always pin buttons to the bottom */}\n <div className=\"flex flex-col items-start gap-0 pt-2\">\n <Button type=\"submit\" size=\"sm\" disabled={isVerifying}>\n {isVerifying\n ? texts.loginSendingButton ?? \"\"\n : texts.loginSendCodeButton ?? \"\"}\n </Button>\n <Button\n type=\"button\"\n variant=\"link\"\n className=\"ml-0 pl-0\"\n size=\"sm\"\n onClick={() => {\n setIsEmailSent(true);\n }}\n >\n {texts.loginIHaveCode ?? \"\"}\n </Button>\n </div>\n </form>\n ) : (\n <form\n onSubmit={(e) => e.preventDefault()}\n className=\"flex flex-col flex-1\"\n >\n <div className=\"space-y-2\">\n <Label>{texts.loginCodeLabel ?? \"\"}</Label>\n <InputOTP\n maxLength={6}\n value={code}\n onChange={handleVerifyCode}\n disabled={isVerifying}\n >\n <InputOTPGroup>\n <InputOTPSlot index={0} />\n <InputOTPSlot index={1} />\n <InputOTPSlot index={2} />\n <InputOTPSlot index={3} />\n <InputOTPSlot index={4} />\n <InputOTPSlot index={5} />\n </InputOTPGroup>\n </InputOTP>\n {isVerifying && <Spinner />}\n </div>\n {error && (\n <div\n className=\"text-sm text-destructive mt-2 mb-1\"\n role=\"alert\"\n >\n {error}\n </div>\n )}\n <div className=\"grow\" />\n {/* Always pin buttons to the bottom */}\n <div className=\"flex flex-col items-start gap-2 pt-2\">\n {email.length > 0 && (\n <Button\n variant=\"link\"\n size=\"sm\"\n onClick={handleResendEmail}\n disabled={isVerifying}\n className=\"flex-1 ml-0 pl-0\"\n >\n {texts.loginResendCodeButton ?? \"\"}\n </Button>\n )}\n <Button\n variant=\"link\"\n size=\"sm\"\n onClick={handleChangeEmail}\n disabled={isVerifying}\n className=\"flex-1 ml-0 pl-0\"\n >\n {texts.loginChangeEmailButton ?? \"\"}\n </Button>\n </div>\n </form>\n )}\n </div>\n </div>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction Wrapper(props: LoginScreenProps) {\n return (\n <RpcProvider>\n <LoginScreen {...props} />\n </RpcProvider>\n );\n}\n\nexport default Wrapper;\n","import * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@/src/lib/utils\"\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-semibold\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"],"mappings":"knBAAA,IAKAA,GAMaC,GA0CAC,GA+CAC,GApGbC,GAAAC,EAAA,kBAKAL,GAAsC,wCAMzBC,MACX,aAAS,4kBAA4kB,EAyC1kBC,MACX,gBAAYD,GAAwB,CAAC,EA8C1BE,MACX,gBAAYF,GAAwB,CAAC,ICrGvC,IAKAK,GAKaC,GAVbC,GAAAC,EAAA,kBAKAH,GAAmC,wCAKtBC,MACX,aAAS,gcAAgc,ICX3c,IAKAG,GAEAC,GAMaC,GAbbC,GAAAC,EAAA,kBAKAJ,GAAgD,wCAEhDC,GAA+C,kCAMlCC,MACX,aAAS,6yCAA8yC,CAAC,iCAA8B,CAAC,ICdz1C,IAKAG,GAEAC,GAMaC,GAbbC,GAAAC,EAAA,kBAKAJ,GAA6D,wCAE7DC,GAA2E,kCAM9DC,MACX,aAAS,82HAA+2H,CAAC,kCAAgC,6BAA0B,CAAC,ICdt7H,IAMAG,GAUAC,GAMaC,GAosBAC,GAsDAC,GA25DAC,GA42BAC,EAvhHbC,GAAAC,EAAA,kBAMAR,GAA6D,wCAE7DS,KAEAC,KAEAC,KAEAC,KAEAX,GAA2E,kCAM9DC,MACX,aAAS,mz4BAAoz4B,CAACW,GAAwBC,GAAwBC,GAAmCC,GAA8B,8BAA4B,iCAA8B,CAAC,EAmsB/94Bb,MACX,gBAAYD,GAA2B,EAAE,EAqD9BE,MACX,gBAAYF,GAA2B,EAAE,EA05D9BG,MACX,gBAAYH,GAA2B,EAAE,EA22B9BI,KAsWX,gBAAYJ,GAA2B,CAAC,IC73H1C,IACAe,GACAC,GAGiBC,GALjBC,GAAAC,EAAA,kBACAJ,GAA0C,+BAC1CC,GAAuC,mCACvCI,MAEiBH,GAAV,CACE,SAASI,EAAIC,EAA+C,CACjE,SAAO,iBAAaC,EAAkBC,EAAaF,CAA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EAEpCY,GACF5B,EAAS,CAAE,KAAM,eAAgB,CAAC,CAEtC,EACA,OAAQpC,EAAM,OACd,eAAgBmB,EAChB,cAAeuB,EAAY,cAC3B,UAAWrB,EACX,MAAOqB,EACP,WAAY1C,EAAM,WAClB,WAAY0B,EACd,EACF,EAEJ,KACA,QAACuC,GAAA,CACC,OAAQjE,EAAM,cAAgB,CAACA,EAAM,WACrC,KAAMuB,EACN,UAAW4B,GACX,MAAOT,EACP,QAASO,GACX,GACF,CAEJ,CAEA,SAASiB,GAAQ,CACf,KAAA3C,EACA,OAAAb,EACA,UAAAyD,EACA,YAAAvD,EACA,YAAAC,EACA,gBAAAC,EACA,OAAAC,EACA,WAAAC,EACA,MAAAC,EACA,WAAAC,EACA,eAAAC,EACA,eAAAC,EACA,UAAAC,CACF,EAAU,CACR,SACE,QAAC+C,GAAA,CACC,oBAAC5D,GAAA,CACC,KAAMe,EACN,OAAQb,EACR,UAAWyD,EACX,YAAavD,EACb,YAAaC,EACb,gBAAiBC,EACjB,OAAQC,EACR,WAAYC,EACZ,MAAOC,EACP,WAAYC,EACZ,eAAgBC,EAChB,eAAgBC,EAChB,UAAWC,EACb,EACF,CAEJ,CACA,IAAOgD,GAAQH,GFrbfI,KACAC,KACAC,KAEAC,KACAC,KACAC","names":["import_codegenv2","file_common_v1_address","AddressSchema","BillingAddressSchema","init_address_pb","__esmMin","import_codegenv2","file_common_v1_gateway","init_gateway_pb","__esmMin","import_codegenv2","import_wkt","file_common_v1_push_notifications","init_push_notifications_pb","__esmMin","import_codegenv2","import_wkt","file_dashboard_v1_audiobooks","init_audiobooks_pb","__esmMin","import_codegenv2","import_wkt","file_public_v1_public_api","PreOrderItemSchema","GetPreOrderDetailsRequestSchema","UserProductSchema","PublicApiService","init_public_api_pb","__esmMin","init_address_pb","init_gateway_pb","init_push_notifications_pb","init_audiobooks_pb","file_common_v1_address","file_common_v1_gateway","file_common_v1_push_notifications","file_dashboard_v1_audiobooks","import_connect","import_connect_web","PublicApiClient","init_public_api_client","__esmMin","init_public_api_pb","get","host","PublicApiService","getTransport","transports","transport","cn","inputs","import_clsx","import_tailwind_merge","init_utils","__esmMin","setCustomHost","host","HOST","DEFAULT_HOST","init_constants","__esmMin","import_codegenv2","import_wkt","file_dashboard_v1_product","init_product_pb","__esmMin","import_codegenv2","import_wkt","file_dashboard_v1_notifications","FailureMessage","NotificationsService","init_notifications_pb","__esmMin","init_product_pb","init_push_notifications_pb","file_dashboard_v1_product","file_common_v1_push_notifications","notifications_NotificationsService_connectquery_exports","__export","createNotificationGroup","createNotificationGroupUser","createNotificationMessage","createNotificationMessageJob","createNotificationSetting","createNotificationUser","deleteNotificationGroup","deleteNotificationGroupUser","deleteNotificationMessage","deleteNotificationMessageJob","deleteNotificationSetting","deleteNotificationUser","getNotificationStats","getNotificationUserSettings","getProjectedRecipientCount","getSentNotificationMessages","getUserGroups","readNotificationGroupUsers","readNotificationGroups","readNotificationMessageJobs","readNotificationMessages","readNotificationProducts","readNotificationSetting","readNotificationUsers","updateNotificationGroup","updateNotificationGroupUser","updateNotificationMessage","updateNotificationMessageJob","updateNotificationSetting","updateNotificationUser","updateUserGroups","verifyUserEmail","init_notifications_NotificationsService_connectquery","__esmMin","init_notifications_pb","NotificationsService","public_api_PublicApiService_connectquery_exports","__export","addPublicOrderComment","applePayValidateMerchant","authorizeOneClickPayment","clearAppStoreAccountToken","didBuyProduct","getAppStoreAccountToken","getAppStoreEntitlements","getAvailableCountForProduct","getGuestCatalog","getNotificationHistory","getNotificationSettings","getNotificationSettingsDetails","getOrder","getOrderForTestimonial","getOrderRetryUrl","getOrders","getPreOrderDetails","getPublicOrderDetails","getShopProducts","getStoreKitCatalog","getTestimonialUploadUrl","isOneClickPaymentAvailable","notifyUserAboutProductAvailability","pushEvent","pushSendDeviceToken","restoreAppStorePurchases","shouldShopProducts","shouldShowGuestCatalog","submitTestimonial","updateGlobalNotificationSettings","updateNotificationSettings","userPanelDeleteAccount","userPanelGetAudiobookDetails","userPanelGetAudiobookDetailsDownloadURLs","userPanelGetCourseDetails","userPanelGetFileDetails","userPanelGetProducts","userPanelGetTicketDetails","userPanelLogin","userPanelLoginWithCode","userPanelLogout","userPanelResolveProductAccess","verifyAppStorePurchase","init_public_api_PublicApiService_connectquery","__esmMin","init_public_api_pb","PublicApiService","import_codegenv2","file_common_v1_environment","Environment","init_environment_pb","__esmMin","import_codegenv2","import_wkt","file_public_v1_returns","ReturnsService","init_returns_pb","__esmMin","init_environment_pb","file_common_v1_environment","returns_ReturnsService_connectquery_exports","__export","createReturnRequest","exchangePanelSession","getMyReturn","getReturnableOrder","listMyReturns","listReturnOrders","startReturnSession","verifyReturnSession","init_returns_ReturnsService_connectquery","__esmMin","init_returns_pb","ReturnsService","getTransportHost","customHost","HOST","createRpcTransport","host","input","init","getRpcTransport","transport","transportsByHost","import_connect_query","import_connect_web","import_react_query","import_react","import_jsx_runtime","currentFinalTransportHost","finalTransport","rpcProvider","useQuery","useMutation","RpcProvider","init_rpc_provider","__esmMin","init_constants","init_notifications_NotificationsService_connectquery","init_public_api_PublicApiService_connectquery","init_returns_ReturnsService_connectquery","public_api_PublicApiService_connectquery_exports","notifications_NotificationsService_connectquery_exports","returns_ReturnsService_connectquery_exports","uq","um","children","transportHost","queryClient","Button","className","variant","size","asChild","props","Comp","cn","buttonVariants","import_class_variance_authority","import_radix_ui","import_jsx_runtime","init_button","__esmMin","init_utils","Card","className","props","cn","CardHeader","CardTitle","CardDescription","CardContent","import_jsx_runtime","init_card","__esmMin","init_utils","Input","className","type","props","cn","import_jsx_runtime","init_input","__esmMin","init_utils","InputOTP","className","containerClassName","props","cn","InputOTPGroup","InputOTPSlot","index","inputOTPContext","char","hasFakeCaret","isActive","InputOTPSeparator","React","import_input_otp","import_lucide_react","import_jsx_runtime","init_input_otp","__esmMin","init_utils","Label","className","props","cn","LabelPrimitive","import_jsx_runtime","init_label","__esmMin","init_utils","LoadingIndicator","import_jsx_runtime","LoadingIndicator_default","init_LoadingIndicator","__esmMin","setPanelConfig","newConfig","config","getPanelConfig","setProjectID","projectID","setTheme","theme","setLoginURL","loginURL","setHost","host","setAllowedReturnOrigins","origins","allowedReturnOrigins","getAllowedReturnOrigins","init_config","__esmMin","import_react","import_jsx_runtime","PanelContext","PanelProvider","usePanelConfig","init_PanelProvider","__esmMin","init_rpc_provider","init_config","getPanelConfig","children","RpcProvider","getReturnURLFromSearch","search","raw","RETURN_URL_PARAM","validateReturnURL","persistReturnURL","returnURL","RETURN_URL_STORAGE_KEY","readPersistedReturnURL","stored","isOriginAllowed","origin","allowedOrigins","allowed","allowedHost","originHost","u","getAllowedReturnOrigins","buildAccessTokenRedirect","accessToken","ACCESS_TOKEN_PARAM","init_return_url","__esmMin","init_config","getPanelSession","projectID","host","panelSessionKey","savePanelSession","token","email","panelEmailKey","getPanelEmail","clearPanelSession","init_session_storage","__esmMin","import_react","import_input_otp","import_jsx_runtime","LoginUserPanel","VerifyCodePanel","PanelLoginComponentWrapper","PanelLogin","init_PanelLogin","__esmMin","init_utils","init_rpc_provider","init_button","init_card","init_input","init_input_otp","init_label","init_LoadingIndicator","init_config","init_PanelProvider","init_return_url","init_session_storage","knownSiblings","getAllowedReturnOrigins","setAllowedReturnOrigins","projectID","host","reveal","email","setEmail","loginUser","isLoginLoading","errMsg","configuredProjectID","configuredHost","usePanelConfig","getPanelSession","isValidEmail","setIsValidEmail","emailValidation","input","handleInputChange","e","value","goToVerifyCode","onSubmit","cn","Card","CardHeader","CardTitle","CardDescription","CardContent","Label","Input","Button","LoadingIndicator_default","loginUserResponse","setLoginUserResponse","setResponseStatus","verifyCodeAsync","isVerifyLoading","useMutation","rpcProvider","code","setCode","isValidCode","setIsValidCode","isSubmitted","setIsSubmitted","retryIn","setRetryIn","codeValidation","login","codeValue","verifyCodeResult","status","message","accessToken","savePanelSession","returnURL","readPersistedReturnURL","buildAccessTokenRedirect","handleRetryInTime","intervalId","prevRetryIn","backToLoginComponent","onCodeSubmit","InputOTP","newValue","InputOTPGroup","InputOTPSlot","InputOTPSeparator","theme","allowedReturnOrigins","styles","activeScreen","setActiveScreen","parent","prevScreen","responseStatus","loginUserAsync","setErrMsg","queryReturnURL","getReturnURLFromSearch","persistReturnURL","existingToken","loginUserResult","useUrlSearchParams","initialValue","params","setParams","urlParams","parsed","key","value","updateParams","newParams","prev","updated","newUrl","handlePopState","import_react","init_useUrlSearchParams","__esmMin","parseHex","value","match","hex","char","parseRgb","channels","channel","linearize","readableForeground","color","trimmed","rgb","r","g","b","luminance","whiteContrast","blackContrast","brandColorTokens","foreground","init_color","__esmMin","resolvePanelReturnsAppearance","explicit","brand","color","brandColorTokens","init_returns_appearance","__esmMin","init_color","Switch","className","props","cn","SwitchPrimitive","import_jsx_runtime","init_switch","__esmMin","init_utils","PanelNotificationsComponent","notifications","setNotifications","Switch","checked","prevState","Label","import_react","import_jsx_runtime","PanelNotifications_default","init_PanelNotifications","__esmMin","init_label","init_switch","Pagination","className","props","cn","PaginationContent","PaginationItem","PaginationLink","isActive","size","buttonVariants","PaginationPrevious","PaginationNext","PaginationEllipsis","import_lucide_react","import_jsx_runtime","init_pagination","__esmMin","init_utils","init_button","Skeleton","className","props","cn","import_jsx_runtime","init_skeleton","__esmMin","init_utils","PanelOrderHistory","openOrderDetails","projectID","accessToken","offset","setOffset","limit","data","isFetching","useQuery","rpcProvider","orders","totalCount","currentPage","totalPages","handlePageChange","newOffset","_","i","Skeleton","order","formatAmount","statusColor","statusLabel","formatDate","Pagination","PaginationContent","PaginationItem","PaginationPrevious","PaginationLink","PaginationEllipsis","page","PaginationNext","import_react","import_jsx_runtime","PanelOrderHistory_default","init_PanelOrderHistory","__esmMin","init_rpc_provider","init_pagination","init_skeleton","ts","amount","currency","PanelPlansComponent","_projectID","plans","setPlans","isLoading","setIsLoading","plan","statusColor","statusLabel","formatDate","import_react","import_jsx_runtime","PanelPlans_default","init_PanelPlans","__esmMin","ts","Spinner","className","props","cn","import_lucide_react","import_jsx_runtime","init_spinner","__esmMin","init_utils","React","import_jsx_runtime","Textarea","init_textarea","__esmMin","init_utils","className","props","ref","cn","omitUndefined","tokens","result","key","value","hasAnyElement","elements","element","resolveBoundaryStyle","variables","shadcnVariables","style","token","variable","resolveAppearanceCore","appearance","config","theme","getSlotAppearance","slot","init_appearance_core","__esmMin","resolveReturnsAppearance","appearance","resolved","resolveAppearanceCore","RETURNS_THEME_PRESETS","RETURNS_TOKEN_VARIABLES","RETURNS_SHADCN_VARIABLES","getReturnsSlotAppearance","slot","getSlotAppearance","RETURNS_SLOT_NAMES","init_appearance","__esmMin","init_appearance_core","ReturnsAppearanceProvider","appearance","children","resolved","resolveReturnsAppearance","ReturnsAppearanceContext","useReturnsAppearance","useReturnsSlot","slot","getReturnsSlotAppearance","import_react","import_jsx_runtime","init_appearance_context","__esmMin","init_appearance","getReturnsErrorCode","error","rawMessage","message","ERROR_TEXT_KEYS","code","isSessionExpiredError","SESSION_EXPIRED","mapReturnsError","init_errors","__esmMin","createIdempotencyKey","cryptoObject","bytes","i","byte","init_idempotency","__esmMin","resolveReturnsEnvironment","environment","mapLegacyTexts","texts","result","legacyKey","targets","LEGACY_TEXT_KEYS","value","target","key","resolveBrandAppearance","appearance","theme","color","brandColorTokens","resolvePagedArguments","first","pageToken","init_legacy","__esmMin","init_color","sessionStorageKey","projectID","KEY_PREFIX","getBrowserSessionStorage","readStoredSession","storage","now","key","raw","parsed","token","expiresAt","writeStoredSession","session","clearStoredSession","expiryToMillis","import_wkt","init_session_storage","__esmMin","pickLocaleTable","tables","locale","mergeTexts","table","overrides","result","key","value","resolveTexts","lookupText","texts","init_texts","__esmMin","resolveCheckoutTexts","locale","overrides","resolveTexts","CHECKOUT_TEXT_TABLES","getCheckoutText","key","lookupText","init_texts","__esmMin","setLocale","locale","value","activeLocale","DEFAULT_LOCALE","localeStorageKey","getLocale","init_locale","__esmMin","resolveReturnsTexts","locale","overrides","resolveTexts","RETURNS_TEXT_TABLES","fillText","template","values","match","name","statusTextKey","status","STATUS_TEXT_KEYS","refundStatusTextKey","REFUND_STATUS_TEXT_KEYS","init_texts","__esmMin","ReturnsTextsProvider","texts","locale","children","activeLocale","getLocale","value","resolveReturnsTexts","ReturnsTextsContext","useReturnsText","key","values","fillText","useReturnsLocale","import_react","import_jsx_runtime","init_texts_context","__esmMin","init_locale","init_texts","useReturnsContext","name","value","ReturnsContext","returnsQueryKey","ReturnsService","SessionProvider","projectID","environment","transport","panelAccessToken","className","children","queryClient","boundaryClassName","boundaryStyle","useReturnsAppearance","root","useReturnsSlot","session","setSession","exchangeError","setExchangeError","challenge","setChallenge","previousPanelToken","dropCachedData","clearSession","clearStoredSession","getBrowserSessionStorage","authenticate","next","writeStoredSession","cancelled","storage","hadPanelToken","stored","readStoredSession","response","expiresAt","expiryToMillis","error","remaining","timer","MAX_TIMEOUT_MS","cn","ReturnsProvider","host","appearance","texts","theme","locale","existingQueryClient","ownQueryClient","resolvedHost","getTransportHost","getRpcTransport","brandColor","resolvedAppearance","resolveBrandAppearance","resolvedTexts","mapLegacyTexts","content","ReturnsAppearanceProvider","ReturnsTextsProvider","resolveReturnsEnvironment","import_connect","import_connect_query","import_react_query","import_react","import_jsx_runtime","BitsnapReturnsProvider","init_ReturnsProvider","__esmMin","init_returns_pb","init_utils","init_rpc_provider","init_appearance_context","init_session_storage","init_legacy","init_texts_context","asError","error","errorKeyOf","mapReturnsError","useDropSessionOnExpiry","clearSession","isSessionExpiredError","usePageTokens","resetKey","tokens","setTokens","token","current","useReturnSession","ctx","useReturnsContext","startMutation","rpcProvider","verifyMutation","setChallenge","authenticate","startSession","email","trimmed","response","verifySession","input","expiresAt","expiryToMillis","start","verify","code","resend","isSessionPending","useReturnOrders","first","pageSize","explicitPageToken","resolvePagedArguments","pages","query","nextPageToken","useReturnableOrder","orderId","useCreateReturn","queryClient","mutation","idempotencyKey","send","key","returnsQueryKey","submit","createIdempotencyKey","mutateAsync","mutate","options","useMyReturns","useMyReturn","returnId","import_connect_query","import_react_query","import_react","init_hooks","__esmMin","init_rpc_provider","init_errors","init_idempotency","init_legacy","init_ReturnsProvider","init_session_storage","StepFrame","title","description","onBack","className","children","text","useReturnsText","header","useReturnsSlot","titleSlot","descriptionSlot","backButton","cn","Button","ErrorMessage","errorKey","onRetry","error","secondaryButton","SECONDARY_BUTTON_CLASS","EmptyState","emptyState","SkeletonRows","rows","skeleton","_","index","Skeleton","StatusBadge","status","badge","statusTextKey","useRefundStatusText","refundStatusTextKey","Pagination","page","total","hasNext","hasPrevious","isFetching","onNext","onPrevious","pagination","import_jsx_runtime","PRIMARY_BUTTON_CLASS","INPUT_CLASS","init_internal","__esmMin","init_button","init_skeleton","init_utils","init_appearance_context","init_texts","init_texts_context","ReturnsEmailStep","onSubmitted","className","useReturnsContext","text","useReturnsText","session","useReturnSession","email","setEmail","form","useReturnsSlot","input","submitButton","handleSubmit","event","StepFrame","cn","Label","Input","INPUT_CLASS","ErrorMessage","Button","PRIMARY_BUTTON_CLASS","Spinner","useCountdown","availableAt","now","setNow","timer","current","ReturnsCodeStep","onVerified","onBack","code","setCode","secondsLeft","resendButton","isBusy","SECONDARY_BUTTON_CLASS","LogoutButton","logoutButton","import_react","import_jsx_runtime","init_AuthSteps","__esmMin","init_button","init_input","init_label","init_spinner","init_utils","init_appearance_context","init_hooks","init_internal","init_ReturnsProvider","init_texts_context","formatDate","timestamp","locale","date","import_wkt","init_date","__esmMin","formatMoney","minor","currency","locale","amount","formatter","digits","toDecimalString","fractionDigits","negative","absolute","divisor","whole","fraction","init_money","__esmMin","clampQuantity","value","max","isLineSelectable","line","toSelectedLines","lineIds","quantities","lineId","init_selection","__esmMin","ReturnsOrderList","onSelectOrder","onOpenMyReturns","showLogout","pageSize","className","useReturnsContext","text","useReturnsText","locale","useReturnsLocale","orders","useReturnOrders","list","useReturnsSlot","card","reference","date","total","secondaryButton","StepFrame","Button","cn","SECONDARY_BUTTON_CLASS","LogoutButton","SkeletonRows","ErrorMessage","EmptyState","order","formatDate","formatMoney","Pagination","ReturnsOrderDetail","orderId","onContinue","onBack","initialItems","initialNote","returnHistory","isLoading","errorKey","refetch","useReturnableOrder","quantities","setQuantities","item","note","setNote","showEmptyError","setShowEmptyError","lineList","lineSlot","lineName","linePrice","quantityControl","quantityButton","quantityInput","ineligibleReason","noteInput","submitButton","history","historyEntry","setQuantity","line","value","current","clampQuantity","handleSubmit","event","items","toSelectedLines","isLineSelectable","selectable","quantity","inputId","INPUT_CLASS","Label","Textarea","PRIMARY_BUTTON_CLASS","entry","StatusBadge","ReturnsConfirmation","onSubmitted","orderErrorKey","create","useCreateReturn","summary","request","candidate","Spinner","ReturnsResult","returnId","useMyReturn","success","instructions","import_react","import_jsx_runtime","init_OrderSteps","__esmMin","init_button","init_label","init_spinner","init_textarea","init_utils","init_appearance_context","init_AuthSteps","init_date","init_hooks","init_internal","init_money","init_ReturnsProvider","init_selection","init_texts_context","ReturnsMyReturnsList","onSelectReturn","onBack","pageSize","className","useReturnsContext","text","useReturnsText","locale","useReturnsLocale","refundText","useRefundStatusText","myReturns","useMyReturns","list","useReturnsSlot","card","reference","secondaryButton","StepFrame","SkeletonRows","ErrorMessage","EmptyState","cn","item","formatDate","StatusBadge","Button","SECONDARY_BUTTON_CLASS","Pagination","ReturnsMyReturnDetail","returnId","request","isLoading","errorKey","refetch","useMyReturn","summary","lineList","lineSlot","lineName","instructions","history","historyEntry","formatMoney","line","entry","import_jsx_runtime","init_MyReturns","__esmMin","init_button","init_utils","init_appearance_context","init_date","init_hooks","init_internal","init_money","init_ReturnsProvider","init_texts_context","redirectToLogin","loginURL","dropToken","projectID","host","clearPanelSession","ReturnsScreens","screen","params","setParams","setActiveScreen","status","exchangeError","useReturnsContext","text","useReturnsText","expired","isSessionExpiredError","view","setView","draft","setDraft","createdReturnId","setCreatedReturnId","mapReturnsError","Button","SkeletonRows","openReturns","next","ReturnsMyReturnDetail","ReturnsMyReturnsList","returnId","ReturnsResult","orderId","ReturnsConfirmation","ReturnsOrderDetail","selection","ReturnsOrderList","PanelReturns","accessToken","appearance","texts","rest","ReturnsProvider","import_react","import_jsx_runtime","init_PanelReturns","__esmMin","init_OrderSteps","init_MyReturns","init_ReturnsProvider","init_internal","init_errors","init_texts_context","init_button","init_session_storage","import_jsx_runtime","URL_REGEX","findURLIndices","replaceTextByIndices","renderText","init_render_text","__esmMin","text","match","originalText","replacements","result","lastIndex","a","b","startIndex","endIndex","replacementText","txt","urlIndices","el","mediaSessionPlay","mediaSessionPause","mediaSessionUpdateDurationAndPosition","duration","currentTime","startMediaSessionCoordinator","args","e","stopMediaSessionCoordinator","init_media_session_coordinator","__esmMin","init_audio_player","__esmMin","isSafari","import_hls","import_lucide_react","import_react","import_jsx_runtime","AudioPlayer","AudioPlayer_default","init_AudioPlayer","__esmMin","init_button","init_LoadingIndicator","init_media_session_coordinator","init_audio_player","chapters","styles","updateCurrentTime","setCurrentTimeHandler","title","imageURL","uniqueProductID","onChapterChange","ref","PlayState","playState","setPlayState","mediaSessionPlay","mediaSessionPause","chapter","playChapter","currentTime","setCurrentTime","duration","setDuration","videoRef","hlsRef","timerRef","audioPlayerContainerRef","currentChapterRef","playWhenReady","setPlayWhenReady","isStarted","setIsStarted","isLoading","setIsLoading","saveLastPlayedTime","timeInSeconds","getLastPlayedTime","time","result","getLastSelectedChapterID","lastSelectedChapterID","setLastSelectedChapterID","chapterID","deleteMemoryChapter","setupObservers","lastPlayedTime","seekTo","play","e","playNextChapter","startMediaSessionCoordinator","details","pause","seekBy","startTimer","currentChapterIndex","updatePlayerDetails","stopTimer","mediaSessionUpdateDurationAndPosition","togglePlayState","seconds","newTime","toSecond","destroyPlayer","loadChapters","playURL","src","Hls","stopMediaSessionCoordinator","calculateTime","secs","hours","minutes","returnedHours","returnedSeconds","showRangeProgress","rangeInput","barProgress","selectedTime","Button","LoadingIndicator_default","ProgressBar","progress","setProgress","timer","React","import_jsx_runtime","init_ProgressBar","__esmMin","warn","message","args","error","import_react","import_lucide_react","import_jsx_runtime","PanelProductDetails","PanelProductDetails_default","init_PanelProductDetails","__esmMin","init_utils","init_rpc_provider","init_button","init_AudioPlayer","init_LoadingIndicator","init_ProgressBar","accessToken","product","styles","reveal","productType","audioPlayerRef","filesRefAnimation","filesResponse","setFilesResponse","fileDetailsAsync","isFileLoading","useMutation","rpcProvider","audioPlayerSeekToHandler","audioResponse","setAudioResponse","audioDownloadURLs","setAudioDownloadURLs","isAvailableToDownloadInMobileApp","setIsAvailableToDownloadInMobileApp","isCourseLoading","setIsCourseLoading","courseError","setCourseError","audioDetailsAsync","isAudioLoading","audioDetailsDownloadURLsAsync","isAudioDownloadURLsLoading","courseDetailsAsync","selectedChapter","setSelectedChapter","chapters","setChapters","handleFileDownload","filesResult","err","handleAudioDownload","audioResult","handleAudioURLsDownload","audioURLsResult","handleCourseRedirect","courseResult","audioChapters","mappedChapters","chapter","details","el","Button","LoadingIndicator_default","ProgressBar","index","AudioPlayer_default","handler","cn","import_react","import_protobuf","import_jsx_runtime","PanelProductGridComponent","PanelProductGrid_default","ProductsComponent","init_PanelProductGrid","__esmMin","init_public_api_pb","init_rpc_provider","init_button","init_LoadingIndicator","init_render_text","init_PanelProductDetails","init_session_storage","accessToken","projectID","loginURL","styles","activeScreen","params","setParams","products","isProductsLoading","useQuery","rpcProvider","LoadingIndicator_default","clearPanelSession","productsList","selectedProduct","setSelectedProduct","UserProductSchema","reveal","product","getProductTypeName","type","handleSelectedProduct","PanelProductDetails_default","index","renderText","Button","e","getPanelTexts","locale","getLocale","pickLocaleTable","PANEL_TEXT_TABLES","init_texts","__esmMin","init_locale","PanelProductHeaderComponent","activeScreen","setActiveScreen","setParams","_styles","theme","logout","MobileMenu","SidebarMenu","returnsNavLabel","getPanelTexts","MobileButton","panelScreen","label","imageURL","icon","Button","cn","SidebarButton","darkImageURL","isExpanded","sidebarExpandRef","setIsExpanded","CompanyLogo","SidebarSeparator","className","_isExpanded","import_react","import_lucide_react","import_jsx_runtime","PanelProductHeader_default","init_PanelProductHeader","__esmMin","init_utils","init_button","init_texts","PanelProfileComponent","email","logout","Button","import_lucide_react","import_jsx_runtime","PanelProfile_default","init_PanelProfile","__esmMin","init_button","StatusBadge","status","statusConfig","config","Icon","statusLabels","AddCommentForm","orderID","email","message","setMessage","addCommentMutation","useMutation","rpcProvider","e","error","Label","Textarea","Button","formatDate","timestamp","formatCurrency","amount","currency","PublicOrderPageContent","initialEmail","onBack","accessToken","theme","projectID","usePanelConfig","verifyEmail","setVerifyEmail","isVerifyDialogOpen","setIsVerifyDialogOpen","orderData","isLoading","refetch","useQuery","order","isVerified","handleVerifyEmail","styles","Card","CardContent","CardHeader","CardTitle","item","index","comment","Input","PublicOrderPage","props","import_lucide_react","import_react","import_jsx_runtime","PublicOrderPage_default","init_PublicOrderPage","__esmMin","init_rpc_provider","init_button","init_card","init_input","init_label","init_textarea","init_PanelProvider","import_react","import_jsx_runtime","PanelPage","PanelPage_default","init_PanelPage","__esmMin","init_rpc_provider","init_useUrlSearchParams","init_PanelProvider","init_returns_appearance","init_return_url","init_PanelNotifications","init_PanelOrderHistory","init_PanelPlans","init_PanelReturns","init_PanelProductGrid","init_PanelProductHeader","init_PanelProfile","init_PublicOrderPage","init_session_storage","returnsAppearance","returnsTexts","projectID","theme","loginURL","host","usePanelConfig","accessToken","getPanelSession","email","getPanelEmail","logoutUserAsync","useMutation","rpcProvider","logout","clearPanelSession","panelParentRef","isScreen","value","params","setParams","useUrlSearchParams","activeScreen","setActiveScreen","handleOpenOrderDetails","orderID","handleBackToOrders","navigate","next","styles","queryReturnURL","getReturnURLFromSearch","persistReturnURL","returnURL","readPersistedReturnURL","buildAccessTokenRedirect","PanelProductHeader_default","PanelProductGrid_default","PanelNotifications_default","PanelPlans_default","PanelOrderHistory_default","PublicOrderPage_default","PanelReturns","resolvePanelReturnsAppearance","PanelProfile_default","init_panel","__esmMin","init_PanelLogin","init_PanelPage","init_PublicOrderPage","init_config","init_PanelProvider","init_return_url","round","num","numberOfDecimals","formatCurrency","amount","currency","language","init_round_number","__esmMin","sendAnalyticEvent","payload","sendGoogleAnalyticsEvent","sendPixelAnalyticsEvent","sendTikTokAnalyticsEvent","ga4Event","mapToGA4EcommerceEvent","e","totalValue","sum","item","items","round","ecommerce","eventName","eventType","eventPayload","tiktokEvent","mapToTikTokEvent","contents","import_zod","init_frontent_analytics","__esmMin","init_round_number","zod","mapGooglePayConfiguration","args","items","googlePayConfig","checkout","result","cartRequiresShipping","intents","method","formatCurrency","round","mapGooglePayDisplayItems","methods","deliveryMethod","couponCode","couponValue","displayItems","subtotalAmount","item","selectedDeliveryMethod","init_google_pay_mapper","__esmMin","init_round_number","buildURL","projectID","path","HOST","init_helper_methods","__esmMin","init_constants","isErr","x","Err","message","type","data","init_err","__esmMin","findProductForCartItem","productID","products","el","variant","findMissingProductIDs","requested","resolved","found","id","init_cart_items","__esmMin","import_zustand","useCheckoutStore","init_state","__esmMin","set","state","numberOfProductsInCart","methods_exports","__export","Bitsnap","createCheckout","createPaymentURL","getReferenceIfPossible","injectReferenceToRequestIfNeeded","request","projectID","getProjectID","getLocale","result","buildURL","payload","itemIds","Err","headers","path","HOST","refLink","ref","init_methods","__esmMin","init_CartProvider","init_constants","init_helper_methods","init_err","init_state","addProductToCart","id","quantity","metadata","args","err","getCheckoutMethods","showCart","useCheckoutStore","hideCart","CartProvider_exports","__export","MARKETING_AGREEMENT_ID","bitsnapProjectID","CartProvider_default","getCheckoutMethods","getLocale","getProjectID","setLocale","setProjectID","useCartProvider","projectID","setPanelConfig","setAllowedReturnOrigins","getNewHostIfExist","getCheckout","value","checkoutKey","emptyCheckout","checkoutSchema","addProducts","products","latestProducts","getProducts","item","index","isErr","missingIDs","findMissingProductIDs","el","Err","checkout","product","sendAnalyticEvent","saveCheckout","updateNumberOfProductsInCart","removeProductFromCheckout","ids","newCheckout","id","model","resolveGooglePayConfiguration","result","PublicApiClient","HOST","resolveProductDetailsFromSingleProduct","variantIndex","v","variant","numberOfProductsInCart","useCheckoutStore","state","acc","import_protobuf","import_react_query","import_react","import_zod","import_jsx_runtime","CartProviderContext","CartProvider","googlePayConfigSchema","checkoutProduct","init_CartProvider","__esmMin","init_panel","init_address_pb","init_public_api_pb","init_public_api_client","init_constants","init_frontent_analytics","init_google_pay_mapper","init_helper_methods","init_err","init_cart_items","init_round_number","init_methods","init_state","init_locale","children","locale","queryClient","checkoutMethods","args","productIds","params","buildURL","payload","details","findProductForCartItem","context","zod","newHost","setCustomHost","e","googlePayConfig","PreOrderItemSchema","cartRequiresShipping","mappedPaymentRequest","mapGooglePayConfiguration","empty","country","couponCode","postalCode","deliveryMethod","email","mergedMetadata","key","paymentResponse","createPaymentURL","injectReferenceToRequestIfNeeded","shippingName","metadata","ref","getReferenceIfPossible","GetPreOrderDetailsRequestSchema","AddressSchema","BillingAddressSchema","error","items","round","src_exports","__export","ApplePay_default","Bitsnap","BitsnapCart_default","BitsnapReturns","BitsnapReturnsProvider","CHECKOUT_SLOT_NAMES","Environment","GooglePay_default","NotificationsComponentPublic_default","PRODUCT_LIST_SLOT_NAMES","PanelPage_default","PanelLogin","PanelProvider","ProductList","PublicOrderPage_default","RETURNS_SLOT_NAMES","ReturnsAppearanceProvider","ReturnsCodeStep","ReturnsConfirmation","ReturnsEmailStep","ReturnsMyReturnDetail","ReturnsMyReturnsList","ReturnsOrderDetail","ReturnsOrderList","ReturnsProvider","ReturnsResult","buildAccessTokenRedirect","createCheckout","createPaymentURL","formatProductPrice","getAllowedReturnOrigins","getLocale","getPanelConfig","getReferenceIfPossible","getReturnURLFromSearch","injectReferenceToRequestIfNeeded","persistReturnURL","readPersistedReturnURL","setAllowedReturnOrigins","setCustomHost","setHost","setLocale","setLoginURL","setPanelConfig","setProjectID","setTheme","useCreateReturn","useMyReturn","useMyReturns","usePanelConfig","useProducts","useReturnOrders","useReturnSession","useReturnableOrder","useReturnsAppearance","useReturnsSlot","useReturnsText","__toCommonJS","import_apple_pay_button","init_public_api_client","init_CartProvider","init_constants","init_err","init_round_number","import_react_query","init_frontent_analytics","import_jsx_runtime","ApplePayButtonComponent","style","buttonType","colorType","items","onClick","checkIfApplePayIsAvailable","getApplePayPaymentRequest","completeApplePayPayment","setCountry","setCouponCodeIfPossible","setDeliveryMethod","setEmail","setPostalCode","clearCart","useCartProvider","isApplePayAvailable","expectedItems","el","beginSession","sendAnalyticEvent","requiresShipping","session","round","acc","item","apRequest","isErr","event","result","PublicApiClient","HOST","getProjectID","error","ApplePayButton","Wrapper","props","CartProvider_default","ApplePay_default","import_react","import_zod","import_react","import_react_dom","init_utils","import_react","init_appearance_core","CHECKOUT_SLOT_NAMES","CHECKOUT_TOKEN_VARIABLES","CHECKOUT_THEME_PRESETS","CHECKOUT_SHADCN_VARIABLES","resolveDropdownStyle","tokens","resolveCheckoutAppearance","appearance","resolved","resolveAppearanceCore","getCheckoutSlotAppearance","slot","getSlotAppearance","import_jsx_runtime","CheckoutAppearanceContext","resolveCheckoutAppearance","CheckoutAppearanceProvider","appearance","children","resolved","useCheckoutAppearance","useCheckoutSlot","slot","getCheckoutSlotAppearance","import_react","init_CartProvider","import_react","SelectPrimitive","import_lucide_react","init_utils","import_jsx_runtime","Select","props","SelectValue","props","selectTriggerThemeClasses","SelectTrigger","className","size","theme","children","cn","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectItem","className","children","props","cn","SelectScrollUpButton","className","props","cn","SelectScrollDownButton","init_utils","import_jsx_runtime","CountrySelector","id","open","disabled","onToggle","onChange","selectedValue","countries","query","setQuery","isCustomized","boundaryClassName","boundaryStyle","dropdownStyle","useCheckoutAppearance","countryTrigger","useCheckoutSlot","countryDropdown","countrySearch","countryOption","filteredCountries","country","selectedCountry","el","Select","value","isOpen","SelectTrigger","cn","SelectValue","SelectContent","e","SelectItem","CountrySelector_default","init_err","init_round_number","import_react","init_button","import_lucide_react","import_react_slot","import_class_variance_authority","init_utils","import_jsx_runtime","buttonGroupVariants","ButtonGroup","className","orientation","props","cn","init_utils","init_round_number","import_jsx_runtime","ProductPrice","price","currency","pricing","quantity","regular","effective","onSale","formatCurrency","import_jsx_runtime","SingleProduct","isNotAvailable","quantity","details","shouldUpdate","product","useCheckoutSlot","productImage","productName","productPrice","removeButton","cn","ProductPrice","QuantityComponent","Button","SingleProduct_default","className","quantityString","setQuantityString","quantityValue","setQuantityValue","quantityControl","quantityInput","quantityButton","setNewQuantity","newQuantity","parsedInt","increaseQuantity","decreaseQuantity","ButtonGroup","e","import_jsx_runtime","Skeleton","className","props","init_spinner","import_react_query","init_utils","init_frontent_analytics","init_locale","import_react","init_locale","init_texts","import_jsx_runtime","CheckoutTextsContext","CheckoutTextsProvider","texts","locale","children","value","useCheckoutText","key","getCheckoutText","getLocale","import_jsx_runtime","CartComponentContent","className","locale","provider","useCartProvider","currentLocale","getLocale","productList","useCheckoutSlot","summary","totalLabel","totalValue","deliveryText","countryLabel","paymentButtons","checkoutButton","emptyState","error","skeleton","unavailableProductsText","useCheckoutText","emptyCartText","totalText","deliveryCopy","chooseCountryText","nextStepText","removeProduct","updateQuantity","setCountryAsync","clearCart","errMsg","setErrMsg","React","missingItemIds","setMissingItemIds","isCountryOpen","setIsCountryOpen","continueToCheckoutAsync","isContinueToCheckoutLoading","availableCountries","isApplePayAvailable","data","isLoading","refetch","countryData","refetchCountry","productsParent","products","isErr","countries","sumOfProducts","prev","curr","currency","isSomeProductDeliverable","product","selectedCountry","shouldUpdate","id","newQuantity","continueToCheckout","sendAnalyticEvent","el","response","e","Skeleton","cn","SingleProduct_default","formatCurrency","CountrySelector_default","newValue","ApplePay_default","GooglePay_default","Spinner","CartComponentContent_default","init_CartProvider","import_jsx_runtime","CartComponent","isVisible","shouldHide","locale","parent","boundaryClassName","boundaryStyle","useCheckoutAppearance","root","useCheckoutSlot","overlay","panel","header","title","closeButton","cartText","useCheckoutText","cn","CartComponentContent_default","WrapperCartComponent","props","CheckoutAppearanceProvider","CheckoutTextsProvider","CartProvider_default","CartComponent_default","init_CartProvider","init_frontent_analytics","init_err","init_state","init_locale","import_jsx_runtime","cartAddToCartSchema","zod","BitsnapCart","projectID","locale","children","onVisibleChange","className","numberOfProductsInCartOptions","appearance","texts","isCartVisible","showCart","hideCart","numberOfProductsInCart","useCheckoutStore","sentPostMessageToIframe","msg","iframe","sendAnalyticEvent","setProjectID","setLocale","getProjectID","args","payload","methods","getCheckoutMethods","products","isErr","el","result","e","handleAddingToCart","id","data","handleAddingSubscriptionToCart","event","setupEventListener","type","parsedParams","refLink","CartComponent_default","BitsnapCart_default","import_react","init_utils","init_locale","init_constants","ProductListError","message","status","clampPageSize","pageSize","pageCountFor","totalCount","normalizeHost","host","buildProductListURL","query","params","search","isProductListData","value","fetchProductList","signal","response","payload","planCartTarget","state","target","setHost","targetHost","normalizeHost","currentHost","addProductToCart","product","target","Bitsnap","getProjectID","setProjectID","plan","planCartTarget","HOST","DEFAULT_HOST","failConflict","setCustomHost","reason","init_appearance_core","PRODUCT_LIST_SLOT_NAMES","PRODUCT_LIST_TOKEN_VARIABLES","PRODUCT_LIST_THEME_PRESETS","PRODUCT_LIST_SHADCN_VARIABLES","resolveProductListAppearance","appearance","resolved","resolveAppearanceCore","getProductListSlotAppearance","slot","getSlotAppearance","init_locale","createFormatter","locale","currency","formatProductPrice","amount","DEFAULT_LOCALE","value","formatter","init_texts","PRODUCT_LIST_TEXT_TABLES","resolveProductListTexts","locale","overrides","resolveTexts","fillProductListText","text","values","match","name","import_react","init_constants","useProducts","options","projectID","locale","search","initialData","defaultHost","HOST","host","pageSize","clampPageSize","queryKey","pageState","setPageState","reloads","setReloads","snapshot","setSnapshot","totalCount","pageCount","pageCountFor","requestedPage","page","requestKey","isCurrent","controller","fetchProductList","data","error","previous","setPage","next","target","refetch","value","import_jsx_runtime","ProductListContext","useListContext","value","useSlot","slot","className","appearance","override","getProductListSlotAppearance","cn","BUTTON_CLASS","BLOCK_BUTTON_CLASS","LINK_BUTTON_CLASS","AddToCartButton","product","onAdd","texts","status","setStatus","button","message","timer","click","error","label","ProductCard","href","renderItem","locale","card","cardLink","imageFrame","placeholder","body","name","description","price","comparePrice","badge","actions","selectButton","formattedPrice","formatProductPrice","formattedCompare","imageSource","badgeText","fillProductListText","GRID_CLASS","SkeletonGrid","count","grid","skeleton","_","index","Pagination","page","pageCount","isLoading","onPage","nav","indicator","ProductListContent","options","productHref","onAddToCart","showCartOnAdd","products","setPage","refetch","useProducts","content","movedPage","changePage","next","empty","errorSlot","retry","projectID","host","addFor","addProductToCart","clampPageSize","defaultProductHref","ProductList","DEFAULT_LOCALE","resolvedAppearance","resolveProductListAppearance","resolvedTexts","resolveProductListTexts","context","root","import_react","init_utils","init_appearance_context","init_AuthSteps","init_internal","init_MyReturns","init_OrderSteps","init_ReturnsProvider","STEPS_WITH_SESSION","stepRequiresSession","step","initialReturnsStep","hasSession","reduceReturnsStep","event","STEP_NUMBERS","RETURNS_STEP_COUNT","returnsStepNumber","init_texts_context","import_jsx_runtime","StepIndicator","current","text","useReturnsText","slot","useReturnsSlot","cn","RETURNS_STEP_COUNT","ReturnsRouter","panelToken","status","useReturnsContext","step","dispatch","reduceReturnsStep","initialReturnsStep","SkeletonRows","stepNumber","returnsStepNumber","ReturnsEmailStep","ReturnsCodeStep","ReturnsOrderList","orderId","ReturnsOrderDetail","items","note","ReturnsConfirmation","returnId","ReturnsResult","ReturnsMyReturnsList","ReturnsMyReturnDetail","BitsnapReturns","props","ReturnsProvider","init_ReturnsProvider","init_AuthSteps","init_OrderSteps","init_MyReturns","init_hooks","init_appearance","init_appearance_context","init_texts_context","import_button_react","init_CartProvider","init_err","init_spinner","import_react_query","init_frontent_analytics","import_jsx_runtime","GooglePayButtonComponent","items","style","buttonColor","buttonSizeMode","test","getGooglePayConfiguration","completeGooglePayPayment","setCountry","setCouponCodeIfPossible","setDeliveryMethod","setEmail","setPostalCode","clearCart","useCartProvider","googlePayConfiguration","el","completeGooglePayPaymentAsync","isPending","GooglePayButton","paymentData","sendAnalyticEvent","config","paymentRequest","result","isErr","e","Spinner","Wrapper","props","CartProvider_default","GooglePay_default","import_react","init_utils","init_rpc_provider","import_react_query","import_lucide_react","import_jsx_runtime","DEFAULT_TEXTS","init_utils","init_button","import_lucide_react","import_jsx_runtime","NotificationHeader","projectName","projectLogo","projectLogoDark","description","className","onLogout","cn","Button","init_switch","init_utils","import_react","import_lucide_react","init_button","init_spinner","PopoverPrimitive","init_utils","import_jsx_runtime","Popover","props","PopoverTrigger","PopoverContent","className","align","sideOffset","cn","import_lucide_react","import_jsx_runtime","HowOftenComponent","regularity","text","Popover","PopoverTrigger","e","PopoverContent","init_card","import_jsx_runtime","NotificationGroupsList","groups","isManaging","onToggle","onCheckAll","onUpdate","isUpdating","wasChanged","isUserGroupsUpdated","className","texts","groupsParent","updateGroupsParent","hasNoSelection","group","hasUnchecked","content","cn","e","Switch","HowOftenComponent","Button","DEFAULT_TEXTS","Spinner","Card","CardHeader","CardTitle","CardContent","init_utils","init_constants","init_card","import_jsx_runtime","QRCodeSection","showQRCode","_isManaging","className","texts","isBrowser","darkMode","getURL","Card","cn","CardHeader","CardTitle","DEFAULT_TEXTS","CardContent","HOST","import_react","import_react_phone_number_input","init_utils","init_rpc_provider","init_notifications_pb","init_input","init_utils","import_react","import_react_label","import_lucide_react","init_button","init_spinner","import_jsx_runtime","FormInput","submit","isLoading","errMsg","emailLack","warnMsg","isSubmited","agreementLack","showPhoneInput","agreementText","className","texts","email","setEmail","phone","setPhone","isChecked","setIsChecked","parent","submitForm","e","cn","DEFAULT_TEXTS","Input","newVal","Button","Spinner","import_jsx_runtime","emailRegex","AddUserToGroups","groups","onToggle","onCheckAll","slug","showPhoneInput","agreementText","className","texts","isUpdating","wasChanged","onSuccess","errMsg","setErrMsg","warnMsg","setWarnMsg","isSubmited","setIsSubmited","agreementLack","setAgreementLack","emailLack","setEmailLack","createNotificationUserMutation","isCreateNotificationUserPending","useMutation","rpcProvider","validatePhoneNumber","phone","save","email","agreement","newNotificationUser","el","failureMessage","FailureMessage","e","text","DEFAULT_TEXTS","cn","NotificationGroupsList","FormInput","import_react","init_skeleton","init_switch","init_utils","import_react_label","import_lucide_react","init_rpc_provider","import_use_debounce","init_utils","import_lucide_react","import_react_dom","import_react","init_button","import_jsx_runtime","UnsubscribeDialog","open","onOpenChange","onConfirm","isDeleting","mounted","setMounted","handleBackdropClick","e","handleConfirm","cn","Button","init_button","init_spinner","init_card","import_react","import_jsx_runtime","ManageMyData","accessToken","slug","userID","className","texts","parent","parentCard","deleteMyData","isDeleting","useMutation","rpcProvider","updateNotificationUser","isUpdating","userSettings","isLoading","useQuery","email","setEmail","phone","setPhone","isDataUpdated","setIsDataUpdated","push","setPush","isDialogOpen","setIsDialogOpen","details","deleteData","handleConfirmDelete","updateData","debouncedUpdateData","_","setData","key","value","cn","DEFAULT_TEXTS","Skeleton","Card","CardHeader","CardTitle","CardContent","Switch","Button","Spinner","UnsubscribeDialog","import_react","init_rpc_provider","init_input","init_label","init_button","init_input_otp","init_card","import_lucide_react","DialogPrimitive","import_lucide_react","init_utils","import_jsx_runtime","Dialog","props","DialogPortal","props","DialogOverlay","className","props","cn","DialogContent","children","showCloseButton","DialogPortal","init_spinner","import_jsx_runtime","LoginScreen","slug","onSuccess","onError","_className","isOpen","onClose","texts","parentContent","parentHeader","email","setEmail","code","setCode","isEmailSent","setIsEmailSent","error","setError","verifyUserEmail","isVerifying","useMutation","rpcProvider","handleSendEmail","e","err","handleVerifyCode","value","response","handleResendEmail","handleChangeEmail","Dialog","DialogContent","Button","CardTitle","CardDescription","Label","InputOTP","InputOTPGroup","InputOTPSlot","Spinner","Input","init_button","init_CartProvider","import_react","init_spinner","import_jsx_runtime","reducer","state","action","group","g","isDefaultOn","newGroupsWithIsOn","updatedGroups","updated","NotificationsComponentPublic","slugProp","userID","_productID","projectName","projectLogo","projectLogoDark","groups","isManaging","texts","showQRCode","showPhoneInput","hiddenGroupIds","className","parent","slug","getProjectID","updateUserGroups","isUpdating","useMutation","rpcProvider","userInfo","refetchAccessToken","UQ","groupsDownloaded","isGroupsDownloading","refetchGroups","useQuery","dispatch","newGroups","howOften","timeoutRef","preparedGroups","el","mergedTexts","DEFAULT_TEXTS","updateGroups","toggleGroup","groupID","checkAllGroups","handleSettingsClick","handleCloseSettings","handleLogout","handleLoginSuccess","accessToken","e","isManagingEnabled","cn","Button","NotificationHeader","Spinner","NotificationGroupsList","ManageMyData","QRCodeSection","AddUserToGroups","id","userAlreadyExists","LoginScreen","Wrapper","productID","RpcProvider","NotificationsComponentPublic_default","init_CartProvider","init_locale","init_constants","init_methods","init_environment_pb","init_panel"]}
|
|
1
|
+
{"version":3,"sources":["/home/emems/.t3/worktrees/bitsnap-react/consent-analytics/dist/index.js","../src/components/checkout/ApplePay.tsx","../src/components/checkout/project-id.ts"],"names":["currentProjectID","getProjectID","ApplePayButton","ApplePayButtonModule","ApplePayButtonComponent","style","buttonType","colorType","items","onClick","checkIfApplePayIsAvailable","getApplePayPaymentRequest","completeApplePayPayment","setCountry","setCouponCodeIfPossible","setDeliveryMethod","setEmail","setPostalCode","clearCart","useCartProvider","instrument","useInstrumentContext","isApplePayAvailable","useQuery","expectedItems","el","beginSession","reported","report","outcome","sendAnalyticEvent","requiresShipping","session"],"mappings":"AAAA,ylCAA+R,sDAAyC,sDAAwN,sDAAiE,sDAAiD,sDAAiH,sDAAwG,sDAAgF,sDAAiE,+BAA4B,+BAA4B,kHCAnhC,SCGjBA,EAAAA,CAAAA,CAAuC,CACrD,GAAI,CACF,OAAOC,gCAAAA,CACT,CAAA,UAAQ,CACN,MACF,CACF,CDFA,mDAAyB,+CAqUrB,IA1TEC,EAAAA,kBACHC,wBAAAA,CACE,OAAA,SAAWA,0BAAAA,CAiDhB,SAASC,EAAAA,CAAwB,CAC/B,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CACF,CAAA,CAAU,CACR,GAAM,CACJ,0BAAA,CAAAC,CAAAA,CACA,yBAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAC,CAAAA,C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UA,CAAAA,CAAG,QAAA,CACb,QAAA,CAAU,KACZ,CAAA,CAAE,CACJ,CAAC,CAAA,CACD,IAAMM,CAAAA,CACJvB,CAAAA,CAAM,IAAA,CAAMiB,CAAAA,EAAOA,CAAAA,CAAG,aAAA,GAAkB,CAAA,CAAI,CAAA,EAAK,IAAA,CAC7CO,CAAAA,CAAU,IAAI,eAAA,CAAgB,EAAA,CAAI,CACtC,WAAA,CAAa,IAAA,CACb,oBAAA,CAAsB,CAAC,aAAa,CAAA,CACpC,iBAAA,CAAmB,CAAC,MAAA,CAAQ,YAAY,CAAA,CACxC,YAAA,CAAc,KAAA,CACd,KAAA,CAAO,CACL,MAAA,CAAQ,CAAA,EAAA","file":"/home/emems/.t3/worktrees/bitsnap-react/consent-analytics/dist/index.js","sourcesContent":[null,"import ApplePayButtonModule from \"apple-pay-button\";\nimport { PublicApiClient } from \"src/public.api.client\";\nimport CartProvider, { getProjectID, useCartProvider } from \"./CartProvider\";\nimport { HOST } from \"./constants\";\nimport { isErr } from \"./lib/err\";\nimport { currentProjectID } from \"./project-id\";\nimport { round } from \"./lib/round.number\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport { sendAnalyticEvent } from \"./frontent.analytics\";\nimport {\n InstrumentProvider,\n useInstrument,\n useInstrumentContext,\n type AnalyticsOption,\n} from \"@/src/analytics/instrument\";\n\n// A CommonJS package with a `default` export: bundlers unwrap it, Node's own\n// ESM loader (server rendering of the unbundled library) does not.\nconst ApplePayButton: typeof ApplePayButtonModule =\n (ApplePayButtonModule as unknown as { default?: typeof ApplePayButtonModule })\n .default ?? ApplePayButtonModule;\n\ntype AppleButtonType =\n | \"plain\"\n | \"add-money\"\n | \"book\"\n | \"buy\"\n | \"check-out\"\n | \"continue\"\n | \"contribute\"\n | \"donate\"\n | \"order\"\n | \"pay\"\n | \"reload\"\n | \"rent\"\n | \"set-up\"\n | \"subscribe\"\n | \"support\"\n | \"tip\"\n | \"top-up\";\ntype ColorType = \"black\" | \"white\" | \"white-outline\";\n\nexport type Props = {\n style?: {\n width?: string;\n height?: string;\n borderRadius?: string;\n padding?: string;\n boxSizing?: string;\n };\n buttonType?: AppleButtonType;\n colorType?: ColorType;\n items: {\n name: string;\n id: string;\n price: number;\n quantity: number;\n isDeliverable?: boolean;\n metadata?: { [key: string]: string | undefined };\n }[];\n onClick?: () => Promise<void>;\n /**\n * Usage statistics for your Bitsnap dashboard (Apple Pay clicks and\n * results). On by default; `false` turns it off. Inside `<BitsnapCheckout>`\n * the checkout's setting applies unless this is given.\n */\n analytics?: AnalyticsOption;\n};\n\nfunction ApplePayButtonComponent({\n style,\n buttonType,\n colorType,\n items,\n onClick,\n}: Props) {\n const {\n checkIfApplePayIsAvailable,\n getApplePayPaymentRequest,\n completeApplePayPayment,\n setCountry,\n setCouponCodeIfPossible,\n setDeliveryMethod,\n setEmail,\n setPostalCode,\n clearCart,\n } = useCartProvider();\n const instrument = useInstrumentContext();\n const { data: isApplePayAvailable } = useQuery({\n queryKey: [\"is-apple-pay-available\"],\n queryFn: checkIfApplePayIsAvailable,\n });\n if (isApplePayAvailable != true) {\n return null;\n }\n\n const expectedItems = items.map((el) => ({\n productID: el.id,\n quantity: el.quantity,\n metadata: el.metadata,\n }));\n\n async function beginSession() {\n let reported = false;\n const report = (outcome: \"success\" | \"fail\" | \"cancel\") => {\n if (reported) {\n return;\n }\n reported = true;\n instrument.track(\"apple_pay_result\", { outcome });\n };\n instrument.track(\"apple_pay_clicked\", {});\n instrument.track(\"payment_method_selected\", {\n gateway: \"apple_pay\",\n method: \"apple_pay\",\n });\n sendAnalyticEvent({\n event: \"initiateCheckout\",\n items: items.map((el) => ({\n id: el.id,\n name: el.name,\n price: el.price,\n quantity: el.quantity,\n currency: \"PLN\",\n })),\n });\n const requiresShipping =\n items.find((el) => el.isDeliverable === true) != null;\n const session = new ApplePaySession(14, {\n countryCode: \"PL\",\n merchantCapabilities: [\"supports3DS\"],\n supportedNetworks: [\"visa\", \"masterCard\"],\n currencyCode: \"PLN\",\n total: {\n amount: `${round(\n items.reduce((acc, item) => acc + item.price * item.quantity, 0) /\n 100,\n 2\n )}`,\n label: \"Płatność za koszyk\",\n type: \"pending\",\n },\n lineItems: [\n ...items.map(\n (item) =>\n ({\n amount: `${round((item.price * item.quantity) / 100, 2)}`,\n label: item.name,\n type: \"final\",\n } as ApplePayJS.ApplePayLineItem)\n ),\n requiresShipping\n ? ({\n amount: `16.99`,\n type: \"pending\",\n label: \"Dostawa\",\n } as ApplePayJS.ApplePayLineItem)\n : undefined,\n ].filter((el) => el != null),\n ...(requiresShipping\n ? {\n shippingMethods: [],\n supportsCouponCode: true,\n requiredBillingContactFields: [\n \"name\",\n \"email\",\n \"postalAddress\",\n \"phone\",\n ],\n requiredShippingContactFields: [\n \"name\",\n \"email\",\n \"postalAddress\",\n \"phone\",\n ],\n }\n : {}),\n });\n await onClick?.();\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n if (isErr(apRequest)) {\n console.error(\"Error creating ApplePaySession:\", apRequest.error);\n report(\"fail\");\n return;\n }\n\n session.oncancel = (event) => {\n console.log(\"ApplePaySession cancelled\", event);\n report(\"cancel\");\n };\n\n session.onvalidatemerchant = async (event) => {\n try {\n const result = await PublicApiClient.get(HOST).applePayValidateMerchant(\n {\n validationUrl: event.validationURL,\n projectId: getProjectID(),\n }\n );\n console.log(\"merchantSession\", result.merchantSession);\n if (result.merchantSession.length > 0) {\n console.log(\"completing merchant session\");\n session.completeMerchantValidation(\n JSON.parse(result.merchantSession)\n );\n } else {\n session.abort();\n }\n } catch (error) {\n session.abort;\n }\n };\n\n session.onshippingmethodselected = async (event) => {\n console.log(\"shipping method selected\", event);\n instrument.track(\"delivery_method_selected\", {\n method: event.shippingMethod.identifier,\n });\n await setDeliveryMethod(event.shippingMethod.identifier);\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n console.log(\"apRequest\", apRequest);\n if (isErr(apRequest)) {\n session.abort();\n throw new Error(\"Failed to get Apple Pay payment request\");\n }\n\n session.completeShippingMethodSelection({\n newTotal: apRequest.total,\n newLineItems: apRequest.lineItems,\n newShippingMethods: apRequest.shippingMethods,\n });\n };\n session.onshippingcontactselected = async (event) => {\n try {\n if (event.shippingContact.countryCode != null) {\n await setCountry(event.shippingContact.countryCode);\n }\n if (event.shippingContact.postalCode != null) {\n await setPostalCode(event.shippingContact.postalCode);\n }\n if (event.shippingContact.phoneNumber != null) {\n await setEmail(event.shippingContact.emailAddress);\n }\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n if (isErr(apRequest)) {\n session.abort();\n throw new Error(\"Failed to get Apple Pay payment request\");\n }\n\n console.log(\"apRequest\", apRequest);\n session.completeShippingContactSelection({\n newLineItems: apRequest.lineItems,\n newTotal: apRequest.total,\n newShippingMethods: apRequest.shippingMethods,\n });\n } catch (error) {\n console.log(\"shipping contact selected error\", error);\n session.abort();\n }\n };\n\n session.oncouponcodechanged = async (event) => {\n try {\n console.log(\"coupon code changed\", event);\n const result = await setCouponCodeIfPossible(event.couponCode);\n const apRequest = await getApplePayPaymentRequest({ expectedItems });\n console.log(\"apRequest\", apRequest);\n if (isErr(apRequest)) {\n session.abort();\n throw new Error(\"Failed to get Apple Pay payment request\");\n }\n\n session.completeCouponCodeChange({\n errors: isErr(result)\n ? [new ApplePayError(\"couponCodeInvalid\")]\n : undefined,\n newTotal: apRequest.total,\n newLineItems: apRequest.lineItems,\n newShippingMethods: apRequest.shippingMethods,\n });\n } catch (error) {\n console.log(\"coupon code changed error\", error);\n session.abort();\n }\n };\n\n session.onpaymentauthorized = async (event) => {\n instrument.track(\"payment_submitted\", {\n gateway: \"apple_pay\",\n method: \"apple_pay\",\n });\n try {\n const result = await completeApplePayPayment({\n token: event.payment.token,\n billingContact: event.payment.billingContact,\n shippingContact: event.payment.shippingContact,\n });\n if (isErr(result)) {\n console.log(\"apple pay error\", result);\n report(\"fail\");\n session.completePayment({\n status: ApplePaySession.STATUS_FAILURE,\n });\n return;\n }\n\n if (result.redirectURL) {\n setTimeout(() => {\n open(result.redirectURL, \"_self\");\n }, 2000);\n }\n report(result.isSuccess ? \"success\" : \"fail\");\n session.completePayment({\n status: result.isSuccess\n ? ApplePaySession.STATUS_SUCCESS\n : ApplePaySession.STATUS_FAILURE,\n });\n\n result.isSuccess && clearCart();\n } catch (e) {\n report(\"fail\");\n session.completePayment({\n status: ApplePaySession.STATUS_FAILURE,\n });\n }\n // event.complete(ApplePaySession.STATUS_SUCCESS);\n };\n\n session.begin();\n }\n\n return (\n <ApplePayButton\n style={style}\n buttonStyle={colorType}\n type={buttonType}\n onClick={beginSession}\n />\n );\n}\n\nfunction Wrapper(props: Props) {\n const instrument = useInstrument(\n currentProjectID(),\n props.analytics,\n \"cart\",\n );\n return (\n <InstrumentProvider value={instrument}>\n <CartProvider>\n <ApplePayButtonComponent {...props} />\n </CartProvider>\n </InstrumentProvider>\n );\n}\nexport default Wrapper;\n","import { getProjectID } from \"./CartProvider\";\n\n/** The page's project ID; `undefined` (instead of a throw) during server rendering. */\nexport function currentProjectID(): string | undefined {\n try {\n return getProjectID();\n } catch {\n return undefined;\n }\n}\n"]}
|