@nylas/react 1.1.0-canary.8 → 1.1.0-canary.9

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 (131) hide show
  1. package/dist/elements/index.js +92 -0
  2. package/dist/elements/index.js.map +1 -0
  3. package/dist/elements/react-component-lib/createComponent.js +65 -0
  4. package/dist/elements/react-component-lib/createComponent.js.map +1 -0
  5. package/dist/elements/react-component-lib/createOverlayComponent.js +98 -0
  6. package/dist/elements/react-component-lib/createOverlayComponent.js.map +1 -0
  7. package/dist/elements/react-component-lib/index.js +3 -0
  8. package/dist/elements/react-component-lib/index.js.map +1 -0
  9. package/dist/elements/react-component-lib/interfaces.js +2 -0
  10. package/dist/elements/react-component-lib/interfaces.js.map +1 -0
  11. package/dist/elements/react-component-lib/utils/attachProps.js +92 -0
  12. package/dist/elements/react-component-lib/utils/attachProps.js.map +1 -0
  13. package/dist/elements/react-component-lib/utils/case.js +7 -0
  14. package/dist/elements/react-component-lib/utils/case.js.map +1 -0
  15. package/dist/elements/react-component-lib/utils/dev.js +13 -0
  16. package/dist/elements/react-component-lib/utils/dev.js.map +1 -0
  17. package/dist/elements/react-component-lib/utils/index.js +31 -0
  18. package/dist/elements/react-component-lib/utils/index.js.map +1 -0
  19. package/dist/index.js +29 -0
  20. package/dist/index.js.map +1 -0
  21. package/package.json +8 -12
  22. package/dist/add-circle-icon_22.entry-080abc71.cjs +0 -1
  23. package/dist/add-circle-icon_22.entry-bda9be31.js +0 -1818
  24. package/dist/archive-icon_7.entry-ca20da59.cjs +0 -1
  25. package/dist/archive-icon_7.entry-e2954750.js +0 -75
  26. package/dist/arrow-icon.entry-03a85113.js +0 -15
  27. package/dist/arrow-icon.entry-548b027e.cjs +0 -1
  28. package/dist/bold-icon_3.entry-70ffa7f0.js +0 -35
  29. package/dist/bold-icon_3.entry-9a7b1869.cjs +0 -1
  30. package/dist/calendar-cancel-icon.entry-45388fdc.cjs +0 -1
  31. package/dist/calendar-cancel-icon.entry-6bbc119f.js +0 -15
  32. package/dist/calendar-check-icon_2.entry-6628456c.cjs +0 -1
  33. package/dist/calendar-check-icon_2.entry-f633f7a6.js +0 -25
  34. package/dist/calendar-icon.entry-379b1fa1.cjs +0 -1
  35. package/dist/calendar-icon.entry-62b82c27.js +0 -15
  36. package/dist/chevron-icon_3.entry-74425e1f.js +0 -117
  37. package/dist/chevron-icon_3.entry-7ff803ad.cjs +0 -1
  38. package/dist/close-icon.entry-18e140ed.cjs +0 -1
  39. package/dist/close-icon.entry-6a8ea4a7.js +0 -15
  40. package/dist/constants-f34b9c6e-95a17764.js +0 -3749
  41. package/dist/constants-f34b9c6e-e7137e51.cjs +0 -15
  42. package/dist/core-js-38e53e34.cjs +0 -4
  43. package/dist/core-js-a9d3b6e1.js +0 -3297
  44. package/dist/document-refresh-icon.entry-32c75418.js +0 -15
  45. package/dist/document-refresh-icon.entry-f15f795a.cjs +0 -1
  46. package/dist/dom-68f08be9.cjs +0 -15
  47. package/dist/dom-86e17616.js +0 -664
  48. package/dist/elements-dc5b338e-1f23530f.cjs +0 -16516
  49. package/dist/elements-dc5b338e-62fe1cf3.js +0 -28031
  50. package/dist/flow-40ff9cea-6f8c30e2.cjs +0 -9
  51. package/dist/flow-40ff9cea-ee70fdf5.js +0 -505
  52. package/dist/focus-visible-e8093c16-1f664070.js +0 -84
  53. package/dist/focus-visible-e8093c16-f0f05815.cjs +0 -1
  54. package/dist/forward-icon_6.entry-7fab04d7.js +0 -953
  55. package/dist/forward-icon_6.entry-ef5e2e0f.cjs +0 -3
  56. package/dist/globe-icon.entry-398a9826.cjs +0 -1
  57. package/dist/globe-icon.entry-b8e1efae.js +0 -15
  58. package/dist/google-logo-icon_4.entry-38d5c2f2.cjs +0 -1
  59. package/dist/google-logo-icon_4.entry-5eca9538.js +0 -381
  60. package/dist/index-93c50de4.cjs +0 -37
  61. package/dist/index-f93f6948.js +0 -4006
  62. package/dist/index.es-df564f87-b773d34f.js +0 -3137
  63. package/dist/index.es-df564f87-e4a4092a.cjs +0 -7
  64. package/dist/info-icon_2.entry-2eb70f49.cjs +0 -1
  65. package/dist/info-icon_2.entry-6bbfa6dc.js +0 -34
  66. package/dist/loading-icon.entry-b563b2e6.js +0 -15
  67. package/dist/loading-icon.entry-fb04b893.cjs +0 -1
  68. package/dist/mailbox-store-69c5c5f6-631eddb5.cjs +0 -1
  69. package/dist/mailbox-store-69c5c5f6-8ab4670b.js +0 -380
  70. package/dist/nylas-additional-participants.entry-33a45477.cjs +0 -1
  71. package/dist/nylas-additional-participants.entry-4b214308.js +0 -81
  72. package/dist/nylas-booked-event-card_10.entry-3e225025.cjs +0 -1
  73. package/dist/nylas-booked-event-card_10.entry-e93bc290.js +0 -782
  74. package/dist/nylas-form-card.entry-0748fdd5.js +0 -54
  75. package/dist/nylas-form-card.entry-eb3607bc.cjs +0 -1
  76. package/dist/nylas-if-state.entry-276d61ad.cjs +0 -1
  77. package/dist/nylas-if-state.entry-f8abd025.js +0 -94
  78. package/dist/nylas-list-folders.entry-78cc680e.js +0 -120
  79. package/dist/nylas-list-folders.entry-afe02f0e.cjs +0 -1
  80. package/dist/nylas-list-threads.entry-217088de.js +0 -70
  81. package/dist/nylas-list-threads.entry-6395c12f.cjs +0 -1
  82. package/dist/nylas-login.entry-e4d57589.js +0 -73
  83. package/dist/nylas-login.entry-ec81e21b.cjs +0 -1
  84. package/dist/nylas-mailbox-pagination.entry-069673aa.js +0 -101
  85. package/dist/nylas-mailbox-pagination.entry-d4d929f1.cjs +0 -1
  86. package/dist/nylas-mailbox-toolbar-button.entry-03c5f5c8.js +0 -82
  87. package/dist/nylas-mailbox-toolbar-button.entry-2b9e4431.cjs +0 -1
  88. package/dist/nylas-mailbox.entry-1342178d.cjs +0 -1
  89. package/dist/nylas-mailbox.entry-7e6b4791.js +0 -134
  90. package/dist/nylas-provider.entry-0ae8e70a.cjs +0 -1
  91. package/dist/nylas-provider.entry-498a7be9.js +0 -145
  92. package/dist/nylas-scheduler-editor.entry-4de2bb97.js +0 -2275
  93. package/dist/nylas-scheduler-editor.entry-72c91b7d.cjs +0 -7
  94. package/dist/nylas-scheduling.entry-1a004916.cjs +0 -1
  95. package/dist/nylas-scheduling.entry-4e18ab43.js +0 -235
  96. package/dist/nylas-threads-refresh.entry-d020c89e.cjs +0 -1
  97. package/dist/nylas-threads-refresh.entry-fc2d8028.js +0 -74
  98. package/dist/nylas-threads-search.entry-0abcbc10.cjs +0 -1
  99. package/dist/nylas-threads-search.entry-f92f7e30.js +0 -69
  100. package/dist/nylas-view-thread.entry-2f1474cf.js +0 -203
  101. package/dist/nylas-view-thread.entry-56080c89.cjs +0 -1
  102. package/dist/people-icon.entry-431e5044.cjs +0 -1
  103. package/dist/people-icon.entry-b4778e15.js +0 -15
  104. package/dist/play-icon_2.entry-24ffa01f.js +0 -25
  105. package/dist/play-icon_2.entry-f97db395.cjs +0 -1
  106. package/dist/react.cjs +0 -1
  107. package/dist/react.js +0 -98
  108. package/dist/refresh-icon.entry-8395104b.js +0 -15
  109. package/dist/refresh-icon.entry-cf4416b8.cjs +0 -1
  110. package/dist/register-component-b9cfcbaf-c0147194.js +0 -109
  111. package/dist/register-component-b9cfcbaf-d40e1f3c.cjs +0 -1
  112. package/dist/scheduler-config-store-07d98279-0610e42f.cjs +0 -1
  113. package/dist/scheduler-config-store-07d98279-3b70606c.js +0 -24
  114. package/dist/scheduler-store-24fd0e91-2dba20c2.cjs +0 -1
  115. package/dist/scheduler-store-24fd0e91-47098841.js +0 -302
  116. package/dist/time-period-selector.entry-1e849c2e.js +0 -76
  117. package/dist/time-period-selector.entry-d8f3462f.cjs +0 -1
  118. package/dist/translate-icon.entry-66533238.cjs +0 -1
  119. package/dist/translate-icon.entry-d847f706.js +0 -15
  120. package/dist/warning-icon.entry-1f0f00ed.cjs +0 -1
  121. package/dist/warning-icon.entry-b5db0151.js +0 -15
  122. /package/dist/{elements → types/elements}/index.d.ts +0 -0
  123. /package/dist/{elements → types/elements}/react-component-lib/createComponent.d.ts +0 -0
  124. /package/dist/{elements → types/elements}/react-component-lib/createOverlayComponent.d.ts +0 -0
  125. /package/dist/{elements → types/elements}/react-component-lib/index.d.ts +0 -0
  126. /package/dist/{elements → types/elements}/react-component-lib/interfaces.d.ts +0 -0
  127. /package/dist/{elements → types/elements}/react-component-lib/utils/attachProps.d.ts +0 -0
  128. /package/dist/{elements → types/elements}/react-component-lib/utils/case.d.ts +0 -0
  129. /package/dist/{elements → types/elements}/react-component-lib/utils/dev.d.ts +0 -0
  130. /package/dist/{elements → types/elements}/react-component-lib/utils/index.d.ts +0 -0
  131. /package/dist/{index.d.ts → types/index.d.ts} +0 -0
