@rechargeapps/storefront-client 1.16.0 → 1.16.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sources":["../../../src/utils/init.ts"],"sourcesContent":["import { resetCDNCache } from '../api/cdn';\nimport { StorefrontOptions, CRUDRequestOptions, GetRequestOptions, InitOptions } from '../types';\nimport { setOptions } from './options';\nimport { request } from './request';\n\nexport const api = {\n get<T>(url: string, requestOptions?: GetRequestOptions): Promise<T> {\n return request<T>('get', url, requestOptions);\n },\n post<T>(url: string, requestOptions?: CRUDRequestOptions): Promise<T> {\n return request<T>('post', url, requestOptions);\n },\n put<T>(url: string, requestOptions?: CRUDRequestOptions): Promise<T> {\n return request<T>('put', url, requestOptions);\n },\n delete<T>(url: string, requestOptions?: CRUDRequestOptions): Promise<T> {\n return request<T>('delete', url, requestOptions);\n },\n};\n\n/**\n * Uses passed in storeIdentifier, but if it's not passed in will try to infer it.\n * Currently it will only infer if we are in the context of a Shopify store. This will not infer headless or hosted yet.\n */\nfunction getStoreIdentifier(storeIdentifier?: string): string {\n if (storeIdentifier) {\n return storeIdentifier;\n }\n\n // Infer's when on Shopify store (non headless)\n if (window?.Shopify?.shop) {\n return window.Shopify.shop;\n }\n\n // Domain exists on hosted themes. If it doesn't for some reason, get the subdomain and create the identifier\n let domain = window?.domain;\n if (!domain) {\n const subdomain = location?.href\n .match(/(?:http[s]*:\\/\\/)*(.*?)\\.(?=admin\\.rechargeapps\\.com)/i)?.[1]\n .replace(/-sp$/, '');\n if (subdomain) {\n domain = `${subdomain}.myshopify.com`;\n }\n }\n\n // Infer's when on Recharge hosted\n if (domain) {\n return domain;\n }\n\n throw new Error(`No storeIdentifier was passed into init.`);\n}\n\nexport function initRecharge(opt: InitOptions = {}) {\n const hiddenOpts = opt as StorefrontOptions;\n const { storefrontAccessToken } = opt;\n if (storefrontAccessToken && !storefrontAccessToken.startsWith('strfnt')) {\n throw new Error(\n 'Incorrect storefront access token used. See https://storefront.rechargepayments.com/client/docs/getting_started/package_setup/#initialization-- for more information.'\n );\n }\n setOptions({\n storeIdentifier: getStoreIdentifier(opt.storeIdentifier),\n loginRetryFn: opt.loginRetryFn,\n storefrontAccessToken,\n environment: hiddenOpts.environment ? hiddenOpts.environment : 'prod',\n environmentUri: hiddenOpts.environmentUri,\n });\n\n // When init is called again, reset the cache to make sure we don't have the old cache around\n resetCDNCache();\n}\n"],"names":["request","setOptions","resetCDNCache"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"init.js","sources":["../../../src/utils/init.ts"],"sourcesContent":["import { resetCDNCache } from '../api/cdn';\nimport { StorefrontOptions, CRUDRequestOptions, GetRequestOptions, InitOptions } from '../types';\nimport { setOptions } from './options';\nimport { request } from './request';\n\n/**\n * @internal\n * @deprecated will be removed in next version\n */\nexport const api = {\n get<T>(url: string, requestOptions?: GetRequestOptions): Promise<T> {\n return request<T>('get', url, requestOptions);\n },\n post<T>(url: string, requestOptions?: CRUDRequestOptions): Promise<T> {\n return request<T>('post', url, requestOptions);\n },\n put<T>(url: string, requestOptions?: CRUDRequestOptions): Promise<T> {\n return request<T>('put', url, requestOptions);\n },\n delete<T>(url: string, requestOptions?: CRUDRequestOptions): Promise<T> {\n return request<T>('delete', url, requestOptions);\n },\n};\n\n/**\n * Uses passed in storeIdentifier, but if it's not passed in will try to infer it.\n * Currently it will only infer if we are in the context of a Shopify store. This will not infer headless or hosted yet.\n */\nfunction getStoreIdentifier(storeIdentifier?: string): string {\n if (storeIdentifier) {\n return storeIdentifier;\n }\n\n // Infer's when on Shopify store (non headless)\n if (window?.Shopify?.shop) {\n return window.Shopify.shop;\n }\n\n // Domain exists on hosted themes. If it doesn't for some reason, get the subdomain and create the identifier\n let domain = window?.domain;\n if (!domain) {\n const subdomain = location?.href\n .match(/(?:http[s]*:\\/\\/)*(.*?)\\.(?=admin\\.rechargeapps\\.com)/i)?.[1]\n .replace(/-sp$/, '');\n if (subdomain) {\n domain = `${subdomain}.myshopify.com`;\n }\n }\n\n // Infer's when on Recharge hosted\n if (domain) {\n return domain;\n }\n\n throw new Error(`No storeIdentifier was passed into init.`);\n}\n\nexport function initRecharge(opt: InitOptions = {}) {\n const hiddenOpts = opt as StorefrontOptions;\n const { storefrontAccessToken } = opt;\n if (storefrontAccessToken && !storefrontAccessToken.startsWith('strfnt')) {\n throw new Error(\n 'Incorrect storefront access token used. See https://storefront.rechargepayments.com/client/docs/getting_started/package_setup/#initialization-- for more information.'\n );\n }\n setOptions({\n storeIdentifier: getStoreIdentifier(opt.storeIdentifier),\n loginRetryFn: opt.loginRetryFn,\n storefrontAccessToken,\n environment: hiddenOpts.environment ? hiddenOpts.environment : 'prod',\n environmentUri: hiddenOpts.environmentUri,\n });\n\n // When init is called again, reset the cache to make sure we don't have the old cache around\n resetCDNCache();\n}\n"],"names":["request","setOptions","resetCDNCache"],"mappings":";;;;;;AASO,MAAM,GAAM,GAAA;AAAA,EACjB,GAAA,CAAO,KAAa,cAAgD,EAAA;AAClE,IAAO,OAAAA,eAAA,CAAW,KAAO,EAAA,GAAA,EAAK,cAAc,CAAA,CAAA;AAAA,GAC9C;AAAA,EACA,IAAA,CAAQ,KAAa,cAAiD,EAAA;AACpE,IAAO,OAAAA,eAAA,CAAW,MAAQ,EAAA,GAAA,EAAK,cAAc,CAAA,CAAA;AAAA,GAC/C;AAAA,EACA,GAAA,CAAO,KAAa,cAAiD,EAAA;AACnE,IAAO,OAAAA,eAAA,CAAW,KAAO,EAAA,GAAA,EAAK,cAAc,CAAA,CAAA;AAAA,GAC9C;AAAA,EACA,MAAA,CAAU,KAAa,cAAiD,EAAA;AACtE,IAAO,OAAAA,eAAA,CAAW,QAAU,EAAA,GAAA,EAAK,cAAc,CAAA,CAAA;AAAA,GACjD;AACF,EAAA;AAMA,SAAS,mBAAmB,eAAkC,EAAA;AAC5D,EAAA,IAAI,eAAiB,EAAA;AACnB,IAAO,OAAA,eAAA,CAAA;AAAA,GACT;AAGA,EAAI,IAAA,MAAA,EAAQ,SAAS,IAAM,EAAA;AACzB,IAAA,OAAO,OAAO,OAAQ,CAAA,IAAA,CAAA;AAAA,GACxB;AAGA,EAAA,IAAI,SAAS,MAAQ,EAAA,MAAA,CAAA;AACrB,EAAA,IAAI,CAAC,MAAQ,EAAA;AACX,IAAM,MAAA,SAAA,GAAY,QAAU,EAAA,IAAA,CACzB,KAAM,CAAA,wDAAwD,IAAI,CAAC,CAAA,CACnE,OAAQ,CAAA,MAAA,EAAQ,EAAE,CAAA,CAAA;AACrB,IAAA,IAAI,SAAW,EAAA;AACb,MAAA,MAAA,GAAS,GAAG,SAAS,CAAA,cAAA,CAAA,CAAA;AAAA,KACvB;AAAA,GACF;AAGA,EAAA,IAAI,MAAQ,EAAA;AACV,IAAO,OAAA,MAAA,CAAA;AAAA,GACT;AAEA,EAAM,MAAA,IAAI,MAAM,CAA0C,wCAAA,CAAA,CAAA,CAAA;AAC5D,CAAA;AAEgB,SAAA,YAAA,CAAa,GAAmB,GAAA,EAAI,EAAA;AAClD,EAAA,MAAM,UAAa,GAAA,GAAA,CAAA;AACnB,EAAM,MAAA,EAAE,uBAA0B,GAAA,GAAA,CAAA;AAClC,EAAA,IAAI,qBAAyB,IAAA,CAAC,qBAAsB,CAAA,UAAA,CAAW,QAAQ,CAAG,EAAA;AACxE,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,uKAAA;AAAA,KACF,CAAA;AAAA,GACF;AACA,EAAWC,kBAAA,CAAA;AAAA,IACT,eAAA,EAAiB,kBAAmB,CAAA,GAAA,CAAI,eAAe,CAAA;AAAA,IACvD,cAAc,GAAI,CAAA,YAAA;AAAA,IAClB,qBAAA;AAAA,IACA,WAAa,EAAA,UAAA,CAAW,WAAc,GAAA,UAAA,CAAW,WAAc,GAAA,MAAA;AAAA,IAC/D,gBAAgB,UAAW,CAAA,cAAA;AAAA,GAC5B,CAAA,CAAA;AAGD,EAAcC,iBAAA,EAAA,CAAA;AAChB;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sources":["../../../src/utils/init.ts"],"sourcesContent":["import { resetCDNCache } from '../api/cdn';\nimport { StorefrontOptions, CRUDRequestOptions, GetRequestOptions, InitOptions } from '../types';\nimport { setOptions } from './options';\nimport { request } from './request';\n\nexport const api = {\n get<T>(url: string, requestOptions?: GetRequestOptions): Promise<T> {\n return request<T>('get', url, requestOptions);\n },\n post<T>(url: string, requestOptions?: CRUDRequestOptions): Promise<T> {\n return request<T>('post', url, requestOptions);\n },\n put<T>(url: string, requestOptions?: CRUDRequestOptions): Promise<T> {\n return request<T>('put', url, requestOptions);\n },\n delete<T>(url: string, requestOptions?: CRUDRequestOptions): Promise<T> {\n return request<T>('delete', url, requestOptions);\n },\n};\n\n/**\n * Uses passed in storeIdentifier, but if it's not passed in will try to infer it.\n * Currently it will only infer if we are in the context of a Shopify store. This will not infer headless or hosted yet.\n */\nfunction getStoreIdentifier(storeIdentifier?: string): string {\n if (storeIdentifier) {\n return storeIdentifier;\n }\n\n // Infer's when on Shopify store (non headless)\n if (window?.Shopify?.shop) {\n return window.Shopify.shop;\n }\n\n // Domain exists on hosted themes. If it doesn't for some reason, get the subdomain and create the identifier\n let domain = window?.domain;\n if (!domain) {\n const subdomain = location?.href\n .match(/(?:http[s]*:\\/\\/)*(.*?)\\.(?=admin\\.rechargeapps\\.com)/i)?.[1]\n .replace(/-sp$/, '');\n if (subdomain) {\n domain = `${subdomain}.myshopify.com`;\n }\n }\n\n // Infer's when on Recharge hosted\n if (domain) {\n return domain;\n }\n\n throw new Error(`No storeIdentifier was passed into init.`);\n}\n\nexport function initRecharge(opt: InitOptions = {}) {\n const hiddenOpts = opt as StorefrontOptions;\n const { storefrontAccessToken } = opt;\n if (storefrontAccessToken && !storefrontAccessToken.startsWith('strfnt')) {\n throw new Error(\n 'Incorrect storefront access token used. See https://storefront.rechargepayments.com/client/docs/getting_started/package_setup/#initialization-- for more information.'\n );\n }\n setOptions({\n storeIdentifier: getStoreIdentifier(opt.storeIdentifier),\n loginRetryFn: opt.loginRetryFn,\n storefrontAccessToken,\n environment: hiddenOpts.environment ? hiddenOpts.environment : 'prod',\n environmentUri: hiddenOpts.environmentUri,\n });\n\n // When init is called again, reset the cache to make sure we don't have the old cache around\n resetCDNCache();\n}\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"init.js","sources":["../../../src/utils/init.ts"],"sourcesContent":["import { resetCDNCache } from '../api/cdn';\nimport { StorefrontOptions, CRUDRequestOptions, GetRequestOptions, InitOptions } from '../types';\nimport { setOptions } from './options';\nimport { request } from './request';\n\n/**\n * @internal\n * @deprecated will be removed in next version\n */\nexport const api = {\n get<T>(url: string, requestOptions?: GetRequestOptions): Promise<T> {\n return request<T>('get', url, requestOptions);\n },\n post<T>(url: string, requestOptions?: CRUDRequestOptions): Promise<T> {\n return request<T>('post', url, requestOptions);\n },\n put<T>(url: string, requestOptions?: CRUDRequestOptions): Promise<T> {\n return request<T>('put', url, requestOptions);\n },\n delete<T>(url: string, requestOptions?: CRUDRequestOptions): Promise<T> {\n return request<T>('delete', url, requestOptions);\n },\n};\n\n/**\n * Uses passed in storeIdentifier, but if it's not passed in will try to infer it.\n * Currently it will only infer if we are in the context of a Shopify store. This will not infer headless or hosted yet.\n */\nfunction getStoreIdentifier(storeIdentifier?: string): string {\n if (storeIdentifier) {\n return storeIdentifier;\n }\n\n // Infer's when on Shopify store (non headless)\n if (window?.Shopify?.shop) {\n return window.Shopify.shop;\n }\n\n // Domain exists on hosted themes. If it doesn't for some reason, get the subdomain and create the identifier\n let domain = window?.domain;\n if (!domain) {\n const subdomain = location?.href\n .match(/(?:http[s]*:\\/\\/)*(.*?)\\.(?=admin\\.rechargeapps\\.com)/i)?.[1]\n .replace(/-sp$/, '');\n if (subdomain) {\n domain = `${subdomain}.myshopify.com`;\n }\n }\n\n // Infer's when on Recharge hosted\n if (domain) {\n return domain;\n }\n\n throw new Error(`No storeIdentifier was passed into init.`);\n}\n\nexport function initRecharge(opt: InitOptions = {}) {\n const hiddenOpts = opt as StorefrontOptions;\n const { storefrontAccessToken } = opt;\n if (storefrontAccessToken && !storefrontAccessToken.startsWith('strfnt')) {\n throw new Error(\n 'Incorrect storefront access token used. See https://storefront.rechargepayments.com/client/docs/getting_started/package_setup/#initialization-- for more information.'\n );\n }\n setOptions({\n storeIdentifier: getStoreIdentifier(opt.storeIdentifier),\n loginRetryFn: opt.loginRetryFn,\n storefrontAccessToken,\n environment: hiddenOpts.environment ? hiddenOpts.environment : 'prod',\n environmentUri: hiddenOpts.environmentUri,\n });\n\n // When init is called again, reset the cache to make sure we don't have the old cache around\n resetCDNCache();\n}\n"],"names":[],"mappings":";;;;AASO,MAAM,GAAM,GAAA;AAAA,EACjB,GAAA,CAAO,KAAa,cAAgD,EAAA;AAClE,IAAO,OAAA,OAAA,CAAW,KAAO,EAAA,GAAA,EAAK,cAAc,CAAA,CAAA;AAAA,GAC9C;AAAA,EACA,IAAA,CAAQ,KAAa,cAAiD,EAAA;AACpE,IAAO,OAAA,OAAA,CAAW,MAAQ,EAAA,GAAA,EAAK,cAAc,CAAA,CAAA;AAAA,GAC/C;AAAA,EACA,GAAA,CAAO,KAAa,cAAiD,EAAA;AACnE,IAAO,OAAA,OAAA,CAAW,KAAO,EAAA,GAAA,EAAK,cAAc,CAAA,CAAA;AAAA,GAC9C;AAAA,EACA,MAAA,CAAU,KAAa,cAAiD,EAAA;AACtE,IAAO,OAAA,OAAA,CAAW,QAAU,EAAA,GAAA,EAAK,cAAc,CAAA,CAAA;AAAA,GACjD;AACF,EAAA;AAMA,SAAS,mBAAmB,eAAkC,EAAA;AAC5D,EAAA,IAAI,eAAiB,EAAA;AACnB,IAAO,OAAA,eAAA,CAAA;AAAA,GACT;AAGA,EAAI,IAAA,MAAA,EAAQ,SAAS,IAAM,EAAA;AACzB,IAAA,OAAO,OAAO,OAAQ,CAAA,IAAA,CAAA;AAAA,GACxB;AAGA,EAAA,IAAI,SAAS,MAAQ,EAAA,MAAA,CAAA;AACrB,EAAA,IAAI,CAAC,MAAQ,EAAA;AACX,IAAM,MAAA,SAAA,GAAY,QAAU,EAAA,IAAA,CACzB,KAAM,CAAA,wDAAwD,IAAI,CAAC,CAAA,CACnE,OAAQ,CAAA,MAAA,EAAQ,EAAE,CAAA,CAAA;AACrB,IAAA,IAAI,SAAW,EAAA;AACb,MAAA,MAAA,GAAS,GAAG,SAAS,CAAA,cAAA,CAAA,CAAA;AAAA,KACvB;AAAA,GACF;AAGA,EAAA,IAAI,MAAQ,EAAA;AACV,IAAO,OAAA,MAAA,CAAA;AAAA,GACT;AAEA,EAAM,MAAA,IAAI,MAAM,CAA0C,wCAAA,CAAA,CAAA,CAAA;AAC5D,CAAA;AAEgB,SAAA,YAAA,CAAa,GAAmB,GAAA,EAAI,EAAA;AAClD,EAAA,MAAM,UAAa,GAAA,GAAA,CAAA;AACnB,EAAM,MAAA,EAAE,uBAA0B,GAAA,GAAA,CAAA;AAClC,EAAA,IAAI,qBAAyB,IAAA,CAAC,qBAAsB,CAAA,UAAA,CAAW,QAAQ,CAAG,EAAA;AACxE,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,uKAAA;AAAA,KACF,CAAA;AAAA,GACF;AACA,EAAW,UAAA,CAAA;AAAA,IACT,eAAA,EAAiB,kBAAmB,CAAA,GAAA,CAAI,eAAe,CAAA;AAAA,IACvD,cAAc,GAAI,CAAA,YAAA;AAAA,IAClB,qBAAA;AAAA,IACA,WAAa,EAAA,UAAA,CAAW,WAAc,GAAA,UAAA,CAAW,WAAc,GAAA,MAAA;AAAA,IAC/D,gBAAgB,UAAW,CAAA,cAAA;AAAA,GAC5B,CAAA,CAAA;AAGD,EAAc,aAAA,EAAA,CAAA;AAChB;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -470,21 +470,15 @@ type VariantSelector = {
|
|
|
470
470
|
};
|
|
471
471
|
};
|
|
472
472
|
};
|
|
473
|
-
|
|
474
|
-
VARIANT_SELECTOR = "variantSelector",
|
|
475
|
-
ALL_COLLECTIONS = "all-collections",
|
|
476
|
-
ADDONS = "addons",
|
|
477
|
-
SUMMARY = "summary",
|
|
478
|
-
CROSS_SELLS = "cross-sells"
|
|
479
|
-
}
|
|
473
|
+
type StepSettingsTypes = 'variantSelector' | 'all-collections' | 'addons' | 'summary' | 'cross-sells';
|
|
480
474
|
type BundlePriceRule = 'fixed' | 'dynamic';
|
|
481
475
|
type VariantSelectorStepSetting = StepSettingsCommon & {
|
|
482
476
|
data?: VariantSelector;
|
|
483
|
-
type:
|
|
477
|
+
type: 'variantSelector';
|
|
484
478
|
};
|
|
485
479
|
type StepSettings = StepSettingsCommon & {
|
|
486
480
|
data?: Record<string, unknown>;
|
|
487
|
-
type:
|
|
481
|
+
type: Omit<StepSettingsTypes, 'variantSelector'>;
|
|
488
482
|
};
|
|
489
483
|
interface MultiStepSettings {
|
|
490
484
|
optionImages: string;
|
|
@@ -2640,6 +2634,10 @@ declare function createSubscriptions(session: Session, createRequestBulk: Create
|
|
|
2640
2634
|
*/
|
|
2641
2635
|
declare function updateSubscriptions(session: Session, addressId: string | number, updateRequestBulk: UpdateSubscriptionsRequest[], query?: UpdateSubscriptionsParams): Promise<Subscription[]>;
|
|
2642
2636
|
|
|
2637
|
+
/**
|
|
2638
|
+
* @internal
|
|
2639
|
+
* @deprecated will be removed in next version
|
|
2640
|
+
*/
|
|
2643
2641
|
declare const api: {
|
|
2644
2642
|
get<T>(url: string, requestOptions?: GetRequestOptions): Promise<T>;
|
|
2645
2643
|
post<T_1>(url: string, requestOptions?: CRUDRequestOptions): Promise<T_1>;
|
|
@@ -2648,4 +2646,4 @@ declare const api: {
|
|
|
2648
2646
|
};
|
|
2649
2647
|
declare function initRecharge(opt?: InitOptions): void;
|
|
2650
2648
|
|
|
2651
|
-
export { type ActivateMembershipRequest, type Address, type AddressIncludes, type AddressListParams, type AddressListResponse, type AddressResponse, type AddressSortBy, type AnalyticsData, type AssociatedAddress, type BasicSubscriptionParams, type BooleanLike, type BooleanNumbers, type BooleanString, type BooleanStringNumbers, type BundleAppProxy, type BundleProduct, type BundlePurchaseItem, type BundlePurchaseItemParams, type BundleSelection, type BundleSelectionAppProxy, type BundleSelectionItem, type BundleSelectionItemRequiredCreateProps, type BundleSelectionListParams, type BundleSelectionsResponse, type BundleSelectionsSortBy, type BundleTranslations, type BundleVariant, type BundleVariantOptionSource, type CDNBaseWidgetSettings, type CDNBundleSettings, type CDNBundleVariant, type CDNBundleVariantOptionSource, type CDNPlan, type CDNProduct, type CDNProductAndSettings, type CDNProductKeyObject, type CDNProductQuery_2020_12, type CDNProductQuery_2022_06, type CDNProductRaw, type CDNProductResource, type CDNProductResponseType, type CDNProductType, type CDNProductVariant_2022_06, type CDNProduct_2022_06, type CDNProductsAndSettings, type CDNProductsAndSettingsResource, type CDNStoreSettings, type CDNSubscriptionOption, type CDNVariant, type CDNVersion, type CDNWidgetSettings, type CDNWidgetSettingsRaw, type CDNWidgetSettingsResource, type CRUDRequestOptions, type CancelMembershipRequest, type CancelSubscriptionRequest, type ChangeMembershipRequest, type ChannelSettings, type Charge, type ChargeIncludes, type ChargeListParams, type ChargeListResponse, type ChargeResponse, type ChargeSortBy, type ChargeStatus, type ColorString, type CreateAddressRequest, type CreateBundleSelectionRequest, type CreateMetafieldRequest, type CreateOnetimeRequest, type CreatePaymentMethodRequest, type CreateRecipientAddress, type CreateSubscriptionRequest, type CreditAccount, type CreditAccountType, type CreditSummaryIncludes, type Customer, type CustomerCreditSummary, type CustomerDeliveryScheduleParams, type CustomerDeliveryScheduleResponse, type CustomerIncludes, type CustomerNotification, type CustomerNotificationOptions, type CustomerNotificationTemplate, type CustomerNotificationType, type CustomerPortalAccessResponse, type Delivery, type DeliveryLineItem, type DeliveryOrder, type DeliveryPaymentMethod, type Discount, type DiscountType, type DynamicBundleItemAppProxy, type DynamicBundlePropertiesAppProxy, type ExternalAttributeSchema, type ExternalId, type ExternalTransactionId, type FirstOption, type GetAddressOptions, type GetChargeOptions, type GetCreditSummaryOptions, type GetCustomerOptions, type GetMembershipProgramOptions, type GetPaymentMethodOptions, type GetRequestOptions, type GetSubscriptionOptions, type GiftPurchase, type GiftPurchasesParams, type GiftPurchasesResponse, type HTMLString, type InitOptions, type IntervalUnit, type IsoDateString, type LineItem, type ListParams, type LoginResponse, type Membership, type MembershipBenefit, type MembershipIncludes, type MembershipListParams, type MembershipListResponse, type MembershipProgram, type MembershipProgramIncludes, type MembershipProgramListParams, type MembershipProgramListResponse, type MembershipProgramResponse, type MembershipProgramSortBy, type MembershipProgramStatus, type MembershipResponse, type MembershipStatus, type MembershipsSortBy, type MergeAddressesRequest, type Metafield, type MetafieldOptionalCreateProps, type MetafieldOwnerResource, type MetafieldRequiredCreateProps, type Method, type Modifier, type Onetime, type OnetimeListParams, type OnetimeOptionalCreateProps, type OnetimeRequiredCreateProps, type OnetimesResponse, type OnetimesSortBy, type Order, type OrderIncludes, type OrderListParams, type OrderSortBy, type OrderStatus, type OrderType, type OrdersResponse, type PasswordlessCodeResponse, type PasswordlessOptions, type PasswordlessValidateResponse, type PaymentDetails, type PaymentMethod, type PaymentMethodIncludes, type PaymentMethodListParams, type PaymentMethodOptionalCreateProps, type PaymentMethodRequiredCreateProps, type PaymentMethodSortBy, type PaymentMethodStatus, type PaymentMethodsResponse, type PaymentType, type Plan, type PlanListParams, type PlanSortBy, type PlanType, type PlansResponse, type ProcessorName, type ProductImage, type ProductInclude, type ProductOption, type ProductSearchParams_2020_12, type ProductSearchParams_2022_06, type ProductSearchResponse_2020_12, type ProductSearchResponse_2022_06, type ProductSearchType, type ProductSource, type ProductValueOption, type ProductVariant_2020_12, type ProductVariant_2022_06, type Product_2020_12, type Product_2022_06, type Property, type PublishStatus, type Request, type RequestHeaders, type RequestOptions, type SellingPlan, type SellingPlanGroup, type Session, type ShippingCountriesOptions, type ShippingCountriesResponse, type ShippingCountry, type ShippingLine, type ShippingProvince, type ShopifyUpdatePaymentInfoOptions, type SkipChargeParams, type SkipFutureChargeAddressRequest, type SkipFutureChargeAddressResponse, type SortBy, type SortField, type SortKeys, type StorefrontEnvironment, type StorefrontOptions, type StorefrontPurchaseOption, type SubType, type Subscription, type SubscriptionIncludes, type SubscriptionListParams, type SubscriptionOption, type SubscriptionOptionalCreateProps, type SubscriptionPreferences, type SubscriptionRequiredCreateProps, type SubscriptionSortBy, type SubscriptionStatus, type Subscription_2021_01, type SubscriptionsResponse, type TaxLine, type Translations, type UpdateAddressRequest, type UpdateBundlePurchaseItem, type UpdateBundleSelectionRequest, type UpdateCustomerRequest, type UpdateMetafieldRequest, type UpdateOnetimeRequest, type UpdatePaymentMethodRequest, type UpdateSubscriptionParams, type UpdateSubscriptionRequest, type UpdateSubscriptionsParams, type UpdateSubscriptionsRequest, type WidgetIconColor, type WidgetTemplateType, activateMembership, activateSubscription, api, applyDiscountToAddress, applyDiscountToCharge, cancelMembership, cancelSubscription, changeMembership, createAddress, createBundleSelection, createMetafield, createOnetime, createPaymentMethod, createSubscription, createSubscriptions, deleteAddress, deleteBundleSelection, deleteMetafield, deleteOnetime, getActiveChurnLandingPageURL, getAddress, getBundleId, getBundleSelection, getCDNBundleSettings, getCDNProduct, getCDNProductAndSettings, getCDNProducts, getCDNProductsAndSettings, getCDNStoreSettings, getCDNWidgetSettings, getCharge, getCreditSummary, getCustomer, getCustomerPortalAccess, getDeliverySchedule, getDynamicBundleItems, getGiftPurchase, getGiftRedemptionLandingPageURL, getMembership, getMembershipProgram, getOnetime, getOrder, getPaymentMethod, getPlan, getShippingCountries, getSubscription, initRecharge, type intervalUnit, listAddresses, listBundleSelections, listCharges, listGiftPurchases, listMembershipPrograms, listMemberships, listOnetimes, listOrders, listPaymentMethods, listPlans, listSubscriptions, loginCustomerPortal, loginShopifyApi, loginShopifyAppProxy, type membershipIncludes, mergeAddresses, processCharge, productSearch, removeDiscountsFromAddress, removeDiscountsFromCharge, resetCDNCache, sendCustomerNotification, sendPasswordlessCode, sendPasswordlessCodeAppProxy, skipCharge, skipFutureCharge, skipGiftSubscriptionCharge, skipSubscriptionCharge, unskipCharge, updateAddress, updateBundle, updateBundleSelection, updateCustomer, updateMetafield, updateOnetime, updatePaymentMethod, updateSubscription, updateSubscriptionAddress, updateSubscriptionChargeDate, updateSubscriptions, validateBundle, validateDynamicBundle, validatePasswordlessCode, validatePasswordlessCodeAppProxy };
|
|
2649
|
+
export { type ActivateMembershipRequest, type AddToCartCallbackSettings, type AddonSettings, type Address, type AddressIncludes, type AddressListParams, type AddressListResponse, type AddressResponse, type AddressSortBy, type AnalyticsData, type AssociatedAddress, type BasicSubscriptionParams, type BooleanLike, type BooleanNumbers, type BooleanString, type BooleanStringNumbers, type BundleAppProxy, type BundlePriceRule, type BundleProduct, type BundleProductLayoutSettings, type BundlePurchaseItem, type BundlePurchaseItemParams, type BundleSelection, type BundleSelectionAppProxy, type BundleSelectionItem, type BundleSelectionItemRequiredCreateProps, type BundleSelectionListParams, type BundleSelectionsResponse, type BundleSelectionsSortBy, type BundleTemplateSettings, type BundleTemplateType, type BundleTranslations, type BundleVariant, type BundleVariantOptionSource, type BundleVariantRange, type BundleVariantSelectionDefault, type CDNBaseWidgetSettings, type CDNBundleSettings, type CDNBundleVariant, type CDNBundleVariantOptionSource, type CDNPlan, type CDNProduct, type CDNProductAndSettings, type CDNProductKeyObject, type CDNProductQuery_2020_12, type CDNProductQuery_2022_06, type CDNProductRaw, type CDNProductResource, type CDNProductResponseType, type CDNProductType, type CDNProductVariant_2022_06, type CDNProduct_2022_06, type CDNProductsAndSettings, type CDNProductsAndSettingsResource, type CDNStoreSettings, type CDNSubscriptionOption, type CDNVariant, type CDNVersion, type CDNWidgetSettings, type CDNWidgetSettingsRaw, type CDNWidgetSettingsResource, type CRUDRequestOptions, type CancelMembershipRequest, type CancelSubscriptionRequest, type ChangeMembershipRequest, type ChannelSettings, type Charge, type ChargeIncludes, type ChargeListParams, type ChargeListResponse, type ChargeResponse, type ChargeSortBy, type ChargeStatus, type ColorString, type CreateAddressRequest, type CreateBundleSelectionRequest, type CreateMetafieldRequest, type CreateOnetimeRequest, type CreatePaymentMethodRequest, type CreateRecipientAddress, type CreateSubscriptionRequest, type CreditAccount, type CreditAccountType, type CreditSummaryIncludes, type CrossSellsSettings, type Customer, type CustomerCreditSummary, type CustomerDeliveryScheduleParams, type CustomerDeliveryScheduleResponse, type CustomerIncludes, type CustomerNotification, type CustomerNotificationOptions, type CustomerNotificationTemplate, type CustomerNotificationType, type CustomerPortalAccessResponse, type Delivery, type DeliveryLineItem, type DeliveryOrder, type DeliveryPaymentMethod, type Discount, type DiscountType, type DynamicBundleItemAppProxy, type DynamicBundlePropertiesAppProxy, type ExternalAttributeSchema, type ExternalId, type ExternalTransactionId, type FirstOption, type GetAddressOptions, type GetChargeOptions, type GetCreditSummaryOptions, type GetCustomerOptions, type GetMembershipProgramOptions, type GetPaymentMethodOptions, type GetRequestOptions, type GetSubscriptionOptions, type GiftPurchase, type GiftPurchasesParams, type GiftPurchasesResponse, type HTMLString, type InitOptions, type IntervalUnit, type IsoDateString, type LineItem, type ListParams, type LoginResponse, type Membership, type MembershipBenefit, type MembershipIncludes, type MembershipListParams, type MembershipListResponse, type MembershipProgram, type MembershipProgramIncludes, type MembershipProgramListParams, type MembershipProgramListResponse, type MembershipProgramResponse, type MembershipProgramSortBy, type MembershipProgramStatus, type MembershipResponse, type MembershipStatus, type MembershipsSortBy, type MergeAddressesRequest, type Metafield, type MetafieldOptionalCreateProps, type MetafieldOwnerResource, type MetafieldRequiredCreateProps, type Method, type Modifier, type MultiStepSettings, type OnePageSettings, type Onetime, type OnetimeListParams, type OnetimeOptionalCreateProps, type OnetimeRequiredCreateProps, type OnetimesResponse, type OnetimesSortBy, type Order, type OrderIncludes, type OrderListParams, type OrderSortBy, type OrderStatus, type OrderType, type OrdersResponse, type PasswordlessCodeResponse, type PasswordlessOptions, type PasswordlessValidateResponse, type PaymentDetails, type PaymentMethod, type PaymentMethodIncludes, type PaymentMethodListParams, type PaymentMethodOptionalCreateProps, type PaymentMethodRequiredCreateProps, type PaymentMethodSortBy, type PaymentMethodStatus, type PaymentMethodsResponse, type PaymentType, type Plan, type PlanListParams, type PlanSortBy, type PlanType, type PlansResponse, type ProcessorName, type ProductImage, type ProductInclude, type ProductOption, type ProductSearchParams_2020_12, type ProductSearchParams_2022_06, type ProductSearchResponse_2020_12, type ProductSearchResponse_2022_06, type ProductSearchType, type ProductSource, type ProductValueOption, type ProductVariant_2020_12, type ProductVariant_2022_06, type Product_2020_12, type Product_2022_06, type Property, type PublishStatus, type Request, type RequestHeaders, type RequestOptions, type SellingPlan, type SellingPlanGroup, type Session, type ShippingCountriesOptions, type ShippingCountriesResponse, type ShippingCountry, type ShippingLine, type ShippingProvince, type ShopifyUpdatePaymentInfoOptions, type SkipChargeParams, type SkipFutureChargeAddressRequest, type SkipFutureChargeAddressResponse, type SortBy, type SortField, type SortKeys, type StepSettings, type StepSettingsCommon, type StepSettingsTypes, type StorefrontEnvironment, type StorefrontOptions, type StorefrontPurchaseOption, type SubType, type Subscription, type SubscriptionIncludes, type SubscriptionListParams, type SubscriptionOption, type SubscriptionOptionalCreateProps, type SubscriptionPreferences, type SubscriptionRequiredCreateProps, type SubscriptionSortBy, type SubscriptionStatus, type Subscription_2021_01, type SubscriptionsResponse, type TaxLine, type Translations, type UpdateAddressRequest, type UpdateBundlePurchaseItem, type UpdateBundleSelectionRequest, type UpdateCustomerRequest, type UpdateMetafieldRequest, type UpdateOnetimeRequest, type UpdatePaymentMethodRequest, type UpdateSubscriptionParams, type UpdateSubscriptionRequest, type UpdateSubscriptionsParams, type UpdateSubscriptionsRequest, type VariantSelector, type VariantSelectorStepSetting, type WidgetIconColor, type WidgetTemplateType, type WidgetVisibility, activateMembership, activateSubscription, api, applyDiscountToAddress, applyDiscountToCharge, cancelMembership, cancelSubscription, changeMembership, createAddress, createBundleSelection, createMetafield, createOnetime, createPaymentMethod, createSubscription, createSubscriptions, deleteAddress, deleteBundleSelection, deleteMetafield, deleteOnetime, getActiveChurnLandingPageURL, getAddress, getBundleId, getBundleSelection, getCDNBundleSettings, getCDNProduct, getCDNProductAndSettings, getCDNProducts, getCDNProductsAndSettings, getCDNStoreSettings, getCDNWidgetSettings, getCharge, getCreditSummary, getCustomer, getCustomerPortalAccess, getDeliverySchedule, getDynamicBundleItems, getGiftPurchase, getGiftRedemptionLandingPageURL, getMembership, getMembershipProgram, getOnetime, getOrder, getPaymentMethod, getPlan, getShippingCountries, getSubscription, initRecharge, type intervalUnit, listAddresses, listBundleSelections, listCharges, listGiftPurchases, listMembershipPrograms, listMemberships, listOnetimes, listOrders, listPaymentMethods, listPlans, listSubscriptions, loginCustomerPortal, loginShopifyApi, loginShopifyAppProxy, type membershipIncludes, mergeAddresses, processCharge, productSearch, removeDiscountsFromAddress, removeDiscountsFromCharge, resetCDNCache, sendCustomerNotification, sendPasswordlessCode, sendPasswordlessCodeAppProxy, skipCharge, skipFutureCharge, skipGiftSubscriptionCharge, skipSubscriptionCharge, unskipCharge, updateAddress, updateBundle, updateBundleSelection, updateCustomer, updateMetafield, updateOnetime, updatePaymentMethod, updateSubscription, updateSubscriptionAddress, updateSubscriptionChargeDate, updateSubscriptions, validateBundle, validateDynamicBundle, validatePasswordlessCode, validatePasswordlessCodeAppProxy };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// recharge-client-1.16.
|
|
1
|
+
// recharge-client-1.16.1.min.js | MIT License | © Recharge Inc.
|
|
2
2
|
(function(oe,$e){typeof exports=="object"&&typeof module<"u"?module.exports=$e():typeof define=="function"&&define.amd?define($e):(oe=typeof globalThis<"u"?globalThis:oe||self,oe.recharge=$e())})(this,function(){"use strict";var oe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Fo(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return t[n]}})}),r}var J=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof J<"u"&&J,te={searchParams:"URLSearchParams"in J,iterable:"Symbol"in J&&"iterator"in Symbol,blob:"FileReader"in J&&"Blob"in J&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in J,arrayBuffer:"ArrayBuffer"in J};function Po(t){return t&&DataView.prototype.isPrototypeOf(t)}if(te.arrayBuffer)var $o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Uo=ArrayBuffer.isView||function(t){return t&&$o.indexOf(Object.prototype.toString.call(t))>-1};function ht(t){if(typeof t!="string"&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||t==="")throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function wr(t){return typeof t!="string"&&(t=String(t)),t}function vr(t){var e={next:function(){var r=t.shift();return{done:r===void 0,value:r}}};return te.iterable&&(e[Symbol.iterator]=function(){return e}),e}function q(t){this.map={},t instanceof q?t.forEach(function(e,r){this.append(r,e)},this):Array.isArray(t)?t.forEach(function(e){this.append(e[0],e[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}q.prototype.append=function(t,e){t=ht(t),e=wr(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},q.prototype.delete=function(t){delete this.map[ht(t)]},q.prototype.get=function(t){return t=ht(t),this.has(t)?this.map[t]:null},q.prototype.has=function(t){return this.map.hasOwnProperty(ht(t))},q.prototype.set=function(t,e){this.map[ht(t)]=wr(e)},q.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},q.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),vr(t)},q.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),vr(t)},q.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),vr(t)},te.iterable&&(q.prototype[Symbol.iterator]=q.prototype.entries);function _r(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function Sn(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function Co(t){var e=new FileReader,r=Sn(e);return e.readAsArrayBuffer(t),r}function Do(t){var e=new FileReader,r=Sn(e);return e.readAsText(t),r}function No(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}function In(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function Bn(){return this.bodyUsed=!1,this._initBody=function(t){this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?typeof t=="string"?this._bodyText=t:te.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:te.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:te.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():te.arrayBuffer&&te.blob&&Po(t)?(this._bodyArrayBuffer=In(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):te.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||Uo(t))?this._bodyArrayBuffer=In(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||(typeof t=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):te.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},te.blob&&(this.blob=function(){var t=_r(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=_r(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(Co)}),this.text=function(){var t=_r(this);if(t)return t;if(this._bodyBlob)return Do(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(No(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},te.formData&&(this.formData=function(){return this.text().then(ko)}),this.json=function(){return this.text().then(JSON.parse)},this}var Mo=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Lo(t){var e=t.toUpperCase();return Mo.indexOf(e)>-1?e:t}function Ue(t,e){if(!(this instanceof Ue))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e=e||{};var r=e.body;if(t instanceof Ue){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new q(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,!r&&t._bodyInit!=null&&(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",(e.headers||!this.headers)&&(this.headers=new q(e.headers)),this.method=Lo(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(this.method==="GET"||this.method==="HEAD")&&(e.cache==="no-store"||e.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var a=/\?/;this.url+=(a.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Ue.prototype.clone=function(){return new Ue(this,{body:this._bodyInit})};function ko(t){var e=new FormData;return t.trim().split("&").forEach(function(r){if(r){var n=r.split("="),a=n.shift().replace(/\+/g," "),s=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(a),decodeURIComponent(s))}}),e}function jo(t){var e=new q,r=t.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(n){return n.indexOf(`
|
|
3
3
|
`)===0?n.substr(1,n.length):n}).forEach(function(n){var a=n.split(":"),s=a.shift().trim();if(s){var f=a.join(":").trim();e.append(s,f)}}),e}Bn.call(Ue.prototype);function pe(t,e){if(!(this instanceof pe))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new q(e.headers),this.url=e.url||"",this._initBody(t)}Bn.call(pe.prototype),pe.prototype.clone=function(){return new pe(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new q(this.headers),url:this.url})},pe.error=function(){var t=new pe(null,{status:0,statusText:""});return t.type="error",t};var qo=[301,302,303,307,308];pe.redirect=function(t,e){if(qo.indexOf(e)===-1)throw new RangeError("Invalid status code");return new pe(null,{status:e,headers:{location:t}})};var Ce=J.DOMException;try{new Ce}catch{Ce=function(e,r){this.message=e,this.name=r;var n=Error(e);this.stack=n.stack},Ce.prototype=Object.create(Error.prototype),Ce.prototype.constructor=Ce}function On(t,e){return new Promise(function(r,n){var a=new Ue(t,e);if(a.signal&&a.signal.aborted)return n(new Ce("Aborted","AbortError"));var s=new XMLHttpRequest;function f(){s.abort()}s.onload=function(){var h={status:s.status,statusText:s.statusText,headers:jo(s.getAllResponseHeaders()||"")};h.url="responseURL"in s?s.responseURL:h.headers.get("X-Request-URL");var m="response"in s?s.response:s.responseText;setTimeout(function(){r(new pe(m,h))},0)},s.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.onabort=function(){setTimeout(function(){n(new Ce("Aborted","AbortError"))},0)};function p(h){try{return h===""&&J.location.href?J.location.href:h}catch{return h}}s.open(a.method,p(a.url),!0),a.credentials==="include"?s.withCredentials=!0:a.credentials==="omit"&&(s.withCredentials=!1),"responseType"in s&&(te.blob?s.responseType="blob":te.arrayBuffer&&a.headers.get("Content-Type")&&a.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(s.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof q)?Object.getOwnPropertyNames(e.headers).forEach(function(h){s.setRequestHeader(h,wr(e.headers[h]))}):a.headers.forEach(function(h,m){s.setRequestHeader(m,h)}),a.signal&&(a.signal.addEventListener("abort",f),s.onreadystatechange=function(){s.readyState===4&&a.signal.removeEventListener("abort",f)}),s.send(typeof a._bodyInit>"u"?null:a._bodyInit)})}On.polyfill=!0,J.fetch||(J.fetch=On,J.Headers=q,J.Request=Ue,J.Response=pe),self.fetch.bind(self);var Vo=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;e[r]=a;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(e,r);if(f.value!==a||f.enumerable!==!0)return!1}return!0},Tn=typeof Symbol<"u"&&Symbol,zo=Vo,Go=function(){return typeof Tn!="function"||typeof Symbol!="function"||typeof Tn("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:zo()},Rn={foo:{}},Wo=Object,Ho=function(){return{__proto__:Rn}.foo===Rn.foo&&!({__proto__:null}instanceof Wo)},Yo="Function.prototype.bind called on incompatible ",br=Array.prototype.slice,Xo=Object.prototype.toString,Jo="[object Function]",Ko=function(e){var r=this;if(typeof r!="function"||Xo.call(r)!==Jo)throw new TypeError(Yo+r);for(var n=br.call(arguments,1),a,s=function(){if(this instanceof a){var v=r.apply(this,n.concat(br.call(arguments)));return Object(v)===v?v:this}else return r.apply(e,n.concat(br.call(arguments)))},f=Math.max(0,r.length-n.length),p=[],h=0;h<f;h++)p.push("$"+h);if(a=Function("binder","return function ("+p.join(",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var m=function(){};m.prototype=r.prototype,a.prototype=new m,m.prototype=null}return a},Qo=Ko,Er=Function.prototype.bind||Qo,Zo=Er,ea=Zo.call(Function.call,Object.prototype.hasOwnProperty),C,Ye=SyntaxError,Fn=Function,Xe=TypeError,Ar=function(t){try{return Fn('"use strict"; return ('+t+").constructor;")()}catch{}},De=Object.getOwnPropertyDescriptor;if(De)try{De({},"")}catch{De=null}var xr=function(){throw new Xe},ta=De?function(){try{return arguments.callee,xr}catch{try{return De(arguments,"callee").get}catch{return xr}}}():xr,Je=Go(),ra=Ho(),W=Object.getPrototypeOf||(ra?function(t){return t.__proto__}:null),Ke={},na=typeof Uint8Array>"u"||!W?C:W(Uint8Array),Ne={"%AggregateError%":typeof AggregateError>"u"?C:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?C:ArrayBuffer,"%ArrayIteratorPrototype%":Je&&W?W([][Symbol.iterator]()):C,"%AsyncFromSyncIteratorPrototype%":C,"%AsyncFunction%":Ke,"%AsyncGenerator%":Ke,"%AsyncGeneratorFunction%":Ke,"%AsyncIteratorPrototype%":Ke,"%Atomics%":typeof Atomics>"u"?C:Atomics,"%BigInt%":typeof BigInt>"u"?C:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?C:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?C:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?C:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?C:Float32Array,"%Float64Array%":typeof Float64Array>"u"?C:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?C:FinalizationRegistry,"%Function%":Fn,"%GeneratorFunction%":Ke,"%Int8Array%":typeof Int8Array>"u"?C:Int8Array,"%Int16Array%":typeof Int16Array>"u"?C:Int16Array,"%Int32Array%":typeof Int32Array>"u"?C:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Je&&W?W(W([][Symbol.iterator]())):C,"%JSON%":typeof JSON=="object"?JSON:C,"%Map%":typeof Map>"u"?C:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Je||!W?C:W(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?C:Promise,"%Proxy%":typeof Proxy>"u"?C:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?C:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?C:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Je||!W?C:W(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?C:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Je&&W?W(""[Symbol.iterator]()):C,"%Symbol%":Je?Symbol:C,"%SyntaxError%":Ye,"%ThrowTypeError%":ta,"%TypedArray%":na,"%TypeError%":Xe,"%Uint8Array%":typeof Uint8Array>"u"?C:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?C:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?C:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?C:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?C:WeakMap,"%WeakRef%":typeof WeakRef>"u"?C:WeakRef,"%WeakSet%":typeof WeakSet>"u"?C:WeakSet};if(W)try{null.error}catch(t){var ia=W(W(t));Ne["%Error.prototype%"]=ia}var oa=function t(e){var r;if(e==="%AsyncFunction%")r=Ar("async function () {}");else if(e==="%GeneratorFunction%")r=Ar("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Ar("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var a=t("%AsyncGenerator%");a&&W&&(r=W(a.prototype))}return Ne[e]=r,r},Pn={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},dt=Er,Dt=ea,aa=dt.call(Function.call,Array.prototype.concat),sa=dt.call(Function.apply,Array.prototype.splice),$n=dt.call(Function.call,String.prototype.replace),Nt=dt.call(Function.call,String.prototype.slice),ua=dt.call(Function.call,RegExp.prototype.exec),ca=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fa=/\\(\\)?/g,la=function(e){var r=Nt(e,0,1),n=Nt(e,-1);if(r==="%"&&n!=="%")throw new Ye("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ye("invalid intrinsic syntax, expected opening `%`");var a=[];return $n(e,ca,function(s,f,p,h){a[a.length]=p?$n(h,fa,"$1"):f||s}),a},pa=function(e,r){var n=e,a;if(Dt(Pn,n)&&(a=Pn[n],n="%"+a[0]+"%"),Dt(Ne,n)){var s=Ne[n];if(s===Ke&&(s=oa(n)),typeof s>"u"&&!r)throw new Xe("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:s}}throw new Ye("intrinsic "+e+" does not exist!")},Sr=function(e,r){if(typeof e!="string"||e.length===0)throw new Xe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Xe('"allowMissing" argument must be a boolean');if(ua(/^%?[^%]*%?$/,e)===null)throw new Ye("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=la(e),a=n.length>0?n[0]:"",s=pa("%"+a+"%",r),f=s.name,p=s.value,h=!1,m=s.alias;m&&(a=m[0],sa(n,aa([0,1],m)));for(var v=1,_=!0;v<n.length;v+=1){var b=n[v],y=Nt(b,0,1),x=Nt(b,-1);if((y==='"'||y==="'"||y==="`"||x==='"'||x==="'"||x==="`")&&y!==x)throw new Ye("property names with quotes must have matching quotes");if((b==="constructor"||!_)&&(h=!0),a+="."+b,f="%"+a+"%",Dt(Ne,f))p=Ne[f];else if(p!=null){if(!(b in p)){if(!r)throw new Xe("base intrinsic for "+e+" exists, but the property is not available.");return}if(De&&v+1>=n.length){var I=De(p,b);_=!!I,_&&"get"in I&&!("originalValue"in I.get)?p=I.get:p=p[b]}else _=Dt(p,b),p=p[b];_&&!h&&(Ne[f]=p)}}return p},Un={exports:{}};(function(t){var e=Er,r=Sr,n=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||e.call(a,n),f=r("%Object.getOwnPropertyDescriptor%",!0),p=r("%Object.defineProperty%",!0),h=r("%Math.max%");if(p)try{p({},"a",{value:1})}catch{p=null}t.exports=function(_){var b=s(e,a,arguments);if(f&&p){var y=f(b,"length");y.configurable&&p(b,"length",{value:1+h(0,_.length-(arguments.length-1))})}return b};var m=function(){return s(e,n,arguments)};p?p(t.exports,"apply",{value:m}):t.exports.apply=m})(Un);var ha=Un.exports,Cn=Sr,Dn=ha,da=Dn(Cn("String.prototype.indexOf")),ya=function(e,r){var n=Cn(e,!!r);return typeof n=="function"&&da(e,".prototype.")>-1?Dn(n):n},Qe=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},he=[],ae=[],ga=typeof Uint8Array<"u"?Uint8Array:Array,Ir=!1;function Nn(){Ir=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)he[e]=t[e],ae[t.charCodeAt(e)]=e;ae["-".charCodeAt(0)]=62,ae["_".charCodeAt(0)]=63}function ma(t){Ir||Nn();var e,r,n,a,s,f,p=t.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s=t[p-2]==="="?2:t[p-1]==="="?1:0,f=new ga(p*3/4-s),n=s>0?p-4:p;var h=0;for(e=0,r=0;e<n;e+=4,r+=3)a=ae[t.charCodeAt(e)]<<18|ae[t.charCodeAt(e+1)]<<12|ae[t.charCodeAt(e+2)]<<6|ae[t.charCodeAt(e+3)],f[h++]=a>>16&255,f[h++]=a>>8&255,f[h++]=a&255;return s===2?(a=ae[t.charCodeAt(e)]<<2|ae[t.charCodeAt(e+1)]>>4,f[h++]=a&255):s===1&&(a=ae[t.charCodeAt(e)]<<10|ae[t.charCodeAt(e+1)]<<4|ae[t.charCodeAt(e+2)]>>2,f[h++]=a>>8&255,f[h++]=a&255),f}function wa(t){return he[t>>18&63]+he[t>>12&63]+he[t>>6&63]+he[t&63]}function va(t,e,r){for(var n,a=[],s=e;s<r;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],a.push(wa(n));return a.join("")}function Mn(t){Ir||Nn();for(var e,r=t.length,n=r%3,a="",s=[],f=16383,p=0,h=r-n;p<h;p+=f)s.push(va(t,p,p+f>h?h:p+f));return n===1?(e=t[r-1],a+=he[e>>2],a+=he[e<<4&63],a+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],a+=he[e>>10],a+=he[e>>4&63],a+=he[e<<2&63],a+="="),s.push(a),s.join("")}function Mt(t,e,r,n,a){var s,f,p=a*8-n-1,h=(1<<p)-1,m=h>>1,v=-7,_=r?a-1:0,b=r?-1:1,y=t[e+_];for(_+=b,s=y&(1<<-v)-1,y>>=-v,v+=p;v>0;s=s*256+t[e+_],_+=b,v-=8);for(f=s&(1<<-v)-1,s>>=-v,v+=n;v>0;f=f*256+t[e+_],_+=b,v-=8);if(s===0)s=1-m;else{if(s===h)return f?NaN:(y?-1:1)*(1/0);f=f+Math.pow(2,n),s=s-m}return(y?-1:1)*f*Math.pow(2,s-n)}function Ln(t,e,r,n,a,s){var f,p,h,m=s*8-a-1,v=(1<<m)-1,_=v>>1,b=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:s-1,x=n?1:-1,I=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(p=isNaN(e)?1:0,f=v):(f=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-f))<1&&(f--,h*=2),f+_>=1?e+=b/h:e+=b*Math.pow(2,1-_),e*h>=2&&(f++,h/=2),f+_>=v?(p=0,f=v):f+_>=1?(p=(e*h-1)*Math.pow(2,a),f=f+_):(p=e*Math.pow(2,_-1)*Math.pow(2,a),f=0));a>=8;t[r+y]=p&255,y+=x,p/=256,a-=8);for(f=f<<a|p,m+=a;m>0;t[r+y]=f&255,y+=x,f/=256,m-=8);t[r+y-x]|=I*128}var _a={}.toString,kn=Array.isArray||function(t){return _a.call(t)=="[object Array]"};/*!
|
|
4
4
|
* The buffer module from node.js, for the browser.
|