@calcom/atoms 1.4.0 → 1.5.0-booker

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.
Files changed (104) hide show
  1. package/dist/{AddressInput-oBqEc36p.js → AddressInput-2hL6xvaw.js} +3 -3
  2. package/dist/{AlbyPriceComponent-mtspbv1Z.js → AlbyPriceComponent-90fNQIrg.js} +19 -19
  3. package/dist/{PhoneInput-uwxWFpdD.js → PhoneInput-FnKIa4kA.js} +1 -1
  4. package/dist/cal-atoms.js +5 -36
  5. package/dist/index-YQ_KdK6G.js +83604 -0
  6. package/dist/{index-ju7GeYL2.js → index-a3d1IjXE.js} +1 -1
  7. package/dist/index-ubX_XTnt.js +1957 -0
  8. package/dist/packages/features/bookings/Booker/components/EventMeta.d.ts +1 -1
  9. package/dist/packages/features/bookings/Booker/components/EventMeta.d.ts.map +1 -1
  10. package/dist/packages/features/bookings/Booker/utils/event.d.ts +7 -0
  11. package/dist/packages/features/bookings/Booker/utils/event.d.ts.map +1 -1
  12. package/dist/packages/features/bookings/lib/handleNewBooking/test/fresh-booking.test.d.ts.map +1 -1
  13. package/dist/packages/features/bookings/lib/handleNewBooking.d.ts.map +1 -1
  14. package/dist/packages/features/ee/workflows/pages/workflow.d.ts.map +1 -1
  15. package/dist/packages/features/eventtypes/components/locations/CalVideoSettings.d.ts +6 -0
  16. package/dist/packages/features/eventtypes/components/locations/CalVideoSettings.d.ts.map +1 -0
  17. package/dist/packages/features/eventtypes/components/locations/LocationSettingsContainer.d.ts +5 -0
  18. package/dist/packages/features/eventtypes/components/locations/LocationSettingsContainer.d.ts.map +1 -0
  19. package/dist/packages/features/eventtypes/components/{Locations.d.ts → locations/Locations.d.ts} +2 -2
  20. package/dist/packages/features/eventtypes/components/locations/Locations.d.ts.map +1 -0
  21. package/dist/packages/features/eventtypes/components/tabs/setup/EventSetupTab.d.ts +1 -1
  22. package/dist/packages/features/eventtypes/components/tabs/setup/EventSetupTab.d.ts.map +1 -1
  23. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts +36 -0
  24. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts.map +1 -1
  25. package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts +7 -0
  26. package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts.map +1 -1
  27. package/dist/packages/features/eventtypes/lib/types.d.ts +10 -9
  28. package/dist/packages/features/eventtypes/lib/types.d.ts.map +1 -1
  29. package/dist/packages/features/schedules/components/DateOverrideInputDialog.d.ts.map +1 -1
  30. package/dist/packages/platform/atoms/availability/AvailabilitySettings.d.ts +4 -0
  31. package/dist/packages/platform/atoms/availability/AvailabilitySettings.d.ts.map +1 -1
  32. package/dist/packages/platform/atoms/availability/wrappers/AvailabilitySettingsPlatformWrapper.d.ts.map +1 -1
  33. package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts +7 -0
  34. package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts.map +1 -1
  35. package/dist/packages/platform/atoms/index.d.ts +0 -36
  36. package/dist/packages/platform/atoms/index.d.ts.map +1 -1
  37. package/dist/packages/platform/libraries/index.d.ts +1 -0
  38. package/dist/packages/platform/libraries/index.d.ts.map +1 -1
  39. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.d.ts +1 -0
  40. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.d.ts.map +1 -1
  41. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.d.ts +1 -0
  42. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.d.ts.map +1 -1
  43. package/dist/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.d.ts +1 -0
  44. package/dist/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.d.ts.map +1 -1
  45. package/dist/style.css +1 -1
  46. package/package.json +1 -1
  47. package/dist/AppCard-HKcGH7KI.js +0 -281
  48. package/dist/AppListCardPlatformWrapper-r8Hitr0l.js +0 -9
  49. package/dist/AppListCardWebWrapper-vejVG2AV.js +0 -74
  50. package/dist/AppSettingsInterface-nEGM5s84.js +0 -75
  51. package/dist/AppSettingsInterface-qxGtpTiN.js +0 -23
  52. package/dist/AppSettingsInterface-sZRl3Mr6.js +0 -29
  53. package/dist/DateRangePicker-35rSj6si.js +0 -74
  54. package/dist/EventTypeAppCardInterface-3FT5nxjW.js +0 -34
  55. package/dist/EventTypeAppCardInterface-3G3-8wgP.js +0 -24
  56. package/dist/EventTypeAppCardInterface-4BC7MtM9.js +0 -86
  57. package/dist/EventTypeAppCardInterface-5dgM-Uqy.js +0 -42
  58. package/dist/EventTypeAppCardInterface-6nH3STHb.js +0 -41
  59. package/dist/EventTypeAppCardInterface-7Fa6yG1D.js +0 -49
  60. package/dist/EventTypeAppCardInterface-7RirPSFI.js +0 -42
  61. package/dist/EventTypeAppCardInterface-AGvK3dWC.js +0 -34
  62. package/dist/EventTypeAppCardInterface-B0TNZbec.js +0 -24
  63. package/dist/EventTypeAppCardInterface-BsVjKokG.js +0 -24
  64. package/dist/EventTypeAppCardInterface-HCOkEHH_.js +0 -51
  65. package/dist/EventTypeAppCardInterface-NPVbq3L2.js +0 -858
  66. package/dist/EventTypeAppCardInterface-OuKoklDG.js +0 -31
  67. package/dist/EventTypeAppCardInterface-W0eXvwJ6.js +0 -34
  68. package/dist/EventTypeAppCardInterface-YCW2vw93.js +0 -24
  69. package/dist/EventTypeAppCardInterface-asX2AyDB.js +0 -34
  70. package/dist/EventTypeAppCardInterface-d4eBiO7E.js +0 -34
  71. package/dist/EventTypeAppCardInterface-fXkSopxu.js +0 -51
  72. package/dist/EventTypeAppCardInterface-g7tp7Yhd.js +0 -24
  73. package/dist/EventTypeAppCardInterface-gHA1xrj1.js +0 -32
  74. package/dist/EventTypeAppCardInterface-gPp6kDAS.js +0 -39
  75. package/dist/EventTypeAppCardInterface-gjVYt_ZD.js +0 -33
  76. package/dist/EventTypeAppCardInterface-kmftUrCV.js +0 -32
  77. package/dist/EventTypeAppCardInterface-sG1mFyzN.js +0 -39
  78. package/dist/EventTypeAppCardInterface-sRqedemb.js +0 -41
  79. package/dist/EventTypeAppCardInterface-sZ8b3QC1.js +0 -34
  80. package/dist/EventTypeAppCardInterface-t_YQeAVV.js +0 -34
  81. package/dist/EventTypeAppSettingsInterface-4yNMo4Q9.js +0 -298
  82. package/dist/EventTypeAppSettingsInterface-BfRfPQNh.js +0 -120
  83. package/dist/EventTypeAppSettingsInterface-D72l4G-t.js +0 -48
  84. package/dist/EventTypeAppSettingsInterface-J1v2pIJ6.js +0 -78
  85. package/dist/EventTypeAppSettingsInterface-TNrelj_x.js +0 -25
  86. package/dist/EventTypeAppSettingsInterface-hfofyLH8.js +0 -221
  87. package/dist/EventTypeAppSettingsInterface-iPaHKtIn.js +0 -23
  88. package/dist/EventTypeAppSettingsInterface-iscD_8j0.js +0 -106
  89. package/dist/EventTypeAppSettingsInterface-lCQQSWge.js +0 -43
  90. package/dist/EventTypeAppSettingsInterface-pqAHbpj-.js +0 -72
  91. package/dist/EventTypeAppSettingsInterface-r12RWRqC.js +0 -42
  92. package/dist/EventTypeAppSettingsInterface-rUiI0j3i.js +0 -23
  93. package/dist/EventTypeAppSettingsInterface-xrBzd-pp.js +0 -24
  94. package/dist/InstallAppButton-JXhBVaYJ.js +0 -29
  95. package/dist/InstallAppButton-N6EWQ7cN.js +0 -58
  96. package/dist/InstallAppButton-bRxGl3Ky.js +0 -14
  97. package/dist/InstallAppButton-fNl0KaRA.js +0 -14
  98. package/dist/StripePaymentForm-Iym6ImTI.js +0 -493
  99. package/dist/currencyOptions-kannG2hu.js +0 -61
  100. package/dist/index-0N1b0J1c.js +0 -30
  101. package/dist/index-7HDflSvQ.js +0 -518
  102. package/dist/index-ZlYpjCCS.js +0 -161411
  103. package/dist/packages/features/eventtypes/components/Locations.d.ts.map +0 -1
  104. package/dist/useIsAppEnabled-BJ4EJ4jB.js +0 -18