@@ -1,24 +0,0 @@
1
- import { e as i } from "./index-f93f6948.js";
2
- function a(t = {}) {
3
- const o = {
4
- selectedConfiguration: {},
5
- configurations: [],
6
- calendars: [],
7
- currentUser: null,
8
- action: null,
9
- defaultRequiresSessionAuth: !0,
10
- ...t
11
- }, e = i(o);
12
- function n() {
13
- e.set("selectedConfiguration", { ...t.selectedConfiguration });
14
- }
15
- return e.onChange("action", async (r) => {
16
- r || n();
17
- }), {
18
- ...e,
19
- resetSelectedConfiguration: n
20
- };
21
- }
22
- export {
23
- a as C
24
- };
@@ -1 +0,0 @@
1
- "use strict";const v=require("./index-93c50de4.cjs");exports.ErrorCategory=void 0;(function(r){r.Component="component",r.Api="api",r.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var I;(function(r){r.endtime_not_in_future="endtime_not_in_future",r.no_booking_info="no_booking_info",r.no_timeslot_selected="no_timeslot_selected",r.no_timezone_selected="no_timezone_selected",r.no_booking_id="no_booking_id",r.invalid_start_time="invalid_start_time",r.invalid_end_time="invalid_end_time",r.invalid_timezone="invalid_timezone"})(I||(I={}));var b;(function(r){r.invalid_session="invalid_session",r.general_error="general_error",r.internal_error="internal_error",r.invalid_request_error="invalid_request_error",r.timeslot_not_available="timeslot_not_available"})(b||(b={}));class z{constructor(){this.component=t=>{const e=exports.ErrorCategory.Component,s=`${t} error`;return{endtime_not_in_future:(i='"endtime" can not be in the future')=>({title:s,message:i,category:e}),no_booking_info:(i="No booking info provided")=>({title:s,message:i,category:e}),no_timeslot_selected:(i="No timeslot selected")=>({title:s,message:i,category:e}),no_timezone_selected:(i="No timezone selected")=>({title:s,message:i,category:e}),no_booking_id:(i="No booking id provided")=>({title:s,message:i,category:e}),invalid_start_time:(i="Invalid start time")=>({title:s,message:i,category:e}),invalid_end_time:(i="Invalid end time")=>({title:s,message:i,category:e}),invalid_timezone:(i="Invalid timezone")=>({title:s,message:i,category:e})}},this.api=t=>{const e=exports.ErrorCategory.Api,s=`${t} error`;return{invalid_session:i=>({title:s,message:i,category:e}),general_error:i=>({title:s,message:i,category:e}),internal_error:i=>({title:s,message:i,category:e}),invalid_request_error:i=>({title:s,message:i,category:e}),timeslot_not_available:i=>({title:s,message:i,category:e})}}}}class D{constructor({schedulerAPIURL:t,schedulerStore:e,sessionId:s,configId:i}){this.errors=new z,this.schedulerStore=e,this.schedulerAPIURL=t,this.sessionId=s,this.configId=i}getHeaders(){return this.configId?{}:{Authorization:`Bearer ${this.sessionId}`}}async makeAPIRequest(t,e,s,i={}){try{const n=new URL(this.schedulerAPIURL);return n.pathname=t,await(await fetch(decodeURIComponent(n.toString()),{method:e,headers:{"Content-Type":"application/json",...i},body:s})).json()}catch(n){return{error:{message:n.message,title:"API request failed",type:"api"}}}}selectDate(t){this.schedulerStore.set("selectedDate",t),this.schedulerStore.set("selectedTimeslot",null)}selectTime(t){this.schedulerStore.set("selectedTimeslot",t)}selectTimezone(t){this.schedulerStore.set("selectedTimezone",t)}toggleAdditionalData(t){this.schedulerStore.set("showBookingForm",t)}setParticipantName(t){const{bookingInfo:e}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...e,primaryParticipant:{...e==null?void 0:e.primaryParticipant,name:t}})}setParticipantEmail(t){const{bookingInfo:e}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...e,primaryParticipant:{...e==null?void 0:e.primaryParticipant,email:t}})}async setReschedule(t){const e=new Date;this.schedulerStore.set("rescheduleBookingId",t),this.schedulerStore.set("selectedTimeslot",null),this.schedulerStore.set("eventInfo",null),this.schedulerStore.set("showBookingForm",!1);const s=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3,i=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3,n=await this.getAvailability(s,i),l=this.schedulerStore.get("availability").find(a=>new Date(a.start_time)>new Date);let d=e;return l&&(d=l.start_time),this.schedulerStore.set("selectedDate",d),n}async setCancel(t){this.schedulerStore.set("cancelBookingId",t)}async bookTimeslot(t){var c;this.schedulerStore.set("isLoading",!0);const{selectedTimeslot:e,selectedTimezone:s,bookingInfo:i}=this.schedulerStore.state;if(!t&&!i)return{error:this.errors.component("Booking").no_booking_info()};const n=(t==null?void 0:t.timeslot)||e;if(!n)return{error:this.errors.component("Create Booking").no_timeslot_selected()};const l=t&&(t!=null&&t.timezone)?t==null?void 0:t.timezone:s;if(!l)return{error:this.errors.component("Create Booking").no_timezone_selected()};const d=t?t==null?void 0:t.primaryParticipant:i==null?void 0:i.primaryParticipant,a=t?(t==null?void 0:t.guests)||[]:(i==null?void 0:i.guests)||[],h=t?{...t==null?void 0:t.additionalFields,guests:a}:{...i==null?void 0:i.additionalFields,guests:a},p=this.getHeaders(),_=`/v3/scheduling/bookings${this.configId?`?configuration_id=${this.configId}`:""}`,o=await this.makeAPIRequest(decodeURIComponent(_),"POST",JSON.stringify({additional_fields:h,guest:{...d},start_time:n.start_time.getTime()/1e3,end_time:n.end_time.getTime()/1e3,timezone:l}),p);if("error"in o){this.schedulerStore.set("isLoading",!1);const u=(c=o.error)==null?void 0:c.type;let m=o.error;return u&&u in this.errors.api("Create Booking")&&(m=this.errors.api("Create Booking")[u]((m==null?void 0:m.message)||(m==null?void 0:m.title)||"Something went wrong")),{error:m}}return"data"in o&&this.schedulerStore.set("eventInfo",o==null?void 0:o.data),this.schedulerStore.set("isLoading",!1),o}async getAvailability(t=0,e=0){var p,S,_;this.schedulerStore.set("isLoading",!0);const s=new URLSearchParams,i=new Date,n=i.getTime();if(e&&e<n/1e3)return this.schedulerStore.set("isLoading",!1),{error:this.errors.component("Get Availability").endtime_not_in_future()};if(!t){const o=new Date(i.getFullYear(),i.getMonth(),1);t=Math.floor(o.getTime()/1e3)}if(!e){const o=new Date(i.getFullYear(),i.getMonth()+1,0);e=Math.floor(o.getTime()/1e3)}s.append("start_time",encodeURIComponent(t.toString())),s.append("end_time",encodeURIComponent(e.toString())),this.configId&&s.append("configuration_id",encodeURIComponent(this.configId));const l=s.toString(),d=`/v3/scheduling/availability${l?`?${l}`:""}`,a=this.getHeaders(),h=await this.makeAPIRequest(decodeURIComponent(d),"GET",void 0,a);if("error"in h){this.schedulerStore.set("availability",[]),this.schedulerStore.set("isLoading",!1);const o=(p=h.error)==null?void 0:p.type;let c=h.error;return o&&o in this.errors.api("Get Availability")&&(c=this.errors.api("Get Availability")[o]((c==null?void 0:c.message)||(c==null?void 0:c.title)||"Something went wrong")),{error:c}}if("data"in h){const c=(((_=(S=h.data)==null?void 0:S.time_slots)==null?void 0:_.map(u=>({...u,start_time:new Date(u.start_time*1e3),end_time:new Date(u.end_time*1e3)})))||[]).filter(u=>u.start_time.getTime()>n);this.schedulerStore.set("availability",c)}return this.schedulerStore.set("isLoading",!1),h}async cancelBooking(t){var l;if(this.schedulerStore.set("isLoading",!0),!t)return{error:this.errors.component("Cancel Booking").no_booking_id()};const e=this.configId?`?configuration_id=${this.configId}`:"",s=`/v3/scheduling/bookings/${t}${e}`,i=this.getHeaders(),n=await this.makeAPIRequest(decodeURIComponent(s),"DELETE",JSON.stringify({action:"cancel"}),i);if("error"in n){this.schedulerStore.set("isLoading",!1);const d=(l=n.error)==null?void 0:l.type;let a=n.error;return d&&d in this.errors.api("Cancel Booking")&&(a=this.errors.api("Cancel Booking")[d]((a==null?void 0:a.message)||(a==null?void 0:a.title)||"Something went wrong")),{error:a}}return this.schedulerStore.set("cancelledEventInfo",{booking_id:t}),this.schedulerStore.set("isLoading",!1),n}async rescheduleBooking(t,e){var w;if(this.schedulerStore.set("isLoading",!0),!t)return{error:this.errors.component("Reschedule Booking").no_booking_id()};const s=this.errors.api("Reschedule Booking"),i=this.errors.component("Reschedule Booking"),{bookingInfo:n,selectedTimeslot:l,selectedTimezone:d}=this.schedulerStore.state,{startTime:a,endTime:h,timezone:p}=e,S=a||(l==null?void 0:l.start_time);if(!S)return{error:i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const _=h||(l==null?void 0:l.end_time);if(!_)return{error:i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')};const o=p||d;if(!o)return{error:i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')};const c=e?e==null?void 0:e.primaryParticipant:n==null?void 0:n.primaryParticipant,u=e?(e==null?void 0:e.guests)||[]:(n==null?void 0:n.guests)||[],m=e?{...e==null?void 0:e.additionalFields,guests:u}:{...n==null?void 0:n.additionalFields,guests:u},P=this.configId?`?configuration_id=${this.configId}`:"",k=`/v3/scheduling/bookings/${t}${P}`,T=this.getHeaders(),g=await this.makeAPIRequest(decodeURIComponent(k),"PATCH",JSON.stringify({start_time:S.getTime()/1e3,end_time:_.getTime()/1e3,time_zone:o,additional_fields:m,guest:{...c}}),T);if("error"in g){this.schedulerStore.set("isLoading",!1);const y=(w=g.error)==null?void 0:w.type;let f=g.error;y&&y in s&&(f=s[y]((f==null?void 0:f.message)||(f==null?void 0:f.title)||"Something went wrong"))}return"data"in g&&this.schedulerStore.set("eventInfo",g==null?void 0:g.data),this.schedulerStore.set("isLoading",!1),g}}function C(r={}){const t={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:!1,selectableDates:null,availability:[],state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:!1,nylasBranding:!0,...r};v.debug("[defaultNylasStoreState]: ",t);const e=v.createStore(t);return e.onChange("availability",s=>{v.debug("[availability]: ",s);const i=s.map(n=>n.start_time);v.debug("[selectableDates]: ",i),e.set("selectableDates",i)}),e.reset=()=>{for(const s in t){const i=t[s];e.set(s,i)}},e}exports.CreateNylasSchedulerStore=C;exports.NylaSchedulerAPIConnector=D;
@@ -1,302 +0,0 @@
1
- import { d as w, e as D } from "./index-f93f6948.js";
2
- var v;
3
- (function(r) {
4
- r.Component = "component", r.Api = "api", r.Auth = "auth";
5
- })(v || (v = {}));
6
- var P;
7
- (function(r) {
8
- r.endtime_not_in_future = "endtime_not_in_future", r.no_booking_info = "no_booking_info", r.no_timeslot_selected = "no_timeslot_selected", r.no_timezone_selected = "no_timezone_selected", r.no_booking_id = "no_booking_id", r.invalid_start_time = "invalid_start_time", r.invalid_end_time = "invalid_end_time", r.invalid_timezone = "invalid_timezone";
9
- })(P || (P = {}));
10
- var b;
11
- (function(r) {
12
- r.invalid_session = "invalid_session", r.general_error = "general_error", r.internal_error = "internal_error", r.invalid_request_error = "invalid_request_error", r.timeslot_not_available = "timeslot_not_available";
13
- })(b || (b = {}));
14
- class R {
15
- constructor() {
16
- this.component = (t) => {
17
- const e = v.Component, s = `${t} error`;
18
- return {
19
- endtime_not_in_future: (i = '"endtime" can not be in the future') => ({
20
- title: s,
21
- message: i,
22
- category: e
23
- }),
24
- no_booking_info: (i = "No booking info provided") => ({
25
- title: s,
26
- message: i,
27
- category: e
28
- }),
29
- no_timeslot_selected: (i = "No timeslot selected") => ({
30
- title: s,
31
- message: i,
32
- category: e
33
- }),
34
- no_timezone_selected: (i = "No timezone selected") => ({
35
- title: s,
36
- message: i,
37
- category: e
38
- }),
39
- no_booking_id: (i = "No booking id provided") => ({
40
- title: s,
41
- message: i,
42
- category: e
43
- }),
44
- invalid_start_time: (i = "Invalid start time") => ({
45
- title: s,
46
- message: i,
47
- category: e
48
- }),
49
- invalid_end_time: (i = "Invalid end time") => ({
50
- title: s,
51
- message: i,
52
- category: e
53
- }),
54
- invalid_timezone: (i = "Invalid timezone") => ({
55
- title: s,
56
- message: i,
57
- category: e
58
- })
59
- };
60
- }, this.api = (t) => {
61
- const e = v.Api, s = `${t} error`;
62
- return {
63
- invalid_session: (i) => ({
64
- title: s,
65
- message: i,
66
- category: e
67
- }),
68
- general_error: (i) => ({
69
- title: s,
70
- message: i,
71
- category: e
72
- }),
73
- internal_error: (i) => ({
74
- title: s,
75
- message: i,
76
- category: e
77
- }),
78
- invalid_request_error: (i) => ({
79
- title: s,
80
- message: i,
81
- category: e
82
- }),
83
- timeslot_not_available: (i) => ({
84
- title: s,
85
- message: i,
86
- category: e
87
- })
88
- };
89
- };
90
- }
91
- }
92
- class B {
93
- constructor({ schedulerAPIURL: t, schedulerStore: e, sessionId: s, configId: i }) {
94
- this.errors = new R(), this.schedulerStore = e, this.schedulerAPIURL = t, this.sessionId = s, this.configId = i;
95
- }
96
- getHeaders() {
97
- return this.configId ? {} : {
98
- Authorization: `Bearer ${this.sessionId}`
99
- };
100
- }
101
- async makeAPIRequest(t, e, s, i = {}) {
102
- try {
103
- const n = new URL(this.schedulerAPIURL);
104
- return n.pathname = t, await (await fetch(decodeURIComponent(n.toString()), {
105
- method: e,
106
- headers: {
107
- "Content-Type": "application/json",
108
- ...i
109
- },
110
- body: s
111
- })).json();
112
- } catch (n) {
113
- return {
114
- error: {
115
- message: n.message,
116
- title: "API request failed",
117
- type: "api"
118
- }
119
- };
120
- }
121
- }
122
- selectDate(t) {
123
- this.schedulerStore.set("selectedDate", t), this.schedulerStore.set("selectedTimeslot", null);
124
- }
125
- selectTime(t) {
126
- this.schedulerStore.set("selectedTimeslot", t);
127
- }
128
- selectTimezone(t) {
129
- this.schedulerStore.set("selectedTimezone", t);
130
- }
131
- toggleAdditionalData(t) {
132
- this.schedulerStore.set("showBookingForm", t);
133
- }
134
- setParticipantName(t) {
135
- const { bookingInfo: e } = this.schedulerStore.state;
136
- this.schedulerStore.set("bookingInfo", {
137
- ...e,
138
- primaryParticipant: {
139
- ...e == null ? void 0 : e.primaryParticipant,
140
- name: t
141
- }
142
- });
143
- }
144
- setParticipantEmail(t) {
145
- const { bookingInfo: e } = this.schedulerStore.state;
146
- this.schedulerStore.set("bookingInfo", {
147
- ...e,
148
- primaryParticipant: {
149
- ...e == null ? void 0 : e.primaryParticipant,
150
- email: t
151
- }
152
- });
153
- }
154
- async setReschedule(t) {
155
- const e = /* @__PURE__ */ new Date();
156
- this.schedulerStore.set("rescheduleBookingId", t), this.schedulerStore.set("selectedTimeslot", null), this.schedulerStore.set("eventInfo", null), this.schedulerStore.set("showBookingForm", !1);
157
- const s = new Date(e.getFullYear(), e.getMonth(), 1).getTime() / 1e3, i = new Date(e.getFullYear(), e.getMonth() + 1, 1).getTime() / 1e3, n = await this.getAvailability(s, i), l = this.schedulerStore.get("availability").find((a) => new Date(a.start_time) > /* @__PURE__ */ new Date());
158
- let d = e;
159
- return l && (d = l.start_time), this.schedulerStore.set("selectedDate", d), n;
160
- }
161
- async setCancel(t) {
162
- this.schedulerStore.set("cancelBookingId", t);
163
- }
164
- async bookTimeslot(t) {
165
- var c;
166
- this.schedulerStore.set("isLoading", !0);
167
- const { selectedTimeslot: e, selectedTimezone: s, bookingInfo: i } = this.schedulerStore.state;
168
- if (!t && !i)
169
- return { error: this.errors.component("Booking").no_booking_info() };
170
- const n = (t == null ? void 0 : t.timeslot) || e;
171
- if (!n)
172
- return { error: this.errors.component("Create Booking").no_timeslot_selected() };
173
- const l = t && (t != null && t.timezone) ? t == null ? void 0 : t.timezone : s;
174
- if (!l)
175
- return { error: this.errors.component("Create Booking").no_timezone_selected() };
176
- const d = t ? t == null ? void 0 : t.primaryParticipant : i == null ? void 0 : i.primaryParticipant, a = t ? (t == null ? void 0 : t.guests) || [] : (i == null ? void 0 : i.guests) || [], h = t ? { ...t == null ? void 0 : t.additionalFields, guests: a } : { ...i == null ? void 0 : i.additionalFields, guests: a }, p = this.getHeaders(), _ = `/v3/scheduling/bookings${this.configId ? `?configuration_id=${this.configId}` : ""}`, o = await this.makeAPIRequest(decodeURIComponent(_), "POST", JSON.stringify({
177
- additional_fields: h,
178
- guest: { ...d },
179
- start_time: n.start_time.getTime() / 1e3,
180
- end_time: n.end_time.getTime() / 1e3,
181
- timezone: l
182
- }), p);
183
- if ("error" in o) {
184
- this.schedulerStore.set("isLoading", !1);
185
- const u = (c = o.error) == null ? void 0 : c.type;
186
- let m = o.error;
187
- return u && u in this.errors.api("Create Booking") && (m = this.errors.api("Create Booking")[u]((m == null ? void 0 : m.message) || (m == null ? void 0 : m.title) || "Something went wrong")), { error: m };
188
- }
189
- return "data" in o && this.schedulerStore.set("eventInfo", o == null ? void 0 : o.data), this.schedulerStore.set("isLoading", !1), o;
190
- }
191
- async getAvailability(t = 0, e = 0) {
192
- var p, S, _;
193
- this.schedulerStore.set("isLoading", !0);
194
- const s = new URLSearchParams(), i = /* @__PURE__ */ new Date(), n = i.getTime();
195
- if (e && e < n / 1e3)
196
- return this.schedulerStore.set("isLoading", !1), { error: this.errors.component("Get Availability").endtime_not_in_future() };
197
- if (!t) {
198
- const o = new Date(i.getFullYear(), i.getMonth(), 1);
199
- t = Math.floor(o.getTime() / 1e3);
200
- }
201
- if (!e) {
202
- const o = new Date(i.getFullYear(), i.getMonth() + 1, 0);
203
- e = Math.floor(o.getTime() / 1e3);
204
- }
205
- s.append("start_time", encodeURIComponent(t.toString())), s.append("end_time", encodeURIComponent(e.toString())), this.configId && s.append("configuration_id", encodeURIComponent(this.configId));
206
- const l = s.toString(), d = `/v3/scheduling/availability${l ? `?${l}` : ""}`, a = this.getHeaders(), h = await this.makeAPIRequest(decodeURIComponent(d), "GET", void 0, a);
207
- if ("error" in h) {
208
- this.schedulerStore.set("availability", []), this.schedulerStore.set("isLoading", !1);
209
- const o = (p = h.error) == null ? void 0 : p.type;
210
- let c = h.error;
211
- return o && o in this.errors.api("Get Availability") && (c = this.errors.api("Get Availability")[o]((c == null ? void 0 : c.message) || (c == null ? void 0 : c.title) || "Something went wrong")), { error: c };
212
- }
213
- if ("data" in h) {
214
- const c = (((_ = (S = h.data) == null ? void 0 : S.time_slots) == null ? void 0 : _.map((u) => ({
215
- ...u,
216
- start_time: new Date(u.start_time * 1e3),
217
- end_time: new Date(u.end_time * 1e3)
218
- }))) || []).filter((u) => u.start_time.getTime() > n);
219
- this.schedulerStore.set("availability", c);
220
- }
221
- return this.schedulerStore.set("isLoading", !1), h;
222
- }
223
- async cancelBooking(t) {
224
- var l;
225
- if (this.schedulerStore.set("isLoading", !0), !t)
226
- return { error: this.errors.component("Cancel Booking").no_booking_id() };
227
- const e = this.configId ? `?configuration_id=${this.configId}` : "", s = `/v3/scheduling/bookings/${t}${e}`, i = this.getHeaders(), n = await this.makeAPIRequest(decodeURIComponent(s), "DELETE", JSON.stringify({
228
- action: "cancel"
229
- }), i);
230
- if ("error" in n) {
231
- this.schedulerStore.set("isLoading", !1);
232
- const d = (l = n.error) == null ? void 0 : l.type;
233
- let a = n.error;
234
- return d && d in this.errors.api("Cancel Booking") && (a = this.errors.api("Cancel Booking")[d]((a == null ? void 0 : a.message) || (a == null ? void 0 : a.title) || "Something went wrong")), { error: a };
235
- }
236
- return this.schedulerStore.set("cancelledEventInfo", {
237
- booking_id: t
238
- }), this.schedulerStore.set("isLoading", !1), n;
239
- }
240
- async rescheduleBooking(t, e) {
241
- var I;
242
- if (this.schedulerStore.set("isLoading", !0), !t)
243
- return { error: this.errors.component("Reschedule Booking").no_booking_id() };
244
- const s = this.errors.api("Reschedule Booking"), i = this.errors.component("Reschedule Booking"), { bookingInfo: n, selectedTimeslot: l, selectedTimezone: d } = this.schedulerStore.state, { startTime: a, endTime: h, timezone: p } = e, S = a || (l == null ? void 0 : l.start_time);
245
- if (!S)
246
- return { error: i.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
247
- const _ = h || (l == null ? void 0 : l.end_time);
248
- if (!_)
249
- return { error: i.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
250
- const o = p || d;
251
- if (!o)
252
- return { error: i.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.') };
253
- const c = e ? e == null ? void 0 : e.primaryParticipant : n == null ? void 0 : n.primaryParticipant, u = e ? (e == null ? void 0 : e.guests) || [] : (n == null ? void 0 : n.guests) || [], m = e ? { ...e == null ? void 0 : e.additionalFields, guests: u } : { ...n == null ? void 0 : n.additionalFields, guests: u }, k = this.configId ? `?configuration_id=${this.configId}` : "", T = `/v3/scheduling/bookings/${t}${k}`, z = this.getHeaders(), g = await this.makeAPIRequest(decodeURIComponent(T), "PATCH", JSON.stringify({
254
- start_time: S.getTime() / 1e3,
255
- end_time: _.getTime() / 1e3,
256
- time_zone: o,
257
- additional_fields: m,
258
- guest: { ...c }
259
- }), z);
260
- if ("error" in g) {
261
- this.schedulerStore.set("isLoading", !1);
262
- const y = (I = g.error) == null ? void 0 : I.type;
263
- let f = g.error;
264
- y && y in s && (f = s[y]((f == null ? void 0 : f.message) || (f == null ? void 0 : f.title) || "Something went wrong"));
265
- }
266
- return "data" in g && this.schedulerStore.set("eventInfo", g == null ? void 0 : g.data), this.schedulerStore.set("isLoading", !1), g;
267
- }
268
- }
269
- function A(r = {}) {
270
- const t = {
271
- selectedDate: null,
272
- selectedLanguage: navigator.language,
273
- selectedTimezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
274
- selectedTimeslot: null,
275
- showBookingForm: !1,
276
- selectableDates: null,
277
- availability: [],
278
- state: "ready",
279
- eventInfo: null,
280
- cancelledEventInfo: null,
281
- isLoading: !1,
282
- nylasBranding: !0,
283
- ...r
284
- };
285
- w("[defaultNylasStoreState]: ", t);
286
- const e = D(t);
287
- return e.onChange("availability", (s) => {
288
- w("[availability]: ", s);
289
- const i = s.map((n) => n.start_time);
290
- w("[selectableDates]: ", i), e.set("selectableDates", i);
291
- }), e.reset = () => {
292
- for (const s in t) {
293
- const i = t[s];
294
- e.set(s, i);
295
- }
296
- }, e;
297
- }
298
- export {
299
- A as C,
300
- v as E,
301
- B as N
302
- };
@@ -1,76 +0,0 @@
1
- import { r as i, c as s, d as n, h as d, g as l } from "./index-f93f6948.js";
2
- import "react";
3
- import "react-dom";
4
- const a = ".time-period-selector.sc-time-period-selector{display:flex;gap:0.5rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector select-dropdown#time-period.sc-time-period-selector::part(sd_dropdown-button){min-width:108px}.time-period-selector.sc-time-period-selector select-dropdown#time-number.sc-time-period-selector::part(sd_dropdown-button){min-width:84px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}", c = a, p = class {
5
- constructor(e) {
6
- i(this, e), this.timePeriodChanged = s(this, "timePeriodChanged", 7), this.timePeriods = ["hour", "day", "week", "month"], this.defaultSelectedPeriod = "hour", this.defaultSelectedNumber = 1, this.selectedPeriod = this.defaultSelectedPeriod, this.selectedNumber = this.defaultSelectedNumber, this.numberOptions = this.calculateOptions("hour").map((t) => ({
7
- label: t.toString(),
8
- value: t.toString()
9
- })), this.timePeriodOptions = this.timePeriods.map((t) => ({
10
- label: t,
11
- value: t
12
- }));
13
- }
14
- defaultSelectedPeriodChangedHandler(e) {
15
- this.selectedPeriod = e, this.updateNumberOptionsAndSelectedNumber(e);
16
- }
17
- defaultSelectedNumberChangedHandler(e) {
18
- this.selectedNumber = e;
19
- }
20
- timePeriodsChangedHandler(e) {
21
- this.timePeriodOptions = e.map((t) => ({
22
- label: t,
23
- value: t
24
- }));
25
- }
26
- calculateOptions(e) {
27
- switch (e) {
28
- case "hour":
29
- return Array.from({ length: 23 }, (t, r) => r + 1);
30
- case "minute":
31
- return Array.from({ length: 60 }, (t, r) => r);
32
- case "day":
33
- return Array.from({ length: 30 }, (t, r) => r + 1);
34
- case "week":
35
- return Array.from({ length: 4 }, (t, r) => r + 1);
36
- case "month":
37
- return Array.from({ length: 12 }, (t, r) => r + 1);
38
- default:
39
- return [];
40
- }
41
- }
42
- selectedOptionChangedHandler(e) {
43
- n("time-period-selector", "selectedOptionChangedHandler", e.detail);
44
- const { value: t, name: r } = e.detail;
45
- r === "time-period" ? (this.selectedPeriod = t, this.updateNumberOptionsAndSelectedNumber(t)) : r === "time-number" && (this.selectedNumber = parseInt(t));
46
- const o = {
47
- number: this.selectedNumber,
48
- period: this.selectedPeriod
49
- };
50
- this.timePeriodChanged.emit(o);
51
- }
52
- updateNumberOptionsAndSelectedNumber(e) {
53
- const t = this.calculateOptions(e);
54
- this.numberOptions = t.map((r) => ({
55
- label: r.toString(),
56
- value: r.toString()
57
- })), this.selectedNumber = parseInt(this.numberOptions[0].value);
58
- }
59
- render() {
60
- return d("div", { key: "eaec00db41b0c2410fc4a9ccc341fc4ec4012e10", class: "time-period-selector" }, d("select-dropdown", { key: "0d53efe90429a05d4f52a8f1b92bf46b14b1e6ad", id: "time-number", name: "time-number", exportparts: "sd__dropdown: tps__number-dropdown, sd__dropdown-button: tps__number-dropdown-button, sd__dropdown-content: tps__number-dropdown-content", options: this.numberOptions, defaultSelectedOption: this.numberOptions.find((e) => e.value == this.selectedNumber.toString()) ?? this.numberOptions[0], withSearch: !1 }), d("select-dropdown", { key: "bce764e3e959eb4fad73d1e410173d584f243ee5", id: "time-period", name: "time-period", options: this.timePeriodOptions, exportparts: "sd__dropdown: tps__period-dropdown, sd__dropdown-button: tps__period-dropdown-button, sd__dropdown-content: tps__period-dropdown-content", pluralizedLabel: this.selectedNumber > 1 ? "s" : "", defaultSelectedOption: this.timePeriodOptions.find((e) => e.value == this.selectedPeriod) ?? this.timePeriodOptions[0], withSearch: !1 }));
61
- }
62
- get host() {
63
- return l(this);
64
- }
65
- static get watchers() {
66
- return {
67
- defaultSelectedPeriod: ["defaultSelectedPeriodChangedHandler"],
68
- defaultSelectedNumber: ["defaultSelectedNumberChangedHandler"],
69
- timePeriods: ["timePeriodsChangedHandler"]
70
- };
71
- }
72
- };
73
- p.style = c;
74
- export {
75
- p as time_period_selector
76
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-93c50de4.cjs");require("react");require("react-dom");const s=".time-period-selector.sc-time-period-selector{display:flex;gap:0.5rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector select-dropdown#time-period.sc-time-period-selector::part(sd_dropdown-button){min-width:108px}.time-period-selector.sc-time-period-selector select-dropdown#time-number.sc-time-period-selector::part(sd_dropdown-button){min-width:84px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}",n=s,i=class{constructor(e){d.registerInstance(this,e),this.timePeriodChanged=d.createEvent(this,"timePeriodChanged",7),this.timePeriods=["hour","day","week","month"],this.defaultSelectedPeriod="hour",this.defaultSelectedNumber=1,this.selectedPeriod=this.defaultSelectedPeriod,this.selectedNumber=this.defaultSelectedNumber,this.numberOptions=this.calculateOptions("hour").map(t=>({label:t.toString(),value:t.toString()})),this.timePeriodOptions=this.timePeriods.map(t=>({label:t,value:t}))}defaultSelectedPeriodChangedHandler(e){this.selectedPeriod=e,this.updateNumberOptionsAndSelectedNumber(e)}defaultSelectedNumberChangedHandler(e){this.selectedNumber=e}timePeriodsChangedHandler(e){this.timePeriodOptions=e.map(t=>({label:t,value:t}))}calculateOptions(e){switch(e){case"hour":return Array.from({length:23},(t,r)=>r+1);case"minute":return Array.from({length:60},(t,r)=>r);case"day":return Array.from({length:30},(t,r)=>r+1);case"week":return Array.from({length:4},(t,r)=>r+1);case"month":return Array.from({length:12},(t,r)=>r+1);default:return[]}}selectedOptionChangedHandler(e){d.debug("time-period-selector","selectedOptionChangedHandler",e.detail);const{value:t,name:r}=e.detail;r==="time-period"?(this.selectedPeriod=t,this.updateNumberOptionsAndSelectedNumber(t)):r==="time-number"&&(this.selectedNumber=parseInt(t));const o={number:this.selectedNumber,period:this.selectedPeriod};this.timePeriodChanged.emit(o)}updateNumberOptionsAndSelectedNumber(e){const t=this.calculateOptions(e);this.numberOptions=t.map(r=>({label:r.toString(),value:r.toString()})),this.selectedNumber=parseInt(this.numberOptions[0].value)}render(){return d.h("div",{key:"eaec00db41b0c2410fc4a9ccc341fc4ec4012e10",class:"time-period-selector"},d.h("select-dropdown",{key:"0d53efe90429a05d4f52a8f1b92bf46b14b1e6ad",id:"time-number",name:"time-number",exportparts:"sd__dropdown: tps__number-dropdown, sd__dropdown-button: tps__number-dropdown-button, sd__dropdown-content: tps__number-dropdown-content",options:this.numberOptions,defaultSelectedOption:this.numberOptions.find(e=>e.value==this.selectedNumber.toString())??this.numberOptions[0],withSearch:!1}),d.h("select-dropdown",{key:"bce764e3e959eb4fad73d1e410173d584f243ee5",id:"time-period",name:"time-period",options:this.timePeriodOptions,exportparts:"sd__dropdown: tps__period-dropdown, sd__dropdown-button: tps__period-dropdown-button, sd__dropdown-content: tps__period-dropdown-content",pluralizedLabel:this.selectedNumber>1?"s":"",defaultSelectedOption:this.timePeriodOptions.find(e=>e.value==this.selectedPeriod)??this.timePeriodOptions[0],withSearch:!1}))}get host(){return d.getElement(this)}static get watchers(){return{defaultSelectedPeriod:["defaultSelectedPeriodChangedHandler"],defaultSelectedNumber:["defaultSelectedNumberChangedHandler"],timePeriods:["timePeriodsChangedHandler"]}}};i.style=n;exports.time_period_selector=i;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-93c50de4.cjs");require("react");require("react-dom");const s=".sc-translate-icon-h{display:flex}",i=s,e=class{constructor(t){C.registerInstance(this,t),this.width="16",this.height="16"}render(){return C.h("svg",{key:"2196637bc95dbea321941ad3080c130dcea629c1",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 20 20",fill:"none"},C.h("path",{key:"2c2a3192f284366cb9d53e8f381e48cdfa546eb2",fill:"currentColor",d:"M14.1663 4.02867C14.4267 4.12081 14.563 4.40654 14.4709 4.66685C14.3501 5.00788 14.2182 5.4771 14.1178 5.86047C14.6877 5.77587 15.2665 5.65653 15.8867 5.51288C16.1557 5.45058 16.4243 5.61815 16.4866 5.88717C16.5489 6.15619 16.3814 6.42479 16.1123 6.4871C15.339 6.66621 14.6101 6.81289 13.8717 6.90283C13.7759 7.35654 13.7014 7.77084 13.6451 8.15021C14.1202 8.04599 14.5738 8.00553 14.9996 8.02075L14.9996 8C14.9996 7.72386 15.2235 7.5 15.4996 7.5C15.7758 7.5 15.9996 7.72386 15.9996 8C15.9996 8.05657 15.9991 8.11281 15.9979 8.16871C17.1392 8.47838 17.9781 9.23987 18.3435 10.2263C18.9579 11.8853 18.1287 13.8787 15.7027 14.9569C15.4504 15.069 15.1549 14.9554 15.0427 14.7031C14.9306 14.4507 15.0442 14.1552 15.2966 14.0431C17.3705 13.1213 17.7913 11.6147 17.4057 10.5737C17.1874 9.984 16.6776 9.44916 15.9129 9.18633C15.6829 10.7237 15.021 11.9466 14.229 12.7925C14.3126 12.9656 14.3958 13.1436 14.4641 13.3151C14.5662 13.5717 14.441 13.8625 14.1844 13.9646C13.9278 14.0667 13.637 13.9415 13.5349 13.6849C13.5066 13.6137 13.4777 13.5463 13.448 13.4802C13.028 13.7794 12.5905 13.9869 12.1705 14.0835C11.5942 14.2161 10.963 14.1517 10.534 13.6942C9.88917 13.0053 9.84361 11.8611 10.2855 10.8412C10.6652 9.96479 11.4186 9.11781 12.5848 8.54034C12.6387 8.07338 12.7199 7.55894 12.8332 6.98891C12.3926 7.00755 11.9403 7.00326 11.4659 6.97127C11.1904 6.95269 10.9821 6.71428 11.0007 6.43876C11.0192 6.16325 11.2577 5.95496 11.5332 5.97353C12.0633 6.00928 12.5641 6.00772 13.0566 5.97553C13.1605 5.55444 13.3512 4.8331 13.5282 4.33317C13.6203 4.07286 13.906 3.93653 14.1663 4.02867ZM12.501 9.74109C11.8436 10.1821 11.427 10.7219 11.2031 11.2387C10.8542 12.0439 10.9881 12.716 11.2638 13.0105C11.2637 13.0104 11.2639 13.0106 11.2638 13.0105C11.3573 13.11 11.5624 13.1973 11.9463 13.109C12.2578 13.0373 12.6311 12.8571 13.0121 12.5576C12.8658 12.22 12.7272 11.8324 12.6313 11.353C12.5405 10.8996 12.4899 10.3743 12.501 9.74109ZM13.7808 11.7797C14.316 11.0956 14.759 10.1665 14.9271 9.01632C14.539 9.00681 14.1111 9.05601 13.6457 9.17854C13.605 9.19274 13.5647 9.20726 13.525 9.22209C13.4663 10.0545 13.5146 10.671 13.6118 11.1568C13.6578 11.3868 13.7156 11.5913 13.7808 11.7797ZM6.92028 5.2159C5.77942 4.88398 4.78409 5.00841 4.07616 5.21575C3.72264 5.3193 3.439 5.44393 3.24121 5.5443C3.14215 5.59457 3.0641 5.63901 3.00903 5.67212C2.98147 5.68868 2.95962 5.70244 2.9437 5.71271L2.92429 5.72542L2.91797 5.72966L2.91566 5.73123L2.91393 5.73241C2.91384 5.73249 2.91436 5.73325 2.94925 5.78397C3.23698 6.20225 3.1703 6.10548 2.91393 5.73241C2.68634 5.88881 2.62863 6.20009 2.78502 6.42767C2.94134 6.65514 3.25207 6.71313 3.47963 6.55703L3.4788 6.5576L3.48576 6.55305C3.49318 6.54826 3.50608 6.5401 3.52423 6.52919C3.56057 6.50735 3.6177 6.47463 3.69373 6.43605C3.84612 6.35872 4.07228 6.2589 4.35724 6.17544C4.92619 6.0088 5.72242 5.90898 6.64043 6.17595C7.35305 6.38517 7.66747 6.76919 7.82692 7.16112C7.98173 7.54163 8.0026 7.95751 8.00531 8.33243C7.46199 8.18407 6.79336 8.03682 6.08385 8.00744C5.04808 7.96456 3.8874 8.17096 2.87738 9.01102C1.98877 9.75011 1.78345 10.8818 2.07014 11.853C2.35713 12.8252 3.14925 13.692 4.31803 13.9348C5.22351 14.123 6.18016 13.8639 6.9599 13.5212C7.3403 13.354 7.69572 13.1594 8.0057 12.9665V13.5C8.0057 13.7761 8.22956 14 8.5057 14C8.78184 14 9.0057 13.7754 9.0057 13.4993L9.0057 8.44586C9.0058 8.05404 9.00595 7.40554 8.7532 6.78428C8.48142 6.11625 7.93342 5.51313 6.92136 5.21622L6.92028 5.2159ZM6.04249 9.00659C6.76366 9.03645 7.44769 9.209 8.0057 9.37205V11.757C7.65814 12.0182 7.13927 12.35 6.55757 12.6057C5.85264 12.9155 5.12729 13.0816 4.52148 12.9557C3.75127 12.7957 3.22322 12.2271 3.02922 11.5699C2.83491 10.9116 2.98777 10.2199 3.51683 9.77985C4.27958 9.14545 5.16917 8.97043 6.04249 9.00659Z"}))}};e.style=i;exports.translate_icon=e;
@@ -1,15 +0,0 @@
1
- import { r as e, h as C } from "./index-f93f6948.js";
2
- import "react";
3
- import "react-dom";
4
- const s = ".sc-translate-icon-h{display:flex}", i = s, c = class {
5
- constructor(t) {
6
- e(this, t), this.width = "16", this.height = "16";
7
- }
8
- render() {
9
- return C("svg", { key: "2196637bc95dbea321941ad3080c130dcea629c1", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 20 20", fill: "none" }, C("path", { key: "2c2a3192f284366cb9d53e8f381e48cdfa546eb2", fill: "currentColor", d: "M14.1663 4.02867C14.4267 4.12081 14.563 4.40654 14.4709 4.66685C14.3501 5.00788 14.2182 5.4771 14.1178 5.86047C14.6877 5.77587 15.2665 5.65653 15.8867 5.51288C16.1557 5.45058 16.4243 5.61815 16.4866 5.88717C16.5489 6.15619 16.3814 6.42479 16.1123 6.4871C15.339 6.66621 14.6101 6.81289 13.8717 6.90283C13.7759 7.35654 13.7014 7.77084 13.6451 8.15021C14.1202 8.04599 14.5738 8.00553 14.9996 8.02075L14.9996 8C14.9996 7.72386 15.2235 7.5 15.4996 7.5C15.7758 7.5 15.9996 7.72386 15.9996 8C15.9996 8.05657 15.9991 8.11281 15.9979 8.16871C17.1392 8.47838 17.9781 9.23987 18.3435 10.2263C18.9579 11.8853 18.1287 13.8787 15.7027 14.9569C15.4504 15.069 15.1549 14.9554 15.0427 14.7031C14.9306 14.4507 15.0442 14.1552 15.2966 14.0431C17.3705 13.1213 17.7913 11.6147 17.4057 10.5737C17.1874 9.984 16.6776 9.44916 15.9129 9.18633C15.6829 10.7237 15.021 11.9466 14.229 12.7925C14.3126 12.9656 14.3958 13.1436 14.4641 13.3151C14.5662 13.5717 14.441 13.8625 14.1844 13.9646C13.9278 14.0667 13.637 13.9415 13.5349 13.6849C13.5066 13.6137 13.4777 13.5463 13.448 13.4802C13.028 13.7794 12.5905 13.9869 12.1705 14.0835C11.5942 14.2161 10.963 14.1517 10.534 13.6942C9.88917 13.0053 9.84361 11.8611 10.2855 10.8412C10.6652 9.96479 11.4186 9.11781 12.5848 8.54034C12.6387 8.07338 12.7199 7.55894 12.8332 6.98891C12.3926 7.00755 11.9403 7.00326 11.4659 6.97127C11.1904 6.95269 10.9821 6.71428 11.0007 6.43876C11.0192 6.16325 11.2577 5.95496 11.5332 5.97353C12.0633 6.00928 12.5641 6.00772 13.0566 5.97553C13.1605 5.55444 13.3512 4.8331 13.5282 4.33317C13.6203 4.07286 13.906 3.93653 14.1663 4.02867ZM12.501 9.74109C11.8436 10.1821 11.427 10.7219 11.2031 11.2387C10.8542 12.0439 10.9881 12.716 11.2638 13.0105C11.2637 13.0104 11.2639 13.0106 11.2638 13.0105C11.3573 13.11 11.5624 13.1973 11.9463 13.109C12.2578 13.0373 12.6311 12.8571 13.0121 12.5576C12.8658 12.22 12.7272 11.8324 12.6313 11.353C12.5405 10.8996 12.4899 10.3743 12.501 9.74109ZM13.7808 11.7797C14.316 11.0956 14.759 10.1665 14.9271 9.01632C14.539 9.00681 14.1111 9.05601 13.6457 9.17854C13.605 9.19274 13.5647 9.20726 13.525 9.22209C13.4663 10.0545 13.5146 10.671 13.6118 11.1568C13.6578 11.3868 13.7156 11.5913 13.7808 11.7797ZM6.92028 5.2159C5.77942 4.88398 4.78409 5.00841 4.07616 5.21575C3.72264 5.3193 3.439 5.44393 3.24121 5.5443C3.14215 5.59457 3.0641 5.63901 3.00903 5.67212C2.98147 5.68868 2.95962 5.70244 2.9437 5.71271L2.92429 5.72542L2.91797 5.72966L2.91566 5.73123L2.91393 5.73241C2.91384 5.73249 2.91436 5.73325 2.94925 5.78397C3.23698 6.20225 3.1703 6.10548 2.91393 5.73241C2.68634 5.88881 2.62863 6.20009 2.78502 6.42767C2.94134 6.65514 3.25207 6.71313 3.47963 6.55703L3.4788 6.5576L3.48576 6.55305C3.49318 6.54826 3.50608 6.5401 3.52423 6.52919C3.56057 6.50735 3.6177 6.47463 3.69373 6.43605C3.84612 6.35872 4.07228 6.2589 4.35724 6.17544C4.92619 6.0088 5.72242 5.90898 6.64043 6.17595C7.35305 6.38517 7.66747 6.76919 7.82692 7.16112C7.98173 7.54163 8.0026 7.95751 8.00531 8.33243C7.46199 8.18407 6.79336 8.03682 6.08385 8.00744C5.04808 7.96456 3.8874 8.17096 2.87738 9.01102C1.98877 9.75011 1.78345 10.8818 2.07014 11.853C2.35713 12.8252 3.14925 13.692 4.31803 13.9348C5.22351 14.123 6.18016 13.8639 6.9599 13.5212C7.3403 13.354 7.69572 13.1594 8.0057 12.9665V13.5C8.0057 13.7761 8.22956 14 8.5057 14C8.78184 14 9.0057 13.7754 9.0057 13.4993L9.0057 8.44586C9.0058 8.05404 9.00595 7.40554 8.7532 6.78428C8.48142 6.11625 7.93342 5.51313 6.92136 5.21622L6.92028 5.2159ZM6.04249 9.00659C6.76366 9.03645 7.44769 9.209 8.0057 9.37205V11.757C7.65814 12.0182 7.13927 12.35 6.55757 12.6057C5.85264 12.9155 5.12729 13.0816 4.52148 12.9557C3.75127 12.7957 3.22322 12.2271 3.02922 11.5699C2.83491 10.9116 2.98777 10.2199 3.51683 9.77985C4.27958 9.14545 5.16917 8.97043 6.04249 9.00659Z" }));
10
- }
11
- };
12
- c.style = i;
13
- export {
14
- c as translate_icon
15
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-93c50de4.cjs");require("react");require("react-dom");const r=".sc-warning-icon-h{display:flex}",i=r,n=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"5a655b4440d40d0e22c0e8bb3d9e3f08a947eb32",width:"21",height:"21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"c3de0f39d8816fcc092f0a4bc6231e9cb91283de",d:"M10.149 7.054a.5.5 0 0 1 .5.5v4a.5.5 0 1 1-1 0v-4a.5.5 0 0 1 .5-.5Zm0 7.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM8.834 2.906a1.5 1.5 0 0 1 2.63 0l6.558 11.925a1.5 1.5 0 0 1-1.314 2.223H3.59a1.5 1.5 0 0 1-1.314-2.223L8.834 2.906Zm1.753.482a.5.5 0 0 0-.876 0L3.15 15.313a.5.5 0 0 0 .439.741h13.117a.5.5 0 0 0 .439-.741l-6.56-11.925Z",fill:"currentColor"}))}};n.style=i;exports.warning_icon=n;
@@ -1,15 +0,0 @@
1
- import { r as a, h as n } from "./index-f93f6948.js";
2
- import "react";
3
- import "react-dom";
4
- const e = ".sc-warning-icon-h{display:flex}", r = e, i = class {
5
- constructor(t) {
6
- a(this, t), this.width = "16", this.height = "16";
7
- }
8
- render() {
9
- return n("svg", { key: "5a655b4440d40d0e22c0e8bb3d9e3f08a947eb32", width: "21", height: "21", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("path", { key: "c3de0f39d8816fcc092f0a4bc6231e9cb91283de", d: "M10.149 7.054a.5.5 0 0 1 .5.5v4a.5.5 0 1 1-1 0v-4a.5.5 0 0 1 .5-.5Zm0 7.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM8.834 2.906a1.5 1.5 0 0 1 2.63 0l6.558 11.925a1.5 1.5 0 0 1-1.314 2.223H3.59a1.5 1.5 0 0 1-1.314-2.223L8.834 2.906Zm1.753.482a.5.5 0 0 0-.876 0L3.15 15.313a.5.5 0 0 0 .439.741h13.117a.5.5 0 0 0 .439-.741l-6.56-11.925Z", fill: "currentColor" }));
10
- }
11
- };
12
- i.style = r;
13
- export {
14
- i as warning_icon
15
- };
File without changes
File without changes