@calcom/atoms 1.1.0-booker → 1.1.1-debug-dont-use

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 (137) hide show
  1. package/dist/{AddressInput-6TIOefqU.js → AddressInput-CVMPei2D.js} +3 -3
  2. package/dist/{AlbyPriceComponent-zZlkVZTy.js → AlbyPriceComponent-E6ULoDL6.js} +29 -29
  3. package/dist/AppCard-cTGNOAHy.js +281 -0
  4. package/dist/AppListCardPlatformWrapper-NSThSuXk.js +9 -0
  5. package/dist/AppListCardWebWrapper-XwKnQn63.js +74 -0
  6. package/dist/AppSettingsInterface-YBMLeXt4.js +23 -0
  7. package/dist/AppSettingsInterface-ZH3XhiYG.js +75 -0
  8. package/dist/AppSettingsInterface-x5iDZUBe.js +29 -0
  9. package/dist/DateRangePicker-f_B5u4e9.js +2405 -0
  10. package/dist/EventTypeAppCardInterface--fNkLgYH.js +858 -0
  11. package/dist/EventTypeAppCardInterface-0cii-lHS.js +34 -0
  12. package/dist/EventTypeAppCardInterface-0gSJQJit.js +32 -0
  13. package/dist/EventTypeAppCardInterface-2TR5xhf8.js +33 -0
  14. package/dist/EventTypeAppCardInterface-9C3Wfgpy.js +24 -0
  15. package/dist/EventTypeAppCardInterface-C6ns7UmL.js +51 -0
  16. package/dist/EventTypeAppCardInterface-F5At064k.js +41 -0
  17. package/dist/EventTypeAppCardInterface-JCEQYUtS.js +31 -0
  18. package/dist/EventTypeAppCardInterface-L_OQx-GG.js +34 -0
  19. package/dist/EventTypeAppCardInterface-NMuTJqnR.js +32 -0
  20. package/dist/EventTypeAppCardInterface-Q8BoN8IR.js +24 -0
  21. package/dist/EventTypeAppCardInterface-TSa1z_cz.js +24 -0
  22. package/dist/EventTypeAppCardInterface-V2CVt-gp.js +39 -0
  23. package/dist/EventTypeAppCardInterface-VdYfOsab.js +51 -0
  24. package/dist/EventTypeAppCardInterface-VxD1hz61.js +34 -0
  25. package/dist/EventTypeAppCardInterface-Zei_gfk9.js +42 -0
  26. package/dist/EventTypeAppCardInterface-_2yZa06r.js +34 -0
  27. package/dist/EventTypeAppCardInterface-_mJKoptx.js +41 -0
  28. package/dist/EventTypeAppCardInterface-cZjp0yNN.js +34 -0
  29. package/dist/EventTypeAppCardInterface-ix9-eOy7.js +34 -0
  30. package/dist/EventTypeAppCardInterface-omHgFR_2.js +24 -0
  31. package/dist/EventTypeAppCardInterface-pS7YojCs.js +34 -0
  32. package/dist/EventTypeAppCardInterface-qaVZIE5N.js +49 -0
  33. package/dist/EventTypeAppCardInterface-ugSSelEX.js +42 -0
  34. package/dist/EventTypeAppCardInterface-wPiG1Uab.js +24 -0
  35. package/dist/EventTypeAppCardInterface-x8x6_qO2.js +86 -0
  36. package/dist/EventTypeAppSettingsInterface-A-zPsqPN.js +298 -0
  37. package/dist/EventTypeAppSettingsInterface-Mw0nUm2I.js +48 -0
  38. package/dist/EventTypeAppSettingsInterface-N-387tFo.js +120 -0
  39. package/dist/EventTypeAppSettingsInterface-SrOLSflD.js +43 -0
  40. package/dist/EventTypeAppSettingsInterface-TxRlEgaM.js +78 -0
  41. package/dist/EventTypeAppSettingsInterface-USUuP18O.js +24 -0
  42. package/dist/EventTypeAppSettingsInterface-_jGTLesb.js +72 -0
  43. package/dist/EventTypeAppSettingsInterface-aGQavYPZ.js +42 -0
  44. package/dist/EventTypeAppSettingsInterface-mf5L8PKf.js +25 -0
  45. package/dist/EventTypeAppSettingsInterface-uJw6TEuG.js +221 -0
  46. package/dist/EventTypeAppSettingsInterface-wRyNHA8Z.js +23 -0
  47. package/dist/EventTypeAppSettingsInterface-xfI4WyE9.js +23 -0
  48. package/dist/InstallAppButton-3pRRFAeS.js +14 -0
  49. package/dist/InstallAppButton-JXhBVaYJ.js +29 -0
  50. package/dist/InstallAppButton-sMIEaIrB.js +58 -0
  51. package/dist/InstallAppButton-xME8ESsW.js +14 -0
  52. package/dist/{PhoneInput-_EJl7Rqu.js → PhoneInput-_96ULuJw.js} +1 -1
  53. package/dist/StripePaymentForm-1ANfOJyB.js +493 -0
  54. package/dist/cal-atoms.js +36 -5
  55. package/dist/currencyOptions-kannG2hu.js +61 -0
  56. package/dist/index-VZRHTsae.js +28 -0
  57. package/dist/index-ZQlxzdt5.js +157233 -0
  58. package/dist/index-me6CfU0W.js +518 -0
  59. package/dist/{index-_P-UqUYu.js → index-qcnOr3S-.js} +1 -1
  60. package/dist/packages/features/bookings/Booker/components/hooks/useCalendars.d.ts +4 -0
  61. package/dist/packages/features/bookings/Booker/components/hooks/useCalendars.d.ts.map +1 -1
  62. package/dist/packages/features/bookings/Booker/store.d.ts +3 -1
  63. package/dist/packages/features/bookings/Booker/store.d.ts.map +1 -1
  64. package/dist/packages/features/bookings/Booker/types.d.ts +1 -0
  65. package/dist/packages/features/bookings/Booker/types.d.ts.map +1 -1
  66. package/dist/packages/features/bookings/lib/book-event-form/booking-to-mutation-input-mapper.d.ts +2 -1
  67. package/dist/packages/features/bookings/lib/book-event-form/booking-to-mutation-input-mapper.d.ts.map +1 -1
  68. package/dist/packages/features/bookings/lib/getBookingDataSchema.d.ts +3 -0
  69. package/dist/packages/features/bookings/lib/getBookingDataSchema.d.ts.map +1 -1
  70. package/dist/packages/features/bookings/lib/getBookingDataSchemaForApi.d.ts +5 -0
  71. package/dist/packages/features/bookings/lib/getBookingDataSchemaForApi.d.ts.map +1 -1
  72. package/dist/packages/features/bookings/lib/getBookingInfo.d.ts +2 -0
  73. package/dist/packages/features/bookings/lib/getBookingInfo.d.ts.map +1 -1
  74. package/dist/packages/features/bookings/lib/getUserBooking.d.ts +1 -0
  75. package/dist/packages/features/bookings/lib/getUserBooking.d.ts.map +1 -1
  76. package/dist/packages/features/bookings/lib/handleNewBooking/getBookingData.d.ts +4 -0
  77. package/dist/packages/features/bookings/lib/handleNewBooking/getBookingData.d.ts.map +1 -1
  78. package/dist/packages/features/bookings/lib/handleNewBooking/loadUsers.d.ts.map +1 -1
  79. package/dist/packages/features/bookings/lib/handleNewBooking.d.ts.map +1 -1
  80. package/dist/packages/features/data-table/lib/__tests__/server.test.d.ts +2 -0
  81. package/dist/packages/features/data-table/lib/__tests__/server.test.d.ts.map +1 -0
  82. package/dist/packages/features/data-table/lib/server.d.ts +8 -0
  83. package/dist/packages/features/data-table/lib/server.d.ts.map +1 -1
  84. package/dist/packages/features/ee/round-robin/assignmentReason/AssignmentReasonRecorder.d.ts +3 -1
  85. package/dist/packages/features/ee/round-robin/assignmentReason/AssignmentReasonRecorder.d.ts.map +1 -1
  86. package/dist/packages/features/ee/round-robin/assignmentReason/appAssignmentReasonHandler.d.ts +2 -1
  87. package/dist/packages/features/ee/round-robin/assignmentReason/appAssignmentReasonHandler.d.ts.map +1 -1
  88. package/dist/packages/features/ee/round-robin/roundRobinReassignment.d.ts.map +1 -1
  89. package/dist/packages/features/ee/workflows/api/scheduleSMSReminders.d.ts.map +1 -1
  90. package/dist/packages/features/ee/workflows/api/scheduleWhatsappReminders.d.ts.map +1 -1
  91. package/dist/packages/features/ee/workflows/lib/getWorkflowReminders.d.ts.map +1 -1
  92. package/dist/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.d.ts.map +1 -1
  93. package/dist/packages/features/eventtypes/components/Locations.d.ts.map +1 -1
  94. package/dist/packages/features/eventtypes/components/tabs/advanced/RequiresConfirmationController.d.ts.map +1 -1
  95. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts +985 -1
  96. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts.map +1 -1
  97. package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts +166 -0
  98. package/dist/packages/features/eventtypes/lib/getTeamEventType.d.ts.map +1 -0
  99. package/dist/packages/features/eventtypes/lib/types.d.ts +1 -0
  100. package/dist/packages/features/eventtypes/lib/types.d.ts.map +1 -1
  101. package/dist/packages/features/schedules/components/Schedule.d.ts.map +1 -1
  102. package/dist/packages/platform/atoms/booker/BookerPlatformWrapper.d.ts.map +1 -1
  103. package/dist/packages/platform/atoms/cal-provider/BaseCalProvider.d.ts.map +1 -1
  104. package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts +1 -0
  105. package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts.map +1 -1
  106. package/dist/packages/platform/atoms/event-types/hooks/useAtomUpdateEventType.d.ts +1 -0
  107. package/dist/packages/platform/atoms/event-types/hooks/useAtomUpdateEventType.d.ts.map +1 -1
  108. package/dist/packages/platform/atoms/event-types/hooks/useEventTypeForm.d.ts.map +1 -1
  109. package/dist/packages/platform/atoms/hooks/bookings/useCreateInstantBooking.d.ts +1 -0
  110. package/dist/packages/platform/atoms/hooks/bookings/useCreateInstantBooking.d.ts.map +1 -1
  111. package/dist/packages/platform/atoms/hooks/bookings/useHandleBookEvent.d.ts.map +1 -1
  112. package/dist/packages/platform/atoms/hooks/event-types/public/useAtomGetPublicEvent.d.ts.map +1 -1
  113. package/dist/packages/platform/atoms/index.d.ts +34 -0
  114. package/dist/packages/platform/atoms/index.d.ts.map +1 -1
  115. package/dist/packages/platform/libraries/repositories.d.ts +1 -1
  116. package/dist/packages/platform/libraries/repositories.d.ts.map +1 -1
  117. package/dist/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-fields.input.d.ts.map +1 -1
  118. package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots-input.pipe.d.ts +6 -0
  119. package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots-input.pipe.d.ts.map +1 -1
  120. package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots.input.d.ts +0 -4
  121. package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots.input.d.ts.map +1 -1
  122. package/dist/packages/prisma/zod/calendarcache.d.ts +3 -0
  123. package/dist/packages/prisma/zod/calendarcache.d.ts.map +1 -1
  124. package/dist/packages/prisma/zod/calvideosettings.d.ts +3 -0
  125. package/dist/packages/prisma/zod/calvideosettings.d.ts.map +1 -1
  126. package/dist/packages/prisma/zod/custom/booking.d.ts +9 -0
  127. package/dist/packages/prisma/zod/custom/booking.d.ts.map +1 -1
  128. package/dist/packages/prisma-client/index.d.ts +65 -0
  129. package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts +1 -1
  130. package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts.map +1 -1
  131. package/dist/packages/trpc/server/routers/viewer/slots/util.test.d.ts +2 -0
  132. package/dist/packages/trpc/server/routers/viewer/slots/util.test.d.ts.map +1 -0
  133. package/dist/style.css +1 -1
  134. package/dist/useIsAppEnabled-V8Jl9FX-.js +18 -0
  135. package/package.json +1 -1
  136. package/dist/index-4kA2xtz7.js +0 -1957
  137. package/dist/index-ESVL5ZDq.js +0 -82852