@@ -1,518 +0,0 @@
1
- import { jsxs as c, jsx as i, Fragment as g } from "react/jsx-runtime";
2
- import { av as N, aw as L, ax as S, al as j, ay as T, az as U, s as h, u as A, aA as I, y as R, aB as x, aC as _, aD as $, O as V } from "./index-ZlYpjCCS.js";
3
- import { memo as z, useState as Q } from "react";
4
- var M = Math.floor, E = Math.random;
5
- function O(t, r) {
6
- return t + M(E() * (r - t + 1));
7
- }
8
- var Z = O, q = Z;
9
- function D(t, r) {
10
- var o = -1, n = t.length, a = n - 1;
11
- for (r = r === void 0 ? n : r; ++o < r; ) {
12
- var e = q(o, a), s = t[e];
13
- t[e] = t[o], t[o] = s;
14
- }
15
- return t.length = r, t;
16
- }
17
- var y = D, F = N, G = y;
18
- function W(t) {
19
- return G(F(t));
20
- }
21
- var P = W, H = L;
22
- function Y(t, r) {
23
- return H(r, function(o) {
24
- return t[o];
25
- });
26
- }
27
- var K = Y, J = K, X = S;
28
- function B(t) {
29
- return t == null ? [] : J(t, X(t));
30
- }
31
- var ee = B, te = y, ie = ee;
32
- function se(t) {
33
- return te(ie(t));
34
- }
35
- var re = se, ae = P, le = re, oe = T;
36
- function de(t) {
37
- var r = oe(t) ? ae : le;
38
- return r(t);
39
- }
40
- var ne = de;
41
- const ce = /* @__PURE__ */ j(ne), b = I("", {
42
- // Variants won't have any style by default. Style will only be applied if the variants are combined.
43
- // So, style is defined in compoundVariants.
44
- variants: {
45
- variant: {
46
- basic: "",
47
- ProfileCard: "",
48
- SidebarCard: ""
49
- },
50
- structure: {
51
- image: "",
52
- card: "",
53
- title: "",
54
- description: ""
55
- }
56
- },
57
- compoundVariants: [
58
- // Style for Basic Variants types
59
- {
60
- variant: "basic",
61
- structure: "image",
62
- className: "w-10 h-auto"
63
- },
64
- {
65
- variant: "basic",
66
- structure: "card",
67
- className: "p-5"
68
- },
69
- {
70
- variant: "basic",
71
- structure: "title",
72
- className: "text-base mt-4"
73
- },
74
- {
75
- variant: "basic",
76
- structure: "description",
77
- className: "text-sm leading-[18px] text-subtle font-normal"
78
- },
79
- // Style for ProfileCard Variant Types
80
- {
81
- variant: "ProfileCard",
82
- structure: "image",
83
- className: "w-9 h-auto rounded-full mb-4s"
84
- },
85
- {
86
- variant: "ProfileCard",
87
- structure: "card",
88
- className: "w-80 p-4 hover:bg-subtle"
89
- },
90
- {
91
- variant: "ProfileCard",
92
- structure: "title",
93
- className: "text-base"
94
- },
95
- {
96
- variant: "ProfileCard",
97
- structure: "description",
98
- className: "text-sm leading-[18px] text-subtle font-normal"
99
- },
100
- // Style for SidebarCard Variant Types
101
- {
102
- variant: "SidebarCard",
103
- structure: "image",
104
- className: "w-9 h-auto rounded-full mb-4s"
105
- },
106
- {
107
- variant: "SidebarCard",
108
- structure: "card",
109
- className: "w-full p-3 border border-subtle"
110
- },
111
- {
112
- variant: "SidebarCard",
113
- structure: "title",
114
- className: "text-sm font-cal"
115
- },
116
- {
117
- variant: "SidebarCard",
118
- structure: "description",
119
- className: "text-xs text-default line-clamp-2"
120
- }
121
- ]
122
- });
123
- function me({
124
- image: t,
125
- title: r,
126
- icon: o,
127
- description: n,
128
- variant: a,
129
- actionButton: e,
130
- containerProps: s,
131
- imageProps: l,
132
- mediaLink: d,
133
- thumbnailUrl: u,
134
- learnMore: m
135
- }) {
136
- const p = m && m.href.startsWith("https") ? "a" : U;
137
- return /* @__PURE__ */ c(
138
- "div",
139
- {
140
- className: h(
141
- s == null ? void 0 : s.className,
142
- b({ variant: a, structure: "card" }),
143
- "bg-default border-subtle text-default flex flex-col justify-between rounded-md border"
144
- ),
145
- "data-testid": "card-container",
146
- ...s,
147
- children: [
148
- /* @__PURE__ */ c("div", { children: [
149
- o && o,
150
- t && /* @__PURE__ */ i(
151
- "img",
152
- {
153
- src: t,
154
- alt: l == null ? void 0 : l.alt,
155
- className: h(
156
- l == null ? void 0 : l.className,
157
- b({ variant: a, structure: "image" })
158
- ),
159
- ...l
160
- }
161
- ),
162
- /* @__PURE__ */ i(
163
- "h5",
164
- {
165
- title: r,
166
- className: h(
167
- b({ variant: a, structure: "title" }),
168
- "text-emphasis line-clamp-1 font-bold leading-5"
169
- ),
170
- children: r
171
- }
172
- ),
173
- n && /* @__PURE__ */ i(
174
- "p",
175
- {
176
- title: n.toString(),
177
- className: h(b({ variant: a, structure: "description" }), "pt-1"),
178
- children: n
179
- }
180
- )
181
- ] }),
182
- a === "SidebarCard" && /* @__PURE__ */ c(
183
- "a",
184
- {
185
- onClick: e == null ? void 0 : e.onClick,
186
- target: "_blank",
187
- rel: "noreferrer",
188
- href: d,
189
- "data-testid": e == null ? void 0 : e["data-testid"],
190
- className: "group relative my-3 flex aspect-video items-center overflow-hidden rounded",
191
- children: [
192
- /* @__PURE__ */ i("div", { className: "absolute inset-0 bg-black bg-opacity-50 transition group-hover:bg-opacity-40" }),
193
- /* @__PURE__ */ c(
194
- "svg",
195
- {
196
- className: "text-inverted absolute left-1/2 top-1/2 h-8 w-8 -translate-x-1/2 -translate-y-1/2 transform rounded-full shadow-lg transition-all hover:-mt-px",
197
- viewBox: "0 0 32 32",
198
- fill: "none",
199
- xmlns: "http://www.w3.org/2000/svg",
200
- children: [
201
- /* @__PURE__ */ i(
202
- "path",
203
- {
204
- d: "M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32Z",
205
- fill: "white"
206
- }
207
- ),
208
- /* @__PURE__ */ i(
209
- "path",
210
- {
211
- d: "M12.1667 8.5L23.8334 16L12.1667 23.5V8.5Z",
212
- fill: "#111827",
213
- stroke: "#111827",
214
- strokeWidth: "1.5",
215
- strokeLinecap: "round",
216
- strokeLinejoin: "round"
217
- }
218
- )
219
- ]
220
- }
221
- ),
222
- /* @__PURE__ */ i("img", { alt: "play feature video", src: u })
223
- ]
224
- }
225
- ),
226
- a === "basic" && e && /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
227
- A,
228
- {
229
- color: "secondary",
230
- href: e == null ? void 0 : e.href,
231
- className: "mt-10",
232
- EndIcon: "arrow-right",
233
- "data-testid": e["data-testid"],
234
- children: e == null ? void 0 : e.child
235
- }
236
- ) }),
237
- a === "SidebarCard" && /* @__PURE__ */ c("div", { className: "mt-2 flex items-center justify-between", children: [
238
- m && /* @__PURE__ */ i(
239
- p,
240
- {
241
- href: m.href,
242
- onClick: e == null ? void 0 : e.onClick,
243
- target: "_blank",
244
- rel: "noreferrer",
245
- className: "text-default text-xs font-medium",
246
- children: m.text
247
- }
248
- ),
249
- (e == null ? void 0 : e.child) && /* @__PURE__ */ i(
250
- "button",
251
- {
252
- className: "text-default hover:text-emphasis p-0 text-xs font-normal",
253
- color: "minimal",
254
- "data-testid": e == null ? void 0 : e["data-testid"],
255
- onClick: e == null ? void 0 : e.onClick,
256
- children: e == null ? void 0 : e.child
257
- }
258
- )
259
- ] })
260
- ]
261
- }
262
- );
263
- }
264
- const he = [
265
- {
266
- id: 17,
267
- thumbnailUrl: "https://img.youtube.com/vi/fMHW6jYPIb8/0.jpg",
268
- mediaLink: "https://go.cal.com/embed-video",
269
- title: "Embed",
270
- description: "Embed your booking page on your website",
271
- href: "https://go.cal.com/embed-video"
272
- },
273
- {
274
- id: 16,
275
- thumbnailUrl: "https://img.youtube.com/vi/xopxmk2H4Ng/0.jpg",
276
- mediaLink: "https://go.cal.com/paid-booking",
277
- title: "Paid Bookings",
278
- description: "Charge for your time with Cal.com's paid bookings",
279
- href: "https://go.cal.com/paid-booking"
280
- },
281
- {
282
- id: 15,
283
- thumbnailUrl: "https://img.youtube.com/vi/ZjSD1yPgLLQ/0.jpg",
284
- mediaLink: "https://go.cal.com/instant-meetings-video",
285
- title: "Instant Meetings",
286
- description: "Book meetings instantly with a link",
287
- href: "https://go.cal.com/instant-meetings-video"
288
- },
289
- {
290
- id: 14,
291
- thumbnailUrl: "https://img.youtube.com/vi/IZ4-nUiIpvY/0.jpg",
292
- mediaLink: "https://go.cal.com/custom-attributes",
293
- title: "Custom Attributes",
294
- description: "Define roles and attributes for your teams",
295
- href: "https://go.cal.com/custom-attributes"
296
- },
297
- {
298
- id: 13,
299
- thumbnailUrl: "https://img.youtube.com/vi/TTAASLLPKk0/0.jpg",
300
- mediaLink: "https://go.cal.com/ooo-video",
301
- title: "ooo.new",
302
- description: "Easily go out-of-office",
303
- href: "https://go.cal.com/ooo-video"
304
- },
305
- {
306
- id: 12,
307
- thumbnailUrl: "https://cal.com/og-image-cal-ai.jpg",
308
- mediaLink: "https://go.cal.com/cal-ai",
309
- title: "Cal.ai",
310
- description: "Your personal AI scheduling assistant",
311
- href: "https://go.cal.com/cal-ai"
312
- },
313
- {
314
- id: 11,
315
- thumbnailUrl: "https://img.youtube.com/vi/KTg_qzA9NEc/0.jpg",
316
- mediaLink: "https://go.cal.com/insights",
317
- title: "Insights",
318
- description: "Get a better understanding of your business",
319
- href: "https://go.cal.com/insights"
320
- },
321
- {
322
- id: 10,
323
- thumbnailUrl: "https://img.youtube.com/vi/jvaBafzVUQc/0.jpg",
324
- mediaLink: "https://go.cal.com/video",
325
- title: "Cal Video",
326
- description: "Free video conferencing with recording",
327
- href: "https://go.cal.com/video"
328
- },
329
- {
330
- id: 9,
331
- thumbnailUrl: "https://img.youtube.com/vi/93iOmzHieCU/0.jpg",
332
- mediaLink: "https://go.cal.com/round-robin",
333
- title: "Round-Robin",
334
- description: "Create advanced group meetings with round-robin",
335
- href: "https://go.cal.com/round-robin"
336
- },
337
- {
338
- id: 8,
339
- thumbnailUrl: "https://img.youtube.com/vi/piKlAiibAFo/0.jpg",
340
- mediaLink: "https://go.cal.com/workflows",
341
- title: "Automate Workflows",
342
- description: "Make time work for you and automate tasks",
343
- href: "https://go.cal.com/workflows"
344
- },
345
- {
346
- id: 7,
347
- thumbnailUrl: "https://img.youtube.com/vi/UVXgo12cY4g/0.jpg",
348
- mediaLink: "https://go.cal.com/routing-forms",
349
- title: "Routing Forms",
350
- description: "Ask questions and route to the correct person",
351
- href: "https://go.cal.com/routing-forms"
352
- },
353
- {
354
- id: 6,
355
- thumbnailUrl: "https://img.youtube.com/vi/yGiZo1Ry5-8/0.jpg",
356
- mediaLink: "https://go.cal.com/recurring-video",
357
- title: "Recurring Bookings",
358
- description: "Learn how to create a recurring schedule",
359
- href: "https://go.cal.com/recurring-video"
360
- },
361
- {
362
- id: 5,
363
- thumbnailUrl: "https://img.youtube.com/vi/0v_nQtpxC_4/0.jpg",
364
- mediaLink: "https://go.cal.com/payments-video",
365
- title: "Accept Payments",
366
- description: "Charge for your time with Cal.com's Stripe App",
367
- href: "https://app.cal.com/apps/stripe"
368
- },
369
- {
370
- id: 4,
371
- thumbnailUrl: "https://img.youtube.com/vi/zGr_s-fG84k/0.jpg",
372
- mediaLink: "https://go.cal.com/confirmation-video",
373
- title: "Requires Confirmation",
374
- description: "Learn how to be in charge of your bookings",
375
- href: "https://cal.com/resources/feature/opt-in"
376
- },
377
- {
378
- id: 3,
379
- thumbnailUrl: "https://img.youtube.com/vi/-L8MCiT6uhQ/0.jpg",
380
- mediaLink: "https://youtu.be/-L8MCiT6uhQ?si=DRJzRNhN85hqAwBl",
381
- title: "Routing Forms, Workflows",
382
- description: "Ask screening questions of potential bookers to connect them with the right person",
383
- href: "https://youtu.be/-L8MCiT6uhQ?si=DRJzRNhN85hqAwBl"
384
- },
385
- {
386
- id: 2,
387
- thumbnailUrl: "https://img.youtube.com/vi/EAc46SPL6iA/0.jpg",
388
- mediaLink: "https://go.cal.com/teams-video",
389
- title: "How to set up Teams",
390
- description: "Learn how to use round-robin and collective events.",
391
- href: "https://cal.com/docs/enterprise-features/teams"
392
- },
393
- {
394
- id: 1,
395
- thumbnailUrl: "https://img.youtube.com/vi/VZ5PfQzzxBw/0.jpg",
396
- mediaLink: "https://youtu.be/VZ5PfQzzxBw?si=oB0LPSxG8dWIwg5a",
397
- title: "Dynamic booking links",
398
- description: "Booking link that allows people to quickly schedule meetings.",
399
- href: "https://youtu.be/VZ5PfQzzxBw?si=oB0LPSxG8dWIwg5a"
400
- }
401
- ], v = ce(he).slice(0).reverse();
402
- function ue() {
403
- const { t } = R(), [r, o] = Q(() => {
404
- if (typeof window > "u")
405
- return v;
406
- try {
407
- const e = x.getItem("removedTipsIds");
408
- if (e !== null) {
409
- const s = e.split(",").map((d) => parseInt(d, 10));
410
- return v.filter((d) => s.indexOf(d.id) === -1);
411
- } else
412
- return v;
413
- } catch {
414
- return v;
415
- }
416
- }), n = (e) => {
417
- o((s) => {
418
- const l = x.getItem("removedTipsIds") || "", d = s.findIndex((u) => u.id === e);
419
- return d === -1 ? [...s] : (x.setItem(
420
- "removedTipsIds",
421
- `${s[d].id.toString()}${l.length > 0 ? `,${l}` : ""}`
422
- ), s.splice(d, 1), [...s]);
423
- });
424
- }, a = r.slice(0).reverse();
425
- return /* @__PURE__ */ i(
426
- "div",
427
- {
428
- className: "hidden pb-4 pt-8 lg:grid",
429
- style: {
430
- gridTemplateColumns: "1fr"
431
- },
432
- children: r.map((e) => {
433
- const s = a.indexOf(e) === 0;
434
- return /* @__PURE__ */ i(
435
- "div",
436
- {
437
- className: "relative",
438
- style: {
439
- gridRowStart: 1,
440
- gridColumnStart: 1
441
- },
442
- children: /* @__PURE__ */ i(
443
- "div",
444
- {
445
- className: "relative",
446
- style: {
447
- transform: `scale(${1 - a.indexOf(e) / 20})`,
448
- top: -a.indexOf(e) * 10,
449
- opacity: `${1 - a.indexOf(e) / 7}`
450
- },
451
- children: /* @__PURE__ */ i(
452
- me,
453
- {
454
- variant: "SidebarCard",
455
- thumbnailUrl: e.thumbnailUrl,
456
- mediaLink: s ? e.mediaLink : void 0,
457
- title: e.title,
458
- description: e.description,
459
- learnMore: s ? { href: e.href, text: t("learn_more") } : void 0,
460
- actionButton: s ? { onClick: () => n(e.id), child: t("dismiss") } : void 0,
461
- containerProps: {
462
- tabIndex: s ? void 0 : -1,
463
- "aria-hidden": s ? void 0 : "true"
464
- }
465
- }
466
- )
467
- }
468
- )
469
- },
470
- e.id
471
- );
472
- })
473
- }
474
- );
475
- }
476
- const be = z(ue);
477
- function ve({
478
- title: t,
479
- description: r,
480
- background: o,
481
- features: n,
482
- buttons: a,
483
- isParentLoading: e,
484
- children: s,
485
- plan: l
486
- }) {
487
- const { resolvedTheme: d } = _(), { isPending: u, hasTeamPlan: m } = $(), { data: p } = V.viewer.teams.getUpgradeable.useQuery(), k = `${o}${d === "dark" ? "-dark" : ""}.jpg`, w = !1, C = !!(p != null && p[0]);
488
- return l === "team" && (m || C) ? /* @__PURE__ */ i(g, { children: s }) : l === "enterprise" && w ? /* @__PURE__ */ i(g, { children: s }) : u ? /* @__PURE__ */ i(g, { children: e }) : /* @__PURE__ */ c(g, { children: [
489
- /* @__PURE__ */ c("div", { className: "relative flex min-h-[295px] w-full items-center justify-between overflow-hidden rounded-lg pb-10", children: [
490
- /* @__PURE__ */ c("picture", { className: "absolute min-h-[295px] w-full rounded-lg object-cover", children: [
491
- /* @__PURE__ */ i("source", { srcSet: k, media: "(prefers-color-scheme: dark)" }),
492
- /* @__PURE__ */ i(
493
- "img",
494
- {
495
- className: "absolute min-h-[295px] w-full select-none rounded-lg object-cover object-left md:object-center",
496
- src: k,
497
- loading: "lazy",
498
- alt: t
499
- }
500
- )
501
- ] }),
502
- /* @__PURE__ */ c("div", { className: "relative my-4 px-8 sm:px-14", children: [
503
- /* @__PURE__ */ i("h1", { className: h("font-cal mt-4 text-3xl"), children: t }),
504
- /* @__PURE__ */ i("p", { className: h("mb-8 mt-4 max-w-sm"), children: r }),
505
- a
506
- ] })
507
- ] }),
508
- /* @__PURE__ */ i("div", { className: "mt-4 grid-cols-3 md:grid md:gap-4", children: n.map((f) => /* @__PURE__ */ c("div", { className: "bg-muted mb-4 min-h-[180px] w-full rounded-md p-8 md:mb-0", children: [
509
- f.icon,
510
- /* @__PURE__ */ i("h2", { className: "font-cal text-emphasis mt-4 text-lg", children: f.title }),
511
- /* @__PURE__ */ i("p", { className: "text-default", children: f.description })
512
- ] }, f.title)) })
513
- ] });
514
- }
515
- export {
516
- be as Tips,
517
- ve as UpgradeTip
518
- };