@schematichq/schematic-components 0.7.0 → 0.7.3

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.
@@ -30,28 +30,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  mod
31
31
  ));
32
32
 
33
- // node_modules/void-elements/index.js
34
- var require_void_elements = __commonJS({
35
- "node_modules/void-elements/index.js"(exports, module) {
36
- module.exports = {
37
- "area": true,
38
- "base": true,
39
- "br": true,
40
- "col": true,
41
- "embed": true,
42
- "hr": true,
43
- "img": true,
44
- "input": true,
45
- "link": true,
46
- "meta": true,
47
- "param": true,
48
- "source": true,
49
- "track": true,
50
- "wbr": true
51
- };
52
- }
53
- });
54
-
55
33
  // node_modules/shallowequal/index.js
56
34
  var require_shallowequal = __commonJS({
57
35
  "node_modules/shallowequal/index.js"(exports, module) {
@@ -1664,6 +1642,28 @@ var require_merge = __commonJS({
1664
1642
  }
1665
1643
  });
1666
1644
 
1645
+ // node_modules/void-elements/index.js
1646
+ var require_void_elements = __commonJS({
1647
+ "node_modules/void-elements/index.js"(exports, module) {
1648
+ module.exports = {
1649
+ "area": true,
1650
+ "base": true,
1651
+ "br": true,
1652
+ "col": true,
1653
+ "embed": true,
1654
+ "hr": true,
1655
+ "img": true,
1656
+ "input": true,
1657
+ "link": true,
1658
+ "meta": true,
1659
+ "param": true,
1660
+ "source": true,
1661
+ "track": true,
1662
+ "wbr": true
1663
+ };
1664
+ }
1665
+ });
1666
+
1667
1667
  // node_modules/pluralize/pluralize.js
1668
1668
  var require_pluralize = __commonJS({
1669
1669
  "node_modules/pluralize/pluralize.js"(exports, module) {
@@ -2252,323 +2252,54 @@ var require_debounce = __commonJS({
2252
2252
  }
2253
2253
  });
2254
2254
 
2255
- // src/components/elements/included-features/IncludedFeatures.tsx
2256
- import { forwardRef as forwardRef7, useMemo as useMemo9, useRef as useRef7, useState as useState12 } from "react";
2257
-
2258
- // node_modules/react-i18next/dist/es/Trans.js
2259
- import { useContext } from "react";
2260
-
2261
- // node_modules/react-i18next/dist/es/TransWithoutContext.js
2262
- import { Fragment, isValidElement, cloneElement, createElement, Children } from "react";
2255
+ // src/components/elements/button/Button.tsx
2256
+ import { forwardRef as forwardRef7 } from "react";
2263
2257
 
2264
- // node_modules/html-parse-stringify/dist/html-parse-stringify.module.js
2265
- var import_void_elements = __toESM(require_void_elements());
2258
+ // src/components/layout/card/Card.tsx
2259
+ import { forwardRef as forwardRef3 } from "react";
2266
2260
 
2267
- // node_modules/react-i18next/dist/es/utils.js
2268
- var warn = (i18n, code, msg, rest) => {
2269
- const args = [msg, {
2270
- code,
2271
- ...rest || {}
2272
- }];
2273
- if (i18n?.services?.logger?.forward) {
2274
- return i18n.services.logger.forward(args, "warn", "react-i18next::", true);
2275
- }
2276
- if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
2277
- if (i18n?.services?.logger?.warn) {
2278
- i18n.services.logger.warn(...args);
2279
- } else if (console?.warn) {
2280
- console.warn(...args);
2281
- }
2282
- };
2283
- var alreadyWarned = {};
2284
- var warnOnce = (i18n, code, msg, rest) => {
2285
- if (isString(msg) && alreadyWarned[msg]) return;
2286
- if (isString(msg)) alreadyWarned[msg] = /* @__PURE__ */ new Date();
2287
- warn(i18n, code, msg, rest);
2288
- };
2289
- var loadedClb = (i18n, cb) => () => {
2290
- if (i18n.isInitialized) {
2291
- cb();
2292
- } else {
2293
- const initialized = () => {
2294
- setTimeout(() => {
2295
- i18n.off("initialized", initialized);
2296
- }, 0);
2297
- cb();
2298
- };
2299
- i18n.on("initialized", initialized);
2300
- }
2301
- };
2302
- var loadNamespaces = (i18n, ns, cb) => {
2303
- i18n.loadNamespaces(ns, loadedClb(i18n, cb));
2304
- };
2305
- var loadLanguages = (i18n, lng, ns, cb) => {
2306
- if (isString(ns)) ns = [ns];
2307
- if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
2308
- ns.forEach((n) => {
2309
- if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
2310
- });
2311
- i18n.loadLanguages(lng, loadedClb(i18n, cb));
2312
- };
2313
- var hasLoadedNamespace = (ns, i18n, options = {}) => {
2314
- if (!i18n.languages || !i18n.languages.length) {
2315
- warnOnce(i18n, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
2316
- languages: i18n.languages
2317
- });
2318
- return true;
2319
- }
2320
- return i18n.hasLoadedNamespace(ns, {
2321
- lng: options.lng,
2322
- precheck: (i18nInstance2, loadNotPending) => {
2323
- if (options.bindI18n?.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
2261
+ // node_modules/styled-components/node_modules/tslib/tslib.es6.mjs
2262
+ var __assign = function() {
2263
+ __assign = Object.assign || function __assign2(t2) {
2264
+ for (var s2, i2 = 1, n = arguments.length; i2 < n; i2++) {
2265
+ s2 = arguments[i2];
2266
+ for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2)) t2[p2] = s2[p2];
2324
2267
  }
2325
- });
2326
- };
2327
- var isString = (obj) => typeof obj === "string";
2328
- var isObject = (obj) => typeof obj === "object" && obj !== null;
2329
-
2330
- // node_modules/react-i18next/dist/es/unescape.js
2331
- var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
2332
- var htmlEntities = {
2333
- "&amp;": "&",
2334
- "&#38;": "&",
2335
- "&lt;": "<",
2336
- "&#60;": "<",
2337
- "&gt;": ">",
2338
- "&#62;": ">",
2339
- "&apos;": "'",
2340
- "&#39;": "'",
2341
- "&quot;": '"',
2342
- "&#34;": '"',
2343
- "&nbsp;": " ",
2344
- "&#160;": " ",
2345
- "&copy;": "\xA9",
2346
- "&#169;": "\xA9",
2347
- "&reg;": "\xAE",
2348
- "&#174;": "\xAE",
2349
- "&hellip;": "\u2026",
2350
- "&#8230;": "\u2026",
2351
- "&#x2F;": "/",
2352
- "&#47;": "/"
2353
- };
2354
- var unescapeHtmlEntity = (m2) => htmlEntities[m2];
2355
- var unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
2356
-
2357
- // node_modules/react-i18next/dist/es/defaults.js
2358
- var defaultOptions = {
2359
- bindI18n: "languageChanged",
2360
- bindI18nStore: "",
2361
- transEmptyNodeValue: "",
2362
- transSupportBasicHtmlNodes: true,
2363
- transWrapTextNodes: "",
2364
- transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
2365
- useSuspense: true,
2366
- unescape
2367
- };
2368
- var setDefaults = (options = {}) => {
2369
- defaultOptions = {
2370
- ...defaultOptions,
2371
- ...options
2268
+ return t2;
2372
2269
  };
2270
+ return __assign.apply(this, arguments);
2373
2271
  };
2374
- var getDefaults = () => defaultOptions;
2375
-
2376
- // node_modules/react-i18next/dist/es/i18nInstance.js
2377
- var i18nInstance;
2378
- var setI18n = (instance2) => {
2379
- i18nInstance = instance2;
2380
- };
2381
- var getI18n = () => i18nInstance;
2272
+ function __spreadArray(to, from2, pack) {
2273
+ if (pack || arguments.length === 2) for (var i2 = 0, l2 = from2.length, ar; i2 < l2; i2++) {
2274
+ if (ar || !(i2 in from2)) {
2275
+ if (!ar) ar = Array.prototype.slice.call(from2, 0, i2);
2276
+ ar[i2] = from2[i2];
2277
+ }
2278
+ }
2279
+ return to.concat(ar || Array.prototype.slice.call(from2));
2280
+ }
2382
2281
 
2383
- // node_modules/react-i18next/dist/es/context.js
2384
- import { createContext } from "react";
2282
+ // node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
2283
+ function memoize(fn) {
2284
+ var cache = /* @__PURE__ */ Object.create(null);
2285
+ return function(arg) {
2286
+ if (cache[arg] === void 0) cache[arg] = fn(arg);
2287
+ return cache[arg];
2288
+ };
2289
+ }
2385
2290
 
2386
- // node_modules/react-i18next/dist/es/initReactI18next.js
2387
- var initReactI18next = {
2388
- type: "3rdParty",
2389
- init(instance2) {
2390
- setDefaults(instance2.options.react);
2391
- setI18n(instance2);
2291
+ // node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js
2292
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
2293
+ var isPropValid = /* @__PURE__ */ memoize(
2294
+ function(prop) {
2295
+ return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
2392
2296
  }
2393
- };
2297
+ /* Z+1 */
2298
+ );
2394
2299
 
2395
- // node_modules/react-i18next/dist/es/context.js
2396
- var I18nContext = createContext();
2397
- var ReportNamespaces = class {
2398
- constructor() {
2399
- this.usedNamespaces = {};
2400
- }
2401
- addUsedNamespaces(namespaces) {
2402
- namespaces.forEach((ns) => {
2403
- if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
2404
- });
2405
- }
2406
- getUsedNamespaces() {
2407
- return Object.keys(this.usedNamespaces);
2408
- }
2409
- };
2410
-
2411
- // node_modules/react-i18next/dist/es/useTranslation.js
2412
- import { useState, useEffect, useContext as useContext2, useRef, useCallback } from "react";
2413
- var usePrevious = (value, ignore) => {
2414
- const ref = useRef();
2415
- useEffect(() => {
2416
- ref.current = ignore ? ref.current : value;
2417
- }, [value, ignore]);
2418
- return ref.current;
2419
- };
2420
- var alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
2421
- var useMemoizedT = (i18n, language, namespace, keyPrefix) => useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
2422
- var useTranslation = (ns, props = {}) => {
2423
- const {
2424
- i18n: i18nFromProps
2425
- } = props;
2426
- const {
2427
- i18n: i18nFromContext,
2428
- defaultNS: defaultNSFromContext
2429
- } = useContext2(I18nContext) || {};
2430
- const i18n = i18nFromProps || i18nFromContext || getI18n();
2431
- if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
2432
- if (!i18n) {
2433
- warnOnce(i18n, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
2434
- const notReadyT = (k2, optsOrDefaultValue) => {
2435
- if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
2436
- if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
2437
- return Array.isArray(k2) ? k2[k2.length - 1] : k2;
2438
- };
2439
- const retNotReady = [notReadyT, {}, false];
2440
- retNotReady.t = notReadyT;
2441
- retNotReady.i18n = {};
2442
- retNotReady.ready = false;
2443
- return retNotReady;
2444
- }
2445
- if (i18n.options.react?.wait) warnOnce(i18n, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
2446
- const i18nOptions = {
2447
- ...getDefaults(),
2448
- ...i18n.options.react,
2449
- ...props
2450
- };
2451
- const {
2452
- useSuspense,
2453
- keyPrefix
2454
- } = i18nOptions;
2455
- let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;
2456
- namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"];
2457
- i18n.reportNamespaces.addUsedNamespaces?.(namespaces);
2458
- const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n, i18nOptions));
2459
- const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
2460
- const getT = () => memoGetT;
2461
- const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
2462
- const [t2, setT] = useState(getT);
2463
- let joinedNS = namespaces.join();
2464
- if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
2465
- const previousJoinedNS = usePrevious(joinedNS);
2466
- const isMounted = useRef(true);
2467
- useEffect(() => {
2468
- const {
2469
- bindI18n,
2470
- bindI18nStore
2471
- } = i18nOptions;
2472
- isMounted.current = true;
2473
- if (!ready && !useSuspense) {
2474
- if (props.lng) {
2475
- loadLanguages(i18n, props.lng, namespaces, () => {
2476
- if (isMounted.current) setT(getNewT);
2477
- });
2478
- } else {
2479
- loadNamespaces(i18n, namespaces, () => {
2480
- if (isMounted.current) setT(getNewT);
2481
- });
2482
- }
2483
- }
2484
- if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
2485
- setT(getNewT);
2486
- }
2487
- const boundReset = () => {
2488
- if (isMounted.current) setT(getNewT);
2489
- };
2490
- if (bindI18n) i18n?.on(bindI18n, boundReset);
2491
- if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
2492
- return () => {
2493
- isMounted.current = false;
2494
- if (i18n) bindI18n?.split(" ").forEach((e2) => i18n.off(e2, boundReset));
2495
- if (bindI18nStore && i18n) bindI18nStore.split(" ").forEach((e2) => i18n.store.off(e2, boundReset));
2496
- };
2497
- }, [i18n, joinedNS]);
2498
- useEffect(() => {
2499
- if (isMounted.current && ready) {
2500
- setT(getT);
2501
- }
2502
- }, [i18n, keyPrefix, ready]);
2503
- const ret = [t2, i18n, ready];
2504
- ret.t = t2;
2505
- ret.i18n = i18n;
2506
- ret.ready = ready;
2507
- if (ready) return ret;
2508
- if (!ready && !useSuspense) return ret;
2509
- throw new Promise((resolve) => {
2510
- if (props.lng) {
2511
- loadLanguages(i18n, props.lng, namespaces, () => resolve());
2512
- } else {
2513
- loadNamespaces(i18n, namespaces, () => resolve());
2514
- }
2515
- });
2516
- };
2517
-
2518
- // node_modules/react-i18next/dist/es/withTranslation.js
2519
- import { createElement as createElement2, forwardRef as forwardRefReact } from "react";
2520
-
2521
- // node_modules/react-i18next/dist/es/I18nextProvider.js
2522
- import { createElement as createElement3, useMemo } from "react";
2523
-
2524
- // node_modules/react-i18next/dist/es/withSSR.js
2525
- import { createElement as createElement4 } from "react";
2526
-
2527
- // node_modules/react-i18next/dist/es/useSSR.js
2528
- import { useContext as useContext3 } from "react";
2529
-
2530
- // node_modules/styled-components/node_modules/tslib/tslib.es6.mjs
2531
- var __assign = function() {
2532
- __assign = Object.assign || function __assign2(t2) {
2533
- for (var s2, i2 = 1, n = arguments.length; i2 < n; i2++) {
2534
- s2 = arguments[i2];
2535
- for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2)) t2[p2] = s2[p2];
2536
- }
2537
- return t2;
2538
- };
2539
- return __assign.apply(this, arguments);
2540
- };
2541
- function __spreadArray(to, from2, pack) {
2542
- if (pack || arguments.length === 2) for (var i2 = 0, l2 = from2.length, ar; i2 < l2; i2++) {
2543
- if (ar || !(i2 in from2)) {
2544
- if (!ar) ar = Array.prototype.slice.call(from2, 0, i2);
2545
- ar[i2] = from2[i2];
2546
- }
2547
- }
2548
- return to.concat(ar || Array.prototype.slice.call(from2));
2549
- }
2550
-
2551
- // node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
2552
- function memoize(fn) {
2553
- var cache = /* @__PURE__ */ Object.create(null);
2554
- return function(arg) {
2555
- if (cache[arg] === void 0) cache[arg] = fn(arg);
2556
- return cache[arg];
2557
- };
2558
- }
2559
-
2560
- // node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js
2561
- var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
2562
- var isPropValid = /* @__PURE__ */ memoize(
2563
- function(prop) {
2564
- return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
2565
- }
2566
- /* Z+1 */
2567
- );
2568
-
2569
- // node_modules/styled-components/dist/styled-components.browser.esm.js
2570
- var import_shallowequal = __toESM(require_shallowequal());
2571
- import o, { useRef as r, useState as s, useMemo as i, useEffect as a, useContext as c, useDebugValue as l, createElement as u } from "react";
2300
+ // node_modules/styled-components/dist/styled-components.browser.esm.js
2301
+ var import_shallowequal = __toESM(require_shallowequal());
2302
+ import o, { useRef as r, useState as s, useMemo as i, useEffect as a, useContext as c, useDebugValue as l, createElement as u } from "react";
2572
2303
 
2573
2304
  // node_modules/stylis/src/Enum.js
2574
2305
  var MS = "-ms-";
@@ -3899,10 +3630,10 @@ var DEFAULT_CURRENCY = "USD";
3899
3630
  var MAXIMUM_SIGNIFICANT_DIGITS = 6;
3900
3631
 
3901
3632
  // src/hooks/useAvailablePlans.ts
3902
- import { useCallback as useCallback2, useMemo as useMemo2 } from "react";
3633
+ import { useCallback, useMemo } from "react";
3903
3634
  function useAvailablePlans(activePeriod) {
3904
3635
  const { data, mode } = useEmbed();
3905
- const getAvailablePeriods = useCallback2(() => {
3636
+ const getAvailablePeriods = useCallback(() => {
3906
3637
  const periods = [];
3907
3638
  if (data.activePlans.some((plan) => plan.monthlyPrice) || data.activeAddOns.some((addOn) => addOn.monthlyPrice)) {
3908
3639
  periods.push("month");
@@ -3912,7 +3643,7 @@ function useAvailablePlans(activePeriod) {
3912
3643
  }
3913
3644
  return periods;
3914
3645
  }, [data.activePlans, data.activeAddOns]);
3915
- const getActivePlans = useCallback2(
3646
+ const getActivePlans = useCallback(
3916
3647
  (plans) => {
3917
3648
  const customPlanExist = plans.some((plan) => plan.custom);
3918
3649
  const plansWithSelected = mode === "edit" ? plans.slice() : plans.filter(
@@ -3933,7 +3664,7 @@ function useAvailablePlans(activePeriod) {
3933
3664
  },
3934
3665
  [activePeriod, mode]
3935
3666
  );
3936
- return useMemo2(() => {
3667
+ return useMemo(() => {
3937
3668
  return {
3938
3669
  plans: getActivePlans(data.activePlans),
3939
3670
  addOns: getActivePlans(data.activeAddOns),
@@ -3951,7 +3682,7 @@ function useAvailablePlans(activePeriod) {
3951
3682
  import { useContext as useContext4 } from "react";
3952
3683
 
3953
3684
  // node_modules/i18next/dist/esm/i18next.js
3954
- var isString2 = (obj) => typeof obj === "string";
3685
+ var isString = (obj) => typeof obj === "string";
3955
3686
  var defer = () => {
3956
3687
  let res;
3957
3688
  let rej;
@@ -3974,9 +3705,9 @@ var copy2 = (a2, s2, t2) => {
3974
3705
  };
3975
3706
  var lastOfPathSeparatorRegExp = /###/g;
3976
3707
  var cleanKey = (key) => key && key.indexOf("###") > -1 ? key.replace(lastOfPathSeparatorRegExp, ".") : key;
3977
- var canNotTraverseDeeper = (object) => !object || isString2(object);
3708
+ var canNotTraverseDeeper = (object) => !object || isString(object);
3978
3709
  var getLastOfPath = (object, path, Empty) => {
3979
- const stack = !isString2(path) ? path : path.split(".");
3710
+ const stack = !isString(path) ? path : path.split(".");
3980
3711
  let stackIndex = 0;
3981
3712
  while (stackIndex < stack.length - 1) {
3982
3713
  if (canNotTraverseDeeper(object)) return {};
@@ -4045,7 +3776,7 @@ var deepExtend = (target, source, overwrite) => {
4045
3776
  for (const prop in source) {
4046
3777
  if (prop !== "__proto__" && prop !== "constructor") {
4047
3778
  if (prop in target) {
4048
- if (isString2(target[prop]) || target[prop] instanceof String || isString2(source[prop]) || source[prop] instanceof String) {
3779
+ if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {
4049
3780
  if (overwrite) target[prop] = source[prop];
4050
3781
  } else {
4051
3782
  deepExtend(target[prop], source[prop], overwrite);
@@ -4067,7 +3798,7 @@ var _entityMap = {
4067
3798
  "/": "&#x2F;"
4068
3799
  };
4069
3800
  var escape = (data) => {
4070
- if (isString2(data)) {
3801
+ if (isString(data)) {
4071
3802
  return data.replace(/[&<>"'\/]/g, (s2) => _entityMap[s2]);
4072
3803
  }
4073
3804
  return data;
@@ -4196,7 +3927,7 @@ var Logger = class _Logger {
4196
3927
  }
4197
3928
  forward(args, lvl, prefix2, debugOnly) {
4198
3929
  if (debugOnly && !this.debug) return null;
4199
- if (isString2(args[0])) args[0] = `${prefix2}${this.prefix} ${args[0]}`;
3930
+ if (isString(args[0])) args[0] = `${prefix2}${this.prefix} ${args[0]}`;
4200
3931
  return this.logger[lvl](args);
4201
3932
  }
4202
3933
  create(moduleName) {
@@ -4297,7 +4028,7 @@ var ResourceStore = class extends EventEmitter {
4297
4028
  if (key) {
4298
4029
  if (Array.isArray(key)) {
4299
4030
  path.push(...key);
4300
- } else if (isString2(key) && keySeparator) {
4031
+ } else if (isString(key) && keySeparator) {
4301
4032
  path.push(...key.split(keySeparator));
4302
4033
  } else {
4303
4034
  path.push(key);
@@ -4310,7 +4041,7 @@ var ResourceStore = class extends EventEmitter {
4310
4041
  ns = path[1];
4311
4042
  key = path.slice(2).join(".");
4312
4043
  }
4313
- if (result || !ignoreJSONStructure || !isString2(key)) return result;
4044
+ if (result || !ignoreJSONStructure || !isString(key)) return result;
4314
4045
  return deepFind(this.data?.[lng]?.[ns], key, keySeparator);
4315
4046
  }
4316
4047
  addResource(lng, ns, key, value) {
@@ -4334,7 +4065,7 @@ var ResourceStore = class extends EventEmitter {
4334
4065
  silent: false
4335
4066
  };
4336
4067
  for (const m2 in resources) {
4337
- if (isString2(resources[m2]) || Array.isArray(resources[m2])) this.addResource(lng, ns, m2, resources[m2], {
4068
+ if (isString(resources[m2]) || Array.isArray(resources[m2])) this.addResource(lng, ns, m2, resources[m2], {
4338
4069
  silent: true
4339
4070
  });
4340
4071
  }
@@ -4405,7 +4136,7 @@ var postProcessor = {
4405
4136
  }
4406
4137
  };
4407
4138
  var checkedLoadedFor = {};
4408
- var shouldHandleAsObject = (res) => !isString2(res) && typeof res !== "boolean" && typeof res !== "number";
4139
+ var shouldHandleAsObject = (res) => !isString(res) && typeof res !== "boolean" && typeof res !== "number";
4409
4140
  var Translator = class _Translator extends EventEmitter {
4410
4141
  constructor(services) {
4411
4142
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -4442,7 +4173,7 @@ var Translator = class _Translator extends EventEmitter {
4442
4173
  if (m2 && m2.length > 0) {
4443
4174
  return {
4444
4175
  key,
4445
- namespaces: isString2(namespaces) ? [namespaces] : namespaces
4176
+ namespaces: isString(namespaces) ? [namespaces] : namespaces
4446
4177
  };
4447
4178
  }
4448
4179
  const parts = key.split(nsSeparator);
@@ -4451,7 +4182,7 @@ var Translator = class _Translator extends EventEmitter {
4451
4182
  }
4452
4183
  return {
4453
4184
  key,
4454
- namespaces: isString2(namespaces) ? [namespaces] : namespaces
4185
+ namespaces: isString(namespaces) ? [namespaces] : namespaces
4455
4186
  };
4456
4187
  }
4457
4188
  translate(keys, options, lastKey) {
@@ -4507,7 +4238,7 @@ var Translator = class _Translator extends EventEmitter {
4507
4238
  const noObject = ["[object Number]", "[object Function]", "[object RegExp]"];
4508
4239
  const joinArrays = options.joinArrays !== void 0 ? options.joinArrays : this.options.joinArrays;
4509
4240
  const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;
4510
- const needsPluralHandling = options.count !== void 0 && !isString2(options.count);
4241
+ const needsPluralHandling = options.count !== void 0 && !isString(options.count);
4511
4242
  const hasDefaultValue = _Translator.hasDefaultValue(options);
4512
4243
  const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, options) : "";
4513
4244
  const defaultValueSuffixOrdinalFallback = options.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, {
@@ -4521,7 +4252,7 @@ var Translator = class _Translator extends EventEmitter {
4521
4252
  }
4522
4253
  const handleAsObject = shouldHandleAsObject(resForObjHndl);
4523
4254
  const resType = Object.prototype.toString.apply(resForObjHndl);
4524
- if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && noObject.indexOf(resType) < 0 && !(isString2(joinArrays) && Array.isArray(resForObjHndl))) {
4255
+ if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && noObject.indexOf(resType) < 0 && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {
4525
4256
  if (!options.returnObjects && !this.options.returnObjects) {
4526
4257
  if (!this.options.returnedObjectHandler) {
4527
4258
  this.logger.warn("accessing an object - but returnObjects options is not enabled!");
@@ -4567,7 +4298,7 @@ var Translator = class _Translator extends EventEmitter {
4567
4298
  }
4568
4299
  res = copy3;
4569
4300
  }
4570
- } else if (handleAsObjectInI18nFormat && isString2(joinArrays) && Array.isArray(res)) {
4301
+ } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {
4571
4302
  res = res.join(joinArrays);
4572
4303
  if (res) res = this.extendTranslation(res, keys, options, lastKey);
4573
4304
  } else {
@@ -4661,13 +4392,13 @@ var Translator = class _Translator extends EventEmitter {
4661
4392
  }
4662
4393
  }
4663
4394
  });
4664
- const skipOnVariables = isString2(res) && (options?.interpolation?.skipOnVariables !== void 0 ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
4395
+ const skipOnVariables = isString(res) && (options?.interpolation?.skipOnVariables !== void 0 ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
4665
4396
  let nestBef;
4666
4397
  if (skipOnVariables) {
4667
4398
  const nb = res.match(this.interpolator.nestingRegexp);
4668
4399
  nestBef = nb && nb.length;
4669
4400
  }
4670
- let data = options.replace && !isString2(options.replace) ? options.replace : options;
4401
+ let data = options.replace && !isString(options.replace) ? options.replace : options;
4671
4402
  if (this.options.interpolation.defaultVariables) data = {
4672
4403
  ...this.options.interpolation.defaultVariables,
4673
4404
  ...data
@@ -4692,7 +4423,7 @@ var Translator = class _Translator extends EventEmitter {
4692
4423
  if (options.interpolation) this.interpolator.reset();
4693
4424
  }
4694
4425
  const postProcess = options.postProcess || this.options.postProcess;
4695
- const postProcessorNames = isString2(postProcess) ? [postProcess] : postProcess;
4426
+ const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;
4696
4427
  if (res != null && postProcessorNames?.length && options.applyPostProcessor !== false) {
4697
4428
  res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {
4698
4429
  i18nResolved: {
@@ -4711,7 +4442,7 @@ var Translator = class _Translator extends EventEmitter {
4711
4442
  let exactUsedKey;
4712
4443
  let usedLng;
4713
4444
  let usedNS;
4714
- if (isString2(keys)) keys = [keys];
4445
+ if (isString(keys)) keys = [keys];
4715
4446
  keys.forEach((k2) => {
4716
4447
  if (this.isValidLookup(found)) return;
4717
4448
  const extracted = this.extractFromKey(k2, options);
@@ -4719,9 +4450,9 @@ var Translator = class _Translator extends EventEmitter {
4719
4450
  usedKey = key;
4720
4451
  let namespaces = extracted.namespaces;
4721
4452
  if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);
4722
- const needsPluralHandling = options.count !== void 0 && !isString2(options.count);
4453
+ const needsPluralHandling = options.count !== void 0 && !isString(options.count);
4723
4454
  const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0;
4724
- const needsContextHandling = options.context !== void 0 && (isString2(options.context) || typeof options.context === "number") && options.context !== "";
4455
+ const needsContextHandling = options.context !== void 0 && (isString(options.context) || typeof options.context === "number") && options.context !== "";
4725
4456
  const codes = options.lngs ? options.lngs : this.languageUtils.toResolveHierarchy(options.lng || this.language, options.fallbackLng);
4726
4457
  namespaces.forEach((ns) => {
4727
4458
  if (this.isValidLookup(found)) return;
@@ -4793,7 +4524,7 @@ var Translator = class _Translator extends EventEmitter {
4793
4524
  getUsedParamsDetails() {
4794
4525
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4795
4526
  const optionsKeys = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"];
4796
- const useOptionsReplaceForData = options.replace && !isString2(options.replace);
4527
+ const useOptionsReplaceForData = options.replace && !isString(options.replace);
4797
4528
  let data = useOptionsReplaceForData ? options.replace : options;
4798
4529
  if (useOptionsReplaceForData && typeof options.count !== "undefined") {
4799
4530
  data.count = options.count;
@@ -4846,7 +4577,7 @@ var LanguageUtil = class {
4846
4577
  return this.formatLanguageCode(p2[0]);
4847
4578
  }
4848
4579
  formatLanguageCode(code) {
4849
- if (isString2(code) && code.indexOf("-") > -1) {
4580
+ if (isString(code) && code.indexOf("-") > -1) {
4850
4581
  let formattedCode;
4851
4582
  try {
4852
4583
  formattedCode = Intl.getCanonicalLocales(code)[0];
@@ -4896,7 +4627,7 @@ var LanguageUtil = class {
4896
4627
  getFallbackCodes(fallbacks, code) {
4897
4628
  if (!fallbacks) return [];
4898
4629
  if (typeof fallbacks === "function") fallbacks = fallbacks(code);
4899
- if (isString2(fallbacks)) fallbacks = [fallbacks];
4630
+ if (isString(fallbacks)) fallbacks = [fallbacks];
4900
4631
  if (Array.isArray(fallbacks)) return fallbacks;
4901
4632
  if (!code) return fallbacks.default || [];
4902
4633
  let found = fallbacks[code];
@@ -4917,11 +4648,11 @@ var LanguageUtil = class {
4917
4648
  this.logger.warn(`rejecting language code not found in supportedLngs: ${c2}`);
4918
4649
  }
4919
4650
  };
4920
- if (isString2(code) && (code.indexOf("-") > -1 || code.indexOf("_") > -1)) {
4651
+ if (isString(code) && (code.indexOf("-") > -1 || code.indexOf("_") > -1)) {
4921
4652
  if (this.options.load !== "languageOnly") addCode(this.formatLanguageCode(code));
4922
4653
  if (this.options.load !== "languageOnly" && this.options.load !== "currentOnly") addCode(this.getScriptPartFromCode(code));
4923
4654
  if (this.options.load !== "currentOnly") addCode(this.getLanguagePartFromCode(code));
4924
- } else if (isString2(code)) {
4655
+ } else if (isString(code)) {
4925
4656
  addCode(this.formatLanguageCode(code));
4926
4657
  }
4927
4658
  fallbackCodes.forEach((fc) => {
@@ -5017,7 +4748,7 @@ var deepFindWithDefaults = function(data, defaultData, key) {
5017
4748
  let keySeparator = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".";
5018
4749
  let ignoreJSONStructure = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true;
5019
4750
  let path = getPathWithDefaults(data, defaultData, key);
5020
- if (!path && ignoreJSONStructure && isString2(key)) {
4751
+ if (!path && ignoreJSONStructure && isString(key)) {
5021
4752
  path = deepFind(data, key, keySeparator);
5022
4753
  if (path === void 0) path = deepFind(defaultData, key, keySeparator);
5023
4754
  }
@@ -5127,7 +4858,7 @@ var Interpolator = class {
5127
4858
  if (value === void 0) {
5128
4859
  if (typeof missingInterpolationHandler === "function") {
5129
4860
  const temp = missingInterpolationHandler(str, match2, options);
5130
- value = isString2(temp) ? temp : "";
4861
+ value = isString(temp) ? temp : "";
5131
4862
  } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {
5132
4863
  value = "";
5133
4864
  } else if (skipOnVariables) {
@@ -5137,7 +4868,7 @@ var Interpolator = class {
5137
4868
  this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);
5138
4869
  value = "";
5139
4870
  }
5140
- } else if (!isString2(value) && !this.useRawValueToEscape) {
4871
+ } else if (!isString(value) && !this.useRawValueToEscape) {
5141
4872
  value = makeString(value);
5142
4873
  }
5143
4874
  const safeValue = todo.safeValue(value);
@@ -5191,7 +4922,7 @@ var Interpolator = class {
5191
4922
  clonedOptions = {
5192
4923
  ...options
5193
4924
  };
5194
- clonedOptions = clonedOptions.replace && !isString2(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;
4925
+ clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;
5195
4926
  clonedOptions.applyPostProcessor = false;
5196
4927
  delete clonedOptions.defaultValue;
5197
4928
  let doReduce = false;
@@ -5202,8 +4933,8 @@ var Interpolator = class {
5202
4933
  doReduce = true;
5203
4934
  }
5204
4935
  value = fc(handleHasOptions.call(this, match2[1].trim(), clonedOptions), clonedOptions);
5205
- if (value && match2[0] === str && !isString2(value)) return value;
5206
- if (!isString2(value)) value = makeString(value);
4936
+ if (value && match2[0] === str && !isString(value)) return value;
4937
+ if (!isString(value)) value = makeString(value);
5207
4938
  if (!value) {
5208
4939
  this.logger.warn(`missed to resolve ${match2[1]} for nesting ${str}`);
5209
4940
  value = "";
@@ -5513,8 +5244,8 @@ var Connector = class extends EventEmitter {
5513
5244
  this.logger.warn("No backend was added via i18next.use. Will not load resources.");
5514
5245
  return callback && callback();
5515
5246
  }
5516
- if (isString2(languages)) languages = this.languageUtils.toResolveHierarchy(languages);
5517
- if (isString2(namespaces)) namespaces = [namespaces];
5247
+ if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);
5248
+ if (isString(namespaces)) namespaces = [namespaces];
5518
5249
  const toLoad = this.queueLoad(languages, namespaces, options, callback);
5519
5250
  if (!toLoad.toLoad.length) {
5520
5251
  if (!toLoad.pending.length) callback();
@@ -5618,8 +5349,8 @@ var get = () => ({
5618
5349
  overloadTranslationOptionHandler: (args) => {
5619
5350
  let ret = {};
5620
5351
  if (typeof args[1] === "object") ret = args[1];
5621
- if (isString2(args[1])) ret.defaultValue = args[1];
5622
- if (isString2(args[2])) ret.tDescription = args[2];
5352
+ if (isString(args[1])) ret.defaultValue = args[1];
5353
+ if (isString(args[2])) ret.tDescription = args[2];
5623
5354
  if (typeof args[2] === "object" || typeof args[3] === "object") {
5624
5355
  const options = args[3] || args[2];
5625
5356
  Object.keys(options).forEach((key) => {
@@ -5643,9 +5374,9 @@ var get = () => ({
5643
5374
  }
5644
5375
  });
5645
5376
  var transformOptions = (options) => {
5646
- if (isString2(options.ns)) options.ns = [options.ns];
5647
- if (isString2(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];
5648
- if (isString2(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];
5377
+ if (isString(options.ns)) options.ns = [options.ns];
5378
+ if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];
5379
+ if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];
5649
5380
  if (options.supportedLngs?.indexOf?.("cimode") < 0) {
5650
5381
  options.supportedLngs = options.supportedLngs.concat(["cimode"]);
5651
5382
  }
@@ -5694,7 +5425,7 @@ var I18n = class _I18n extends EventEmitter {
5694
5425
  options = {};
5695
5426
  }
5696
5427
  if (options.defaultNS == null && options.ns) {
5697
- if (isString2(options.ns)) {
5428
+ if (isString(options.ns)) {
5698
5429
  options.defaultNS = options.ns;
5699
5430
  } else if (options.ns.indexOf("translation") < 0) {
5700
5431
  options.defaultNS = options.ns[0];
@@ -5824,7 +5555,7 @@ var I18n = class _I18n extends EventEmitter {
5824
5555
  loadResources(language) {
5825
5556
  let callback = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : noop;
5826
5557
  let usedCallback = callback;
5827
- const usedLng = isString2(language) ? language : this.language;
5558
+ const usedLng = isString(language) ? language : this.language;
5828
5559
  if (typeof language === "function") usedCallback = language;
5829
5560
  if (!this.options.resources || this.options.partialBundledLanguages) {
5830
5561
  if (usedLng?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();
@@ -5940,7 +5671,7 @@ var I18n = class _I18n extends EventEmitter {
5940
5671
  };
5941
5672
  const setLng = (lngs) => {
5942
5673
  if (!lng && !lngs && this.services.languageDetector) lngs = [];
5943
- const l2 = isString2(lngs) ? lngs : this.services.languageUtils.getBestMatchFromCodes(lngs);
5674
+ const l2 = isString(lngs) ? lngs : this.services.languageUtils.getBestMatchFromCodes(lngs);
5944
5675
  if (l2) {
5945
5676
  if (!this.language) {
5946
5677
  setLngProps(l2);
@@ -5992,7 +5723,7 @@ var I18n = class _I18n extends EventEmitter {
5992
5723
  }
5993
5724
  return _this3.t(resultKey, options);
5994
5725
  };
5995
- if (isString2(lng)) {
5726
+ if (isString(lng)) {
5996
5727
  fixedT.lng = lng;
5997
5728
  } else {
5998
5729
  fixedT.lngs = lng;
@@ -6049,7 +5780,7 @@ var I18n = class _I18n extends EventEmitter {
6049
5780
  if (callback) callback();
6050
5781
  return Promise.resolve();
6051
5782
  }
6052
- if (isString2(ns)) ns = [ns];
5783
+ if (isString(ns)) ns = [ns];
6053
5784
  ns.forEach((n) => {
6054
5785
  if (this.options.ns.indexOf(n) < 0) this.options.ns.push(n);
6055
5786
  });
@@ -6061,7 +5792,7 @@ var I18n = class _I18n extends EventEmitter {
6061
5792
  }
6062
5793
  loadLanguages(lngs, callback) {
6063
5794
  const deferred = defer();
6064
- if (isString2(lngs)) lngs = [lngs];
5795
+ if (isString(lngs)) lngs = [lngs];
6065
5796
  const preloaded = this.options.preload || [];
6066
5797
  const newLngs = lngs.filter((lng) => preloaded.indexOf(lng) < 0 && this.services.languageUtils.isSupportedCode(lng));
6067
5798
  if (!newLngs.length) {
@@ -6165,9 +5896,9 @@ var getFixedT = instance.getFixedT;
6165
5896
  var t = instance.t;
6166
5897
  var exists = instance.exists;
6167
5898
  var setDefaultNamespace = instance.setDefaultNamespace;
6168
- var hasLoadedNamespace2 = instance.hasLoadedNamespace;
6169
- var loadNamespaces2 = instance.loadNamespaces;
6170
- var loadLanguages2 = instance.loadLanguages;
5899
+ var hasLoadedNamespace = instance.hasLoadedNamespace;
5900
+ var loadNamespaces = instance.loadNamespaces;
5901
+ var loadLanguages = instance.loadLanguages;
6171
5902
 
6172
5903
  // src/context/embed.tsx
6173
5904
  var import_merge = __toESM(require_merge());
@@ -10349,6 +10080,278 @@ var inflate_1 = inflate;
10349
10080
  // src/context/embed.tsx
10350
10081
  import { createContext as createContext2, useCallback as useCallback3, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
10351
10082
 
10083
+ // node_modules/react-i18next/dist/es/Trans.js
10084
+ import { useContext } from "react";
10085
+
10086
+ // node_modules/react-i18next/dist/es/TransWithoutContext.js
10087
+ import { Fragment, isValidElement, cloneElement, createElement, Children } from "react";
10088
+
10089
+ // node_modules/html-parse-stringify/dist/html-parse-stringify.module.js
10090
+ var import_void_elements = __toESM(require_void_elements());
10091
+
10092
+ // node_modules/react-i18next/dist/es/utils.js
10093
+ var warn = (i18n, code, msg, rest) => {
10094
+ const args = [msg, {
10095
+ code,
10096
+ ...rest || {}
10097
+ }];
10098
+ if (i18n?.services?.logger?.forward) {
10099
+ return i18n.services.logger.forward(args, "warn", "react-i18next::", true);
10100
+ }
10101
+ if (isString2(args[0])) args[0] = `react-i18next:: ${args[0]}`;
10102
+ if (i18n?.services?.logger?.warn) {
10103
+ i18n.services.logger.warn(...args);
10104
+ } else if (console?.warn) {
10105
+ console.warn(...args);
10106
+ }
10107
+ };
10108
+ var alreadyWarned = {};
10109
+ var warnOnce = (i18n, code, msg, rest) => {
10110
+ if (isString2(msg) && alreadyWarned[msg]) return;
10111
+ if (isString2(msg)) alreadyWarned[msg] = /* @__PURE__ */ new Date();
10112
+ warn(i18n, code, msg, rest);
10113
+ };
10114
+ var loadedClb = (i18n, cb) => () => {
10115
+ if (i18n.isInitialized) {
10116
+ cb();
10117
+ } else {
10118
+ const initialized = () => {
10119
+ setTimeout(() => {
10120
+ i18n.off("initialized", initialized);
10121
+ }, 0);
10122
+ cb();
10123
+ };
10124
+ i18n.on("initialized", initialized);
10125
+ }
10126
+ };
10127
+ var loadNamespaces2 = (i18n, ns, cb) => {
10128
+ i18n.loadNamespaces(ns, loadedClb(i18n, cb));
10129
+ };
10130
+ var loadLanguages2 = (i18n, lng, ns, cb) => {
10131
+ if (isString2(ns)) ns = [ns];
10132
+ if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces2(i18n, ns, cb);
10133
+ ns.forEach((n) => {
10134
+ if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
10135
+ });
10136
+ i18n.loadLanguages(lng, loadedClb(i18n, cb));
10137
+ };
10138
+ var hasLoadedNamespace2 = (ns, i18n, options = {}) => {
10139
+ if (!i18n.languages || !i18n.languages.length) {
10140
+ warnOnce(i18n, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
10141
+ languages: i18n.languages
10142
+ });
10143
+ return true;
10144
+ }
10145
+ return i18n.hasLoadedNamespace(ns, {
10146
+ lng: options.lng,
10147
+ precheck: (i18nInstance2, loadNotPending) => {
10148
+ if (options.bindI18n?.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
10149
+ }
10150
+ });
10151
+ };
10152
+ var isString2 = (obj) => typeof obj === "string";
10153
+ var isObject = (obj) => typeof obj === "object" && obj !== null;
10154
+
10155
+ // node_modules/react-i18next/dist/es/unescape.js
10156
+ var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
10157
+ var htmlEntities = {
10158
+ "&amp;": "&",
10159
+ "&#38;": "&",
10160
+ "&lt;": "<",
10161
+ "&#60;": "<",
10162
+ "&gt;": ">",
10163
+ "&#62;": ">",
10164
+ "&apos;": "'",
10165
+ "&#39;": "'",
10166
+ "&quot;": '"',
10167
+ "&#34;": '"',
10168
+ "&nbsp;": " ",
10169
+ "&#160;": " ",
10170
+ "&copy;": "\xA9",
10171
+ "&#169;": "\xA9",
10172
+ "&reg;": "\xAE",
10173
+ "&#174;": "\xAE",
10174
+ "&hellip;": "\u2026",
10175
+ "&#8230;": "\u2026",
10176
+ "&#x2F;": "/",
10177
+ "&#47;": "/"
10178
+ };
10179
+ var unescapeHtmlEntity = (m2) => htmlEntities[m2];
10180
+ var unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
10181
+
10182
+ // node_modules/react-i18next/dist/es/defaults.js
10183
+ var defaultOptions = {
10184
+ bindI18n: "languageChanged",
10185
+ bindI18nStore: "",
10186
+ transEmptyNodeValue: "",
10187
+ transSupportBasicHtmlNodes: true,
10188
+ transWrapTextNodes: "",
10189
+ transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
10190
+ useSuspense: true,
10191
+ unescape
10192
+ };
10193
+ var setDefaults = (options = {}) => {
10194
+ defaultOptions = {
10195
+ ...defaultOptions,
10196
+ ...options
10197
+ };
10198
+ };
10199
+ var getDefaults = () => defaultOptions;
10200
+
10201
+ // node_modules/react-i18next/dist/es/i18nInstance.js
10202
+ var i18nInstance;
10203
+ var setI18n = (instance2) => {
10204
+ i18nInstance = instance2;
10205
+ };
10206
+ var getI18n = () => i18nInstance;
10207
+
10208
+ // node_modules/react-i18next/dist/es/context.js
10209
+ import { createContext } from "react";
10210
+
10211
+ // node_modules/react-i18next/dist/es/initReactI18next.js
10212
+ var initReactI18next = {
10213
+ type: "3rdParty",
10214
+ init(instance2) {
10215
+ setDefaults(instance2.options.react);
10216
+ setI18n(instance2);
10217
+ }
10218
+ };
10219
+
10220
+ // node_modules/react-i18next/dist/es/context.js
10221
+ var I18nContext = createContext();
10222
+ var ReportNamespaces = class {
10223
+ constructor() {
10224
+ this.usedNamespaces = {};
10225
+ }
10226
+ addUsedNamespaces(namespaces) {
10227
+ namespaces.forEach((ns) => {
10228
+ if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
10229
+ });
10230
+ }
10231
+ getUsedNamespaces() {
10232
+ return Object.keys(this.usedNamespaces);
10233
+ }
10234
+ };
10235
+
10236
+ // node_modules/react-i18next/dist/es/useTranslation.js
10237
+ import { useState, useEffect, useContext as useContext2, useRef, useCallback as useCallback2 } from "react";
10238
+ var usePrevious = (value, ignore) => {
10239
+ const ref = useRef();
10240
+ useEffect(() => {
10241
+ ref.current = ignore ? ref.current : value;
10242
+ }, [value, ignore]);
10243
+ return ref.current;
10244
+ };
10245
+ var alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
10246
+ var useMemoizedT = (i18n, language, namespace, keyPrefix) => useCallback2(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
10247
+ var useTranslation = (ns, props = {}) => {
10248
+ const {
10249
+ i18n: i18nFromProps
10250
+ } = props;
10251
+ const {
10252
+ i18n: i18nFromContext,
10253
+ defaultNS: defaultNSFromContext
10254
+ } = useContext2(I18nContext) || {};
10255
+ const i18n = i18nFromProps || i18nFromContext || getI18n();
10256
+ if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
10257
+ if (!i18n) {
10258
+ warnOnce(i18n, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
10259
+ const notReadyT = (k2, optsOrDefaultValue) => {
10260
+ if (isString2(optsOrDefaultValue)) return optsOrDefaultValue;
10261
+ if (isObject(optsOrDefaultValue) && isString2(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
10262
+ return Array.isArray(k2) ? k2[k2.length - 1] : k2;
10263
+ };
10264
+ const retNotReady = [notReadyT, {}, false];
10265
+ retNotReady.t = notReadyT;
10266
+ retNotReady.i18n = {};
10267
+ retNotReady.ready = false;
10268
+ return retNotReady;
10269
+ }
10270
+ if (i18n.options.react?.wait) warnOnce(i18n, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
10271
+ const i18nOptions = {
10272
+ ...getDefaults(),
10273
+ ...i18n.options.react,
10274
+ ...props
10275
+ };
10276
+ const {
10277
+ useSuspense,
10278
+ keyPrefix
10279
+ } = i18nOptions;
10280
+ let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;
10281
+ namespaces = isString2(namespaces) ? [namespaces] : namespaces || ["translation"];
10282
+ i18n.reportNamespaces.addUsedNamespaces?.(namespaces);
10283
+ const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace2(n, i18n, i18nOptions));
10284
+ const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
10285
+ const getT = () => memoGetT;
10286
+ const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
10287
+ const [t2, setT] = useState(getT);
10288
+ let joinedNS = namespaces.join();
10289
+ if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
10290
+ const previousJoinedNS = usePrevious(joinedNS);
10291
+ const isMounted = useRef(true);
10292
+ useEffect(() => {
10293
+ const {
10294
+ bindI18n,
10295
+ bindI18nStore
10296
+ } = i18nOptions;
10297
+ isMounted.current = true;
10298
+ if (!ready && !useSuspense) {
10299
+ if (props.lng) {
10300
+ loadLanguages2(i18n, props.lng, namespaces, () => {
10301
+ if (isMounted.current) setT(getNewT);
10302
+ });
10303
+ } else {
10304
+ loadNamespaces2(i18n, namespaces, () => {
10305
+ if (isMounted.current) setT(getNewT);
10306
+ });
10307
+ }
10308
+ }
10309
+ if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
10310
+ setT(getNewT);
10311
+ }
10312
+ const boundReset = () => {
10313
+ if (isMounted.current) setT(getNewT);
10314
+ };
10315
+ if (bindI18n) i18n?.on(bindI18n, boundReset);
10316
+ if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
10317
+ return () => {
10318
+ isMounted.current = false;
10319
+ if (i18n) bindI18n?.split(" ").forEach((e2) => i18n.off(e2, boundReset));
10320
+ if (bindI18nStore && i18n) bindI18nStore.split(" ").forEach((e2) => i18n.store.off(e2, boundReset));
10321
+ };
10322
+ }, [i18n, joinedNS]);
10323
+ useEffect(() => {
10324
+ if (isMounted.current && ready) {
10325
+ setT(getT);
10326
+ }
10327
+ }, [i18n, keyPrefix, ready]);
10328
+ const ret = [t2, i18n, ready];
10329
+ ret.t = t2;
10330
+ ret.i18n = i18n;
10331
+ ret.ready = ready;
10332
+ if (ready) return ret;
10333
+ if (!ready && !useSuspense) return ret;
10334
+ throw new Promise((resolve) => {
10335
+ if (props.lng) {
10336
+ loadLanguages2(i18n, props.lng, namespaces, () => resolve());
10337
+ } else {
10338
+ loadNamespaces2(i18n, namespaces, () => resolve());
10339
+ }
10340
+ });
10341
+ };
10342
+
10343
+ // node_modules/react-i18next/dist/es/withTranslation.js
10344
+ import { createElement as createElement2, forwardRef as forwardRefReact } from "react";
10345
+
10346
+ // node_modules/react-i18next/dist/es/I18nextProvider.js
10347
+ import { createElement as createElement3, useMemo as useMemo2 } from "react";
10348
+
10349
+ // node_modules/react-i18next/dist/es/withSSR.js
10350
+ import { createElement as createElement4 } from "react";
10351
+
10352
+ // node_modules/react-i18next/dist/es/useSSR.js
10353
+ import { useContext as useContext3 } from "react";
10354
+
10352
10355
  // node_modules/uuid/dist/esm-browser/stringify.js
10353
10356
  var byteToHex = [];
10354
10357
  for (let i2 = 0; i2 < 256; ++i2) {
@@ -10672,7 +10675,23 @@ function BillingPriceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
10672
10675
  id: json["id"],
10673
10676
  interval: json["interval"],
10674
10677
  price: json["price"],
10675
- priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"]
10678
+ priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
10679
+ scheme: json["scheme"]
10680
+ };
10681
+ }
10682
+
10683
+ // src/api/models/BillingProductPriceTierResponseData.ts
10684
+ function BillingProductPriceTierResponseDataFromJSON(json) {
10685
+ return BillingProductPriceTierResponseDataFromJSONTyped(json, false);
10686
+ }
10687
+ function BillingProductPriceTierResponseDataFromJSONTyped(json, ignoreDiscriminator) {
10688
+ if (json == null) {
10689
+ return json;
10690
+ }
10691
+ return {
10692
+ flatAmount: json["flat_amount"] == null ? void 0 : json["flat_amount"],
10693
+ perUnitPrice: json["per_unit_price"],
10694
+ upTo: json["up_to"] == null ? void 0 : json["up_to"]
10676
10695
  };
10677
10696
  }
10678
10697
 
@@ -10685,6 +10704,7 @@ function BillingPriceViewFromJSONTyped(json, ignoreDiscriminator) {
10685
10704
  return json;
10686
10705
  }
10687
10706
  return {
10707
+ billingScheme: json["billing_scheme"],
10688
10708
  createdAt: new Date(json["created_at"]),
10689
10709
  currency: json["currency"],
10690
10710
  id: json["id"],
@@ -10695,6 +10715,9 @@ function BillingPriceViewFromJSONTyped(json, ignoreDiscriminator) {
10695
10715
  priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
10696
10716
  priceExternalId: json["price_external_id"],
10697
10717
  priceId: json["price_id"],
10718
+ priceTier: json["price_tier"].map(
10719
+ BillingProductPriceTierResponseDataFromJSON
10720
+ ),
10698
10721
  productExternalId: json["product_external_id"],
10699
10722
  productId: json["product_id"],
10700
10723
  productName: json["product_name"],
@@ -10739,6 +10762,7 @@ function BillingProductForSubscriptionResponseDataFromJSONTyped(json, ignoreDisc
10739
10762
  return json;
10740
10763
  }
10741
10764
  return {
10765
+ billingScheme: json["billing_scheme"],
10742
10766
  createdAt: new Date(json["created_at"]),
10743
10767
  currency: json["currency"],
10744
10768
  environmentId: json["environment_id"],
@@ -10751,6 +10775,9 @@ function BillingProductForSubscriptionResponseDataFromJSONTyped(json, ignoreDisc
10751
10775
  priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
10752
10776
  priceExternalId: json["price_external_id"],
10753
10777
  priceId: json["price_id"],
10778
+ priceTier: json["price_tier"].map(
10779
+ BillingProductPriceTierResponseDataFromJSON
10780
+ ),
10754
10781
  quantity: json["quantity"],
10755
10782
  subscriptionId: json["subscription_id"],
10756
10783
  updatedAt: new Date(json["updated_at"]),
@@ -10758,6 +10785,29 @@ function BillingProductForSubscriptionResponseDataFromJSONTyped(json, ignoreDisc
10758
10785
  };
10759
10786
  }
10760
10787
 
10788
+ // src/api/models/BillingProductResponseData.ts
10789
+ function BillingProductResponseDataFromJSON(json) {
10790
+ return BillingProductResponseDataFromJSONTyped(json, false);
10791
+ }
10792
+ function BillingProductResponseDataFromJSONTyped(json, ignoreDiscriminator) {
10793
+ if (json == null) {
10794
+ return json;
10795
+ }
10796
+ return {
10797
+ accountId: json["account_id"],
10798
+ createdAt: new Date(json["created_at"]),
10799
+ currency: json["currency"],
10800
+ environmentId: json["environment_id"],
10801
+ externalId: json["external_id"],
10802
+ name: json["name"],
10803
+ price: json["price"],
10804
+ priceDecimal: json["price_decimal"] == null ? void 0 : json["price_decimal"],
10805
+ productId: json["product_id"],
10806
+ quantity: json["quantity"],
10807
+ updatedAt: new Date(json["updated_at"])
10808
+ };
10809
+ }
10810
+
10761
10811
  // src/api/models/BillingSubscriptionDiscountView.ts
10762
10812
  function BillingSubscriptionDiscountViewFromJSON(json) {
10763
10813
  return BillingSubscriptionDiscountViewFromJSONTyped(json, false);
@@ -11428,6 +11478,7 @@ function PlanEntitlementResponseDataFromJSONTyped(json, ignoreDiscriminator) {
11428
11478
  ruleIdUsageExceeded: json["rule_id_usage_exceeded"] == null ? void 0 : json["rule_id_usage_exceeded"],
11429
11479
  softLimit: json["soft_limit"] == null ? void 0 : json["soft_limit"],
11430
11480
  updatedAt: new Date(json["updated_at"]),
11481
+ usageBasedProduct: json["usage_based_product"] == null ? void 0 : BillingProductResponseDataFromJSON(json["usage_based_product"]),
11431
11482
  valueBool: json["value_bool"] == null ? void 0 : json["value_bool"],
11432
11483
  valueNumeric: json["value_numeric"] == null ? void 0 : json["value_numeric"],
11433
11484
  valueTrait: json["value_trait"] == null ? void 0 : EntityTraitDefinitionResponseDataFromJSON(json["value_trait"]),
@@ -11776,6 +11827,26 @@ function ListInvoicesResponseFromJSONTyped(json, ignoreDiscriminator) {
11776
11827
  };
11777
11828
  }
11778
11829
 
11830
+ // src/api/models/PreviewSubscriptionFinanceResponseData.ts
11831
+ function PreviewSubscriptionFinanceResponseDataFromJSON(json) {
11832
+ return PreviewSubscriptionFinanceResponseDataFromJSONTyped(json, false);
11833
+ }
11834
+ function PreviewSubscriptionFinanceResponseDataFromJSONTyped(json, ignoreDiscriminator) {
11835
+ if (json == null) {
11836
+ return json;
11837
+ }
11838
+ return {
11839
+ amountOff: json["amount_off"],
11840
+ dueNow: json["due_now"],
11841
+ newCharges: json["new_charges"],
11842
+ percentOff: json["percent_off"],
11843
+ periodStart: new Date(json["period_start"]),
11844
+ promoCodeApplied: json["promo_code_applied"],
11845
+ proration: json["proration"],
11846
+ trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"])
11847
+ };
11848
+ }
11849
+
11779
11850
  // src/api/models/PreviewSubscriptionChangeResponseData.ts
11780
11851
  function PreviewSubscriptionChangeResponseDataFromJSON(json) {
11781
11852
  return PreviewSubscriptionChangeResponseDataFromJSONTyped(json, false);
@@ -11787,12 +11858,16 @@ function PreviewSubscriptionChangeResponseDataFromJSONTyped(json, ignoreDiscrimi
11787
11858
  return {
11788
11859
  amountOff: json["amount_off"],
11789
11860
  dueNow: json["due_now"],
11861
+ finance: json["finance"] == null ? void 0 : PreviewSubscriptionFinanceResponseDataFromJSON(json["finance"]),
11790
11862
  newCharges: json["new_charges"],
11791
11863
  percentOff: json["percent_off"],
11792
11864
  periodStart: new Date(json["period_start"]),
11793
11865
  promoCodeApplied: json["promo_code_applied"],
11794
11866
  proration: json["proration"],
11795
- trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"])
11867
+ trialEnd: json["trial_end"] == null ? void 0 : new Date(json["trial_end"]),
11868
+ usageViolations: json["usage_violations"].map(
11869
+ FeatureUsageResponseDataFromJSON
11870
+ )
11796
11871
  };
11797
11872
  }
11798
11873
 
@@ -13061,7 +13136,7 @@ var EmbedProvider = ({
13061
13136
  useEffect2(() => {
13062
13137
  if (accessToken) {
13063
13138
  const { headers = {} } = apiConfig ?? {};
13064
- headers["X-Schematic-Components-Version"] = "0.7.0";
13139
+ headers["X-Schematic-Components-Version"] = "0.7.3";
13065
13140
  headers["X-Schematic-Session-ID"] = sessionIdRef.current;
13066
13141
  const config = new Configuration({
13067
13142
  ...apiConfig,
@@ -13400,16 +13475,10 @@ function useWrapChildren(elements) {
13400
13475
  return shouldWrap.some((wrap) => wrap);
13401
13476
  }
13402
13477
 
13403
- // src/components/layout/card/Card.tsx
13404
- import { forwardRef as forwardRef3 } from "react";
13405
-
13406
13478
  // src/components/ui/box/styles.ts
13407
13479
  var Box = dt.div((props) => {
13408
13480
  function reducer(acc, [key, value]) {
13409
- if (key.startsWith("$") && ![
13410
- "$viewport",
13411
- ...Object.values(TextPropNames).filter((prop) => prop !== "$color")
13412
- ].includes(key)) {
13481
+ if (key.startsWith("$") && !["$viewport"].includes(key)) {
13413
13482
  acc.push(
13414
13483
  // keys will always be CSS properties
13415
13484
  attr(camelToHyphen(key.slice(1)), value)
@@ -13532,6 +13601,7 @@ var Button2 = forwardRef(
13532
13601
  children,
13533
13602
  ...props
13534
13603
  }, ref) => {
13604
+ const theme = nt();
13535
13605
  return /* @__PURE__ */ jsxs2(
13536
13606
  Button,
13537
13607
  {
@@ -13542,7 +13612,7 @@ var Button2 = forwardRef(
13542
13612
  disabled,
13543
13613
  ...props,
13544
13614
  children: [
13545
- /* @__PURE__ */ jsx2(Loader, { $size: "sm", $isLoading: isLoading }),
13615
+ /* @__PURE__ */ jsx2(Loader, { $color: theme.primary, $size: "sm", $isLoading: isLoading }),
13546
13616
  children
13547
13617
  ]
13548
13618
  }
@@ -13619,6 +13689,8 @@ var EmbedButton = dt(Button2)`
13619
13689
  font-family: "Public Sans", sans-serif;
13620
13690
  font-weight: 500;
13621
13691
  text-align: center;
13692
+ display: flex;
13693
+ align-items: center;
13622
13694
 
13623
13695
  ${({ disabled, $color = "primary", theme }) => {
13624
13696
  const { l: l2 } = hexToHSL(theme[$color]);
@@ -13766,6 +13838,24 @@ var EmbedButton = dt(Button2)`
13766
13838
  `;
13767
13839
  }
13768
13840
  }}
13841
+
13842
+ ${({ $selfAlignment = "center" }) => {
13843
+ switch ($selfAlignment) {
13844
+ case "start":
13845
+ return lt`
13846
+ align-self: start;
13847
+ `;
13848
+ case "end":
13849
+ return lt`
13850
+ align-self: end;
13851
+ `;
13852
+ case "center":
13853
+ default:
13854
+ return lt`
13855
+ align-self: center;
13856
+ `;
13857
+ }
13858
+ }}
13769
13859
 
13770
13860
  ${({ $fullWidth = true }) => {
13771
13861
  if ($fullWidth) {
@@ -14050,7 +14140,7 @@ var Loader = dt.div`
14050
14140
  }
14051
14141
  return lt`
14052
14142
  border-color: ${color};
14053
- border-top-color: ${colorFn(color, 42.5)};
14143
+ border-top-color: ${colorFn(color, 0.425)};
14054
14144
  `;
14055
14145
  }}
14056
14146
 
@@ -14230,8 +14320,11 @@ var ModalHeader = ({
14230
14320
  };
14231
14321
 
14232
14322
  // src/components/ui/progress-bar/styles.ts
14233
- var Container3 = dt(Flex)`
14323
+ var Container3 = dt.div`
14234
14324
  position: relative;
14325
+ display: flex;
14326
+ align-items: center;
14327
+ gap: 1rem;
14235
14328
  `;
14236
14329
 
14237
14330
  // src/components/ui/progress-bar/ProgressBar.tsx
@@ -14261,59 +14354,51 @@ var ProgressBar = ({
14261
14354
  orange: "#DB6769",
14262
14355
  red: "#EF4444"
14263
14356
  };
14264
- return /* @__PURE__ */ jsxs4(
14265
- Container3,
14266
- {
14267
- $alignItems: "center",
14268
- $gap: `${16 / TEXT_BASE_SIZE}rem`,
14269
- ...props,
14270
- children: [
14271
- /* @__PURE__ */ jsx7(
14357
+ return /* @__PURE__ */ jsxs4(Container3, { ...props, children: [
14358
+ /* @__PURE__ */ jsx7(
14359
+ Flex,
14360
+ {
14361
+ $position: "relative",
14362
+ $alignItems: "center",
14363
+ $width: `${barWidth}`,
14364
+ $maxWidth: "100%",
14365
+ children: /* @__PURE__ */ jsx7(
14272
14366
  Flex,
14273
14367
  {
14274
14368
  $position: "relative",
14275
- $alignItems: "center",
14276
- $width: `${barWidth}`,
14277
- $maxWidth: "100%",
14369
+ $overflow: "hidden",
14370
+ $width: "100%",
14371
+ $height: `${8 / TEXT_BASE_SIZE}rem`,
14372
+ $backgroundColor: bgColor,
14373
+ $borderRadius: "9999px",
14278
14374
  children: /* @__PURE__ */ jsx7(
14279
- Flex,
14375
+ Box,
14280
14376
  {
14281
- $position: "relative",
14282
- $overflow: "hidden",
14283
- $width: "100%",
14284
- $height: `${8 / TEXT_BASE_SIZE}rem`,
14285
- $backgroundColor: bgColor,
14286
- $borderRadius: "9999px",
14287
- children: /* @__PURE__ */ jsx7(
14288
- Box,
14289
- {
14290
- $width: `${Math.min(progress, 100)}%`,
14291
- $height: "100%",
14292
- $backgroundColor: barColorMap[color],
14293
- $borderRadius: "9999px"
14294
- }
14295
- )
14377
+ $width: `${Math.min(progress, 100)}%`,
14378
+ $height: "100%",
14379
+ $backgroundColor: barColorMap[color],
14380
+ $borderRadius: "9999px"
14296
14381
  }
14297
14382
  )
14298
14383
  }
14299
- ),
14300
- total !== 0 && /* @__PURE__ */ jsxs4(
14301
- Text,
14302
- {
14303
- $font: theme.typography.text.fontFamily,
14304
- $size: 14,
14305
- $weight: 500,
14306
- $color: theme.typography.text.color,
14307
- children: [
14308
- value,
14309
- "/",
14310
- total
14311
- ]
14312
- }
14313
14384
  )
14314
- ]
14315
- }
14316
- );
14385
+ }
14386
+ ),
14387
+ total !== 0 && /* @__PURE__ */ jsxs4(
14388
+ Text,
14389
+ {
14390
+ $font: theme.typography.text.fontFamily,
14391
+ $size: 14,
14392
+ $weight: 500,
14393
+ $color: theme.typography.text.color,
14394
+ children: [
14395
+ value,
14396
+ "/",
14397
+ total
14398
+ ]
14399
+ }
14400
+ )
14401
+ ] });
14317
14402
  };
14318
14403
 
14319
14404
  // src/components/ui/text/styles.ts
@@ -14326,8 +14411,7 @@ var TextPropNames = /* @__PURE__ */ ((TextPropNames2) => {
14326
14411
  TextPropNames2["Leading"] = "$leading";
14327
14412
  return TextPropNames2;
14328
14413
  })(TextPropNames || {});
14329
- var Text = dt(Box).attrs(({ as = "span", onClick }) => ({
14330
- as,
14414
+ var Text = dt.span.attrs(({ onClick }) => ({
14331
14415
  ...onClick && { tabIndex: 0 }
14332
14416
  }))`
14333
14417
  ${({ $font }) => $font && lt`
@@ -14363,7 +14447,7 @@ import { useCallback as useCallback6, useLayoutEffect as useLayoutEffect3, useRe
14363
14447
  import { createPortal } from "react-dom";
14364
14448
 
14365
14449
  // src/components/ui/tooltip/styles.ts
14366
- var Trigger = dt(Box)``;
14450
+ var Trigger = dt.div``;
14367
14451
  var coords = (position2) => {
14368
14452
  let x2 = 0;
14369
14453
  let y2 = 0;
@@ -14430,7 +14514,7 @@ var grow = (translate) => {
14430
14514
  }
14431
14515
  `;
14432
14516
  };
14433
- var Content = dt(Box).withConfig({
14517
+ var Content = dt.div.withConfig({
14434
14518
  shouldForwardProp: (prop) => !["x", "y", "position", "zIndex"].includes(prop)
14435
14519
  })(({ x: x2, y: y2, position: position2, zIndex }) => {
14436
14520
  const translate = coords(position2);
@@ -14547,6 +14631,7 @@ var Tooltip = ({
14547
14631
  // src/components/layout/card/styles.ts
14548
14632
  var Element = dt(Box)``;
14549
14633
  var FussyChild = dt(Element)``;
14634
+ var Notice = dt(Box)``;
14550
14635
  var cardBoxShadow = "0px 1px 20px 0px #1018280F, 0px 1px 3px 0px #1018281A";
14551
14636
  var StyledCard = dt.div(({ theme }) => {
14552
14637
  const { l: l2 } = hexToHSL(theme.card.background);
@@ -14574,6 +14659,11 @@ var StyledCard = dt.div(({ theme }) => {
14574
14659
  `}
14575
14660
  }
14576
14661
  }
14662
+
14663
+ ${Notice}:first-child {
14664
+ border-top-left-radius: ${borderRadius};
14665
+ border-top-right-radius: ${borderRadius};
14666
+ }
14577
14667
  `;
14578
14668
  });
14579
14669
 
@@ -14628,11 +14718,12 @@ Column.displayName = "Column";
14628
14718
  import { forwardRef as forwardRef5 } from "react";
14629
14719
 
14630
14720
  // src/components/layout/root/styles.ts
14631
- var Container2 = dt(Box)`
14721
+ var Container2 = dt.div`
14632
14722
  all: initial;
14633
14723
  box-sizing: border-box;
14634
14724
  display: block;
14635
14725
  font-size: ${TEXT_BASE_SIZE}px;
14726
+ line-height: 1.35;
14636
14727
  width: 100%;
14637
14728
  height: 100%;
14638
14729
 
@@ -14913,29 +15004,36 @@ var Sidebar = ({
14913
15004
  const isLightBackground = useIsLightBackground();
14914
15005
  const currentPlan = data.company?.plan;
14915
15006
  const currentAddOns = data.company?.addOns || [];
14916
- const currentUsageBasedEntitlements = data.activeUsageBasedEntitlements.reduce(
14917
- (acc, usageData) => {
14918
- const featureUsage = data.featureUsage?.features.find(
14919
- (usage2) => usage2.feature?.id === usageData.featureId
14920
- );
14921
- const allocation = featureUsage?.allocation || 0;
14922
- const usage = featureUsage?.usage || 0;
14923
- acc.push({
14924
- usageData,
14925
- allocation,
14926
- quantity: allocation ?? usage,
14927
- usage
14928
- });
14929
- return acc;
14930
- },
14931
- []
14932
- );
14933
- const payInAdvanceEntitlements = usageBasedEntitlements.filter(
14934
- ({ entitlement }) => entitlement.priceBehavior === "pay_in_advance"
14935
- );
14936
- const payAsYouGoEntitlements = usageBasedEntitlements.filter(
14937
- ({ entitlement }) => entitlement.priceBehavior === "pay_as_you_go"
14938
- );
15007
+ const currentUsageBasedEntitlements = useMemo4(() => {
15008
+ return (data.featureUsage?.features || []).reduce(
15009
+ (acc, entitlement) => {
15010
+ if (entitlement.priceBehavior && (planPeriod === "month" && entitlement.monthlyUsageBasedPrice || planPeriod === "year" && entitlement.yearlyUsageBasedPrice)) {
15011
+ const allocation = entitlement.allocation || 0;
15012
+ const usage = entitlement.usage || 0;
15013
+ acc.push({
15014
+ ...entitlement,
15015
+ allocation,
15016
+ usage,
15017
+ quantity: allocation ?? usage
15018
+ });
15019
+ }
15020
+ return acc;
15021
+ },
15022
+ []
15023
+ );
15024
+ }, [data.featureUsage?.features, planPeriod]);
15025
+ const { payAsYouGoEntitlements, payInAdvanceEntitlements } = useMemo4(() => {
15026
+ const payAsYouGoEntitlements2 = [];
15027
+ const payInAdvanceEntitlements2 = usageBasedEntitlements.filter(
15028
+ (entitlement) => {
15029
+ if (entitlement.priceBehavior === "pay_as_you_go") {
15030
+ payAsYouGoEntitlements2.push(entitlement);
15031
+ }
15032
+ return entitlement.priceBehavior === "pay_in_advance";
15033
+ }
15034
+ );
15035
+ return { payAsYouGoEntitlements: payAsYouGoEntitlements2, payInAdvanceEntitlements: payInAdvanceEntitlements2 };
15036
+ }, [usageBasedEntitlements]);
14939
15037
  const subscriptionPrice = useMemo4(() => {
14940
15038
  let planPrice;
14941
15039
  let currency;
@@ -14952,15 +15050,17 @@ var Sidebar = ({
14952
15050
  if (planPrice) {
14953
15051
  total += planPrice;
14954
15052
  }
14955
- const addOnCost = addOns.reduce(
14956
- (sum, addOn) => sum + (getBillingPrice(
14957
- planPeriod === "year" ? addOn.yearlyPrice : addOn.monthlyPrice
14958
- )?.price ?? 0),
14959
- 0
14960
- );
15053
+ const addOnCost = addOns.reduce((sum, addOn) => {
15054
+ if (addOn.isSelected) {
15055
+ sum += getBillingPrice(
15056
+ planPeriod === "year" ? addOn.yearlyPrice : addOn.monthlyPrice
15057
+ )?.price ?? 0;
15058
+ }
15059
+ return sum;
15060
+ }, 0);
14961
15061
  total += addOnCost;
14962
15062
  const payInAdvanceCost = payInAdvanceEntitlements.reduce(
14963
- (sum, { entitlement, quantity }) => sum + quantity * (getBillingPrice(
15063
+ (sum, entitlement) => sum + entitlement.quantity * (getBillingPrice(
14964
15064
  planPeriod === "year" ? entitlement.meteredYearlyPrice : entitlement.meteredMonthlyPrice
14965
15065
  )?.price ?? 0),
14966
15066
  0
@@ -15010,8 +15110,8 @@ var Sidebar = ({
15010
15110
  return acc;
15011
15111
  }, []),
15012
15112
  payInAdvance: payInAdvanceEntitlements.reduce(
15013
- (acc, { entitlement, quantity }) => {
15014
- const priceId2 = (planPeriod === "year" ? entitlement.meteredYearlyPrice : entitlement.meteredMonthlyPrice)?.priceId;
15113
+ (acc, { meteredMonthlyPrice, meteredYearlyPrice, quantity }) => {
15114
+ const priceId2 = (planPeriod === "year" ? meteredYearlyPrice : meteredMonthlyPrice)?.priceId;
15015
15115
  if (priceId2) {
15016
15116
  acc.push({
15017
15117
  priceId: priceId2,
@@ -15079,48 +15179,62 @@ var Sidebar = ({
15079
15179
  ({ quantity, usage }) => quantity >= usage
15080
15180
  )) && !isLoading;
15081
15181
  const canCheckout = canUpdateSubscription && (!!data.subscription?.paymentMethod || typeof paymentMethodId === "string");
15082
- const changedUsageBasedEntitlements = [];
15083
- const addedUsageBasedEntitlements = usageBasedEntitlements.reduce(
15084
- (acc, selected) => {
15085
- const changed = currentUsageBasedEntitlements.find(
15086
- (current) => current.usageData.featureId === selected.entitlement.featureId && current.quantity !== selected.quantity
15087
- );
15088
- if (changed) {
15089
- changedUsageBasedEntitlements.push({
15090
- entitlement: selected.entitlement,
15091
- previous: changed,
15092
- next: {
15093
- allocation: selected.allocation,
15094
- quantity: selected.quantity,
15095
- usage: selected.usage
15096
- }
15097
- });
15098
- } else {
15099
- acc.push(selected);
15100
- }
15101
- return acc;
15102
- },
15103
- []
15104
- );
15105
- const removedUsageBasedEntitlements = currentUsageBasedEntitlements.reduce(
15106
- (acc, current) => {
15107
- const match2 = usageBasedEntitlements.every(
15108
- ({ entitlement }) => entitlement.featureId !== current.usageData.featureId
15109
- ) && data.featureUsage?.features.find(
15110
- (usage) => usage.feature?.id === current.usageData.featureId
15111
- );
15112
- if (match2) {
15113
- acc.push({
15114
- usage: match2,
15115
- allocation: current.allocation,
15116
- quantity: current.quantity
15117
- });
15118
- }
15119
- return acc;
15120
- },
15121
- []
15122
- );
15123
- const willUsageBasedEntitlementsChange = changedUsageBasedEntitlements.length > 0 || addedUsageBasedEntitlements.length > 0 || removedUsageBasedEntitlements.length > 0;
15182
+ const {
15183
+ changedUsageBasedEntitlements,
15184
+ addedUsageBasedEntitlements,
15185
+ removedUsageBasedEntitlements,
15186
+ willUsageBasedEntitlementsChange
15187
+ } = useMemo4(() => {
15188
+ const changedUsageBasedEntitlements2 = [];
15189
+ const addedUsageBasedEntitlements2 = selectedPlan ? usageBasedEntitlements.reduce(
15190
+ (acc, selected) => {
15191
+ const changed = currentUsageBasedEntitlements.find(
15192
+ (current) => current.entitlementId === selected.id && current.quantity !== selected.quantity
15193
+ );
15194
+ if (changed) {
15195
+ changedUsageBasedEntitlements2.push({
15196
+ previous: changed,
15197
+ next: selected
15198
+ });
15199
+ } else {
15200
+ acc.push(selected);
15201
+ }
15202
+ return acc;
15203
+ },
15204
+ []
15205
+ ) : [];
15206
+ const removedUsageBasedEntitlements2 = selectedPlan ? currentUsageBasedEntitlements.reduce(
15207
+ (acc, current) => {
15208
+ const match2 = usageBasedEntitlements.every(
15209
+ (entitlement) => entitlement.id !== current.entitlementId
15210
+ ) && data.featureUsage?.features.find(
15211
+ (usage) => usage.entitlementId === current.entitlementId
15212
+ );
15213
+ if (match2) {
15214
+ acc.push({
15215
+ ...match2,
15216
+ allocation: current.allocation,
15217
+ usage: current.usage,
15218
+ quantity: current.quantity
15219
+ });
15220
+ }
15221
+ return acc;
15222
+ },
15223
+ []
15224
+ ) : [];
15225
+ const willUsageBasedEntitlementsChange2 = changedUsageBasedEntitlements2.length > 0 || addedUsageBasedEntitlements2.length > 0 || removedUsageBasedEntitlements2.length > 0;
15226
+ return {
15227
+ changedUsageBasedEntitlements: changedUsageBasedEntitlements2,
15228
+ addedUsageBasedEntitlements: addedUsageBasedEntitlements2,
15229
+ removedUsageBasedEntitlements: removedUsageBasedEntitlements2,
15230
+ willUsageBasedEntitlementsChange: willUsageBasedEntitlementsChange2
15231
+ };
15232
+ }, [
15233
+ selectedPlan,
15234
+ data.featureUsage?.features,
15235
+ currentUsageBasedEntitlements,
15236
+ usageBasedEntitlements
15237
+ ]);
15124
15238
  const removedAddOns = currentAddOns.filter(
15125
15239
  (current) => !selectedAddOns.some((selected) => current.id === selected.id)
15126
15240
  );
@@ -15324,13 +15438,13 @@ var Sidebar = ({
15324
15438
  }
15325
15439
  ) }),
15326
15440
  removedUsageBasedEntitlements.reduce(
15327
- (acc, { allocation, quantity, usage }, index) => {
15328
- if (typeof allocation === "number" && usage.feature?.name) {
15441
+ (acc, entitlement, index) => {
15442
+ if (typeof entitlement.allocation === "number" && entitlement.feature?.name) {
15329
15443
  const {
15330
15444
  price: entitlementPrice,
15331
15445
  currency: entitlementCurrency
15332
15446
  } = getBillingPrice(
15333
- planPeriod === "year" ? usage.yearlyUsageBasedPrice : usage.monthlyUsageBasedPrice
15447
+ planPeriod === "year" ? entitlement.yearlyUsageBasedPrice : entitlement.monthlyUsageBasedPrice
15334
15448
  ) || {};
15335
15449
  acc.push(
15336
15450
  /* @__PURE__ */ jsxs8(
@@ -15350,11 +15464,14 @@ var Sidebar = ({
15350
15464
  $size: theme.typography.heading4.fontSize,
15351
15465
  $weight: theme.typography.heading4.fontWeight,
15352
15466
  $color: theme.typography.heading4.color,
15353
- children: usage.priceBehavior === "pay_in_advance" ? /* @__PURE__ */ jsxs8(Fragment3, { children: [
15354
- quantity,
15467
+ children: entitlement.priceBehavior === "pay_in_advance" ? /* @__PURE__ */ jsxs8(Fragment3, { children: [
15468
+ entitlement.quantity,
15355
15469
  " ",
15356
- getFeatureName(usage.feature, quantity)
15357
- ] }) : usage.feature.name
15470
+ getFeatureName(
15471
+ entitlement.feature,
15472
+ entitlement.quantity
15473
+ )
15474
+ ] }) : entitlement.feature.name
15358
15475
  }
15359
15476
  ) }),
15360
15477
  /* @__PURE__ */ jsx13(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsxs8(
@@ -15365,9 +15482,9 @@ var Sidebar = ({
15365
15482
  $weight: theme.typography.text.fontWeight,
15366
15483
  $color: theme.typography.text.color,
15367
15484
  children: [
15368
- usage.priceBehavior === "pay_in_advance" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
15485
+ entitlement.priceBehavior === "pay_in_advance" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
15369
15486
  formatCurrency(
15370
- (entitlementPrice ?? 0) * quantity,
15487
+ (entitlementPrice ?? 0) * entitlement.quantity,
15371
15488
  entitlementCurrency
15372
15489
  ),
15373
15490
  /* @__PURE__ */ jsxs8("sub", { children: [
@@ -15375,14 +15492,14 @@ var Sidebar = ({
15375
15492
  shortenPeriod(planPeriod)
15376
15493
  ] })
15377
15494
  ] }),
15378
- usage.priceBehavior === "pay_as_you_go" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
15495
+ entitlement.priceBehavior === "pay_as_you_go" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
15379
15496
  formatCurrency(
15380
15497
  entitlementPrice ?? 0,
15381
15498
  entitlementCurrency
15382
15499
  ),
15383
15500
  /* @__PURE__ */ jsxs8("sub", { children: [
15384
15501
  "/",
15385
- getFeatureName(usage.feature, 1)
15502
+ getFeatureName(entitlement.feature, 1)
15386
15503
  ] })
15387
15504
  ] })
15388
15505
  ]
@@ -15399,13 +15516,13 @@ var Sidebar = ({
15399
15516
  []
15400
15517
  ),
15401
15518
  changedUsageBasedEntitlements.reduce(
15402
- (acc, { entitlement, previous, next: next2 }, index) => {
15403
- if (entitlement?.feature?.name) {
15519
+ (acc, { previous, next: next2 }, index) => {
15520
+ if (next2.feature?.name) {
15404
15521
  const {
15405
15522
  price: entitlementPrice,
15406
15523
  currency: entitlementCurrency
15407
15524
  } = getBillingPrice(
15408
- planPeriod === "year" ? entitlement.meteredYearlyPrice : entitlement.meteredMonthlyPrice
15525
+ planPeriod === "year" ? next2.meteredYearlyPrice : next2.meteredMonthlyPrice
15409
15526
  ) || {};
15410
15527
  acc.push(
15411
15528
  /* @__PURE__ */ jsxs8(Box, { children: [
@@ -15429,7 +15546,7 @@ var Sidebar = ({
15429
15546
  children: [
15430
15547
  previous.quantity,
15431
15548
  " ",
15432
- getFeatureName(entitlement.feature)
15549
+ getFeatureName(next2.feature)
15433
15550
  ]
15434
15551
  }
15435
15552
  ) }),
@@ -15472,7 +15589,7 @@ var Sidebar = ({
15472
15589
  children: [
15473
15590
  next2.quantity,
15474
15591
  " ",
15475
- getFeatureName(entitlement.feature)
15592
+ getFeatureName(next2.feature)
15476
15593
  ]
15477
15594
  }
15478
15595
  ) }),
@@ -15506,7 +15623,7 @@ var Sidebar = ({
15506
15623
  []
15507
15624
  ),
15508
15625
  addedUsageBasedEntitlements.reduce(
15509
- (acc, { entitlement, quantity }, index) => {
15626
+ (acc, entitlement, index) => {
15510
15627
  if (entitlement.feature?.name) {
15511
15628
  const {
15512
15629
  price: entitlementPrice,
@@ -15530,9 +15647,12 @@ var Sidebar = ({
15530
15647
  $weight: theme.typography.heading4.fontWeight,
15531
15648
  $color: theme.typography.heading4.color,
15532
15649
  children: entitlement.priceBehavior === "pay_in_advance" ? /* @__PURE__ */ jsxs8(Fragment3, { children: [
15533
- quantity,
15650
+ entitlement.quantity,
15534
15651
  " ",
15535
- getFeatureName(entitlement.feature, quantity)
15652
+ getFeatureName(
15653
+ entitlement.feature,
15654
+ entitlement.quantity
15655
+ )
15536
15656
  ] }) : entitlement.feature.name
15537
15657
  }
15538
15658
  ) }),
@@ -15546,7 +15666,7 @@ var Sidebar = ({
15546
15666
  children: [
15547
15667
  entitlement.priceBehavior === "pay_in_advance" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
15548
15668
  formatCurrency(
15549
- (entitlementPrice ?? 0) * quantity,
15669
+ (entitlementPrice ?? 0) * entitlement.quantity,
15550
15670
  entitlementCurrency
15551
15671
  ),
15552
15672
  /* @__PURE__ */ jsxs8("sub", { children: [
@@ -16401,7 +16521,7 @@ var Checkout = ({
16401
16521
  $alignItems: "center",
16402
16522
  $flexGrow: 1,
16403
16523
  $marginTop: "-3.5rem",
16404
- children: /* @__PURE__ */ jsx15(Loader, { $size: "3xl" })
16524
+ children: /* @__PURE__ */ jsx15(Loader, { $color: theme.primary, $size: "3xl" })
16405
16525
  }
16406
16526
  );
16407
16527
  }
@@ -17007,7 +17127,7 @@ var Usage = ({ entitlements, updateQuantity, period }) => {
17007
17127
  const unitPriceFontSize = 0.875 * theme.typography.text.fontSize;
17008
17128
  const unitPriceColor = hexToHSL(theme.typography.text.color).l > 50 ? darken(theme.typography.text.color, 0.46) : lighten(theme.typography.text.color, 0.46);
17009
17129
  return /* @__PURE__ */ jsx18(Fragment8, { children: /* @__PURE__ */ jsx18(Flex, { $flexDirection: "column", $gap: "1rem", children: entitlements.reduce(
17010
- (acc, { entitlement, quantity, usage }, index) => {
17130
+ (acc, entitlement, index) => {
17011
17131
  if (entitlement.priceBehavior === "pay_in_advance" && entitlement.feature) {
17012
17132
  const { price, currency } = getBillingPrice(
17013
17133
  period === "year" ? entitlement.meteredYearlyPrice : entitlement.meteredMonthlyPrice
@@ -17066,8 +17186,8 @@ var Usage = ({ entitlements, updateQuantity, period }) => {
17066
17186
  {
17067
17187
  $size: "lg",
17068
17188
  type: "number",
17069
- value: quantity,
17070
- min: usage,
17189
+ value: entitlement.quantity,
17190
+ min: entitlement.usage,
17071
17191
  autoFocus: true,
17072
17192
  onFocus: (event) => event.target.select(),
17073
17193
  onChange: (event) => {
@@ -17087,12 +17207,12 @@ var Usage = ({ entitlements, updateQuantity, period }) => {
17087
17207
  $weight: theme.typography.text.fontWeight,
17088
17208
  $color: unitPriceColor,
17089
17209
  children: [
17090
- quantity < usage && /* @__PURE__ */ jsxs13("span", { style: { color: "#DB6669" }, children: [
17210
+ entitlement.quantity < entitlement.usage && /* @__PURE__ */ jsxs13("span", { style: { color: "#DB6669" }, children: [
17091
17211
  t2("Cannot downgrade entitlement"),
17092
17212
  " "
17093
17213
  ] }),
17094
17214
  t2("Currently using", {
17095
- quantity: usage,
17215
+ quantity: entitlement.usage,
17096
17216
  unit: getFeatureName(entitlement.feature)
17097
17217
  })
17098
17218
  ]
@@ -17115,7 +17235,10 @@ var Usage = ({ entitlements, updateQuantity, period }) => {
17115
17235
  $weight: theme.typography.text.fontWeight,
17116
17236
  $color: theme.typography.text.color,
17117
17237
  children: [
17118
- formatCurrency((price ?? 0) * quantity, currency),
17238
+ formatCurrency(
17239
+ (price ?? 0) * entitlement.quantity,
17240
+ currency
17241
+ ),
17119
17242
  /* @__PURE__ */ jsxs13("sub", { children: [
17120
17243
  "/",
17121
17244
  shortenPeriod(period)
@@ -17158,6 +17281,22 @@ var Usage = ({ entitlements, updateQuantity, period }) => {
17158
17281
 
17159
17282
  // src/components/shared/checkout-dialog/CheckoutDialog.tsx
17160
17283
  import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
17284
+ var createActiveUsageBasedEntitlementsReducer = (entitlements, period) => (acc, entitlement) => {
17285
+ if (entitlement.priceBehavior && (period === "month" && entitlement.meteredMonthlyPrice || period === "year" && entitlement.meteredYearlyPrice)) {
17286
+ const featureUsage = entitlements.find(
17287
+ (usage2) => usage2.feature?.id === entitlement.feature?.id
17288
+ );
17289
+ const allocation = featureUsage?.allocation || 0;
17290
+ const usage = featureUsage?.usage || 0;
17291
+ acc.push({
17292
+ ...entitlement,
17293
+ allocation,
17294
+ usage,
17295
+ quantity: allocation
17296
+ });
17297
+ }
17298
+ return acc;
17299
+ };
17161
17300
  var CheckoutDialog = ({ top = 0 }) => {
17162
17301
  const { t: t2 } = useTranslation();
17163
17302
  const theme = nt();
@@ -17191,34 +17330,21 @@ var CheckoutDialog = ({ top = 0 }) => {
17191
17330
  )
17192
17331
  }))
17193
17332
  );
17194
- const createActiveUsageBasedEntitlementsReducer = useCallback8(
17195
- (period = planPeriod) => (acc, entitlement) => {
17196
- if (entitlement.priceBehavior && (period === "month" && entitlement.meteredMonthlyPrice || period === "year" && entitlement.meteredYearlyPrice)) {
17197
- const featureUsage = data.featureUsage?.features.find(
17198
- (usage2) => usage2.feature?.id === entitlement.feature?.id
17199
- );
17200
- const allocation = featureUsage?.allocation ?? 0;
17201
- const usage = featureUsage?.usage ?? 0;
17202
- acc.push({
17203
- entitlement,
17204
- allocation,
17205
- quantity: allocation,
17206
- usage
17207
- });
17208
- }
17209
- return acc;
17210
- },
17211
- [planPeriod, data.featureUsage?.features]
17212
- );
17333
+ const currentEntitlements = useMemo5(() => {
17334
+ return data.featureUsage?.features || [];
17335
+ }, [data.featureUsage?.features]);
17213
17336
  const [usageBasedEntitlements, setUsageBasedEntitlements] = useState7(
17214
17337
  () => (selectedPlan?.entitlements || []).reduce(
17215
- createActiveUsageBasedEntitlementsReducer(),
17338
+ createActiveUsageBasedEntitlementsReducer(
17339
+ currentEntitlements,
17340
+ planPeriod
17341
+ ),
17216
17342
  []
17217
17343
  )
17218
17344
  );
17219
17345
  const payInAdvanceEntitlements = useMemo5(
17220
17346
  () => usageBasedEntitlements.filter(
17221
- ({ entitlement }) => entitlement.priceBehavior === "pay_in_advance"
17347
+ (entitlement) => entitlement.priceBehavior === "pay_in_advance"
17222
17348
  ),
17223
17349
  [usageBasedEntitlements]
17224
17350
  );
@@ -17310,8 +17436,8 @@ var CheckoutDialog = ({ top = 0 }) => {
17310
17436
  []
17311
17437
  ),
17312
17438
  payInAdvance: (updates.payInAdvanceEntitlements || payInAdvanceEntitlements).reduce(
17313
- (acc, { entitlement, quantity }) => {
17314
- const priceId = (period === "year" ? entitlement.meteredYearlyPrice : entitlement.meteredMonthlyPrice)?.priceId;
17439
+ (acc, { meteredMonthlyPrice, meteredYearlyPrice, quantity }) => {
17440
+ const priceId = (period === "year" ? meteredYearlyPrice : meteredMonthlyPrice)?.priceId;
17315
17441
  if (priceId) {
17316
17442
  acc.push({
17317
17443
  priceId,
@@ -17325,7 +17451,7 @@ var CheckoutDialog = ({ top = 0 }) => {
17325
17451
  promoCode: updates.promoCode || promoCode
17326
17452
  }
17327
17453
  });
17328
- setCharges(data2);
17454
+ setCharges(data2.finance);
17329
17455
  } catch (error2) {
17330
17456
  if (error2 instanceof ResponseError && error2.response.status === 401) {
17331
17457
  const data2 = await error2.response.json();
@@ -17360,7 +17486,7 @@ var CheckoutDialog = ({ top = 0 }) => {
17360
17486
  }
17361
17487
  const period = updates.period || planPeriod;
17362
17488
  const entitlements = plan.entitlements.reduce(
17363
- createActiveUsageBasedEntitlementsReducer(period),
17489
+ createActiveUsageBasedEntitlementsReducer(currentEntitlements, period),
17364
17490
  []
17365
17491
  );
17366
17492
  if (updates.plan) {
@@ -17371,16 +17497,11 @@ var CheckoutDialog = ({ top = 0 }) => {
17371
17497
  period,
17372
17498
  plan: updates.plan,
17373
17499
  payInAdvanceEntitlements: entitlements.filter(
17374
- ({ entitlement }) => entitlement.priceBehavior === "pay_in_advance"
17500
+ ({ priceBehavior }) => priceBehavior === "pay_in_advance"
17375
17501
  )
17376
17502
  });
17377
17503
  },
17378
- [
17379
- planPeriod,
17380
- selectedPlan,
17381
- createActiveUsageBasedEntitlementsReducer,
17382
- previewCheckout
17383
- ]
17504
+ [planPeriod, selectedPlan, currentEntitlements, previewCheckout]
17384
17505
  );
17385
17506
  const changePlanPeriod = useCallback8(
17386
17507
  (period) => {
@@ -17403,16 +17524,14 @@ var CheckoutDialog = ({ top = 0 }) => {
17403
17524
  (id, updatedQuantity) => {
17404
17525
  setUsageBasedEntitlements((prev2) => {
17405
17526
  const updated = prev2.map(
17406
- ({ entitlement, allocation, quantity, usage }) => entitlement.id === id ? {
17407
- entitlement,
17408
- allocation,
17409
- quantity: updatedQuantity,
17410
- usage
17411
- } : { entitlement, allocation, quantity, usage }
17527
+ (entitlement) => entitlement.id === id ? {
17528
+ ...entitlement,
17529
+ quantity: updatedQuantity
17530
+ } : entitlement
17412
17531
  );
17413
17532
  previewCheckout({
17414
17533
  payInAdvanceEntitlements: updated.filter(
17415
- ({ entitlement }) => entitlement.priceBehavior === "pay_in_advance"
17534
+ ({ priceBehavior }) => priceBehavior === "pay_in_advance"
17416
17535
  )
17417
17536
  });
17418
17537
  return updated;
@@ -17541,7 +17660,7 @@ var CheckoutDialog = ({ top = 0 }) => {
17541
17660
  $size: theme.typography.heading3.fontSize,
17542
17661
  $weight: theme.typography.heading3.fontWeight,
17543
17662
  $color: theme.typography.heading3.color,
17544
- $marginBottom: "0.5rem",
17663
+ style: { marginBottom: "0.5rem" },
17545
17664
  children: activeCheckoutStage.label
17546
17665
  }
17547
17666
  ),
@@ -17820,11 +17939,11 @@ var PeriodToggle = ({
17820
17939
  children: /* @__PURE__ */ jsx22(
17821
17940
  Text,
17822
17941
  {
17823
- $flexShrink: 0,
17824
17942
  $font: theme.typography.text.fontFamily,
17825
17943
  $size: 15,
17826
17944
  $weight: option === selectedOption ? 600 : 400,
17827
17945
  $color: theme.typography.text.color,
17946
+ style: { flexShrink: 0 },
17828
17947
  children: t2("Billed", { period: adjectify(option) })
17829
17948
  }
17830
17949
  )
@@ -17884,23 +18003,9 @@ var UnsubscribeDialog = ({ top = 0 }) => {
17884
18003
  ),
17885
18004
  [data.company?.plan, planPeriod, availablePlans]
17886
18005
  );
18006
+ const currentEntitlements = data.featureUsage?.features || [];
17887
18007
  const usageBasedEntitlements = (selectedPlan?.entitlements || []).reduce(
17888
- (acc, entitlement) => {
17889
- if (entitlement.priceBehavior && (planPeriod === "month" && entitlement.meteredMonthlyPrice || planPeriod === "year" && entitlement.meteredYearlyPrice)) {
17890
- const featureUsage = data.featureUsage?.features.find(
17891
- (usage2) => usage2.feature?.id === entitlement.feature?.id
17892
- );
17893
- const allocation = featureUsage?.allocation ?? 0;
17894
- const usage = featureUsage?.usage ?? 0;
17895
- acc.push({
17896
- entitlement,
17897
- allocation,
17898
- quantity: allocation,
17899
- usage
17900
- });
17901
- }
17902
- return acc;
17903
- },
18008
+ createActiveUsageBasedEntitlementsReducer(currentEntitlements, planPeriod),
17904
18009
  []
17905
18010
  );
17906
18011
  const addOns = useMemo7(
@@ -18223,21 +18328,18 @@ var RenderLayout = ({ children }) => {
18223
18328
  };
18224
18329
 
18225
18330
  // src/components/layout/viewport/styles.ts
18226
- var StyledViewport = dt(Box).attrs(({ theme }) => ({
18227
- $gridTemplateColumns: "repeat(1, minmax(300px, 1fr))",
18228
- $viewport: {
18229
- md: {
18230
- $gridTemplateColumns: `repeat(${theme.numberOfColumns}, minmax(300px, 1fr))`
18231
- }
18232
- }
18233
- })).withConfig({
18331
+ var StyledViewport = dt.div.withConfig({
18234
18332
  shouldForwardProp: (prop) => !["$numberOfColumns", "numberOfColumns"].includes(prop)
18235
18333
  })`
18236
18334
  display: grid;
18237
-
18335
+ grid-template-columns: repeat(1, minmax(300px, 1fr));
18238
18336
  margin-left: auto;
18239
18337
  margin-right: auto;
18240
18338
  gap: 1rem;
18339
+
18340
+ @media (min-width: 768px) {
18341
+ grid-template-columns: ${({ theme }) => lt`repeat(${theme.numberOfColumns}, minmax(300px, 1fr))`};
18342
+ }
18241
18343
  `;
18242
18344
 
18243
18345
  // src/components/layout/viewport/Viewport.tsx
@@ -18278,9 +18380,72 @@ var Viewport = forwardRef6(
18278
18380
  );
18279
18381
  Viewport.displayName = "Viewport";
18280
18382
 
18383
+ // src/components/elements/button/Button.tsx
18384
+ import { jsx as jsx27 } from "react/jsx-runtime";
18385
+ var resolveDesignProps = (props) => {
18386
+ return {
18387
+ button: {
18388
+ link: props.button?.link ?? "",
18389
+ openInNewTab: props.button?.openInNewTab ?? true,
18390
+ text: props.button?.text ?? "Button",
18391
+ style: props.button?.style ?? "primary",
18392
+ size: props.button?.size ?? "md",
18393
+ fullWidth: props.button?.fullWidth ?? true,
18394
+ alignment: props.button?.alignment ?? "center",
18395
+ selfAlignment: props.button?.selfAlignment ?? "center"
18396
+ }
18397
+ };
18398
+ };
18399
+ var ButtonElement = forwardRef7(({ children, className, ...rest }, ref) => {
18400
+ const props = resolveDesignProps(rest);
18401
+ const buttonStyles = {
18402
+ primary: {
18403
+ color: "primary",
18404
+ variant: "filled"
18405
+ },
18406
+ secondary: {
18407
+ color: "primary",
18408
+ variant: "outline"
18409
+ },
18410
+ tertiary: {
18411
+ color: "primary",
18412
+ variant: "text"
18413
+ }
18414
+ };
18415
+ return /* @__PURE__ */ jsx27(
18416
+ Element,
18417
+ {
18418
+ as: Flex,
18419
+ ref,
18420
+ className,
18421
+ $flexDirection: "column",
18422
+ $gap: "2rem",
18423
+ children: /* @__PURE__ */ jsx27(
18424
+ EmbedButton,
18425
+ {
18426
+ as: "a",
18427
+ href: props.button.link,
18428
+ target: props.button.openInNewTab ? "_blank" : "_self",
18429
+ $size: props.button.size,
18430
+ $color: buttonStyles[props.button.style].color,
18431
+ $variant: buttonStyles[props.button.style].variant,
18432
+ $alignment: props.button.alignment,
18433
+ $selfAlignment: props.button.selfAlignment,
18434
+ $fullWidth: props.button.fullWidth,
18435
+ children: props.button.text
18436
+ }
18437
+ )
18438
+ }
18439
+ );
18440
+ });
18441
+ ButtonElement.displayName = "Button";
18442
+
18443
+ // src/components/elements/included-features/IncludedFeatures.tsx
18444
+ import { forwardRef as forwardRef8, useMemo as useMemo9, useRef as useRef7, useState as useState12 } from "react";
18445
+
18281
18446
  // src/components/elements/included-features/Details.tsx
18282
18447
  import { useMemo as useMemo8 } from "react";
18283
- import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
18448
+ import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
18284
18449
  var Details = ({
18285
18450
  shouldWrapChildren,
18286
18451
  featureUsage,
@@ -18379,7 +18544,7 @@ var Details = ({
18379
18544
  $flexGrow: "1",
18380
18545
  $textAlign: shouldWrapChildren ? "left" : "right",
18381
18546
  children: [
18382
- props.entitlement.isVisible && /* @__PURE__ */ jsx27(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsx27(
18547
+ props.entitlement.isVisible && /* @__PURE__ */ jsx28(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsx28(
18383
18548
  Text,
18384
18549
  {
18385
18550
  $font: theme.typography[props.entitlement.fontStyle].fontFamily,
@@ -18390,7 +18555,7 @@ var Details = ({
18390
18555
  children: text
18391
18556
  }
18392
18557
  ) }),
18393
- props.usage.isVisible && usageText && /* @__PURE__ */ jsx27(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsx27(
18558
+ props.usage.isVisible && usageText && /* @__PURE__ */ jsx28(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsx28(
18394
18559
  Text,
18395
18560
  {
18396
18561
  $font: theme.typography[props.usage.fontStyle].fontFamily,
@@ -18407,8 +18572,8 @@ var Details = ({
18407
18572
  };
18408
18573
 
18409
18574
  // src/components/elements/included-features/IncludedFeatures.tsx
18410
- import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
18411
- function resolveDesignProps(props) {
18575
+ import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
18576
+ function resolveDesignProps2(props) {
18412
18577
  return {
18413
18578
  header: {
18414
18579
  isVisible: props.header?.isVisible ?? true,
@@ -18436,8 +18601,8 @@ function resolveDesignProps(props) {
18436
18601
  visibleFeatures: props.visibleFeatures
18437
18602
  };
18438
18603
  }
18439
- var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18440
- const props = resolveDesignProps(rest);
18604
+ var IncludedFeatures = forwardRef8(({ className, ...rest }, ref) => {
18605
+ const props = resolveDesignProps2(rest);
18441
18606
  const { t: t2 } = useTranslation();
18442
18607
  const theme = nt();
18443
18608
  const { data } = useEmbed();
@@ -18481,7 +18646,7 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18481
18646
  $flexDirection: "column",
18482
18647
  $gap: "1rem",
18483
18648
  children: [
18484
- props.header.isVisible && /* @__PURE__ */ jsx28(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx28(
18649
+ props.header.isVisible && /* @__PURE__ */ jsx29(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx29(
18485
18650
  Text,
18486
18651
  {
18487
18652
  $font: theme.typography[props.header.fontStyle].fontFamily,
@@ -18515,7 +18680,7 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18515
18680
  $flexBasis: "min-content",
18516
18681
  $gap: "1rem",
18517
18682
  children: [
18518
- props.icons.isVisible && feature?.icon && /* @__PURE__ */ jsx28(
18683
+ props.icons.isVisible && feature?.icon && /* @__PURE__ */ jsx29(
18519
18684
  IconRound,
18520
18685
  {
18521
18686
  name: feature.icon,
@@ -18526,7 +18691,7 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18526
18691
  ]
18527
18692
  }
18528
18693
  ),
18529
- feature?.name && /* @__PURE__ */ jsx28(
18694
+ feature?.name && /* @__PURE__ */ jsx29(
18530
18695
  Text,
18531
18696
  {
18532
18697
  $font: theme.typography[props.icons.fontStyle].fontFamily,
@@ -18556,7 +18721,7 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18556
18721
  ]
18557
18722
  }
18558
18723
  ),
18559
- shouldShowDetails && /* @__PURE__ */ jsx28(
18724
+ shouldShowDetails && /* @__PURE__ */ jsx29(
18560
18725
  Details,
18561
18726
  {
18562
18727
  featureUsage: usage,
@@ -18570,7 +18735,7 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18570
18735
  );
18571
18736
  }),
18572
18737
  shouldShowExpand && /* @__PURE__ */ jsxs22(Flex, { $alignItems: "center", $justifyContent: "start", $marginTop: "1rem", children: [
18573
- /* @__PURE__ */ jsx28(
18738
+ /* @__PURE__ */ jsx29(
18574
18739
  Icon2,
18575
18740
  {
18576
18741
  name: isExpanded ? "chevron-up" : "chevron-down",
@@ -18582,7 +18747,7 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18582
18747
  }
18583
18748
  }
18584
18749
  ),
18585
- /* @__PURE__ */ jsx28(
18750
+ /* @__PURE__ */ jsx29(
18586
18751
  Text,
18587
18752
  {
18588
18753
  onClick: handleToggleShowAll,
@@ -18603,9 +18768,9 @@ var IncludedFeatures = forwardRef7(({ className, ...rest }, ref) => {
18603
18768
  IncludedFeatures.displayName = "IncludedFeatures";
18604
18769
 
18605
18770
  // src/components/elements/invoices/Invoices.tsx
18606
- import { forwardRef as forwardRef8, useEffect as useEffect6, useState as useState13 } from "react";
18607
- import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
18608
- function resolveDesignProps2(props) {
18771
+ import { forwardRef as forwardRef9, useEffect as useEffect6, useState as useState13 } from "react";
18772
+ import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
18773
+ function resolveDesignProps3(props) {
18609
18774
  return {
18610
18775
  header: {
18611
18776
  isVisible: props.header?.isVisible ?? true,
@@ -18638,7 +18803,7 @@ function formatInvoices(invoices = []) {
18638
18803
  }
18639
18804
  var InvoiceDate = ({ date, fontStyle, url }) => {
18640
18805
  const theme = nt();
18641
- const dateText = /* @__PURE__ */ jsx29(
18806
+ const dateText = /* @__PURE__ */ jsx30(
18642
18807
  Text,
18643
18808
  {
18644
18809
  ...url && { onClick: () => {
@@ -18651,12 +18816,12 @@ var InvoiceDate = ({ date, fontStyle, url }) => {
18651
18816
  }
18652
18817
  );
18653
18818
  if (url) {
18654
- return /* @__PURE__ */ jsx29("a", { href: url, target: "_blank", rel: "noreferrer", children: dateText });
18819
+ return /* @__PURE__ */ jsx30("a", { href: url, target: "_blank", rel: "noreferrer", children: dateText });
18655
18820
  }
18656
18821
  return dateText;
18657
18822
  };
18658
- var Invoices = forwardRef8(({ className, data, ...rest }, ref) => {
18659
- const props = resolveDesignProps2(rest);
18823
+ var Invoices = forwardRef9(({ className, data, ...rest }, ref) => {
18824
+ const props = resolveDesignProps3(rest);
18660
18825
  const { t: t2 } = useTranslation();
18661
18826
  const theme = nt();
18662
18827
  const { api } = useEmbed();
@@ -18675,8 +18840,8 @@ var Invoices = forwardRef8(({ className, data, ...rest }, ref) => {
18675
18840
  if (invoices.length === 0) {
18676
18841
  return null;
18677
18842
  }
18678
- return /* @__PURE__ */ jsx29(Element, { ref, className, children: /* @__PURE__ */ jsxs23(Flex, { $flexDirection: "column", $gap: "1rem", children: [
18679
- props.header.isVisible && /* @__PURE__ */ jsx29(Flex, { $justifyContent: "space-between", $alignItems: "center", children: /* @__PURE__ */ jsx29(
18843
+ return /* @__PURE__ */ jsx30(Element, { ref, className, children: /* @__PURE__ */ jsxs23(Flex, { $flexDirection: "column", $gap: "1rem", children: [
18844
+ props.header.isVisible && /* @__PURE__ */ jsx30(Flex, { $justifyContent: "space-between", $alignItems: "center", children: /* @__PURE__ */ jsx30(
18680
18845
  Text,
18681
18846
  {
18682
18847
  $font: theme.typography[props.header.fontStyle].fontFamily,
@@ -18686,9 +18851,9 @@ var Invoices = forwardRef8(({ className, data, ...rest }, ref) => {
18686
18851
  children: t2("Invoices")
18687
18852
  }
18688
18853
  ) }),
18689
- /* @__PURE__ */ jsx29(Flex, { $flexDirection: "column", $gap: "0.5rem", children: invoices.slice(0, listSize).map(({ date, amount, url }, index) => {
18854
+ /* @__PURE__ */ jsx30(Flex, { $flexDirection: "column", $gap: "0.5rem", children: invoices.slice(0, listSize).map(({ date, amount, url }, index) => {
18690
18855
  return /* @__PURE__ */ jsxs23(Flex, { $justifyContent: "space-between", children: [
18691
- props.date.isVisible && date && /* @__PURE__ */ jsx29(
18856
+ props.date.isVisible && date && /* @__PURE__ */ jsx30(
18692
18857
  InvoiceDate,
18693
18858
  {
18694
18859
  date,
@@ -18696,7 +18861,7 @@ var Invoices = forwardRef8(({ className, data, ...rest }, ref) => {
18696
18861
  url
18697
18862
  }
18698
18863
  ),
18699
- props.amount.isVisible && /* @__PURE__ */ jsx29(
18864
+ props.amount.isVisible && /* @__PURE__ */ jsx30(
18700
18865
  Text,
18701
18866
  {
18702
18867
  $font: theme.typography[props.amount.fontStyle].fontFamily,
@@ -18709,14 +18874,14 @@ var Invoices = forwardRef8(({ className, data, ...rest }, ref) => {
18709
18874
  ] }, index);
18710
18875
  }) }),
18711
18876
  props.collapse.isVisible && invoices.length > props.limit.number && /* @__PURE__ */ jsxs23(Flex, { $alignItems: "center", $gap: "0.5rem", children: [
18712
- /* @__PURE__ */ jsx29(
18877
+ /* @__PURE__ */ jsx30(
18713
18878
  Icon2,
18714
18879
  {
18715
18880
  name: `chevron-${listSize === props.limit.number ? "down" : "up"}`,
18716
18881
  style: { color: "#D0D0D0" }
18717
18882
  }
18718
18883
  ),
18719
- /* @__PURE__ */ jsx29(
18884
+ /* @__PURE__ */ jsx30(
18720
18885
  Text,
18721
18886
  {
18722
18887
  onClick: toggleListSize,
@@ -18733,10 +18898,11 @@ var Invoices = forwardRef8(({ className, data, ...rest }, ref) => {
18733
18898
  Invoices.displayName = "Invoices";
18734
18899
 
18735
18900
  // src/components/elements/metered-features/MeteredFeatures.tsx
18736
- import { forwardRef as forwardRef9, useMemo as useMemo10, useRef as useRef8 } from "react";
18901
+ import { forwardRef as forwardRef10, useMemo as useMemo10, useRef as useRef8 } from "react";
18737
18902
 
18738
18903
  // src/components/elements/metered-features/styles.ts
18739
- var Container4 = dt(Flex)`
18904
+ var Container4 = dt.div`
18905
+ display: flex;
18740
18906
  flex-direction: column;
18741
18907
  gap: 1rem;
18742
18908
 
@@ -18775,8 +18941,8 @@ var Container4 = dt(Flex)`
18775
18941
  `;
18776
18942
 
18777
18943
  // src/components/elements/metered-features/MeteredFeatures.tsx
18778
- import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
18779
- function resolveDesignProps3(props) {
18944
+ import { Fragment as Fragment10, jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
18945
+ function resolveDesignProps4(props) {
18780
18946
  return {
18781
18947
  isVisible: props.isVisible ?? true,
18782
18948
  header: {
@@ -18801,8 +18967,8 @@ function resolveDesignProps3(props) {
18801
18967
  visibleFeatures: props.visibleFeatures
18802
18968
  };
18803
18969
  }
18804
- var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18805
- const props = resolveDesignProps3(rest);
18970
+ var MeteredFeatures = forwardRef10(({ className, ...rest }, ref) => {
18971
+ const props = resolveDesignProps4(rest);
18806
18972
  const elements = useRef8([]);
18807
18973
  const shouldWrapChildren = useWrapChildren(elements.current);
18808
18974
  const { t: t2 } = useTranslation();
@@ -18831,7 +18997,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18831
18997
  if (!shouldShowFeatures) {
18832
18998
  return null;
18833
18999
  }
18834
- return /* @__PURE__ */ jsx30(Container4, { ref, className, children: featureUsage.map(
19000
+ return /* @__PURE__ */ jsx31(Container4, { ref, className, children: featureUsage.map(
18835
19001
  ({
18836
19002
  feature,
18837
19003
  priceBehavior,
@@ -18847,7 +19013,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18847
19013
  const { price, currency } = getBillingPrice(
18848
19014
  planPeriod === "year" ? yearlyUsageBasedPrice : monthlyUsageBasedPrice
18849
19015
  ) || {};
18850
- const progressBar = props.isVisible && typeof usage === "number" && limit > 0 && priceBehavior !== "pay_as_you_go" && /* @__PURE__ */ jsx30(
19016
+ const progressBar = props.isVisible && typeof usage === "number" && limit > 0 && priceBehavior !== "pay_as_you_go" && /* @__PURE__ */ jsx31(
18851
19017
  ProgressBar,
18852
19018
  {
18853
19019
  progress: (isOverage ? softLimit / usage : usage / limit) * 100,
@@ -18873,7 +19039,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18873
19039
  $borderBottomRightRadius: `${theme.card.borderRadius / TEXT_BASE_SIZE}rem`
18874
19040
  },
18875
19041
  children: [
18876
- /* @__PURE__ */ jsx30(
19042
+ /* @__PURE__ */ jsx31(
18877
19043
  Text,
18878
19044
  {
18879
19045
  $font: theme.typography.text.fontFamily,
@@ -18921,7 +19087,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18921
19087
  }
18922
19088
  ),
18923
19089
  /* @__PURE__ */ jsxs24(Element, { as: Flex, $gap: "1.5rem", children: [
18924
- props.icon.isVisible && feature?.icon && /* @__PURE__ */ jsx30(
19090
+ props.icon.isVisible && feature?.icon && /* @__PURE__ */ jsx31(
18925
19091
  IconRound,
18926
19092
  {
18927
19093
  name: feature.icon,
@@ -18945,7 +19111,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18945
19111
  $gap: "1rem",
18946
19112
  children: [
18947
19113
  feature?.name && /* @__PURE__ */ jsxs24(Flex, { $flexDirection: "column", $gap: "0.5rem", $flexGrow: 1, children: [
18948
- /* @__PURE__ */ jsx30(
19114
+ /* @__PURE__ */ jsx31(
18949
19115
  Text,
18950
19116
  {
18951
19117
  as: Box,
@@ -18961,7 +19127,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18961
19127
  ] }) : feature.name
18962
19128
  }
18963
19129
  ),
18964
- props.description.isVisible && /* @__PURE__ */ jsx30(
19130
+ props.description.isVisible && /* @__PURE__ */ jsx31(
18965
19131
  Text,
18966
19132
  {
18967
19133
  as: Box,
@@ -18980,7 +19146,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
18980
19146
  $flexGrow: 1,
18981
19147
  $textAlign: shouldWrapChildren ? "left" : "right",
18982
19148
  children: [
18983
- props.usage.isVisible && /* @__PURE__ */ jsx30(
19149
+ props.usage.isVisible && /* @__PURE__ */ jsx31(
18984
19150
  Text,
18985
19151
  {
18986
19152
  as: Box,
@@ -19004,7 +19170,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
19004
19170
  ] })
19005
19171
  }
19006
19172
  ),
19007
- props.allocation.isVisible && priceBehavior !== "overage" && /* @__PURE__ */ jsx30(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsx30(
19173
+ props.allocation.isVisible && priceBehavior !== "overage" && /* @__PURE__ */ jsx31(Box, { $whiteSpace: "nowrap", children: /* @__PURE__ */ jsx31(
19008
19174
  Text,
19009
19175
  {
19010
19176
  $font: theme.typography[props.allocation.fontStyle].fontFamily,
@@ -19030,11 +19196,11 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
19030
19196
  }
19031
19197
  ),
19032
19198
  props.isVisible && typeof usage === "number" && priceBehavior !== "pay_as_you_go" && /* @__PURE__ */ jsxs24(Flex, { $gap: "2rem", children: [
19033
- typeof allocation === "number" ? /* @__PURE__ */ jsx30(
19199
+ typeof allocation === "number" ? /* @__PURE__ */ jsx31(
19034
19200
  Tooltip,
19035
19201
  {
19036
19202
  trigger: progressBar,
19037
- content: /* @__PURE__ */ jsx30(
19203
+ content: /* @__PURE__ */ jsx31(
19038
19204
  Text,
19039
19205
  {
19040
19206
  $font: theme.typography.text.fontFamily,
@@ -19051,7 +19217,7 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
19051
19217
  $flexGrow: 1
19052
19218
  }
19053
19219
  ) : progressBar,
19054
- priceBehavior === "pay_in_advance" && /* @__PURE__ */ jsx30(
19220
+ priceBehavior === "pay_in_advance" && /* @__PURE__ */ jsx31(
19055
19221
  EmbedButton,
19056
19222
  {
19057
19223
  onClick: () => {
@@ -19075,11 +19241,11 @@ var MeteredFeatures = forwardRef9(({ className, ...rest }, ref) => {
19075
19241
  MeteredFeatures.displayName = "MeteredFeatures";
19076
19242
 
19077
19243
  // src/components/elements/payment-method/PaymentMethod.tsx
19078
- import { forwardRef as forwardRef10, useMemo as useMemo12 } from "react";
19244
+ import { forwardRef as forwardRef11, useMemo as useMemo12 } from "react";
19079
19245
 
19080
19246
  // src/components/elements/payment-method/PaymentMethodElement.tsx
19081
19247
  import { useMemo as useMemo11 } from "react";
19082
- import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
19248
+ import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
19083
19249
  var PaymentElement2 = ({
19084
19250
  iconName,
19085
19251
  iconTitle,
@@ -19088,17 +19254,17 @@ var PaymentElement2 = ({
19088
19254
  paymentLast4
19089
19255
  }) => {
19090
19256
  const theme = nt();
19091
- return /* @__PURE__ */ jsx31(Text, { $font: theme.typography.text.fontFamily, $size: 16, children: /* @__PURE__ */ jsxs25(Flex, { $flexDirection: "row", $alignItems: "center", $gap: "0.5rem", children: [
19092
- iconName && /* @__PURE__ */ jsx31(Box, { children: /* @__PURE__ */ jsx31(Icon2, { name: iconName, title: iconTitle, style: iconStyles }) }),
19257
+ return /* @__PURE__ */ jsx32(Text, { $font: theme.typography.text.fontFamily, $size: 16, children: /* @__PURE__ */ jsxs25(Flex, { $flexDirection: "row", $alignItems: "center", $gap: "0.5rem", children: [
19258
+ iconName && /* @__PURE__ */ jsx32(Box, { children: /* @__PURE__ */ jsx32(Icon2, { name: iconName, title: iconTitle, style: iconStyles }) }),
19093
19259
  /* @__PURE__ */ jsxs25(Flex, { $alignItems: "center", children: [
19094
- /* @__PURE__ */ jsx31(Box, { $lineHeight: "1", $marginRight: "4px", children: t(label) }),
19095
- paymentLast4 && /* @__PURE__ */ jsx31(Box, { $display: "inline-block", $fontWeight: "bold", children: paymentLast4 })
19260
+ /* @__PURE__ */ jsx32(Box, { $lineHeight: "1", $marginRight: "4px", children: t(label) }),
19261
+ paymentLast4 && /* @__PURE__ */ jsx32(Box, { $display: "inline-block", $fontWeight: "bold", children: paymentLast4 })
19096
19262
  ] })
19097
19263
  ] }) });
19098
19264
  };
19099
19265
  var EmptyPaymentElement = () => {
19100
19266
  const theme = nt();
19101
- return /* @__PURE__ */ jsx31(Text, { $font: theme.typography.text.fontFamily, $size: 16, children: /* @__PURE__ */ jsx31(Flex, { $flexDirection: "row", $alignItems: "center", children: /* @__PURE__ */ jsx31(Flex, { $alignItems: "center", children: /* @__PURE__ */ jsx31(Box, { $lineHeight: "1", $marginRight: "4px", children: t("No payment method selected") }) }) }) });
19267
+ return /* @__PURE__ */ jsx32(Text, { $font: theme.typography.text.fontFamily, $size: 16, children: /* @__PURE__ */ jsx32(Flex, { $flexDirection: "row", $alignItems: "center", children: /* @__PURE__ */ jsx32(Flex, { $alignItems: "center", children: /* @__PURE__ */ jsx32(Box, { $lineHeight: "1", $marginRight: "4px", children: t("No payment method selected") }) }) }) });
19102
19268
  };
19103
19269
  var getPaymentMethodData = ({
19104
19270
  accountLast4,
@@ -19189,7 +19355,7 @@ var PaymentMethodElement = ({
19189
19355
  }
19190
19356
  return /* @__PURE__ */ jsxs25(Flex, { $flexDirection: "column", $gap: `${sizeFactor}rem`, children: [
19191
19357
  props.header.isVisible && /* @__PURE__ */ jsxs25(Flex, { $justifyContent: "space-between", $alignItems: "center", children: [
19192
- /* @__PURE__ */ jsx31(
19358
+ /* @__PURE__ */ jsx32(
19193
19359
  Text,
19194
19360
  {
19195
19361
  $font: theme.typography[props.header.fontStyle].fontFamily,
@@ -19199,7 +19365,7 @@ var PaymentMethodElement = ({
19199
19365
  children: t2("Payment Method")
19200
19366
  }
19201
19367
  ),
19202
- props.functions.showExpiration && typeof monthsToExpiration === "number" && monthsToExpiration < 4 && /* @__PURE__ */ jsx31(
19368
+ props.functions.showExpiration && typeof monthsToExpiration === "number" && monthsToExpiration < 4 && /* @__PURE__ */ jsx32(
19203
19369
  Text,
19204
19370
  {
19205
19371
  $font: theme.typography.text.fontFamily,
@@ -19219,15 +19385,15 @@ var PaymentMethodElement = ({
19219
19385
  $padding: `${sizeFactor / 2.2}rem ${sizeFactor}rem`,
19220
19386
  $borderRadius: "9999px",
19221
19387
  children: [
19222
- paymentMethod && /* @__PURE__ */ jsx31(
19388
+ paymentMethod && /* @__PURE__ */ jsx32(
19223
19389
  PaymentElement2,
19224
19390
  {
19225
19391
  ...getPaymentMethodData(paymentMethod),
19226
19392
  ...getIconStyles({ size, theme })
19227
19393
  }
19228
19394
  ),
19229
- !paymentMethod && /* @__PURE__ */ jsx31(EmptyPaymentElement, {}),
19230
- props.functions.allowEdit && onEdit && /* @__PURE__ */ jsx31(
19395
+ !paymentMethod && /* @__PURE__ */ jsx32(EmptyPaymentElement, {}),
19396
+ props.functions.allowEdit && onEdit && /* @__PURE__ */ jsx32(
19231
19397
  Text,
19232
19398
  {
19233
19399
  onClick: onEdit,
@@ -19281,8 +19447,8 @@ var PaymentListElement = ({
19281
19447
  $font: theme.typography.text.fontFamily,
19282
19448
  $color: theme.typography.text.color,
19283
19449
  children: [
19284
- /* @__PURE__ */ jsx31(Box, { $paddingLeft: "0.5rem", $paddingRight: "0.5rem", children: iconName && /* @__PURE__ */ jsx31(Icon2, { name: iconName, title: iconTitle, style: iconStyles }) }),
19285
- /* @__PURE__ */ jsx31(Box, { $flexGrow: "1", children: /* @__PURE__ */ jsxs25(
19450
+ /* @__PURE__ */ jsx32(Box, { $paddingLeft: "0.5rem", $paddingRight: "0.5rem", children: iconName && /* @__PURE__ */ jsx32(Icon2, { name: iconName, title: iconTitle, style: iconStyles }) }),
19451
+ /* @__PURE__ */ jsx32(Box, { $flexGrow: "1", children: /* @__PURE__ */ jsxs25(
19286
19452
  Text,
19287
19453
  {
19288
19454
  $font: theme.typography.text.fontFamily,
@@ -19296,12 +19462,12 @@ var PaymentListElement = ({
19296
19462
  ]
19297
19463
  }
19298
19464
  ) }),
19299
- /* @__PURE__ */ jsx31(
19465
+ /* @__PURE__ */ jsx32(
19300
19466
  Box,
19301
19467
  {
19302
19468
  $flexGrow: "1",
19303
19469
  $color: isLightBackground ? "hsla(0, 0%, 0%, 0.375)" : "hsla(0, 0%, 100%, 0.375)",
19304
- children: /* @__PURE__ */ jsx31(
19470
+ children: /* @__PURE__ */ jsx32(
19305
19471
  Text,
19306
19472
  {
19307
19473
  $font: theme.typography.text.fontFamily,
@@ -19313,7 +19479,7 @@ var PaymentListElement = ({
19313
19479
  )
19314
19480
  }
19315
19481
  ),
19316
- /* @__PURE__ */ jsx31(Box, { children: /* @__PURE__ */ jsx31(
19482
+ /* @__PURE__ */ jsx32(Box, { children: /* @__PURE__ */ jsx32(
19317
19483
  Text,
19318
19484
  {
19319
19485
  onClick: () => {
@@ -19326,7 +19492,7 @@ var PaymentListElement = ({
19326
19492
  children: t("Set default")
19327
19493
  }
19328
19494
  ) }),
19329
- /* @__PURE__ */ jsx31(
19495
+ /* @__PURE__ */ jsx32(
19330
19496
  Box,
19331
19497
  {
19332
19498
  $cursor: "pointer",
@@ -19334,7 +19500,7 @@ var PaymentListElement = ({
19334
19500
  onClick: () => {
19335
19501
  handleDelete(paymentMethod.id);
19336
19502
  },
19337
- children: /* @__PURE__ */ jsx31(
19503
+ children: /* @__PURE__ */ jsx32(
19338
19504
  Icon2,
19339
19505
  {
19340
19506
  name: "close",
@@ -19352,8 +19518,8 @@ var PaymentListElement = ({
19352
19518
  };
19353
19519
 
19354
19520
  // src/components/elements/payment-method/PaymentMethod.tsx
19355
- import { jsx as jsx32 } from "react/jsx-runtime";
19356
- var resolveDesignProps4 = (props) => {
19521
+ import { jsx as jsx33 } from "react/jsx-runtime";
19522
+ var resolveDesignProps5 = (props) => {
19357
19523
  return {
19358
19524
  header: {
19359
19525
  isVisible: props.header?.isVisible ?? true,
@@ -19365,8 +19531,8 @@ var resolveDesignProps4 = (props) => {
19365
19531
  }
19366
19532
  };
19367
19533
  };
19368
- var PaymentMethod = forwardRef10(({ children, className, portal, allowEdit = true, ...rest }, ref) => {
19369
- const props = resolveDesignProps4(rest);
19534
+ var PaymentMethod = forwardRef11(({ children, className, portal, allowEdit = true, ...rest }, ref) => {
19535
+ const props = resolveDesignProps5(rest);
19370
19536
  const { data, setLayout } = useEmbed();
19371
19537
  const paymentMethod = useMemo12(() => {
19372
19538
  return data.subscription?.paymentMethod;
@@ -19384,7 +19550,7 @@ var PaymentMethod = forwardRef10(({ children, className, portal, allowEdit = tru
19384
19550
  }
19385
19551
  return expiration;
19386
19552
  }, [paymentMethod?.cardExpYear, paymentMethod?.cardExpMonth]);
19387
- return /* @__PURE__ */ jsx32(Element, { ref, className, children: /* @__PURE__ */ jsx32(
19553
+ return /* @__PURE__ */ jsx33(Element, { ref, className, children: /* @__PURE__ */ jsx33(
19388
19554
  PaymentMethodElement,
19389
19555
  {
19390
19556
  paymentMethod,
@@ -19399,8 +19565,8 @@ PaymentMethod.displayName = "PaymentMethod";
19399
19565
  // src/components/elements/payment-method/PaymentMethodDetails.tsx
19400
19566
  import { Elements } from "@stripe/react-stripe-js";
19401
19567
  import { useCallback as useCallback10, useEffect as useEffect7, useMemo as useMemo13, useState as useState14 } from "react";
19402
- import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
19403
- var resolveDesignProps5 = () => {
19568
+ import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
19569
+ var resolveDesignProps6 = () => {
19404
19570
  return {
19405
19571
  header: {
19406
19572
  isVisible: true,
@@ -19415,7 +19581,7 @@ var resolveDesignProps5 = () => {
19415
19581
  var PaymentMethodDetails = ({
19416
19582
  setPaymentMethodId
19417
19583
  }) => {
19418
- const props = resolveDesignProps5();
19584
+ const props = resolveDesignProps6();
19419
19585
  const { t: t2 } = useTranslation();
19420
19586
  const theme = nt();
19421
19587
  const { api, data, setData } = useEmbed();
@@ -19533,7 +19699,7 @@ var PaymentMethodDetails = ({
19533
19699
  [api, data, setData, t2]
19534
19700
  );
19535
19701
  return /* @__PURE__ */ jsxs26(Flex, { $position: "relative", children: [
19536
- isLoading && /* @__PURE__ */ jsx33(
19702
+ isLoading && /* @__PURE__ */ jsx34(
19537
19703
  Flex,
19538
19704
  {
19539
19705
  $position: "absolute",
@@ -19545,7 +19711,7 @@ var PaymentMethodDetails = ({
19545
19711
  $zIndex: 1,
19546
19712
  $backgroundColor: "black",
19547
19713
  $opacity: 0.5,
19548
- children: /* @__PURE__ */ jsx33(Loader, { $size: "2xl" })
19714
+ children: /* @__PURE__ */ jsx34(Loader, { $color: theme.primary, $size: "2xl" })
19549
19715
  }
19550
19716
  ),
19551
19717
  /* @__PURE__ */ jsxs26(
@@ -19558,7 +19724,7 @@ var PaymentMethodDetails = ({
19558
19724
  $backgroundColor: isLightBackground ? "hsla(0, 0%, 0%, 0.025)" : "hsla(0, 0%, 100%, 0.025)",
19559
19725
  $overflow: "auto",
19560
19726
  children: [
19561
- showPaymentForm ? /* @__PURE__ */ jsx33(
19727
+ showPaymentForm ? /* @__PURE__ */ jsx34(
19562
19728
  Elements,
19563
19729
  {
19564
19730
  stripe,
@@ -19587,7 +19753,7 @@ var PaymentMethodDetails = ({
19587
19753
  },
19588
19754
  clientSecret: setupIntent?.setupIntentClientSecret
19589
19755
  },
19590
- children: /* @__PURE__ */ jsx33(
19756
+ children: /* @__PURE__ */ jsx34(
19591
19757
  PaymentForm,
19592
19758
  {
19593
19759
  onConfirm: async (paymentMethodId) => {
@@ -19599,7 +19765,7 @@ var PaymentMethodDetails = ({
19599
19765
  )
19600
19766
  }
19601
19767
  ) : /* @__PURE__ */ jsxs26(Flex, { $flexDirection: "column", $gap: "2rem", children: [
19602
- /* @__PURE__ */ jsx33(
19768
+ /* @__PURE__ */ jsx34(
19603
19769
  PaymentMethodElement,
19604
19770
  {
19605
19771
  size: "lg",
@@ -19608,7 +19774,7 @@ var PaymentMethodDetails = ({
19608
19774
  ...props
19609
19775
  }
19610
19776
  ),
19611
- (data.company?.paymentMethods || []).length > 0 && /* @__PURE__ */ jsx33(Box, { children: /* @__PURE__ */ jsxs26(
19777
+ (data.company?.paymentMethods || []).length > 0 && /* @__PURE__ */ jsx34(Box, { children: /* @__PURE__ */ jsxs26(
19612
19778
  Text,
19613
19779
  {
19614
19780
  onClick: dropDownDifferentPaymentMethods,
@@ -19618,7 +19784,7 @@ var PaymentMethodDetails = ({
19618
19784
  $color: theme.typography.link.color,
19619
19785
  children: [
19620
19786
  t2("Choose different payment method"),
19621
- /* @__PURE__ */ jsx33(
19787
+ /* @__PURE__ */ jsx34(
19622
19788
  Icon2,
19623
19789
  {
19624
19790
  name: "chevron-down",
@@ -19634,9 +19800,9 @@ var PaymentMethodDetails = ({
19634
19800
  ]
19635
19801
  }
19636
19802
  ) }),
19637
- showDifferentPaymentMethods && /* @__PURE__ */ jsx33(Flex, { $flexDirection: "column", $overflowY: "hidden", $height: "10rem", children: /* @__PURE__ */ jsx33(Flex, { $flexDirection: "column", $overflowY: "scroll", children: (data.company?.paymentMethods.filter(
19803
+ showDifferentPaymentMethods && /* @__PURE__ */ jsx34(Flex, { $flexDirection: "column", $overflowY: "hidden", $height: "10rem", children: /* @__PURE__ */ jsx34(Flex, { $flexDirection: "column", $overflowY: "scroll", children: (data.company?.paymentMethods.filter(
19638
19804
  (pm) => pm.id !== paymentMethod?.id
19639
- ) || []).map((paymentMethod2) => /* @__PURE__ */ jsx33(
19805
+ ) || []).map((paymentMethod2) => /* @__PURE__ */ jsx34(
19640
19806
  PaymentListElement,
19641
19807
  {
19642
19808
  paymentMethod: paymentMethod2,
@@ -19645,9 +19811,9 @@ var PaymentMethodDetails = ({
19645
19811
  },
19646
19812
  paymentMethod2.id
19647
19813
  )) }) }),
19648
- (!paymentMethod || showDifferentPaymentMethods) && /* @__PURE__ */ jsx33(EmbedButton, { onClick: createSetupIntent, size: "lg", children: t2("Add new payment method") })
19814
+ (!paymentMethod || showDifferentPaymentMethods) && /* @__PURE__ */ jsx34(EmbedButton, { onClick: createSetupIntent, size: "lg", children: t2("Add new payment method") })
19649
19815
  ] }),
19650
- !isLoading && error && /* @__PURE__ */ jsx33(Box, { children: /* @__PURE__ */ jsx33(
19816
+ !isLoading && error && /* @__PURE__ */ jsx34(Box, { children: /* @__PURE__ */ jsx34(
19651
19817
  Text,
19652
19818
  {
19653
19819
  $font: theme.typography.text.fontFamily,
@@ -19664,9 +19830,9 @@ var PaymentMethodDetails = ({
19664
19830
  };
19665
19831
 
19666
19832
  // src/components/elements/plan-manager/PlanManager.tsx
19667
- import { forwardRef as forwardRef11, useMemo as useMemo14 } from "react";
19668
- import { Fragment as Fragment11, jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
19669
- var resolveDesignProps6 = (props) => {
19833
+ import { forwardRef as forwardRef12, useMemo as useMemo14 } from "react";
19834
+ import { Fragment as Fragment11, jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
19835
+ var resolveDesignProps7 = (props) => {
19670
19836
  return {
19671
19837
  header: {
19672
19838
  isVisible: props.header?.isVisible ?? true,
@@ -19694,8 +19860,8 @@ var resolveDesignProps6 = (props) => {
19694
19860
  }
19695
19861
  };
19696
19862
  };
19697
- var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) => {
19698
- const props = resolveDesignProps6(rest);
19863
+ var PlanManager = forwardRef12(({ children, className, portal, ...rest }, ref) => {
19864
+ const props = resolveDesignProps7(rest);
19699
19865
  const theme = nt();
19700
19866
  const { t: t2 } = useTranslation();
19701
19867
  const { data, setLayout, setSelected } = useEmbed();
@@ -19735,13 +19901,16 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19735
19901
  const headerPriceFontStyle = isUsageBasedPlan ? theme.typography.heading3 : theme.typography[props.header.price.fontStyle];
19736
19902
  return /* @__PURE__ */ jsxs27(Fragment11, { children: [
19737
19903
  isTrialSubscription && !willSubscriptionCancel ? /* @__PURE__ */ jsxs27(
19738
- Box,
19904
+ Notice,
19739
19905
  {
19740
- $backgroundColor: isLightBackground ? "hsla(0, 0%, 0%, 0.04)" : "hsla(0, 0%, 100%, 0.04)",
19906
+ as: Flex,
19907
+ $flexDirection: "column",
19908
+ $gap: "0.5rem",
19909
+ $padding: "1.5rem",
19741
19910
  $textAlign: "center",
19742
- $padding: "1rem",
19911
+ $backgroundColor: isLightBackground ? darken(theme.card.background, 0.04) : lighten(theme.card.background, 0.04),
19743
19912
  children: [
19744
- /* @__PURE__ */ jsx34(
19913
+ /* @__PURE__ */ jsx35(
19745
19914
  Text,
19746
19915
  {
19747
19916
  as: "h3",
@@ -19752,7 +19921,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19752
19921
  children: t2("Trial ends in", { days: trialEndDays.toString() })
19753
19922
  }
19754
19923
  ),
19755
- /* @__PURE__ */ jsx34(
19924
+ /* @__PURE__ */ jsx35(
19756
19925
  Text,
19757
19926
  {
19758
19927
  as: "p",
@@ -19770,13 +19939,16 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19770
19939
  ]
19771
19940
  }
19772
19941
  ) : willSubscriptionCancel && /* @__PURE__ */ jsxs27(
19773
- Box,
19942
+ Notice,
19774
19943
  {
19775
- $backgroundColor: isLightBackground ? "hsla(0, 0%, 0%, 0.04)" : "hsla(0, 0%, 100%, 0.04)",
19944
+ as: Flex,
19945
+ $flexDirection: "column",
19946
+ $gap: "0.5rem",
19947
+ $padding: "1.5rem",
19776
19948
  $textAlign: "center",
19777
- $padding: "1rem",
19949
+ $backgroundColor: isLightBackground ? darken(theme.card.background, 0.04) : lighten(theme.card.background, 0.04),
19778
19950
  children: [
19779
- /* @__PURE__ */ jsx34(
19951
+ /* @__PURE__ */ jsx35(
19780
19952
  Text,
19781
19953
  {
19782
19954
  as: "h3",
@@ -19787,7 +19959,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19787
19959
  children: t2("Subscription canceled")
19788
19960
  }
19789
19961
  ),
19790
- /* @__PURE__ */ jsx34(
19962
+ billingSubscription?.cancelAt && /* @__PURE__ */ jsx35(
19791
19963
  Text,
19792
19964
  {
19793
19965
  as: "p",
@@ -19795,14 +19967,14 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19795
19967
  $size: 0.8125 * theme.typography.text.fontSize,
19796
19968
  $weight: theme.typography.text.fontWeight,
19797
19969
  $color: theme.typography.text.color,
19798
- children: billingSubscription?.cancelAt ? t2("Access to plan will end on", {
19970
+ children: t2("Access to plan will end on", {
19799
19971
  date: toPrettyDate(
19800
19972
  new Date(billingSubscription.cancelAt * 1e3),
19801
19973
  {
19802
19974
  month: "numeric"
19803
19975
  }
19804
19976
  )
19805
- }) : ""
19977
+ })
19806
19978
  }
19807
19979
  )
19808
19980
  ]
@@ -19826,7 +19998,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19826
19998
  $gap: "1rem",
19827
19999
  children: [
19828
20000
  /* @__PURE__ */ jsxs27(Flex, { $flexDirection: "column", $gap: "1rem", children: [
19829
- /* @__PURE__ */ jsx34(
20001
+ /* @__PURE__ */ jsx35(
19830
20002
  Text,
19831
20003
  {
19832
20004
  as: Box,
@@ -19838,7 +20010,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19838
20010
  children: currentPlan.name
19839
20011
  }
19840
20012
  ),
19841
- props.header.description.isVisible && currentPlan.description && /* @__PURE__ */ jsx34(
20013
+ props.header.description.isVisible && currentPlan.description && /* @__PURE__ */ jsx35(
19842
20014
  Text,
19843
20015
  {
19844
20016
  as: Box,
@@ -19851,7 +20023,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19851
20023
  )
19852
20024
  ] }),
19853
20025
  props.header.price.isVisible && typeof currentPlan.planPrice === "number" && currentPlan.planPeriod && /* @__PURE__ */ jsxs27(Box, { children: [
19854
- /* @__PURE__ */ jsx34(
20026
+ /* @__PURE__ */ jsx35(
19855
20027
  Text,
19856
20028
  {
19857
20029
  $font: headerPriceFontStyle.fontFamily,
@@ -19864,7 +20036,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19864
20036
  )
19865
20037
  }
19866
20038
  ),
19867
- !isUsageBasedPlan && /* @__PURE__ */ jsx34(
20039
+ !isUsageBasedPlan && /* @__PURE__ */ jsx35(
19868
20040
  Text,
19869
20041
  {
19870
20042
  $font: theme.typography[props.header.price.fontStyle].fontFamily,
@@ -19882,7 +20054,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19882
20054
  }
19883
20055
  ),
19884
20056
  props.addOns.isVisible && addOns.length > 0 && /* @__PURE__ */ jsxs27(Flex, { $flexDirection: "column", $gap: "1rem", children: [
19885
- props.addOns.showLabel && /* @__PURE__ */ jsx34(
20057
+ props.addOns.showLabel && /* @__PURE__ */ jsx35(
19886
20058
  Text,
19887
20059
  {
19888
20060
  $font: theme.typography.text.fontFamily,
@@ -19901,7 +20073,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19901
20073
  $flexWrap: "wrap",
19902
20074
  $gap: "1rem",
19903
20075
  children: [
19904
- /* @__PURE__ */ jsx34(
20076
+ /* @__PURE__ */ jsx35(
19905
20077
  Text,
19906
20078
  {
19907
20079
  $font: theme.typography[props.addOns.fontStyle].fontFamily,
@@ -19933,7 +20105,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19933
20105
  ))
19934
20106
  ] }),
19935
20107
  usageBasedEntitlements.length > 0 && /* @__PURE__ */ jsxs27(Flex, { $flexDirection: "column", $gap: "1rem", children: [
19936
- /* @__PURE__ */ jsx34(
20108
+ /* @__PURE__ */ jsx35(
19937
20109
  Text,
19938
20110
  {
19939
20111
  $font: theme.typography.text.fontFamily,
@@ -19980,7 +20152,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
19980
20152
  }
19981
20153
  ),
19982
20154
  /* @__PURE__ */ jsxs27(Flex, { $alignItems: "center", $gap: "1rem", children: [
19983
- entitlement.priceBehavior === "overage" && currentPlan?.planPeriod ? /* @__PURE__ */ jsx34(
20155
+ entitlement.priceBehavior === "overage" && currentPlan?.planPeriod ? /* @__PURE__ */ jsx35(
19984
20156
  Text,
19985
20157
  {
19986
20158
  $font: theme.typography.text.fontFamily,
@@ -20059,7 +20231,7 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
20059
20231
  []
20060
20232
  )
20061
20233
  ] }),
20062
- canCheckout && props.callToAction.isVisible && /* @__PURE__ */ jsx34(
20234
+ canCheckout && props.callToAction.isVisible && /* @__PURE__ */ jsx35(
20063
20235
  EmbedButton,
20064
20236
  {
20065
20237
  type: "button",
@@ -20084,9 +20256,9 @@ var PlanManager = forwardRef11(({ children, className, portal, ...rest }, ref) =
20084
20256
  PlanManager.displayName = "PlanManager";
20085
20257
 
20086
20258
  // src/components/elements/pricing-table/PricingTable.tsx
20087
- import { forwardRef as forwardRef12, useState as useState15 } from "react";
20088
- import { Fragment as Fragment12, jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
20089
- var resolveDesignProps7 = (props) => {
20259
+ import { forwardRef as forwardRef13, useState as useState15 } from "react";
20260
+ import { Fragment as Fragment12, jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
20261
+ var resolveDesignProps8 = (props) => {
20090
20262
  return {
20091
20263
  showPeriodToggle: props.showPeriodToggle ?? true,
20092
20264
  showDiscount: props.showDiscount ?? true,
@@ -20125,8 +20297,8 @@ var resolveDesignProps7 = (props) => {
20125
20297
  }
20126
20298
  };
20127
20299
  };
20128
- var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20129
- const props = resolveDesignProps7(rest);
20300
+ var PricingTable = forwardRef13(({ children, className, ...rest }, ref) => {
20301
+ const props = resolveDesignProps8(rest);
20130
20302
  const { t: t2 } = useTranslation();
20131
20303
  const theme = nt();
20132
20304
  const { data, setLayout, setSelected } = useEmbed();
@@ -20188,7 +20360,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20188
20360
  }
20189
20361
  },
20190
20362
  children: [
20191
- /* @__PURE__ */ jsx35(
20363
+ /* @__PURE__ */ jsx36(
20192
20364
  Text,
20193
20365
  {
20194
20366
  $font: theme.typography[props.header.fontStyle].fontFamily,
@@ -20198,7 +20370,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20198
20370
  children: props.header.isVisible && props.plans.isVisible && plans.length > 0 && t2("Plans")
20199
20371
  }
20200
20372
  ),
20201
- props.showPeriodToggle && /* @__PURE__ */ jsx35(
20373
+ props.showPeriodToggle && /* @__PURE__ */ jsx36(
20202
20374
  PeriodToggle,
20203
20375
  {
20204
20376
  options: periods,
@@ -20209,7 +20381,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20209
20381
  ]
20210
20382
  }
20211
20383
  ),
20212
- props.plans.isVisible && plans.length > 0 && /* @__PURE__ */ jsx35(
20384
+ props.plans.isVisible && plans.length > 0 && /* @__PURE__ */ jsx36(
20213
20385
  Box,
20214
20386
  {
20215
20387
  $display: "grid",
@@ -20251,7 +20423,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20251
20423
  $borderStyle: "solid",
20252
20424
  $borderColor: isLightBackground ? "hsla(0, 0%, 0%, 0.175)" : "hsla(0, 0%, 100%, 0.175)",
20253
20425
  children: [
20254
- /* @__PURE__ */ jsx35(Box, { children: /* @__PURE__ */ jsx35(
20426
+ /* @__PURE__ */ jsx36(Box, { children: /* @__PURE__ */ jsx36(
20255
20427
  Text,
20256
20428
  {
20257
20429
  $font: theme.typography[props.plans.name.fontStyle].fontFamily,
@@ -20261,7 +20433,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20261
20433
  children: plan.name
20262
20434
  }
20263
20435
  ) }),
20264
- props.plans.description.isVisible && /* @__PURE__ */ jsx35(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx35(
20436
+ props.plans.description.isVisible && /* @__PURE__ */ jsx36(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx36(
20265
20437
  Text,
20266
20438
  {
20267
20439
  $font: theme.typography[props.plans.description.fontStyle].fontFamily,
@@ -20272,7 +20444,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20272
20444
  }
20273
20445
  ) }),
20274
20446
  /* @__PURE__ */ jsxs28(Box, { children: [
20275
- /* @__PURE__ */ jsx35(
20447
+ /* @__PURE__ */ jsx36(
20276
20448
  Text,
20277
20449
  {
20278
20450
  $font: headerPriceFontStyle.fontFamily,
@@ -20296,7 +20468,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20296
20468
  }
20297
20469
  )
20298
20470
  ] }),
20299
- isActivePlan && /* @__PURE__ */ jsx35(
20471
+ isActivePlan && /* @__PURE__ */ jsx36(
20300
20472
  Flex,
20301
20473
  {
20302
20474
  $position: "absolute",
@@ -20305,7 +20477,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20305
20477
  $backgroundColor: theme.primary,
20306
20478
  $borderRadius: "9999px",
20307
20479
  $padding: "0.125rem 0.85rem",
20308
- children: /* @__PURE__ */ jsx35(
20480
+ children: /* @__PURE__ */ jsx36(
20309
20481
  Text,
20310
20482
  {
20311
20483
  $font: theme.typography.text.fontFamily,
@@ -20330,7 +20502,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20330
20502
  $padding: `${0.75 * cardPadding}rem ${cardPadding}rem 0`,
20331
20503
  children: [
20332
20504
  props.plans.showEntitlements && /* @__PURE__ */ jsxs28(Flex, { $flexDirection: "column", $gap: "1rem", $flexGrow: 1, children: [
20333
- props.plans.showInclusionText && planIndex > 0 && /* @__PURE__ */ jsx35(Box, { $marginBottom: "1.5rem", children: /* @__PURE__ */ jsx35(
20505
+ props.plans.showInclusionText && planIndex > 0 && /* @__PURE__ */ jsx36(Box, { $marginBottom: "1.5rem", children: /* @__PURE__ */ jsx36(
20334
20506
  Text,
20335
20507
  {
20336
20508
  $font: theme.typography.text.fontFamily,
@@ -20356,7 +20528,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20356
20528
  }
20357
20529
  acc.push(
20358
20530
  /* @__PURE__ */ jsxs28(Flex, { $gap: "1rem", children: [
20359
- props.plans.showFeatureIcons && entitlement.feature?.icon && /* @__PURE__ */ jsx35(
20531
+ props.plans.showFeatureIcons && entitlement.feature?.icon && /* @__PURE__ */ jsx36(
20360
20532
  IconRound,
20361
20533
  {
20362
20534
  name: entitlement.feature.icon,
@@ -20374,7 +20546,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20374
20546
  $justifyContent: "center",
20375
20547
  $gap: "0.5rem",
20376
20548
  children: [
20377
- /* @__PURE__ */ jsx35(
20549
+ /* @__PURE__ */ jsx36(
20378
20550
  Text,
20379
20551
  {
20380
20552
  $font: theme.typography.text.fontFamily,
@@ -20483,7 +20655,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20483
20655
  $justifyContent: "start",
20484
20656
  $marginTop: "1rem",
20485
20657
  children: [
20486
- /* @__PURE__ */ jsx35(
20658
+ /* @__PURE__ */ jsx36(
20487
20659
  Icon2,
20488
20660
  {
20489
20661
  name: isExpanded ? "chevron-up" : "chevron-down",
@@ -20495,7 +20667,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20495
20667
  }
20496
20668
  }
20497
20669
  ),
20498
- /* @__PURE__ */ jsx35(
20670
+ /* @__PURE__ */ jsx36(
20499
20671
  Text,
20500
20672
  {
20501
20673
  onClick: () => handleToggleShowAll(plan.id),
@@ -20520,7 +20692,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20520
20692
  $gap: "0.25rem",
20521
20693
  $padding: "0.625rem 0",
20522
20694
  children: [
20523
- /* @__PURE__ */ jsx35(
20695
+ /* @__PURE__ */ jsx36(
20524
20696
  Icon2,
20525
20697
  {
20526
20698
  name: "check-rounded",
@@ -20531,7 +20703,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20531
20703
  }
20532
20704
  }
20533
20705
  ),
20534
- /* @__PURE__ */ jsx35(
20706
+ /* @__PURE__ */ jsx36(
20535
20707
  Text,
20536
20708
  {
20537
20709
  $font: theme.typography.text.fontFamily,
@@ -20544,7 +20716,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20544
20716
  )
20545
20717
  ]
20546
20718
  }
20547
- ) : (props.upgrade.isVisible || props.downgrade.isVisible) && /* @__PURE__ */ jsx35(
20719
+ ) : (props.upgrade.isVisible || props.downgrade.isVisible) && /* @__PURE__ */ jsx36(
20548
20720
  EmbedButton,
20549
20721
  {
20550
20722
  type: "button",
@@ -20568,14 +20740,14 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20568
20740
  $color: props.downgrade.buttonStyle,
20569
20741
  $variant: "outline"
20570
20742
  },
20571
- children: plan.custom ? /* @__PURE__ */ jsx35(
20743
+ children: plan.custom ? /* @__PURE__ */ jsx36(
20572
20744
  ButtonLink,
20573
20745
  {
20574
20746
  href: plan.customPlanConfig?.ctaWebSite ?? "#",
20575
20747
  target: "_blank",
20576
20748
  children: plan.customPlanConfig?.ctaText ?? t2("Talk to support")
20577
20749
  }
20578
- ) : !plan.valid ? /* @__PURE__ */ jsx35(
20750
+ ) : !plan.valid ? /* @__PURE__ */ jsx36(
20579
20751
  Tooltip,
20580
20752
  {
20581
20753
  trigger: t2("Over usage limit"),
@@ -20597,14 +20769,14 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20597
20769
  }
20598
20770
  )
20599
20771
  ] }),
20600
- /* @__PURE__ */ jsx35(Box, { children: props.addOns.isVisible && addOns.length > 0 && /* @__PURE__ */ jsxs28(Fragment12, { children: [
20601
- props.header.isVisible && /* @__PURE__ */ jsx35(
20772
+ /* @__PURE__ */ jsx36(Box, { children: props.addOns.isVisible && addOns.length > 0 && /* @__PURE__ */ jsxs28(Fragment12, { children: [
20773
+ props.header.isVisible && /* @__PURE__ */ jsx36(
20602
20774
  Flex,
20603
20775
  {
20604
20776
  $justifyContent: "space-between",
20605
20777
  $alignItems: "center",
20606
20778
  $marginBottom: "1rem",
20607
- children: /* @__PURE__ */ jsx35(
20779
+ children: /* @__PURE__ */ jsx36(
20608
20780
  Text,
20609
20781
  {
20610
20782
  $font: theme.typography[props.header.fontStyle].fontFamily,
@@ -20616,7 +20788,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20616
20788
  )
20617
20789
  }
20618
20790
  ),
20619
- /* @__PURE__ */ jsx35(
20791
+ /* @__PURE__ */ jsx36(
20620
20792
  Box,
20621
20793
  {
20622
20794
  $display: "grid",
@@ -20642,7 +20814,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20642
20814
  ...theme.card.hasShadow && { $boxShadow: cardBoxShadow },
20643
20815
  children: [
20644
20816
  /* @__PURE__ */ jsxs28(Flex, { $flexDirection: "column", $gap: "0.75rem", children: [
20645
- /* @__PURE__ */ jsx35(Box, { children: /* @__PURE__ */ jsx35(
20817
+ /* @__PURE__ */ jsx36(Box, { children: /* @__PURE__ */ jsx36(
20646
20818
  Text,
20647
20819
  {
20648
20820
  $font: theme.typography[props.plans.name.fontStyle].fontFamily,
@@ -20652,7 +20824,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20652
20824
  children: addOn.name
20653
20825
  }
20654
20826
  ) }),
20655
- props.addOns.showDescription && /* @__PURE__ */ jsx35(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx35(
20827
+ props.addOns.showDescription && /* @__PURE__ */ jsx36(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ jsx36(
20656
20828
  Text,
20657
20829
  {
20658
20830
  $font: theme.typography[props.plans.description.fontStyle].fontFamily,
@@ -20663,7 +20835,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20663
20835
  }
20664
20836
  ) }),
20665
20837
  /* @__PURE__ */ jsxs28(Box, { children: [
20666
- /* @__PURE__ */ jsx35(
20838
+ /* @__PURE__ */ jsx36(
20667
20839
  Text,
20668
20840
  {
20669
20841
  $font: theme.typography[props.plans.name.fontStyle].fontFamily,
@@ -20687,7 +20859,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20687
20859
  }
20688
20860
  )
20689
20861
  ] }),
20690
- isActiveAddOn && /* @__PURE__ */ jsx35(
20862
+ isActiveAddOn && /* @__PURE__ */ jsx36(
20691
20863
  Flex,
20692
20864
  {
20693
20865
  $position: "absolute",
@@ -20696,7 +20868,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20696
20868
  $backgroundColor: theme.primary,
20697
20869
  $borderRadius: "9999px",
20698
20870
  $padding: "0.125rem 0.85rem",
20699
- children: /* @__PURE__ */ jsx35(
20871
+ children: /* @__PURE__ */ jsx36(
20700
20872
  Text,
20701
20873
  {
20702
20874
  $font: theme.typography.text.fontFamily,
@@ -20717,7 +20889,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20717
20889
  $gap: `${cardPadding}rem`,
20718
20890
  $flexGrow: 1,
20719
20891
  children: [
20720
- props.addOns.showEntitlements && /* @__PURE__ */ jsx35(
20892
+ props.addOns.showEntitlements && /* @__PURE__ */ jsx36(
20721
20893
  Flex,
20722
20894
  {
20723
20895
  $flexDirection: "column",
@@ -20726,7 +20898,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20726
20898
  $flexGrow: 1,
20727
20899
  children: addOn.entitlements.map(
20728
20900
  (entitlement, entitlementIndex) => {
20729
- return /* @__PURE__ */ jsx35(
20901
+ return /* @__PURE__ */ jsx36(
20730
20902
  Flex,
20731
20903
  {
20732
20904
  $flexWrap: "wrap",
@@ -20734,7 +20906,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20734
20906
  $alignItems: "center",
20735
20907
  $gap: "1rem",
20736
20908
  children: /* @__PURE__ */ jsxs28(Flex, { $gap: "1rem", children: [
20737
- props.addOns.showFeatureIcons && entitlement.feature?.icon && /* @__PURE__ */ jsx35(
20909
+ props.addOns.showFeatureIcons && entitlement.feature?.icon && /* @__PURE__ */ jsx36(
20738
20910
  IconRound,
20739
20911
  {
20740
20912
  name: entitlement.feature.icon,
@@ -20745,7 +20917,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20745
20917
  ]
20746
20918
  }
20747
20919
  ),
20748
- entitlement.feature?.name && /* @__PURE__ */ jsx35(Flex, { $alignItems: "center", children: /* @__PURE__ */ jsx35(
20920
+ entitlement.feature?.name && /* @__PURE__ */ jsx36(Flex, { $alignItems: "center", children: /* @__PURE__ */ jsx36(
20749
20921
  Text,
20750
20922
  {
20751
20923
  $font: theme.typography.text.fontFamily,
@@ -20789,7 +20961,7 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20789
20961
  )
20790
20962
  }
20791
20963
  ),
20792
- props.upgrade.isVisible && /* @__PURE__ */ jsx35(
20964
+ props.upgrade.isVisible && /* @__PURE__ */ jsx36(
20793
20965
  EmbedButton,
20794
20966
  {
20795
20967
  type: "button",
@@ -20825,10 +20997,39 @@ var PricingTable = forwardRef12(({ children, className, ...rest }, ref) => {
20825
20997
  });
20826
20998
  PricingTable.displayName = "PricingTable";
20827
20999
 
21000
+ // src/components/elements/text/Text.tsx
21001
+ import { forwardRef as forwardRef14 } from "react";
21002
+ import { jsx as jsx37 } from "react/jsx-runtime";
21003
+ var resolveDesignProps9 = (props) => {
21004
+ return {
21005
+ text: {
21006
+ fontStyle: props.text?.fontStyle ?? "text",
21007
+ alignment: props.text?.alignment ?? "left",
21008
+ textContent: props.text?.textContent ?? "Text"
21009
+ }
21010
+ };
21011
+ };
21012
+ var TextElement = forwardRef14(({ children, className, ...rest }, ref) => {
21013
+ const props = resolveDesignProps9(rest);
21014
+ const theme = nt();
21015
+ return /* @__PURE__ */ jsx37(Element, { as: Flex, ref, className, children: /* @__PURE__ */ jsx37(
21016
+ Text,
21017
+ {
21018
+ $font: theme.typography[props.text.fontStyle].fontFamily,
21019
+ $size: theme.typography[props.text.fontStyle].fontSize,
21020
+ $weight: theme.typography[props.text.fontStyle].fontWeight,
21021
+ $color: theme.typography[props.text.fontStyle].color,
21022
+ $align: props.text.alignment,
21023
+ children: props.text.textContent
21024
+ }
21025
+ ) });
21026
+ });
21027
+ TextElement.displayName = "Text";
21028
+
20828
21029
  // src/components/elements/unsubscribe-button/UnsubscribeButton.tsx
20829
- import { forwardRef as forwardRef13 } from "react";
20830
- import { jsx as jsx36 } from "react/jsx-runtime";
20831
- var resolveDesignProps8 = (props) => {
21030
+ import { forwardRef as forwardRef15 } from "react";
21031
+ import { jsx as jsx38 } from "react/jsx-runtime";
21032
+ var resolveDesignProps10 = (props) => {
20832
21033
  return {
20833
21034
  button: {
20834
21035
  text: props.button?.text ?? "Unsubscribe",
@@ -20839,8 +21040,8 @@ var resolveDesignProps8 = (props) => {
20839
21040
  }
20840
21041
  };
20841
21042
  };
20842
- var UnsubscribeButton = forwardRef13(({ children, className, ...rest }, ref) => {
20843
- const props = resolveDesignProps8(rest);
21043
+ var UnsubscribeButton = forwardRef15(({ children, className, ...rest }, ref) => {
21044
+ const props = resolveDesignProps10(rest);
20844
21045
  const { t: t2 } = useTranslation();
20845
21046
  const { data, setLayout } = useEmbed();
20846
21047
  const disabled = !data.subscription || data.subscription.status === "cancelled" || data.subscription.cancelAtPeriodEnd;
@@ -20858,7 +21059,7 @@ var UnsubscribeButton = forwardRef13(({ children, className, ...rest }, ref) =>
20858
21059
  variant: "text"
20859
21060
  }
20860
21061
  };
20861
- return /* @__PURE__ */ jsx36(
21062
+ return /* @__PURE__ */ jsx38(
20862
21063
  Element,
20863
21064
  {
20864
21065
  as: Flex,
@@ -20866,7 +21067,7 @@ var UnsubscribeButton = forwardRef13(({ children, className, ...rest }, ref) =>
20866
21067
  className,
20867
21068
  $flexDirection: "column",
20868
21069
  $gap: "2rem",
20869
- children: /* @__PURE__ */ jsx36(
21070
+ children: /* @__PURE__ */ jsx38(
20870
21071
  EmbedButton,
20871
21072
  {
20872
21073
  $size: props.button.size,
@@ -20887,9 +21088,9 @@ var UnsubscribeButton = forwardRef13(({ children, className, ...rest }, ref) =>
20887
21088
  UnsubscribeButton.displayName = "UnsubscribeButton";
20888
21089
 
20889
21090
  // src/components/elements/upcoming-bill/UpcomingBill.tsx
20890
- import { forwardRef as forwardRef14, useMemo as useMemo15 } from "react";
20891
- import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
20892
- function resolveDesignProps9(props) {
21091
+ import { forwardRef as forwardRef16, useMemo as useMemo15 } from "react";
21092
+ import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
21093
+ function resolveDesignProps11(props) {
20893
21094
  return {
20894
21095
  header: {
20895
21096
  isVisible: props.header?.isVisible ?? true,
@@ -20907,8 +21108,8 @@ function resolveDesignProps9(props) {
20907
21108
  }
20908
21109
  };
20909
21110
  }
20910
- var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
20911
- const props = resolveDesignProps9(rest);
21111
+ var UpcomingBill = forwardRef16(({ className, ...rest }, ref) => {
21112
+ const props = resolveDesignProps11(rest);
20912
21113
  const { t: t2 } = useTranslation();
20913
21114
  const theme = nt();
20914
21115
  const { data } = useEmbed();
@@ -20949,7 +21150,7 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
20949
21150
  $flexDirection: "column",
20950
21151
  $gap: "1rem",
20951
21152
  children: [
20952
- props.header.isVisible && /* @__PURE__ */ jsx37(Flex, { $justifyContent: "space-between", $alignItems: "center", children: /* @__PURE__ */ jsxs29(
21153
+ props.header.isVisible && /* @__PURE__ */ jsx39(Flex, { $justifyContent: "space-between", $alignItems: "center", children: /* @__PURE__ */ jsxs29(
20953
21154
  Text,
20954
21155
  {
20955
21156
  $font: theme.typography[props.header.fontStyle].fontFamily,
@@ -20964,7 +21165,7 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
20964
21165
  }
20965
21166
  ) }),
20966
21167
  /* @__PURE__ */ jsxs29(Flex, { $justifyContent: "space-between", $alignItems: "start", $gap: "1rem", children: [
20967
- props.price.isVisible && /* @__PURE__ */ jsx37(Flex, { $alignItems: "end", $flexGrow: "1", children: /* @__PURE__ */ jsx37(
21168
+ props.price.isVisible && /* @__PURE__ */ jsx39(Flex, { $alignItems: "end", $flexGrow: "1", children: /* @__PURE__ */ jsx39(
20968
21169
  Text,
20969
21170
  {
20970
21171
  $font: theme.typography[props.price.fontStyle].fontFamily,
@@ -20978,7 +21179,7 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
20978
21179
  )
20979
21180
  }
20980
21181
  ) }),
20981
- /* @__PURE__ */ jsx37(Box, { $lineHeight: 1.15, $maxWidth: "10rem", $textAlign: "right", children: /* @__PURE__ */ jsx37(
21182
+ /* @__PURE__ */ jsx39(Box, { $lineHeight: 1.15, $maxWidth: "10rem", $textAlign: "right", children: /* @__PURE__ */ jsx39(
20982
21183
  Text,
20983
21184
  {
20984
21185
  $font: theme.typography[props.contractEndDate.fontStyle].fontFamily,
@@ -20991,7 +21192,7 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
20991
21192
  ) })
20992
21193
  ] }),
20993
21194
  discounts.length > 0 && /* @__PURE__ */ jsxs29(Flex, { $justifyContent: "space-between", $alignItems: "center", children: [
20994
- /* @__PURE__ */ jsx37(Box, { children: /* @__PURE__ */ jsx37(
21195
+ /* @__PURE__ */ jsx39(Box, { children: /* @__PURE__ */ jsx39(
20995
21196
  Text,
20996
21197
  {
20997
21198
  $font: theme.typography.text.fontFamily,
@@ -21001,8 +21202,8 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
21001
21202
  children: t2("Discount")
21002
21203
  }
21003
21204
  ) }),
21004
- /* @__PURE__ */ jsx37(Box, { children: discounts.map((discount) => /* @__PURE__ */ jsxs29(Flex, { $alignItems: "center", $gap: "0.5rem", children: [
21005
- /* @__PURE__ */ jsx37(
21205
+ /* @__PURE__ */ jsx39(Box, { children: discounts.map((discount) => /* @__PURE__ */ jsxs29(Flex, { $alignItems: "center", $gap: "0.5rem", children: [
21206
+ /* @__PURE__ */ jsx39(
21006
21207
  Flex,
21007
21208
  {
21008
21209
  $alignItems: "center",
@@ -21011,7 +21212,7 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
21011
21212
  $borderStyle: "solid",
21012
21213
  $borderColor: isLightBackground ? "hsla(0, 0%, 0%, 0.15)" : "hsla(0, 0%, 100%, 0.15)",
21013
21214
  $borderRadius: "0.3125rem",
21014
- children: /* @__PURE__ */ jsx37(
21215
+ children: /* @__PURE__ */ jsx39(
21015
21216
  Text,
21016
21217
  {
21017
21218
  $font: theme.typography.text.fontFamily,
@@ -21023,7 +21224,7 @@ var UpcomingBill = forwardRef14(({ className, ...rest }, ref) => {
21023
21224
  )
21024
21225
  }
21025
21226
  ),
21026
- /* @__PURE__ */ jsx37(Box, { children: /* @__PURE__ */ jsx37(
21227
+ /* @__PURE__ */ jsx39(Box, { children: /* @__PURE__ */ jsx39(
21027
21228
  Text,
21028
21229
  {
21029
21230
  $font: theme.typography.text.fontFamily,
@@ -21058,7 +21259,8 @@ var components = {
21058
21259
  PaymentMethod,
21059
21260
  Invoices,
21060
21261
  PricingTable,
21061
- UnsubscribeButton
21262
+ UnsubscribeButton,
21263
+ ButtonElement
21062
21264
  };
21063
21265
  function createRenderer(options) {
21064
21266
  const { useFallback = false } = options || {};
@@ -21091,10 +21293,10 @@ function createRenderer(options) {
21091
21293
  }
21092
21294
 
21093
21295
  // src/components/embed/ComponentTree.tsx
21094
- import { Fragment as Fragment13, jsx as jsx38, jsxs as jsxs30 } from "react/jsx-runtime";
21296
+ import { Fragment as Fragment13, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
21095
21297
  var Loading = () => {
21096
21298
  const theme = nt();
21097
- return /* @__PURE__ */ jsx38(
21299
+ return /* @__PURE__ */ jsx40(
21098
21300
  Flex,
21099
21301
  {
21100
21302
  $width: "100%",
@@ -21102,7 +21304,7 @@ var Loading = () => {
21102
21304
  $alignItems: "center",
21103
21305
  $justifyContent: "center",
21104
21306
  $padding: `${theme.card.padding / TEXT_BASE_SIZE}rem`,
21105
- children: /* @__PURE__ */ jsx38(Loader, { $size: "2xl", $color: "#194BFB" })
21307
+ children: /* @__PURE__ */ jsx40(Loader, { $color: "#194BFB", $size: "2xl" })
21106
21308
  }
21107
21309
  );
21108
21310
  };
@@ -21119,7 +21321,7 @@ var Error2 = ({ message }) => {
21119
21321
  $alignItems: "center",
21120
21322
  $justifyContent: "center",
21121
21323
  children: [
21122
- /* @__PURE__ */ jsx38(
21324
+ /* @__PURE__ */ jsx40(
21123
21325
  Box,
21124
21326
  {
21125
21327
  $marginBottom: `${8 / TEXT_BASE_SIZE}rem`,
@@ -21130,7 +21332,7 @@ var Error2 = ({ message }) => {
21130
21332
  children: "Error"
21131
21333
  }
21132
21334
  ),
21133
- /* @__PURE__ */ jsx38(
21335
+ /* @__PURE__ */ jsx40(
21134
21336
  Box,
21135
21337
  {
21136
21338
  $marginBottom: `${8 / TEXT_BASE_SIZE}rem`,
@@ -21147,23 +21349,23 @@ var Error2 = ({ message }) => {
21147
21349
  };
21148
21350
  var ComponentTree = () => {
21149
21351
  const { error, nodes, isPending } = useEmbed();
21150
- const [children, setChildren] = useState16(/* @__PURE__ */ jsx38(Loading, {}));
21352
+ const [children, setChildren] = useState16(/* @__PURE__ */ jsx40(Loading, {}));
21151
21353
  useEffect8(() => {
21152
21354
  const renderer = createRenderer();
21153
21355
  setChildren(nodes.map(renderer));
21154
21356
  }, [nodes]);
21155
21357
  if (error) {
21156
21358
  console.error(error);
21157
- return /* @__PURE__ */ jsx38(Error2, { message: error.message });
21359
+ return /* @__PURE__ */ jsx40(Error2, { message: error.message });
21158
21360
  }
21159
21361
  if (isPending) {
21160
- return /* @__PURE__ */ jsx38(Loading, {});
21362
+ return /* @__PURE__ */ jsx40(Loading, {});
21161
21363
  }
21162
- return /* @__PURE__ */ jsx38(Fragment13, { children });
21364
+ return /* @__PURE__ */ jsx40(Fragment13, { children });
21163
21365
  };
21164
21366
 
21165
21367
  // src/components/embed/Embed.tsx
21166
- import { jsx as jsx39 } from "react/jsx-runtime";
21368
+ import { jsx as jsx41 } from "react/jsx-runtime";
21167
21369
  var SchematicEmbed = ({
21168
21370
  id,
21169
21371
  accessToken,
@@ -21171,25 +21373,26 @@ var SchematicEmbed = ({
21171
21373
  debug
21172
21374
  }) => {
21173
21375
  if (accessToken?.length === 0) {
21174
- return /* @__PURE__ */ jsx39("div", { children: "Please provide an access token." });
21376
+ return /* @__PURE__ */ jsx41("div", { children: "Please provide an access token." });
21175
21377
  }
21176
21378
  if (!accessToken?.startsWith("token_")) {
21177
- return /* @__PURE__ */ jsx39("div", { children: 'Invalid access token; your temporary access token will start with "token_".' });
21379
+ return /* @__PURE__ */ jsx41("div", { children: 'Invalid access token; your temporary access token will start with "token_".' });
21178
21380
  }
21179
- return /* @__PURE__ */ jsx39(
21381
+ return /* @__PURE__ */ jsx41(
21180
21382
  EmbedProvider,
21181
21383
  {
21182
21384
  id,
21183
21385
  accessToken,
21184
21386
  apiConfig,
21185
21387
  debug,
21186
- children: /* @__PURE__ */ jsx39(ComponentTree, {})
21388
+ children: /* @__PURE__ */ jsx41(ComponentTree, {})
21187
21389
  }
21188
21390
  );
21189
21391
  };
21190
21392
  export {
21191
21393
  Box,
21192
21394
  Button2 as Button,
21395
+ ButtonElement,
21193
21396
  Card,
21194
21397
  Column,
21195
21398
  Container2 as Container,
@@ -21208,6 +21411,7 @@ export {
21208
21411
  MeteredFeatures,
21209
21412
  Modal,
21210
21413
  ModalHeader,
21414
+ Notice,
21211
21415
  PaymentMethod,
21212
21416
  PaymentMethodDetails,
21213
21417
  PlanManager,
@@ -21217,6 +21421,7 @@ export {
21217
21421
  SchematicEmbed,
21218
21422
  StyledCard,
21219
21423
  Text,
21424
+ TextElement,
21220
21425
  TextPropNames,
21221
21426
  Tooltip,
21222
21427
  UnsubscribeButton,