@@ -1,5 +1,5 @@
1
1
  import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
- import { I as n, b as c, c as o } from "./index-ESVL5ZDq.js";
2
+ import { N as n, e as o, M as c } from "./index-ZQlxzdt5.js";
3
3
  function r({ value: s, onChange: t, ...a }) {
4
4
  return /* @__PURE__ */ m("div", { className: "relative flex items-center", children: [
5
5
  /* @__PURE__ */ e(
@@ -11,14 +11,14 @@ function r({ value: s, onChange: t, ...a }) {
11
11
  }
12
12
  ),
13
13
  /* @__PURE__ */ e(
14
- c,
14
+ o,
15
15
  {
16
16
  ...a,
17
17
  value: s,
18
18
  onChange: (l) => {
19
19
  t(l.target.value);
20
20
  },
21
- className: o("pl-10", a == null ? void 0 : a.className)
21
+ className: c("pl-10", a == null ? void 0 : a.className)
22
22
  }
23
23
  )
24
24
  ] });
@@ -1,7 +1,7 @@
1
- import { jsx as z, jsxs as er } from "react/jsx-runtime";
2
- import J from "react";
3
- import { d as tr, S as nr } from "./index-ESVL5ZDq.js";
4
- const K = function(s, r = !0) {
1
+ import { jsx as K, jsxs as er } from "react/jsx-runtime";
2
+ import z from "react";
3
+ import { K as tr, O as nr } from "./index-ZQlxzdt5.js";
4
+ const J = function(s, r = !0) {
5
5
  if (s.destroyed)
6
6
  throw new Error("Hash instance has been destroyed");
7
7
  if (r && s.finished)
@@ -33,7 +33,7 @@ class ir extends sr {
33
33
  super(), this.blockLen = r, this.outputLen = i, this.padOffset = c, this.isLE = f, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(r), this.view = N(this.buffer);
34
34
  }
35
35
  update(r) {
36
- K(this);
36
+ J(this);
37
37
  const { view: i, buffer: c, blockLen: f } = this, u = (r = Z(r)).length;
38
38
  for (let l = 0; l < u; ) {
39
39
  const g = Math.min(f - this.pos, u - l);
@@ -48,7 +48,7 @@ class ir extends sr {
48
48
  return this.length += r.length, this.roundClean(), this;
49
49
  }
50
50
  digestInto(r) {
51
- K(this), function(b, y) {
51
+ J(this), function(b, y) {
52
52
  (function(x, ...B) {
53
53
  if (!(x instanceof Uint8Array))
54
54
  throw new Error("Expected Uint8Array");
@@ -67,8 +67,8 @@ class ir extends sr {
67
67
  (function(b, y, E, x) {
68
68
  if (typeof b.setBigUint64 == "function")
69
69
  return b.setBigUint64(y, E, x);
70
- const B = BigInt(32), k = BigInt(4294967295), _ = Number(E >> B & k), S = Number(E & k), j = x ? 0 : 4;
71
- b.setUint32(y + (x ? 4 : 0), _, x), b.setUint32(y + j, S, x);
70
+ const B = BigInt(32), k = BigInt(4294967295), _ = Number(E >> B & k), C = Number(E & k), j = x ? 0 : 4;
71
+ b.setUint32(y + (x ? 4 : 0), _, x), b.setUint32(y + j, C, x);
72
72
  })(c, f - 8, BigInt(8 * this.length), u), this.process(c, 0);
73
73
  const g = N(r), m = this.outputLen;
74
74
  if (m % 4)
@@ -347,33 +347,33 @@ Q = function(s, r) {
347
347
  }
348
348
  return Uint8Array.from(t);
349
349
  } }, r.base58check = (e) => c(B(4, (t) => e(e(t))), r.base58);
350
- const S = c(f("qpzry9x8gf2tvdw0s3jn54khce6mua7l"), u("")), j = [996825010, 642813549, 513874426, 1027748829, 705979059];
351
- function C(e) {
350
+ const C = c(f("qpzry9x8gf2tvdw0s3jn54khce6mua7l"), u("")), j = [996825010, 642813549, 513874426, 1027748829, 705979059];
351
+ function S(e) {
352
352
  const t = e >> 25;
353
353
  let n = (33554431 & e) << 5;
354
354
  for (let o = 0; o < j.length; o++)
355
355
  (t >> o & 1) == 1 && (n ^= j[o]);
356
356
  return n;
357
357
  }
358
- function H(e, t, n = 1) {
358
+ function V(e, t, n = 1) {
359
359
  const o = e.length;
360
360
  let a = 1;
361
361
  for (let h = 0; h < o; h++) {
362
362
  const d = e.charCodeAt(h);
363
363
  if (d < 33 || d > 126)
364
364
  throw new Error(`Invalid prefix (${e})`);
365
- a = C(a) ^ d >> 5;
365
+ a = S(a) ^ d >> 5;
366
366
  }
367
- a = C(a);
367
+ a = S(a);
368
368
  for (let h = 0; h < o; h++)
369
- a = C(a) ^ 31 & e.charCodeAt(h);
369
+ a = S(a) ^ 31 & e.charCodeAt(h);
370
370
  for (let h of t)
371
- a = C(a) ^ h;
371
+ a = S(a) ^ h;
372
372
  for (let h = 0; h < 6; h++)
373
- a = C(a);
374
- return a ^= n, S.encode(b([a % 2 ** 30], 30, 5, !1));
373
+ a = S(a);
374
+ return a ^= n, C.encode(b([a % 2 ** 30], 30, 5, !1));
375
375
  }
376
- function O(e) {
376
+ function H(e) {
377
377
  const t = e === "bech32" ? 1 : 734539939, n = E(5), o = n.decode, a = n.encode, h = x(o);
378
378
  function d(w, p = 90) {
379
379
  if (typeof w != "string")
@@ -389,7 +389,7 @@ Q = function(s, r) {
389
389
  const G = w.slice(0, v), D = w.slice(v + 1);
390
390
  if (D.length < 6)
391
391
  throw new Error("Data must be at least 6 characters long");
392
- const M = S.decode(D).slice(0, -6), P = H(G, M, t);
392
+ const M = C.decode(D).slice(0, -6), P = V(G, M, t);
393
393
  if (!D.endsWith(P))
394
394
  throw new Error(`Invalid checksum in ${w}: expected "${P}"`);
395
395
  return { prefix: G, words: M };
@@ -402,13 +402,13 @@ Q = function(s, r) {
402
402
  const v = w.length + 7 + p.length;
403
403
  if ($ !== !1 && v > $)
404
404
  throw new TypeError(`Length ${v} exceeds limit ${$}`);
405
- return `${w = w.toLowerCase()}1${S.encode(p)}${H(w, p, t)}`;
405
+ return `${w = w.toLowerCase()}1${C.encode(p)}${V(w, p, t)}`;
406
406
  }, decode: d, decodeToBytes: function(w) {
407
407
  const { prefix: p, words: $ } = d(w, !1);
408
408
  return { prefix: p, words: $, bytes: o($) };
409
409
  }, decodeUnsafe: x(d), fromWords: o, fromWordsUnsafe: h, toWords: a };
410
410
  }
411
- r.bech32 = O("bech32"), r.bech32m = O("bech32m"), r.utf8 = { encode: (e) => new TextDecoder().decode(e), decode: (e) => new TextEncoder().encode(e) }, r.hex = c(E(4), f("0123456789abcdef"), u(""), g((e) => {
411
+ r.bech32 = H("bech32"), r.bech32m = H("bech32m"), r.utf8 = { encode: (e) => new TextDecoder().decode(e), decode: (e) => new TextEncoder().encode(e) }, r.hex = c(E(4), f("0123456789abcdef"), u(""), g((e) => {
412
412
  if (typeof e != "string" || e.length % 2)
413
413
  throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);
414
414
  return e.toLowerCase();
@@ -434,26 +434,26 @@ BigInt(1e11);
434
434
  const X = { payment_hash: 1, payment_secret: 16, description: 13, payee: 19, description_hash: 23, expiry: 6, min_final_cltv_expiry: 24, fallback_address: 9, route_hint: 3, feature_bits: 5, metadata: 27 };
435
435
  for (let s = 0, r = Object.keys(X); s < r.length; s++)
436
436
  r[s], X[r[s]].toString();
437
- const V = async (s) => {
437
+ const O = async (s) => {
438
438
  const r = "https://getalby.com/api/rates/" + s.toLowerCase() + ".json";
439
439
  return (await (await fetch(r)).json()).rate_float / 1e8;
440
440
  }, Y = async ({ satoshi: s, currency: r }) => {
441
- const i = await V(r);
441
+ const i = await O(r);
442
442
  return Number(s) * i;
443
443
  };
444
- var fr = { __proto__: null, getFiatBtcRate: V, getFiatValue: Y, getSatoshiValue: async ({ amount: s, currency: r }) => {
445
- const i = await V(r);
444
+ var fr = { __proto__: null, getFiatBtcRate: O, getFiatValue: Y, getSatoshiValue: async ({ amount: s, currency: r }) => {
445
+ const i = await O(r);
446
446
  return Math.floor(Number(s) / i);
447
447
  }, getFormattedFiatValue: async ({ satoshi: s, currency: r, locale: i }) => (i || (i = "en"), (await Y({ satoshi: s, currency: r })).toLocaleString(i, { style: "currency", currency: r })) };
448
448
  function wr({ displaySymbol: s, price: r, formattedPrice: i }) {
449
- const [c, f] = J.useState("loading...");
450
- return J.useEffect(() => {
449
+ const [c, f] = z.useState("loading...");
450
+ return z.useEffect(() => {
451
451
  (async () => {
452
452
  const u = await fr.getFiatValue({ satoshi: r, currency: "USD" });
453
453
  f(`$${u.toFixed(2)}`);
454
454
  })();
455
- }, [r]), /* @__PURE__ */ z(tr, { content: c, children: /* @__PURE__ */ er("div", { className: "inline-flex items-center justify-center", children: [
456
- s && /* @__PURE__ */ z(nr, { className: "h-4 w-4" }),
455
+ }, [r]), /* @__PURE__ */ K(tr, { content: c, children: /* @__PURE__ */ er("div", { className: "inline-flex items-center justify-center", children: [
456
+ s && /* @__PURE__ */ K(nr, { className: "h-4 w-4" }),
457
457
  i
458
458
  ] }) });
459
459
  }
@@ -0,0 +1,281 @@
1
+ import { jsx as l, Fragment as O, jsxs as a } from "react/jsx-runtime";
2
+ import { ag as V, ah as v, M as u, N as C, ai as W, y as A, q as H, u as T, aj as q, r as j, _ as N, ak as L, t as F, ae as M, al as g, p as U } from "./index-ZQlxzdt5.js";
3
+ import * as c from "react";
4
+ var y = c.forwardRef((e, r) => {
5
+ const { children: t, ...n } = e, s = c.Children.toArray(t), i = s.find(Z);
6
+ if (i) {
7
+ const o = i.props.children, f = s.map((d) => d === i ? c.Children.count(o) > 1 ? c.Children.only(null) : c.isValidElement(o) ? o.props.children : null : d);
8
+ return /* @__PURE__ */ l(x, { ...n, ref: r, children: c.isValidElement(o) ? c.cloneElement(o, void 0, f) : null });
9
+ }
10
+ return /* @__PURE__ */ l(x, { ...n, ref: r, children: t });
11
+ });
12
+ y.displayName = "Slot";
13
+ var x = c.forwardRef((e, r) => {
14
+ const { children: t, ...n } = e;
15
+ if (c.isValidElement(t)) {
16
+ const s = G(t);
17
+ return c.cloneElement(t, {
18
+ ...p(n, t.props),
19
+ // @ts-ignore
20
+ ref: r ? V(r, s) : s
21
+ });
22
+ }
23
+ return c.Children.count(t) > 1 ? c.Children.only(null) : null;
24
+ });
25
+ x.displayName = "SlotClone";
26
+ var Q = ({ children: e }) => /* @__PURE__ */ l(O, { children: e });
27
+ function Z(e) {
28
+ return c.isValidElement(e) && e.type === Q;
29
+ }
30
+ function p(e, r) {
31
+ const t = { ...r };
32
+ for (const n in r) {
33
+ const s = e[n], i = r[n];
34
+ /^on[A-Z]/.test(n) ? s && i ? t[n] = (...f) => {
35
+ i(...f), s(...f);
36
+ } : s && (t[n] = s) : n === "style" ? t[n] = { ...s, ...i } : n === "className" && (t[n] = [s, i].filter(Boolean).join(" "));
37
+ }
38
+ return { ...e, ...t };
39
+ }
40
+ function G(e) {
41
+ var n, s;
42
+ let r = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, t = r && "isReactWarning" in r && r.isReactWarning;
43
+ return t ? e.ref : (r = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
44
+ }
45
+ const J = ({
46
+ children: e,
47
+ ref: r,
48
+ className: t
49
+ }) => {
50
+ const [n] = v();
51
+ return /* @__PURE__ */ l("div", { ref: n, className: u("bg-muted flex flex-col gap-4 rounded-2xl p-4", t), children: e });
52
+ }, R = ({
53
+ children: e,
54
+ ref: r,
55
+ as: t
56
+ }) => /* @__PURE__ */ l(t ? y : "h2", { ref: r, className: "text-emphasis text-base font-semibold leading-none", children: e }), _ = ({
57
+ children: e,
58
+ ref: r,
59
+ as: t
60
+ }) => /* @__PURE__ */ l(t ? y : "h3", { ref: r, className: "text-subtle line-clamp-1 text-sm", children: e }), b = ({
61
+ ref: e,
62
+ name: r,
63
+ size: t = "md",
64
+ iconSlot: n
65
+ }) => /* @__PURE__ */ l(
66
+ "div",
67
+ {
68
+ ref: e,
69
+ className: u(
70
+ "bg-default border-subtle border-subtle flex items-center justify-center border",
71
+ t === "sm" && "rounded-md p-1",
72
+ t === "md" && "rounded-[10px] p-1.5"
73
+ ),
74
+ children: n || /* @__PURE__ */ l(C, { name: r, className: u(t === "sm" && "h-4 w-4", t === "md" && "h-6 w-6") })
75
+ }
76
+ ), K = ({
77
+ children: e,
78
+ ref: r,
79
+ icon: t,
80
+ title: n,
81
+ description: s,
82
+ iconSlot: i,
83
+ rawHeading: o
84
+ }) => /* @__PURE__ */ a("div", { ref: r, className: "flex items-center justify-between gap-3", children: [
85
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
86
+ t && !i && /* @__PURE__ */ l(b, { name: t }),
87
+ i && /* @__PURE__ */ l(b, { iconSlot: i }),
88
+ /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
89
+ n && /* @__PURE__ */ l(R, { children: n }),
90
+ s && /* @__PURE__ */ l(_, { children: s }),
91
+ o && o
92
+ ] })
93
+ ] }),
94
+ e
95
+ ] }), X = ({ children: e, ref: r }) => /* @__PURE__ */ l("div", { ref: r, className: "flex flex-col gap-4", children: e }), Y = ({ children: e, ref: r }) => {
96
+ const [t] = v();
97
+ return /* @__PURE__ */ l("div", { ref: t, className: "border-muted bg-default flex flex-col gap-4 rounded-xl border p-3", children: e });
98
+ }, z = ({
99
+ children: e,
100
+ ref: r,
101
+ icon: t,
102
+ title: n,
103
+ classNames: s,
104
+ justify: i = "between",
105
+ labelFor: o
106
+ }) => /* @__PURE__ */ a(
107
+ "div",
108
+ {
109
+ ref: r,
110
+ className: u(
111
+ "flex items-center gap-2",
112
+ i === "between" ? "justify-between" : "justify-start",
113
+ s == null ? void 0 : s.container
114
+ ),
115
+ children: [
116
+ /* @__PURE__ */ a("div", { className: u("flex items-center gap-2", s == null ? void 0 : s.title), children: [
117
+ t && /* @__PURE__ */ l(b, { name: t, size: "sm" }),
118
+ /* @__PURE__ */ l("div", { className: u("flex", s == null ? void 0 : s.title), children: /* @__PURE__ */ l("h4", { className: "text-default text-sm font-medium leading-none", id: o, children: n }) })
119
+ ] }),
120
+ e
121
+ ]
122
+ }
123
+ ), $ = ({
124
+ children: e,
125
+ ref: r,
126
+ invert: t,
127
+ classNames: n
128
+ }) => /* @__PURE__ */ l(
129
+ "div",
130
+ {
131
+ ref: r,
132
+ className: u(
133
+ "bg-muted flex flex-col rounded-lg px-[6px] py-1",
134
+ t && "bg-default border-subtle border",
135
+ n == null ? void 0 : n.container
136
+ ),
137
+ children: e
138
+ }
139
+ ), ee = ({
140
+ children: e,
141
+ ref: r
142
+ }) => /* @__PURE__ */ l("div", { ref: r, className: "bg-default border-subtle flex flex-col gap-2 rounded-xl border p-2", children: e }), h = Object.assign(J, {
143
+ Header: K,
144
+ Content: X,
145
+ Title: R,
146
+ Description: _,
147
+ SubSection: Y,
148
+ SubSectionHeader: z,
149
+ SubSectionContent: $,
150
+ SubSectionNested: ee
151
+ });
152
+ function te(e) {
153
+ const { status: r } = W.useSession();
154
+ return A.viewer.apps.appById.useQuery(
155
+ { appId: e },
156
+ {
157
+ enabled: r === "authenticated"
158
+ }
159
+ );
160
+ }
161
+ function ne({
162
+ appId: e,
163
+ className: r,
164
+ returnTo: t,
165
+ teamId: n
166
+ }) {
167
+ const { t: s } = H(), { data: i } = te(e), o = A.useUtils(), f = T(null, {
168
+ returnTo: t,
169
+ onSuccess: (d) => {
170
+ o.viewer.apps.appById.invalidate({ appId: e }), o.viewer.apps.integrations.invalidate({
171
+ extendsFeature: "EventType",
172
+ ...n && { teamId: n }
173
+ }), !(d != null && d.setupPending) && N(s("app_successfully_installed"), "success");
174
+ },
175
+ onError: (d) => {
176
+ d instanceof Error && N(d.message || s("app_could_not_be_installed"), "error");
177
+ }
178
+ });
179
+ return i ? /* @__PURE__ */ l(
180
+ q,
181
+ {
182
+ type: i.type,
183
+ teamsPlanRequired: i.teamsPlanRequired,
184
+ wrapperClassName: u("[@media(max-width:260px)]:w-full", r),
185
+ render: ({ useDefaultComponent: d, ...m }) => (d && (m = {
186
+ ...m,
187
+ onClick: () => {
188
+ f.mutate({
189
+ type: i.type,
190
+ variant: i.variant,
191
+ slug: i.slug,
192
+ ...n && { teamId: n }
193
+ });
194
+ }
195
+ }), /* @__PURE__ */ l(
196
+ j,
197
+ {
198
+ loading: f.isPending,
199
+ color: "secondary",
200
+ className: "[@media(max-width:260px)]:w-full [@media(max-width:260px)]:justify-center",
201
+ StartIcon: "plus",
202
+ ...m,
203
+ children: s("add")
204
+ }
205
+ ))
206
+ }
207
+ ) : null;
208
+ }
209
+ function se({
210
+ app: e,
211
+ description: r,
212
+ switchOnClick: t,
213
+ switchChecked: n,
214
+ children: s,
215
+ returnTo: i,
216
+ teamId: o,
217
+ disableSwitch: f,
218
+ switchTooltip: d,
219
+ hideSettingsIcon: m = !1,
220
+ hideAppCardOptions: E = !1
221
+ }) {
222
+ const { t: w } = L(), [I] = v(), { setAppData: P, LockedIcon: k, disabled: B } = F(), D = M();
223
+ return /* @__PURE__ */ a(h, { className: u(!(e != null && e.isInstalled) && "rounded-xl"), children: [
224
+ /* @__PURE__ */ l(
225
+ h.Header,
226
+ {
227
+ rawHeading: /* @__PURE__ */ a("div", { children: [
228
+ /* @__PURE__ */ a("div", { className: "flex w-full items-center gap-1", children: [
229
+ /* @__PURE__ */ l(h.Title, { children: e == null ? void 0 : e.name }),
230
+ !(e != null && e.isInstalled) && /* @__PURE__ */ l("span", { className: "bg-emphasis ml-1 rounded px-1 py-0.5 text-xs font-medium leading-3 tracking-[0.01em]", children: (e == null ? void 0 : e.categories[0].charAt(0).toUpperCase()) + (e == null ? void 0 : e.categories[0].slice(1)) })
231
+ ] }),
232
+ /* @__PURE__ */ l(h.Description, { children: e == null ? void 0 : e.description })
233
+ ] }),
234
+ iconSlot: /* @__PURE__ */ l(g, { href: `/apps/${e.slug}`, className: "flex h-8 w-8 items-center justify-center", children: /* @__PURE__ */ l(
235
+ "img",
236
+ {
237
+ className: u(
238
+ (e == null ? void 0 : e.logo.includes("-dark")) && "dark:invert",
239
+ "max-h-full max-w-full object-contain"
240
+ ),
241
+ src: e == null ? void 0 : e.logo,
242
+ alt: e == null ? void 0 : e.name
243
+ }
244
+ ) }),
245
+ children: /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("div", { children: e != null && e.isInstalled || e.credentialOwner ? /* @__PURE__ */ l("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ l(
246
+ U,
247
+ {
248
+ size: "sm",
249
+ disabled: !e.enabled || B || f,
250
+ onCheckedChange: (S) => {
251
+ t && t(S), P("enabled", S);
252
+ },
253
+ checked: n,
254
+ LockedIcon: k,
255
+ "data-testid": `${e.slug}-app-switch`,
256
+ tooltip: d
257
+ }
258
+ ) }) : /* @__PURE__ */ l(
259
+ ne,
260
+ {
261
+ className: "ml-auto flex items-center",
262
+ appId: e.slug,
263
+ returnTo: i,
264
+ teamId: o
265
+ }
266
+ ) }) })
267
+ }
268
+ ),
269
+ E ? null : (e == null ? void 0 : e.isInstalled) && n && /* @__PURE__ */ l("div", { ref: I, children: e.isSetupAlready === void 0 || e.isSetupAlready ? /* @__PURE__ */ a("div", { className: "relative text-sm [&_input]:mb-0 [&_input]:leading-4", children: [
270
+ !m && !D && /* @__PURE__ */ l(g, { href: `/apps/${e.slug}/setup`, className: "absolute right-4 top-4", children: /* @__PURE__ */ l(C, { name: "settings", className: "text-default h-4 w-4", "aria-hidden": "true" }) }),
271
+ s
272
+ ] }) : /* @__PURE__ */ a("div", { className: "flex h-64 w-full flex-col items-center justify-center gap-4 ", children: [
273
+ /* @__PURE__ */ l("p", { children: w("this_app_is_not_setup_already") }),
274
+ /* @__PURE__ */ l(g, { href: `/apps/${e.slug}/setup`, children: /* @__PURE__ */ l(j, { StartIcon: "settings", children: w("setup") }) })
275
+ ] }) })
276
+ ] });
277
+ }
278
+ export {
279
+ se as A,
280
+ h as S
281
+ };
@@ -0,0 +1,9 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { A as p } from "./index-ZQlxzdt5.js";
3
+ function s(o) {
4
+ const t = `https://app.cal.com${o.logo}`;
5
+ return /* @__PURE__ */ r(p, { ...o, logo: t });
6
+ }
7
+ export {
8
+ s as default
9
+ };
@@ -0,0 +1,74 @@
1
+ import { jsx as P } from "react/jsx-runtime";
2
+ import { Q as i, s as y, R as A, U as R, A as Q } from "./index-ZQlxzdt5.js";
3
+ import { useMemo as $, useEffect as d, useCallback as b, useState as L, useRef as w } from "react";
4
+ i.string().or(i.number()).or(i.array(i.number())).transform((r) => typeof r == "string" ? r.split(",").map((o) => Number(o)) : Array.isArray(r) ? r : [r]);
5
+ i.preprocess((r) => i.string().parse(r).split(","), i.string().array()).or(i.string().array());
6
+ function U(r) {
7
+ const o = y.useRouter(), c = A(), u = y.usePathname(), a = r.safeParse(c);
8
+ let s = $(() => ({}), []);
9
+ d(() => {
10
+ a.success && a.data && Object.entries(a.data).forEach(([e, t]) => {
11
+ if (e in c || !t)
12
+ return;
13
+ const n = new URLSearchParams(s);
14
+ n.set(String(e), String(t)), o.replace(`${u}?${n.toString()}`);
15
+ });
16
+ }, [a, r, o, u, c, s]), a.success ? s = a.data : a.success || console.error(a.error);
17
+ const m = b(
18
+ function(t, n) {
19
+ const p = new URLSearchParams(s);
20
+ p.set(String(t), String(n)), o.replace(`${u}?${p.toString()}`);
21
+ },
22
+ // eslint-disable-next-line react-hooks/exhaustive-deps
23
+ [s, o]
24
+ );
25
+ function l(e) {
26
+ const t = new URLSearchParams(s);
27
+ t.delete(String(e)), o.replace(`${u}?${t.toString()}`);
28
+ }
29
+ function f(e, t) {
30
+ const n = s[e];
31
+ if (Array.isArray(n)) {
32
+ if (n.includes(t))
33
+ return;
34
+ m(e, [...n, t]);
35
+ } else
36
+ m(e, [t]);
37
+ }
38
+ function h(e, t) {
39
+ const n = s[e];
40
+ if (Array.isArray(n) && n.length > 1) {
41
+ const p = n.filter((S) => S !== t);
42
+ m(e, p);
43
+ } else
44
+ l(e);
45
+ }
46
+ function g() {
47
+ u !== null && o.replace(u);
48
+ }
49
+ return {
50
+ data: s,
51
+ setQuery: m,
52
+ removeByKey: l,
53
+ pushItemToKey: f,
54
+ removeItemByKeyAndValue: h,
55
+ removeAllQueryParams: g
56
+ };
57
+ }
58
+ const x = i.object({ hl: i.string().optional() });
59
+ function j(r) {
60
+ const { slug: o, shouldHighlight: c } = r, {
61
+ data: { hl: u }
62
+ } = U(x), a = y.useRouter(), [s, m] = L(c && u === o), l = w(null), f = R(), h = y.usePathname();
63
+ return d(() => (c && s && f !== null && h !== null && (l.current = setTimeout(() => {
64
+ const g = new URLSearchParams(f.toString());
65
+ g.delete("hl"), g.delete("category"), m(!1);
66
+ const e = g.toString();
67
+ a.replace(`${h}${e !== "" ? `?${e}` : ""}`);
68
+ }, 3e3)), () => {
69
+ l.current && (clearTimeout(l.current), l.current = null);
70
+ }), [s, h, a, f, c]), /* @__PURE__ */ P(Q, { ...r });
71
+ }
72
+ export {
73
+ j as default
74
+ };
@@ -0,0 +1,23 @@
1
+ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
+ import { useState as p } from "react";
3
+ import { q as r, f as u, r as i } from "./index-ZQlxzdt5.js";
4
+ function d() {
5
+ const { t: e } = r(), [s, n] = p("");
6
+ return /* @__PURE__ */ o("div", { className: "space-y-4 px-4 pb-4 pt-4 text-sm", children: [
7
+ /* @__PURE__ */ t(
8
+ u,
9
+ {
10
+ placeholder: "Some Input",
11
+ value: s,
12
+ name: "Enter Input",
13
+ onChange: async (a) => {
14
+ n(a.target.value);
15
+ }
16
+ }
17
+ ),
18
+ /* @__PURE__ */ t(i, { children: e("submit") })
19
+ ] });
20
+ }
21
+ export {
22
+ d as default
23
+ };
@@ -0,0 +1,75 @@
1
+ import { jsxs as a, jsx as e, Fragment as r } from "react/jsx-runtime";
2
+ import { r as i, q as o } from "./index-ZQlxzdt5.js";
3
+ function d({ template: t }) {
4
+ return /* @__PURE__ */ a("div", { className: "min-h-16 bg-default border-subtle sticky flex flex-col justify-between gap-4 rounded-md border p-5", children: [
5
+ /* @__PURE__ */ a("div", { className: "flex items-start justify-start", children: [
6
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "mr-4 flex h-12 w-12 items-center justify-center rounded-md p-1", children: /* @__PURE__ */ e("img", { className: "h-8", alt: t.app, src: `/api/app-store/zapier/${t.icon}` }) }) }),
7
+ /* @__PURE__ */ e("div", { className: "mr-4", children: /* @__PURE__ */ a("div", { children: [
8
+ /* @__PURE__ */ e("p", { className: "text-emphasis truncate text-sm font-medium leading-4", children: t.app }),
9
+ /* @__PURE__ */ e("p", { className: "text-subtle mt-[2px] text-sm", children: t.text })
10
+ ] }) })
11
+ ] }),
12
+ /* @__PURE__ */ e("div", { className: "hidden w-full sm:block", children: /* @__PURE__ */ e("div", { className: "float-right", children: /* @__PURE__ */ e(i, { color: "secondary", className: " w-[90px]", target: "_blank", href: t.link, children: "Use Zap" }) }) }),
13
+ /* @__PURE__ */ e("div", { className: "mt-2 block w-full sm:hidden", children: /* @__PURE__ */ e("div", { className: "float-right", children: /* @__PURE__ */ e(i, { color: "secondary", className: "w-[90px]", target: "_blank", href: t.link, children: "Use Zap" }) }) })
14
+ ] });
15
+ }
16
+ const n = [
17
+ {
18
+ icon: "gmail.svg",
19
+ app: "Gmail",
20
+ text: "Send emails via Gmail for scheduled events",
21
+ link: "https://zapier.com/app/editor/template/1071345"
22
+ },
23
+ {
24
+ icon: "googleSheets.svg",
25
+ app: "Google Sheets",
26
+ text: "Create Google Sheets rows for scheduled events",
27
+ link: "https://zapier.com/app/editor/template/1082047"
28
+ },
29
+ {
30
+ icon: "salesforce.svg",
31
+ app: "Salesforce",
32
+ text: "Create Salesforce leads from new bookings",
33
+ link: "https://zapier.com/app/editor/template/1082050"
34
+ },
35
+ {
36
+ icon: "todoist.svg",
37
+ app: "Todoist",
38
+ text: "Create Todoist tasks for scheduled events",
39
+ link: "https://zapier.com/app/editor/template/1082073"
40
+ },
41
+ {
42
+ icon: "gmail.svg",
43
+ app: "Gmail",
44
+ text: "Send emails via Gmail for rescheduled events",
45
+ link: "https://zapier.com/app/editor/template/1083605"
46
+ },
47
+ {
48
+ icon: "gmail.svg",
49
+ app: "Gmail",
50
+ text: "Send emails via Gmail for cancelled events",
51
+ link: "https://zapier.com/app/editor/template/1083609"
52
+ },
53
+ {
54
+ icon: "gmail.svg",
55
+ app: "Gmail",
56
+ text: "Send emails via Gmail after scheduled meetings end",
57
+ link: "https://zapier.com/app/editor/template/1083613"
58
+ },
59
+ {
60
+ icon: "googleCalendar.svg",
61
+ app: "Google Calendar",
62
+ text: "Add new bookings to Google Calendar",
63
+ link: "https://zapier.com/app/editor/template/1083651"
64
+ }
65
+ ];
66
+ function m() {
67
+ const { t } = o();
68
+ return /* @__PURE__ */ a(r, { children: [
69
+ /* @__PURE__ */ e("div", { className: "text-sm font-semibold leading-4 ", children: t("get_started_zapier_templates") }),
70
+ /* @__PURE__ */ e("div", { className: "mt-4 grid gap-4 md:grid-cols-2", children: n.map((s, l) => /* @__PURE__ */ e(d, { template: s }, l)) })
71
+ ] });
72
+ }
73
+ export {
74
+ m as default
75
+ };
@@ -0,0 +1,29 @@
1
+ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
+ import { useState as s } from "react";
3
+ import { q as i, f as l, r as m } from "./index-ZQlxzdt5.js";
4
+ function h() {
5
+ const { t: a } = i(), n = "metric", [e, r] = s("");
6
+ return /* @__PURE__ */ o("div", { className: "space-y-4 text-sm", children: [
7
+ /* @__PURE__ */ t(
8
+ l,
9
+ {
10
+ placeholder: "San Francisco",
11
+ value: e,
12
+ name: "Enter City",
13
+ onChange: async (c) => {
14
+ r(c.target.value);
15
+ }
16
+ }
17
+ ),
18
+ /* @__PURE__ */ t(
19
+ m,
20
+ {
21
+ href: `webcal://weather-in-calendar.com/cal/weather-cal.php?city=${e}&units=${n}&temperature=day`,
22
+ children: a("add_to_calendar")
23
+ }
24
+ )
25
+ ] });
26
+ }
27
+ export {
28
+ h as default
29
+ };