import{j as e,A as t,m as n,X as r,v as a,c as o,b as s,r as l,x as i,y as d,z as c,V as u,i as f,l as m}from"./ui-0c1fdf09.js";import{r as h}from"./vendor-d03f97b3.js";import{t as p,c as y,m as x,s as v,a as b,g,b as j,d as w,e as k,h as N,i as M,j as _,k as D,l as C,f as S,n as P}from"./format-6bc33007.js";import{a as O,g as E}from"./getDate-b28f462e.js";import{a as F}from"./index-650af140.js";function L(e,t){const n=p(e);return isNaN(t)?y(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function W(e,t){return function(e,t){const n=+p(e);return y(e,n+t)}(e,t*x)}function I(e,t){return L(e,7*t)}function Y(e,t){return O(e,12*t)}function T(e,t){return+v(e)==+v(t)}function B(e,t){const n=p(e),r=p(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function A(e){const t=p(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function H(e){const t=p(e);return t.setDate(1),t.setHours(0,0,0,0),t}function R(e,t){var n,r,a,o;const s=w(),l=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??s.weekStartsOn??(null==(o=null==(a=s.locale)?void 0:a.options)?void 0:o.weekStartsOn)??0,i=p(e),d=i.getDay(),c=6+(d<l?-7:0)-(d-l);return i.setDate(i.getDate()+c),i.setHours(23,59,59,999),i}function $(e){return R(e,{weekStartsOn:1})}function z(e,t){return function(e,t,n){const r=b(e,n),a=b(t,n),o=+r-g(r),s=+a-g(a);return Math.round((o-s)/j)}(function(e){const t=p(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}(e),H(e),t)+1}function q(e,t){const n=p(e),r=p(t);return n.getTime()>r.getTime()}function K(e,t){return+p(e)<+p(t)}function G(e,t){const n=p(e),r=p(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function U(e,t){return L(e,-t)}function Z(e,t){const n=p(e),r=n.getFullYear(),a=n.getDate(),o=y(e,0);o.setFullYear(r,t,15),o.setHours(0,0,0,0);const s=function(e){const t=p(e),n=t.getFullYear(),r=t.getMonth(),a=y(e,0);return a.setFullYear(n,r+1,0),a.setHours(0,0,0,0),a.getDate()}(o);return n.setMonth(t,Math.min(a,s)),n}function V(e,t){let n=p(e);return isNaN(+n)?y(e,NaN):(null!=t.year&&n.setFullYear(t.year),null!=t.month&&(n=Z(n,t.month)),null!=t.date&&n.setDate(t.date),null!=t.hours&&n.setHours(t.hours),null!=t.minutes&&n.setMinutes(t.minutes),null!=t.seconds&&n.setSeconds(t.seconds),null!=t.milliseconds&&n.setMilliseconds(t.milliseconds),n)}function J(e,t){const n=p(e);return isNaN(+n)?y(e,NaN):(n.setFullYear(t),n)}var Q=function(){return Q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},Q.apply(this,arguments)};function X(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}function ee(e){return"multiple"===e.mode}function te(e){return"range"===e.mode}function ne(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var re={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var ae=Object.freeze({__proto__:null,formatCaption:function(e,t){return S(e,"LLLL y",t)},formatDay:function(e,t){return S(e,"d",t)},formatMonthCaption:function(e,t){return S(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return S(e,"cccccc",t)},formatYearCaption:function(e,t){return S(e,"yyyy",t)}}),oe=Object.freeze({__proto__:null,labelDay:function(e,t,n){return S(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return S(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var se=h.createContext(void 0);function le(t){var n,r,a=t.initialProps,o={captionLayout:"buttons",classNames:re,formatters:ae,labels:oe,locale:N,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:new Date,mode:"default"},s=function(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,a=e.toMonth,o=e.fromDate,s=e.toDate;return r?o=H(r):t&&(o=new Date(t,0,1)),a?s=A(a):n&&(s=new Date(n,11,31)),{fromDate:o?v(o):void 0,toDate:s?v(s):void 0}}(a),l=s.fromDate,i=s.toDate,d=null!==(n=a.captionLayout)&&void 0!==n?n:o.captionLayout;"buttons"===d||l&&i||(d="buttons"),(ne(a)||ee(a)||te(a))&&(r=a.onSelect);var c=Q(Q(Q({},o),a),{captionLayout:d,classNames:Q(Q({},o.classNames),a.classNames),components:Q({},a.components),formatters:Q(Q({},o.formatters),a.formatters),fromDate:l,labels:Q(Q({},o.labels),a.labels),mode:a.mode||o.mode,modifiers:Q(Q({},o.modifiers),a.modifiers),modifiersClassNames:Q(Q({},o.modifiersClassNames),a.modifiersClassNames),onSelect:r,styles:Q(Q({},o.styles),a.styles),toDate:i});return e.jsx(se.Provider,{value:c,children:t.children})}function ie(){var e=h.useContext(se);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function de(t){var n=ie(),r=n.locale,a=n.classNames,o=n.styles,s=n.formatters.formatCaption;return e.jsx("div",{className:a.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:t.id,children:s(t.displayMonth,{locale:r})})}function ce(t){return e.jsx("svg",Q({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},t,{children:e.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function ue(t){var n,r,a=t.onChange,o=t.value,s=t.children,l=t.caption,i=t.className,d=t.style,c=ie(),u=null!==(r=null===(n=c.components)||void 0===n?void 0:n.IconDropdown)&&void 0!==r?r:ce;return e.jsxs("div",{className:i,style:d,children:[e.jsx("span",{className:c.classNames.vhidden,children:t["aria-label"]}),e.jsx("select",{name:t.name,"aria-label":t["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:a,children:s}),e.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[l,e.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function fe(t){var n,r=ie(),a=r.fromDate,o=r.toDate,s=r.styles,l=r.locale,i=r.formatters.formatMonthCaption,d=r.classNames,c=r.components,u=r.labels.labelMonthDropdown;if(!a)return e.jsx(e.Fragment,{});if(!o)return e.jsx(e.Fragment,{});var f=[];if(function(e,t){const n=p(e),r=p(t);return n.getFullYear()===r.getFullYear()}(a,o))for(var m=H(a),h=a.getMonth();h<=o.getMonth();h++)f.push(Z(m,h));else for(m=H(new Date),h=0;h<=11;h++)f.push(Z(m,h));var y=null!==(n=null==c?void 0:c.Dropdown)&&void 0!==n?n:ue;return e.jsx(y,{name:"months","aria-label":u(),className:d.dropdown_month,style:s.dropdown_month,onChange:function(e){var n=Number(e.target.value),r=Z(H(t.displayMonth),n);t.onChange(r)},value:t.displayMonth.getMonth(),caption:i(t.displayMonth,{locale:l}),children:f.map((function(t){return e.jsx("option",{value:t.getMonth(),children:i(t,{locale:l})},t.getMonth())}))})}function me(t){var n,r=t.displayMonth,a=ie(),o=a.fromDate,s=a.toDate,l=a.locale,i=a.styles,d=a.classNames,c=a.components,u=a.formatters.formatYearCaption,f=a.labels.labelYearDropdown,m=[];if(!o)return e.jsx(e.Fragment,{});if(!s)return e.jsx(e.Fragment,{});for(var h=o.getFullYear(),p=s.getFullYear(),y=h;y<=p;y++)m.push(J(M(new Date),y));var x=null!==(n=null==c?void 0:c.Dropdown)&&void 0!==n?n:ue;return e.jsx(x,{name:"years","aria-label":f(),className:d.dropdown_year,style:i.dropdown_year,onChange:function(e){var n=J(H(r),Number(e.target.value));t.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:l}),children:m.map((function(t){return e.jsx("option",{value:t.getFullYear(),children:u(t,{locale:l})},t.getFullYear())}))})}function he(){var e=ie(),t=function(e){var t=e.month,n=e.defaultMonth,r=e.today,a=t||n||r||new Date,o=e.toDate,s=e.fromDate,l=e.numberOfMonths,i=void 0===l?1:l;return o&&B(o,a)<0&&(a=O(o,-1*(i-1))),s&&B(a,s)<0&&(a=s),H(a)}(e),n=function(e,t){var n=h.useState(e),r=n[0];return[void 0===t?r:t,n[1]]}(t,e.month),r=n[0],a=n[1];return[r,function(t){var n;if(!e.disableNavigation){var r=H(t);a(r),null===(n=e.onMonthChange)||void 0===n||n.call(e,r)}}]}var pe=h.createContext(void 0);function ye(t){var n=ie(),r=he(),a=r[0],o=r[1],s=function(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,a=H(e),o=B(H(O(a,r)),a),s=[],l=0;l<o;l++){var i=O(a,l);s.push(i)}return n&&(s=s.reverse()),s}(a,n),l=function(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,a=t.numberOfMonths,o=void 0===a?1:a,s=r?o:1,l=H(e);if(!n)return O(l,s);if(!(B(n,e)<o))return O(l,s)}}(a,n),i=function(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,a=t.numberOfMonths,o=r?void 0===a?1:a:1,s=H(e);if(!n)return O(s,-o);if(!(B(s,n)<=0))return O(s,-o)}}(a,n),d=function(e){return s.some((function(t){return G(e,t)}))},c={currentMonth:a,displayMonths:s,goToMonth:o,goToDate:function(e,t){d(e)||(t&&K(e,t)?o(O(e,1+-1*n.numberOfMonths)):o(e))},previousMonth:i,nextMonth:l,isDateDisplayed:d};return e.jsx(pe.Provider,{value:c,children:t.children})}function xe(){var e=h.useContext(pe);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function ve(t){var n,r=ie(),a=r.classNames,o=r.styles,s=r.components,l=xe().goToMonth,i=function(e){l(O(e,t.displayIndex?-t.displayIndex:0))},d=null!==(n=null==s?void 0:s.CaptionLabel)&&void 0!==n?n:de,c=e.jsx(d,{id:t.id,displayMonth:t.displayMonth});return e.jsxs("div",{className:a.caption_dropdowns,style:o.caption_dropdowns,children:[e.jsx("div",{className:a.vhidden,children:c}),e.jsx(fe,{onChange:i,displayMonth:t.displayMonth}),e.jsx(me,{onChange:i,displayMonth:t.displayMonth})]})}function be(t){return e.jsx("svg",Q({width:"16px",height:"16px",viewBox:"0 0 120 120"},t,{children:e.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function ge(t){return e.jsx("svg",Q({width:"16px",height:"16px",viewBox:"0 0 120 120"},t,{children:e.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var je=h.forwardRef((function(t,n){var r=ie(),a=r.classNames,o=r.styles,s=[a.button_reset,a.button];t.className&&s.push(t.className);var l=s.join(" "),i=Q(Q({},o.button_reset),o.button);return t.style&&Object.assign(i,t.style),e.jsx("button",Q({},t,{ref:n,type:"button",className:l,style:i}))}));function we(t){var n,r,a=ie(),o=a.dir,s=a.locale,l=a.classNames,i=a.styles,d=a.labels,c=d.labelPrevious,u=d.labelNext,f=a.components;if(!t.nextMonth&&!t.previousMonth)return e.jsx(e.Fragment,{});var m=c(t.previousMonth,{locale:s}),h=[l.nav_button,l.nav_button_previous].join(" "),p=u(t.nextMonth,{locale:s}),y=[l.nav_button,l.nav_button_next].join(" "),x=null!==(n=null==f?void 0:f.IconRight)&&void 0!==n?n:ge,v=null!==(r=null==f?void 0:f.IconLeft)&&void 0!==r?r:be;return e.jsxs("div",{className:l.nav,style:i.nav,children:[!t.hidePrevious&&e.jsx(je,{name:"previous-month","aria-label":m,className:h,style:i.nav_button_previous,disabled:!t.previousMonth,onClick:t.onPreviousClick,children:"rtl"===o?e.jsx(x,{className:l.nav_icon,style:i.nav_icon}):e.jsx(v,{className:l.nav_icon,style:i.nav_icon})}),!t.hideNext&&e.jsx(je,{name:"next-month","aria-label":p,className:y,style:i.nav_button_next,disabled:!t.nextMonth,onClick:t.onNextClick,children:"rtl"===o?e.jsx(v,{className:l.nav_icon,style:i.nav_icon}):e.jsx(x,{className:l.nav_icon,style:i.nav_icon})})]})}function ke(t){var n=ie().numberOfMonths,r=xe(),a=r.previousMonth,o=r.nextMonth,s=r.goToMonth,l=r.displayMonths,i=l.findIndex((function(e){return G(t.displayMonth,e)})),d=0===i,c=i===l.length-1,u=n>1&&(d||!c),f=n>1&&(c||!d);return e.jsx(we,{displayMonth:t.displayMonth,hideNext:u,hidePrevious:f,nextMonth:o,previousMonth:a,onPreviousClick:function(){a&&s(a)},onNextClick:function(){o&&s(o)}})}function Ne(t){var n,r,a=ie(),o=a.classNames,s=a.disableNavigation,l=a.styles,i=a.captionLayout,d=a.components,c=null!==(n=null==d?void 0:d.CaptionLabel)&&void 0!==n?n:de;return r=s?e.jsx(c,{id:t.id,displayMonth:t.displayMonth}):"dropdown"===i?e.jsx(ve,{displayMonth:t.displayMonth,id:t.id}):"dropdown-buttons"===i?e.jsxs(e.Fragment,{children:[e.jsx(ve,{displayMonth:t.displayMonth,displayIndex:t.displayIndex,id:t.id}),e.jsx(ke,{displayMonth:t.displayMonth,displayIndex:t.displayIndex,id:t.id})]}):e.jsxs(e.Fragment,{children:[e.jsx(c,{id:t.id,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),e.jsx(ke,{displayMonth:t.displayMonth,id:t.id})]}),e.jsx("div",{className:o.caption,style:l.caption,children:r})}function Me(t){var n=ie(),r=n.footer,a=n.styles,o=n.classNames.tfoot;return r?e.jsx("tfoot",{className:o,style:a.tfoot,children:e.jsx("tr",{children:e.jsx("td",{colSpan:8,children:r})})}):e.jsx(e.Fragment,{})}function _e(){var t=ie(),n=t.classNames,r=t.styles,a=t.showWeekNumber,o=t.locale,s=t.weekStartsOn,l=t.ISOWeek,i=t.formatters.formatWeekdayName,d=t.labels.labelWeekday,c=function(e,t,n){for(var r=n?_(new Date):b(new Date,{locale:e,weekStartsOn:t}),a=[],o=0;o<7;o++){var s=L(r,o);a.push(s)}return a}(o,s,l);return e.jsxs("tr",{style:r.head_row,className:n.head_row,children:[a&&e.jsx("td",{style:r.head_cell,className:n.head_cell}),c.map((function(t,a){return e.jsx("th",{scope:"col",className:n.head_cell,style:r.head_cell,"aria-label":d(t,{locale:o}),children:i(t,{locale:o})},a)}))]})}function De(){var t,n=ie(),r=n.classNames,a=n.styles,o=n.components,s=null!==(t=null==o?void 0:o.HeadRow)&&void 0!==t?t:_e;return e.jsx("thead",{style:a.head,className:r.head,children:e.jsx(s,{})})}function Ce(t){var n=ie(),r=n.locale,a=n.formatters.formatDay;return e.jsx(e.Fragment,{children:a(t.date,{locale:r})})}var Se=h.createContext(void 0);function Pe(t){if(!ee(t.initialProps)){return e.jsx(Se.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:t.children})}return e.jsx(Oe,{initialProps:t.initialProps,children:t.children})}function Oe(t){var n=t.initialProps,r=t.children,a=n.selected,o=n.min,s=n.max,l={disabled:[]};a&&l.disabled.push((function(e){var t=s&&a.length>s-1,n=a.some((function(t){return T(t,e)}));return Boolean(t&&!n)}));var i={selected:a,onDayClick:function(e,t,r){var l,i;if((null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,r),!Boolean(t.selected&&o&&(null==a?void 0:a.length)===o))&&!Boolean(!t.selected&&s&&(null==a?void 0:a.length)===s)){var d=a?X([],a,!0):[];if(t.selected){var c=d.findIndex((function(t){return T(e,t)}));d.splice(c,1)}else d.push(e);null===(i=n.onSelect)||void 0===i||i.call(n,d,e,t,r)}},modifiers:l};return e.jsx(Se.Provider,{value:i,children:r})}function Ee(){var e=h.useContext(Se);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var Fe,Le,We=h.createContext(void 0);function Ie(t){if(!te(t.initialProps)){return e.jsx(We.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:t.children})}return e.jsx(Ye,{initialProps:t.initialProps,children:t.children})}function Ye(t){var n=t.initialProps,r=t.children,a=n.selected,o=a||{},s=o.from,l=o.to,i=n.min,d=n.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(s?(c.range_start=[s],l?(c.range_end=[l],T(s,l)||(c.range_middle=[{after:s,before:l}])):c.range_end=[s]):l&&(c.range_start=[l],c.range_end=[l]),i&&(s&&!l&&c.disabled.push({after:U(s,i-1),before:L(s,i-1)}),s&&l&&c.disabled.push({after:s,before:L(s,i-1)}),!s&&l&&c.disabled.push({after:U(l,i-1),before:L(l,i-1)})),d){if(s&&!l&&(c.disabled.push({before:L(s,1-d)}),c.disabled.push({after:L(s,d-1)})),s&&l){var u=d-(k(l,s)+1);c.disabled.push({before:U(s,u)}),c.disabled.push({after:L(l,u)})}!s&&l&&(c.disabled.push({before:L(l,1-d)}),c.disabled.push({after:L(l,d-1)}))}return e.jsx(We.Provider,{value:{selected:a,onDayClick:function(e,t,r){var o,s;null===(o=n.onDayClick)||void 0===o||o.call(n,e,t,r);var l=function(e,t){var n=t||{},r=n.from,a=n.to;if(r&&a){if(T(a,e)&&T(r,e))return;if(T(a,e))return{from:a,to:void 0};if(T(r,e))return;return q(r,e)?{from:e,to:a}:{from:r,to:e}}return a?q(e,a)?{from:a,to:e}:{from:e,to:a}:r?K(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}(e,a);null===(s=n.onSelect)||void 0===s||s.call(n,l,e,t,r)},modifiers:c},children:r})}function Te(){var e=h.useContext(We);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Be(e){return Array.isArray(e)?X([],e,!0):void 0!==e?[e]:[]}(Le=Fe||(Fe={})).Outside="outside",Le.Disabled="disabled",Le.Selected="selected",Le.Hidden="hidden",Le.Today="today",Le.RangeStart="range_start",Le.RangeEnd="range_end",Le.RangeMiddle="range_middle";var Ae=Fe.Selected,He=Fe.Disabled,Re=Fe.Hidden,$e=Fe.Today,ze=Fe.RangeEnd,qe=Fe.RangeMiddle,Ke=Fe.RangeStart,Ge=Fe.Outside;var Ue=h.createContext(void 0);function Ze(t){var n=ie(),r=function(e,t,n){var r,a=((r={})[Ae]=Be(e.selected),r[He]=Be(e.disabled),r[Re]=Be(e.hidden),r[$e]=[e.today],r[ze]=[],r[qe]=[],r[Ke]=[],r[Ge]=[],r);return e.fromDate&&a[He].push({before:e.fromDate}),e.toDate&&a[He].push({after:e.toDate}),ee(e)?a[He]=a[He].concat(t.modifiers[He]):te(e)&&(a[He]=a[He].concat(n.modifiers[He]),a[Ke]=n.modifiers[Ke],a[qe]=n.modifiers[qe],a[ze]=n.modifiers[ze]),a}(n,Ee(),Te()),a=function(e){var t={};return Object.entries(e).forEach((function(e){var n=e[0],r=e[1];t[n]=Be(r)})),t}(n.modifiers),o=Q(Q({},r),a);return e.jsx(Ue.Provider,{value:o,children:t.children})}function Ve(){var e=h.useContext(Ue);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Je(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(P(t))return T(e,t);var n,r,a,o,s;if(function(e){return Array.isArray(e)&&e.every(P)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return n=e,o=(r=t).from,s=r.to,o&&s?(k(s,o)<0&&(o=(a=[s,o])[0],s=a[1]),k(n,o)>=0&&k(s,n)>=0):s?T(s,n):!!o&&T(o,n);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var l=k(t.before,e)>0,i=k(t.after,e)<0;return q(t.before,t.after)?i&&l:l||i}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?k(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?k(t.before,e)>0:"function"==typeof t&&t(e)}))}function Qe(e,t,n){var r=Object.keys(t).reduce((function(n,r){var a=t[r];return Je(e,a)&&n.push(r),n}),[]),a={};return r.forEach((function(e){return a[e]=!0})),n&&!G(e,n)&&(a.outside=!0),a}function Xe(e,t){var n=t.moveBy,r=t.direction,a=t.context,o=t.modifiers,s=t.retry,l=void 0===s?{count:0,lastFocused:e}:s,i=a.weekStartsOn,d=a.fromDate,c=a.toDate,u=a.locale,f={day:L,week:I,month:O,year:Y,startOfWeek:function(e){return a.ISOWeek?_(e):b(e,{locale:u,weekStartsOn:i})},endOfWeek:function(e){return a.ISOWeek?$(e):R(e,{locale:u,weekStartsOn:i})}}[n](e,"after"===r?1:-1);"before"===r&&d?f=function(e){let t;return e.forEach((function(e){const n=p(e);(void 0===t||t<n||isNaN(Number(n)))&&(t=n)})),t||new Date(NaN)}([d,f]):"after"===r&&c&&(f=function(e){let t;return e.forEach((e=>{const n=p(e);(!t||t>n||isNaN(+n))&&(t=n)})),t||new Date(NaN)}([c,f]));var m=!0;if(o){var h=Qe(f,o);m=!h.disabled&&!h.hidden}return m?f:l.count>365?l.lastFocused:Xe(f,{moveBy:n,direction:r,context:a,modifiers:o,retry:Q(Q({},l),{count:l.count+1})})}var et=h.createContext(void 0);function tt(t){var n=xe(),r=Ve(),a=h.useState(),o=a[0],s=a[1],l=h.useState(),i=l[0],d=l[1],c=function(e,t){for(var n,r,a=H(e[0]),o=A(e[e.length-1]),s=a;s<=o;){var l=Qe(s,t);if(l.disabled||l.hidden)s=L(s,1);else{if(l.selected)return s;l.today&&!r&&(r=s),n||(n=s),s=L(s,1)}}return r||n}(n.displayMonths,r),u=(null!=o?o:i&&n.isDateDisplayed(i))?i:c,f=function(e){s(e)},m=ie(),p=function(e,t){if(o){var a=Xe(o,{moveBy:e,direction:t,context:m,modifiers:r});T(o,a)||(n.goToDate(a,o),f(a))}},y={focusedDay:o,focusTarget:u,blur:function(){d(o),s(void 0)},focus:f,focusDayAfter:function(){return p("day","after")},focusDayBefore:function(){return p("day","before")},focusWeekAfter:function(){return p("week","after")},focusWeekBefore:function(){return p("week","before")},focusMonthBefore:function(){return p("month","before")},focusMonthAfter:function(){return p("month","after")},focusYearBefore:function(){return p("year","before")},focusYearAfter:function(){return p("year","after")},focusStartOfWeek:function(){return p("startOfWeek","before")},focusEndOfWeek:function(){return p("endOfWeek","after")}};return e.jsx(et.Provider,{value:y,children:t.children})}function nt(){var e=h.useContext(et);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var rt=h.createContext(void 0);function at(t){if(!ne(t.initialProps)){return e.jsx(rt.Provider,{value:{selected:void 0},children:t.children})}return e.jsx(ot,{initialProps:t.initialProps,children:t.children})}function ot(t){var n=t.initialProps,r=t.children,a={selected:n.selected,onDayClick:function(e,t,r){var a,o,s;null===(a=n.onDayClick)||void 0===a||a.call(n,e,t,r),!t.selected||n.required?null===(s=n.onSelect)||void 0===s||s.call(n,e,e,t,r):null===(o=n.onSelect)||void 0===o||o.call(n,void 0,e,t,r)}};return e.jsx(rt.Provider,{value:a,children:r})}function st(){var e=h.useContext(rt);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function lt(e,t){var n=[e.classNames.day];return Object.keys(t).forEach((function(t){var r=e.modifiersClassNames[t];if(r)n.push(r);else if(function(e){return Object.values(Fe).includes(e)}(t)){var a=e.classNames["day_".concat(t)];a&&n.push(a)}})),n}function it(t,n,r){var a,o,s,l=ie(),i=nt(),d=function(e,t){return Qe(e,Ve(),t)}(t,n),c=function(e,t){var n=ie(),r=st(),a=Ee(),o=Te(),s=nt(),l=s.focusDayAfter,i=s.focusDayBefore,d=s.focusWeekAfter,c=s.focusWeekBefore,u=s.blur,f=s.focus,m=s.focusMonthBefore,h=s.focusMonthAfter,p=s.focusYearBefore,y=s.focusYearAfter,x=s.focusStartOfWeek,v=s.focusEndOfWeek;return{onClick:function(s){var l,i,d,c;ne(n)?null===(l=r.onDayClick)||void 0===l||l.call(r,e,t,s):ee(n)?null===(i=a.onDayClick)||void 0===i||i.call(a,e,t,s):te(n)?null===(d=o.onDayClick)||void 0===d||d.call(o,e,t,s):null===(c=n.onDayClick)||void 0===c||c.call(n,e,t,s)},onFocus:function(r){var a;f(e),null===(a=n.onDayFocus)||void 0===a||a.call(n,e,t,r)},onBlur:function(r){var a;u(),null===(a=n.onDayBlur)||void 0===a||a.call(n,e,t,r)},onKeyDown:function(r){var a;switch(r.key){case"ArrowLeft":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?l():i();break;case"ArrowRight":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?i():l();break;case"ArrowDown":r.preventDefault(),r.stopPropagation(),d();break;case"ArrowUp":r.preventDefault(),r.stopPropagation(),c();break;case"PageUp":r.preventDefault(),r.stopPropagation(),r.shiftKey?p():m();break;case"PageDown":r.preventDefault(),r.stopPropagation(),r.shiftKey?y():h();break;case"Home":r.preventDefault(),r.stopPropagation(),x();break;case"End":r.preventDefault(),r.stopPropagation(),v()}null===(a=n.onDayKeyDown)||void 0===a||a.call(n,e,t,r)},onKeyUp:function(r){var a;null===(a=n.onDayKeyUp)||void 0===a||a.call(n,e,t,r)},onMouseEnter:function(r){var a;null===(a=n.onDayMouseEnter)||void 0===a||a.call(n,e,t,r)},onMouseLeave:function(r){var a;null===(a=n.onDayMouseLeave)||void 0===a||a.call(n,e,t,r)},onPointerEnter:function(r){var a;null===(a=n.onDayPointerEnter)||void 0===a||a.call(n,e,t,r)},onPointerLeave:function(r){var a;null===(a=n.onDayPointerLeave)||void 0===a||a.call(n,e,t,r)},onTouchCancel:function(r){var a;null===(a=n.onDayTouchCancel)||void 0===a||a.call(n,e,t,r)},onTouchEnd:function(r){var a;null===(a=n.onDayTouchEnd)||void 0===a||a.call(n,e,t,r)},onTouchMove:function(r){var a;null===(a=n.onDayTouchMove)||void 0===a||a.call(n,e,t,r)},onTouchStart:function(r){var a;null===(a=n.onDayTouchStart)||void 0===a||a.call(n,e,t,r)}}}(t,d),u=function(){var e=ie(),t=st(),n=Ee(),r=Te();return ne(e)?t.selected:ee(e)?n.selected:te(e)?r.selected:void 0}(),f=Boolean(l.onDayClick||"default"!==l.mode);h.useEffect((function(){var e;d.outside||i.focusedDay&&f&&T(i.focusedDay,t)&&(null===(e=r.current)||void 0===e||e.focus())}),[i.focusedDay,t,r,f,d.outside]);var m=lt(l,d).join(" "),p=function(e,t){var n=Q({},e.styles.day);return Object.keys(t).forEach((function(t){var r;n=Q(Q({},n),null===(r=e.modifiersStyles)||void 0===r?void 0:r[t])})),n}(l,d),y=Boolean(d.outside&&!l.showOutsideDays||d.hidden),x=null!==(s=null===(o=l.components)||void 0===o?void 0:o.DayContent)&&void 0!==s?s:Ce,v={style:p,className:m,children:e.jsx(x,{date:t,displayMonth:n,activeModifiers:d}),role:"gridcell"},b=i.focusTarget&&T(i.focusTarget,t)&&!d.outside,g=i.focusedDay&&T(i.focusedDay,t),j=Q(Q(Q({},v),((a={disabled:d.disabled,role:"gridcell"})["aria-selected"]=d.selected,a.tabIndex=g||b?0:-1,a)),c);return{isButton:f,isHidden:y,activeModifiers:d,selectedDays:u,buttonProps:j,divProps:v}}function dt(t){var n=h.useRef(null),r=it(t.date,t.displayMonth,n);return r.isHidden?e.jsx("div",{role:"gridcell"}):r.isButton?e.jsx(je,Q({name:"day",ref:n},r.buttonProps)):e.jsx("div",Q({},r.divProps))}function ct(t){var n=t.number,r=t.dates,a=ie(),o=a.onWeekNumberClick,s=a.styles,l=a.classNames,i=a.locale,d=a.labels.labelWeekNumber,c=(0,a.formatters.formatWeekNumber)(Number(n),{locale:i});if(!o)return e.jsx("span",{className:l.weeknumber,style:s.weeknumber,children:c});var u=d(Number(n),{locale:i});return e.jsx(je,{name:"week-number","aria-label":u,className:l.weeknumber,style:s.weeknumber,onClick:function(e){o(n,r,e)},children:c})}function ut(t){var n,r,a,o=ie(),s=o.styles,l=o.classNames,i=o.showWeekNumber,d=o.components,c=null!==(n=null==d?void 0:d.Day)&&void 0!==n?n:dt,u=null!==(r=null==d?void 0:d.WeekNumber)&&void 0!==r?r:ct;return i&&(a=e.jsx("td",{className:l.cell,style:s.cell,children:e.jsx(u,{number:t.weekNumber,dates:t.dates})})),e.jsxs("tr",{className:l.row,style:s.row,children:[a,t.dates.map((function(n){return e.jsx("td",{className:l.cell,style:s.cell,role:"presentation",children:e.jsx(c,{displayMonth:t.displayMonth,date:n})},function(e){return Math.trunc(+p(e)/1e3)}(n))}))]})}function ft(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?$(t):R(t,n),a=(null==n?void 0:n.ISOWeek)?_(e):b(e,n),o=k(r,a),s=[],l=0;l<=o;l++)s.push(L(a,l));return s.reduce((function(e,t){var r=(null==n?void 0:n.ISOWeek)?D(t):C(t,n),a=e.find((function(e){return e.weekNumber===r}));return a?(a.dates.push(t),e):(e.push({weekNumber:r,dates:[t]}),e)}),[])}function mt(t){var n,r,a,o=ie(),s=o.locale,l=o.classNames,i=o.styles,d=o.hideHead,c=o.fixedWeeks,u=o.components,f=o.weekStartsOn,m=o.firstWeekContainsDate,h=o.ISOWeek,p=function(e,t){var n=ft(H(e),A(e),t);if(null==t?void 0:t.useFixedWeeks){var r=z(e,t);if(r<6){var a=n[n.length-1],o=a.dates[a.dates.length-1],s=I(o,6-r),l=ft(I(o,1),s,t);n.push.apply(n,l)}}return n}(t.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:h,locale:s,weekStartsOn:f,firstWeekContainsDate:m}),y=null!==(n=null==u?void 0:u.Head)&&void 0!==n?n:De,x=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:ut,v=null!==(a=null==u?void 0:u.Footer)&&void 0!==a?a:Me;return e.jsxs("table",{id:t.id,className:l.table,style:i.table,role:"grid","aria-labelledby":t["aria-labelledby"],children:[!d&&e.jsx(y,{}),e.jsx("tbody",{className:l.tbody,style:i.tbody,children:p.map((function(n){return e.jsx(x,{displayMonth:t.displayMonth,dates:n.dates,weekNumber:n.weekNumber},n.weekNumber)}))}),e.jsx(v,{displayMonth:t.displayMonth})]})}var ht="undefined"!=typeof window&&window.document&&window.document.createElement?h.useLayoutEffect:h.useEffect,pt=!1,yt=0;function xt(){return"react-day-picker-".concat(++yt)}function vt(t){var n,r,a=ie(),o=a.dir,s=a.classNames,l=a.styles,i=a.components,d=xe().displayMonths,c=function(e){var t,n=null!=e?e:pt?xt():null,r=h.useState(n),a=r[0],o=r[1];return ht((function(){null===a&&o(xt())}),[]),h.useEffect((function(){!1===pt&&(pt=!0)}),[]),null!==(t=null!=e?e:a)&&void 0!==t?t:void 0}(a.id?"".concat(a.id,"-").concat(t.displayIndex):void 0),u=a.id?"".concat(a.id,"-grid-").concat(t.displayIndex):void 0,f=[s.month],m=l.month,p=0===t.displayIndex,y=t.displayIndex===d.length-1,x=!p&&!y;"rtl"===o&&(y=(n=[p,y])[0],p=n[1]),p&&(f.push(s.caption_start),m=Q(Q({},m),l.caption_start)),y&&(f.push(s.caption_end),m=Q(Q({},m),l.caption_end)),x&&(f.push(s.caption_between),m=Q(Q({},m),l.caption_between));var v=null!==(r=null==i?void 0:i.Caption)&&void 0!==r?r:Ne;return e.jsxs("div",{className:f.join(" "),style:m,children:[e.jsx(v,{id:c,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),e.jsx(mt,{id:u,"aria-labelledby":c,displayMonth:t.displayMonth})]},t.displayIndex)}function bt(t){var n=ie(),r=n.classNames,a=n.styles;return e.jsx("div",{className:r.months,style:a.months,children:t.children})}function gt(t){var n,r,a=t.initialProps,o=ie(),s=nt(),l=xe(),i=h.useState(!1),d=i[0],c=i[1];h.useEffect((function(){o.initialFocus&&s.focusTarget&&(d||(s.focus(s.focusTarget),c(!0)))}),[o.initialFocus,d,s.focus,s.focusTarget,s]);var u=[o.classNames.root,o.className];o.numberOfMonths>1&&u.push(o.classNames.multiple_months),o.showWeekNumber&&u.push(o.classNames.with_weeknumber);var f=Q(Q({},o.styles.root),o.style),m=Object.keys(a).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var n;return Q(Q({},e),((n={})[t]=a[t],n))}),{}),p=null!==(r=null===(n=a.components)||void 0===n?void 0:n.Months)&&void 0!==r?r:bt;return e.jsx("div",Q({className:u.join(" "),style:f,dir:o.dir,id:o.id,nonce:a.nonce,title:a.title,lang:a.lang},m,{children:e.jsx(p,{children:l.displayMonths.map((function(t,n){return e.jsx(vt,{displayIndex:n,displayMonth:t},n)}))})}))}function jt(t){var n=t.children,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}(t,["children"]);return e.jsx(le,{initialProps:r,children:e.jsx(ye,{children:e.jsx(at,{initialProps:r,children:e.jsx(Pe,{initialProps:r,children:e.jsx(Ie,{initialProps:r,children:e.jsx(Ze,{children:e.jsx(tt,{children:n})})})})})})})}function wt(t){return e.jsx(jt,Q({},t,{children:e.jsx(gt,{initialProps:t})}))}const kt=({isOpen:p,onClose:y,clientId:x})=>{const[v,b]=h.useState(void 0),[g,j]=h.useState([]),[w,k]=h.useState(null),[N,M]=h.useState("date"),[_,D]=h.useState({name:"",email:"",phone:"",topic:"",preferredContact:"video"}),[C,P]=h.useState(!1),[I,Y]=h.useState(!1),T=h.useRef(null),{isMobile:B}=F(),A=()=>S(O(new Date,1),"MMMM"),H=()=>{const e=E(new Date);return e<=7?3:e<=14?2:e<=21?1:0},R=()=>0===H(),$=()=>{const e=H(),t=S(new Date,"MMMM"),n=A();return 0===e?`${t} is fully booked • Next openings in ${n}`:`${e} ${1===e?"spot":"spots"} remaining in ${t}`};h.useEffect((()=>{p&&(M("date"),b(void 0),k(null),Y(!1),D({name:"",email:"",phone:"",topic:"",preferredContact:"video"}))}),[p]),h.useEffect((()=>{v&&j(z(v))}),[v]);const z=e=>{const t=[],n=new Date;for(let r=e.getDate()===n.getDate()?Math.max(7,n.getHours()+(n.getMinutes()>=30?1:0)):7;r<9;r++)for(let a of[0,30]){if(e.getDate()===n.getDate()&&(r<n.getHours()||r===n.getHours()&&a<=n.getMinutes()))continue;const o=`${r.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`,s=V(new Date(e),{hours:r,minutes:a,seconds:0,milliseconds:0}),l=W(s,30),i=`${l.getHours().toString().padStart(2,"0")}:${l.getMinutes().toString().padStart(2,"0")}`,d=S(s,"h:mm a"),c=S(l,"h:mm a");t.push({startTime:o,endTime:i,formatted:`${d} - ${c}`})}return t},q=e=>{const{name:t,value:n}=e.target;D((e=>({...e,[t]:n})))},K=e=>{D((t=>({...t,preferredContact:e})))},G=()=>{"time"===N?M("date"):"details"===N&&M("time")};h.useEffect((()=>{const e=e=>{"Escape"===e.key&&y()};return p&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[p,y]),h.useEffect((()=>(document.body.style.overflow=p?"hidden":"",()=>{document.body.style.overflow=""})),[p]);const U=`\n .rdp {\n --rdp-cell-size: ${B?"36px":"40px"};\n --rdp-accent-color: #3b82f6;\n --rdp-background-color: rgba(59, 130, 246, 0.1);\n margin: 0;\n }\n .rdp-day_selected, .rdp-day_selected:focus-visible, .rdp-day_selected:hover {\n background-color: var(--rdp-accent-color);\n color: white;\n }\n .rdp-button:hover:not([disabled]):not(.rdp-day_selected) {\n background-color: var(--rdp-background-color);\n }\n .rdp-day {\n border-radius: 9999px;\n }\n .rdp-day_today:not(.rdp-day_selected) {\n border: 1px solid var(--rdp-accent-color);\n }\n .rdp-caption_label {\n font-weight: 600;\n }\n .rdp-head_cell {\n font-weight: 500;\n font-size: 0.875rem;\n color: #6b7280;\n }\n .dark .rdp-head_cell {\n color: #9ca3af;\n }\n .dark .rdp-day {\n color: #e5e7eb;\n }\n .dark .rdp-day_disabled {\n color: #6b7280;\n }\n `;return e.jsx(t,{children:p&&e.jsxs("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-24 sm:pt-32 pb-8 px-4 overflow-y-auto bg-black/40 backdrop-blur-sm",onClick:e=>{T.current&&!T.current.contains(e.target)&&y()},children:[e.jsx("style",{children:U}),e.jsx(n.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0"}),e.jsxs(n.div,{ref:T,initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},transition:{type:"spring",damping:25,stiffness:350},className:"bg-white dark:bg-gray-900 rounded-xl shadow-2xl overflow-hidden relative w-full max-w-3xl z-50 max-h-[80vh] flex flex-col my-4",children:[e.jsx("button",{onClick:y,className:"absolute top-4 right-4 p-2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900","aria-label":"Close scheduling dialog",children:e.jsx(r,{size:20})}),e.jsxs("div",{className:"p-6 border-b border-gray-200 dark:border-gray-800 flex-shrink-0",children:[e.jsx("h2",{className:"text-2xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-indigo-600 dark:from-blue-400 dark:to-indigo-400 inline-block",children:"Schedule a Meeting"}),e.jsxs("div",{className:"flex items-center justify-between mt-1",children:[e.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"30-minute free consultation with Enri Zhulati"}),e.jsxs("span",{className:"inline-flex items-center text-sm "+(R()?"text-orange-500 dark:text-orange-400":"text-blue-600 dark:text-blue-400"),children:[e.jsx(a,{size:14,className:"mr-1"}),e.jsx("span",{children:$()})]})]})]}),e.jsxs("div",{className:"overflow-y-auto p-6 flex-grow",children:[e.jsxs("div",{className:"flex items-center justify-between max-w-md mx-auto mb-8 relative",children:[e.jsx("div",{className:"absolute top-5 left-0 right-0 h-0.5 bg-gray-200 dark:bg-gray-700",style:{zIndex:1}}),e.jsx(Nt,{step:1,label:"Date",status:"date"===N?"active":"time"===N||"details"===N||"confirmation"===N?"completed":"inactive"}),e.jsx(Nt,{step:2,label:"Time",status:"time"===N?"active":"details"===N||"confirmation"===N?"completed":"inactive"}),e.jsx(Nt,{step:3,label:"Details",status:"details"===N?"active":"confirmation"===N?"completed":"inactive"})]}),"date"===N&&e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:"mb-6",children:e.jsx(wt,{mode:"single",selected:v,onSelect:e=>{b(e),e&&M("time")},disabled:e=>{const t=new Date;if(t.setHours(0,0,0,0),e<t)return!0;return 0===e.getDay()},fromDate:new Date,toDate:L(new Date,30),showOutsideDays:!0,className:"border border-gray-200 dark:border-gray-700 rounded-lg p-3 mx-auto bg-white dark:bg-gray-800 shadow-sm"})}),e.jsxs("div",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm mb-4 "+(R()?"bg-orange-100 dark:bg-orange-900/20 text-orange-800 dark:text-orange-300":1===H()?"bg-yellow-100 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300":"bg-blue-100 dark:bg-blue-900/20 text-blue-800 dark:text-blue-300"),children:[e.jsx(a,{className:"h-3.5 w-3.5 mr-1.5"}),e.jsx("span",{children:$()})]}),e.jsxs("div",{className:"text-blue-500 dark:text-blue-400 text-sm text-center flex items-center bg-blue-50 dark:bg-blue-900/20 px-4 py-2 rounded-lg",children:[e.jsx(o,{className:"h-4 w-4 mr-2"}),e.jsx("span",{children:"Available: Monday-Saturday, 7:00 AM - 9:00 AM"})]})]}),"time"===N&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-5",children:[e.jsx("button",{onClick:G,className:"p-2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900","aria-label":"Go back to date selection",children:e.jsx(s,{className:"h-5 w-5 transform rotate-180"})}),e.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white flex items-center",children:[e.jsx(o,{className:"h-5 w-5 mr-2 text-blue-500"}),v&&S(v,"EEEE, MMMM d, yyyy")]})]}),g.length>0?e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3 mt-5 max-h-72 overflow-y-auto p-1",children:g.map(((t,n)=>e.jsx("button",{onClick:()=>(e=>{k(e),M("details")})(t),className:"py-3 px-4 border border-gray-200 dark:border-gray-700 rounded-lg text-center hover:border-blue-500 dark:hover:border-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:e.jsx("span",{className:"text-gray-800 dark:text-gray-200 font-medium text-sm",children:t.formatted})},n)))}):e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-gray-100 dark:bg-gray-800 mb-4",children:e.jsx(a,{className:"h-8 w-8 text-gray-400"})}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:"No available time slots for this date."}),e.jsx("button",{onClick:()=>M("date"),className:"px-4 py-2 text-blue-600 dark:text-blue-400 border border-blue-300 dark:border-blue-700 rounded-lg hover:bg-blue-50 dark:hover:bg-blue-900/20 transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:"Select a different date"})]})]}),"details"===N&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-6",children:[e.jsx("button",{onClick:G,className:"p-2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900","aria-label":"Go back to time selection",children:e.jsx(s,{className:"h-5 w-5 transform rotate-180"})}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white flex items-center",children:[e.jsx(o,{className:"h-5 w-5 mr-2 text-blue-500"}),v&&S(v,"EEEE, MMMM d, yyyy")]}),e.jsxs("p",{className:"text-gray-500 dark:text-gray-400 flex items-center mt-1",children:[e.jsx(a,{className:"h-4 w-4 mr-2 text-blue-500"}),null==w?void 0:w.formatted]})]})]}),e.jsxs("form",{onSubmit:async e=>{if(e.preventDefault(),v&&w){P(!0);try{const e=S(v,"EEEE, MMMM d, yyyy"),t=w.formatted,n={..._,scheduledDate:e,scheduledTime:t,_subject:`Meeting Request: ${_.name} for ${e}`},r=await fetch("https://formspree.io/f/xanewdzl",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});r.ok?(Y(!0),M("confirmation")):(console.error("Form submission error:",await r.text()),alert("There was an error submitting your scheduling request. Please try again."))}catch(t){console.error("Error submitting form:",t),alert("There was an error submitting your scheduling request. Please try again.")}finally{P(!1)}}},className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Your Name"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(l,{className:"h-5 w-5 text-gray-400"})}),e.jsx("input",{type:"text",id:"name",name:"name",value:_.name,onChange:q,required:!0,className:"pl-10 w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white shadow-sm",placeholder:"Enter your full name"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Email Address"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(i,{className:"h-5 w-5 text-gray-400"})}),e.jsx("input",{type:"email",id:"email",name:"email",value:_.email,onChange:q,required:!0,className:"pl-10 w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white shadow-sm",placeholder:"you@example.com"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"phone",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:["Phone Number ",e.jsx("span",{className:"text-gray-500 dark:text-gray-400 font-normal",children:"(optional)"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(d,{className:"h-5 w-5 text-gray-400"})}),e.jsx("input",{type:"tel",id:"phone",name:"phone",value:_.phone,onChange:q,className:"pl-10 w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white shadow-sm",placeholder:"(123) 456-7890"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"topic",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"What would you like to discuss?"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(c,{className:"h-5 w-5 text-gray-400"})}),e.jsx("input",{type:"text",id:"topic",name:"topic",value:_.topic,onChange:q,required:!0,className:"pl-10 w-full px-4 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white shadow-sm",placeholder:"Briefly describe what you'd like to discuss"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Preferred Contact Method"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("button",{type:"button",onClick:()=>K("video"),className:`py-3 px-4 rounded-lg flex items-center justify-center transition-colors ${"video"===_.preferredContact?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 border-blue-300 dark:border-blue-700 ring-1 ring-blue-500":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700"} border focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[e.jsx(u,{className:"h-5 w-5 mr-2"}),e.jsx("span",{children:"Video Call"})]}),e.jsxs("button",{type:"button",onClick:()=>K("phone"),className:`py-3 px-4 rounded-lg flex items-center justify-center transition-colors ${"phone"===_.preferredContact?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 border-blue-300 dark:border-blue-700 ring-1 ring-blue-500":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700"} border focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[e.jsx(d,{className:"h-5 w-5 mr-2"}),e.jsx("span",{children:"Phone Call"})]})]})]}),e.jsxs("div",{className:"pt-2",children:[e.jsx("button",{type:"submit",disabled:C,className:"w-full py-3 px-4 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white rounded-lg transition-all duration-300 flex items-center justify-center font-medium shadow-md hover:shadow-blue-500/20 disabled:opacity-70 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:C?e.jsxs(e.Fragment,{children:[e.jsx(f,{className:"animate-spin h-5 w-5 mr-2"}),e.jsx("span",{children:"Scheduling..."})]}):e.jsx("span",{children:"Schedule Meeting"})}),e.jsxs("p",{className:"text-center text-xs text-gray-500 dark:text-gray-400 mt-3",children:["Free consultation • No obligation • Available through ",A()]})]})]})]}),"confirmation"===N&&e.jsxs("div",{className:"text-center py-6",children:[e.jsx("div",{className:"w-16 h-16 bg-green-100 dark:bg-green-900/30 rounded-full flex items-center justify-center mx-auto mb-4 shadow-inner",children:e.jsx(m,{className:"h-8 w-8 text-green-600 dark:text-green-400"})}),e.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-2",children:"Your meeting is scheduled!"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:"I look forward to speaking with you."}),e.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg p-5 max-w-md mx-auto mb-6 border border-gray-200 dark:border-gray-700 shadow-sm",children:[e.jsxs("div",{className:"flex items-center mb-3",children:[e.jsx(o,{className:"h-5 w-5 text-blue-500 mr-3 flex-shrink-0"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200 font-medium",children:v&&S(v,"EEEE, MMMM d, yyyy")})]}),e.jsxs("div",{className:"flex items-center mb-3",children:[e.jsx(a,{className:"h-5 w-5 text-blue-500 mr-3 flex-shrink-0"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200 font-medium",children:null==w?void 0:w.formatted})]}),e.jsxs("div",{className:"flex items-center mb-3",children:[e.jsx(l,{className:"h-5 w-5 text-blue-500 mr-3 flex-shrink-0"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200 font-medium",children:_.name})]}),e.jsxs("div",{className:"flex items-center",children:["video"===_.preferredContact?e.jsx(u,{className:"h-5 w-5 text-blue-500 mr-3 flex-shrink-0"}):e.jsx(d,{className:"h-5 w-5 text-blue-500 mr-3 flex-shrink-0"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200 font-medium",children:"video"===_.preferredContact?"Video Call":"Phone Call"})]})]}),e.jsxs("p",{className:"text-gray-500 dark:text-gray-400 text-sm",children:["I've received your request and will send confirmation details to ",e.jsx("span",{className:"font-medium",children:_.email})]}),e.jsx("button",{onClick:y,className:"mt-8 py-2.5 px-6 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors shadow-md hover:shadow-blue-500/20 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:"Done"})]})]})]})]})})},Nt=({step:t,label:n,status:r})=>e.jsxs("div",{className:"flex flex-col items-center relative z-10",children:[e.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center text-sm shadow-sm ${"active"===r?"bg-blue-600 text-white":"completed"===r?"bg-green-500 text-white":"bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300"} transition-colors duration-200`,children:"completed"===r?e.jsx(m,{size:16}):t}),e.jsx("span",{className:`text-xs mt-1.5 font-medium ${"active"===r?"text-blue-600 dark:text-blue-400":"completed"===r?"text-green-600 dark:text-green-400":"text-gray-500 dark:text-gray-400"} transition-colors duration-200`,children:n})]});export{kt as default}; //# sourceMappingURL=ScheduleModal-671f1dc1.js.map