1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6775],{3122:e=>{e.exports={"m-t-2xs":"ManagerCalendar_m-t-2xs__61vxB","m-t-xs":"ManagerCalendar_m-t-xs__vTjna","m-t-sm":"ManagerCalendar_m-t-sm__tu0vs","m-t-md":"ManagerCalendar_m-t-md__MXzNV","m-t-lg":"ManagerCalendar_m-t-lg__tkhim","m-t-xl":"ManagerCalendar_m-t-xl__DF0Bo","m-t-xl--desktop":"ManagerCalendar_m-t-xl--desktop__eOo9C","m-t-2xl":"ManagerCalendar_m-t-2xl__isf7i","m-t-3xl":"ManagerCalendar_m-t-3xl__UKprd","m-t-4xl":"ManagerCalendar_m-t-4xl__eVNcR","m-b-sm":"ManagerCalendar_m-b-sm__ZNsKI","m-b-md":"ManagerCalendar_m-b-md__uKEmI","m-b-lg":"ManagerCalendar_m-b-lg__WKLZo","m-b-xl":"ManagerCalendar_m-b-xl__d_GNQ","m-b-3xl":"ManagerCalendar_m-b-3xl__nTncT","m-r-xl":"ManagerCalendar_m-r-xl__1Z1kM","m-l-sm":"ManagerCalendar_m-l-sm__Wstpf","rbc-btn":"ManagerCalendar_rbc-btn__zXbpf","rbc-input":"ManagerCalendar_rbc-input__zD9_G","rbc-calendar":"ManagerCalendar_rbc-calendar__9_4yi","rbc-m-b-negative-3":"ManagerCalendar_rbc-m-b-negative-3__oyqIu","rbc-h-full":"ManagerCalendar_rbc-h-full__JZRWF","rbc-abs-full":"ManagerCalendar_rbc-abs-full___XPEt","rbc-row-bg":"ManagerCalendar_rbc-row-bg__rO8CE","rbc-ellipsis":"ManagerCalendar_rbc-ellipsis__yg_F5","rbc-show-more":"ManagerCalendar_rbc-show-more__pDRI7","rbc-row-segment":"ManagerCalendar_rbc-row-segment__aZdzh","rbc-event-content":"ManagerCalendar_rbc-event-content__8lyZg","rbc-event-label":"ManagerCalendar_rbc-event-label__Mys88","rbc-rtl":"ManagerCalendar_rbc-rtl__FJSni","rbc-off-range":"ManagerCalendar_rbc-off-range__ycExx","rbc-off-range-bg":"ManagerCalendar_rbc-off-range-bg__Et5w8","rbc-header":"ManagerCalendar_rbc-header__Vlwqd","rbc-button-link":"ManagerCalendar_rbc-button-link__FqPCT","rbc-row-content":"ManagerCalendar_rbc-row-content__Mk2fW","rbc-row-content-scrollable":"ManagerCalendar_rbc-row-content-scrollable__gHKb4","rbc-row-content-scroll-container":"ManagerCalendar_rbc-row-content-scroll-container__dLPpa","rbc-today":"ManagerCalendar_rbc-today__tbj4T","rbc-toolbar":"ManagerCalendar_rbc-toolbar__jMvND","rbc-toolbar-label":"ManagerCalendar_rbc-toolbar-label__eROPq","rbc-active":"ManagerCalendar_rbc-active__jL9c0","rbc-btn-group":"ManagerCalendar_rbc-btn-group__feasV","rbc-event":"ManagerCalendar_rbc-event__yk2pF","rbc-day-slot":"ManagerCalendar_rbc-day-slot__ck2Js","rbc-background-event":"ManagerCalendar_rbc-background-event__w_15g","rbc-slot-selecting":"ManagerCalendar_rbc-slot-selecting__7T_N9","rbc-selected":"ManagerCalendar_rbc-selected__QdLy0","rbc-event-overlaps":"ManagerCalendar_rbc-event-overlaps__uGZCD","rbc-event-continues-prior":"ManagerCalendar_rbc-event-continues-prior__uOj7L","rbc-event-continues-after":"ManagerCalendar_rbc-event-continues-after__d63Vd","rbc-event-continues-earlier":"ManagerCalendar_rbc-event-continues-earlier__3ZYcl","rbc-event-continues-later":"ManagerCalendar_rbc-event-continues-later__WcglV","rbc-row":"ManagerCalendar_rbc-row__LlCuJ","rbc-selected-cell":"ManagerCalendar_rbc-selected-cell__T4ef0","rbc-month-view":"ManagerCalendar_rbc-month-view__KnEO5","rbc-month-header":"ManagerCalendar_rbc-month-header__2hHn7","rbc-month-row":"ManagerCalendar_rbc-month-row__bQyoo","rbc-date-cell":"ManagerCalendar_rbc-date-cell__iMEh5","rbc-now":"ManagerCalendar_rbc-now__miJRO","rbc-day-bg":"ManagerCalendar_rbc-day-bg__UXBDL","rbc-overlay":"ManagerCalendar_rbc-overlay__8aIp2","rbc-overlay-header":"ManagerCalendar_rbc-overlay-header__JAnWl","rbc-agenda-view":"ManagerCalendar_rbc-agenda-view__lQFzd","rbc-agenda-table":"ManagerCalendar_rbc-agenda-table__K5FrE","rbc-agenda-time-cell":"ManagerCalendar_rbc-agenda-time-cell__Co4j2","rbc-continues-after":"ManagerCalendar_rbc-continues-after__C54_K","rbc-continues-prior":"ManagerCalendar_rbc-continues-prior__mf2T1","rbc-agenda-date-cell":"ManagerCalendar_rbc-agenda-date-cell__HYFTM","rbc-agenda-event-cell":"ManagerCalendar_rbc-agenda-event-cell__AP2VB","rbc-time-column":"ManagerCalendar_rbc-time-column__AS4YZ","rbc-timeslot-group":"ManagerCalendar_rbc-timeslot-group__GlWgO","rbc-time-gutter":"ManagerCalendar_rbc-time-gutter__5Zsi6","rbc-header-gutter":"ManagerCalendar_rbc-header-gutter__PNizY","rbc-label":"ManagerCalendar_rbc-label__ELiny","rbc-events-container":"ManagerCalendar_rbc-events-container__J5llM","rbc-time-slot":"ManagerCalendar_rbc-time-slot__6Br7n","rbc-time-view-resources":"ManagerCalendar_rbc-time-view-resources__5vRQm","rbc-time-header-gutter":"ManagerCalendar_rbc-time-header-gutter__TwG06","rbc-time-header":"ManagerCalendar_rbc-time-header__0Hzya","rbc-time-header-content":"ManagerCalendar_rbc-time-header-content__142ha","rbc-time-header-cell-single-day":"ManagerCalendar_rbc-time-header-cell-single-day__NRuIa","rbc-day-header":"ManagerCalendar_rbc-day-header__QbkrZ","rbc-slot-selection":"ManagerCalendar_rbc-slot-selection__ISN6u","rbc-time-view":"ManagerCalendar_rbc-time-view__k_zYU","rbc-allday-cell":"ManagerCalendar_rbc-allday-cell__Lj_L_","rbc-allday-events":"ManagerCalendar_rbc-allday-events__9ASAs","rbc-overflowing":"ManagerCalendar_rbc-overflowing__CDgET","rbc-row-resource":"ManagerCalendar_rbc-row-resource__17nSl","rbc-time-content":"ManagerCalendar_rbc-time-content__pQIvy","rbc-current-time-indicator":"ManagerCalendar_rbc-current-time-indicator__W3h0J","rbc-resource-grouping":"ManagerCalendar_rbc-resource-grouping__wXlfW",calendar:"ManagerCalendar_calendar__IiJYi",toolbar:"ManagerCalendar_toolbar__ns_1u",toolbar__heading:"ManagerCalendar_toolbar__heading__x1cH_","toolbar__button-group":"ManagerCalendar_toolbar__button-group__ETD6X",toolbar__button:"ManagerCalendar_toolbar__button__Sh5Qx","toolbar__button-today":"ManagerCalendar_toolbar__button-today__Z1XJM","blocked-date":"ManagerCalendar_blocked-date__m8VYV","rotate-three-sixty":"ManagerCalendar_rotate-three-sixty__bsAQo","slide-in-to-left":"ManagerCalendar_slide-in-to-left__IICbY","slide-out-to-left":"ManagerCalendar_slide-out-to-left__4J69n","slide-in-to-right":"ManagerCalendar_slide-in-to-right__9DDQt","slide-out-to-right":"ManagerCalendar_slide-out-to-right__VjloW"}},4973:e=>{e.exports={"m-t-2xs":"ManagerCalendarHeader_m-t-2xs__KMcmP","m-t-xs":"ManagerCalendarHeader_m-t-xs__zSfKa","m-t-sm":"ManagerCalendarHeader_m-t-sm__xnhVT","m-t-md":"ManagerCalendarHeader_m-t-md__zI5OT","m-t-lg":"ManagerCalendarHeader_m-t-lg__Zmev1","m-t-xl":"ManagerCalendarHeader_m-t-xl__P_ZL7","m-t-xl--desktop":"ManagerCalendarHeader_m-t-xl--desktop__DjCTg","m-t-2xl":"ManagerCalendarHeader_m-t-2xl__VfqVU","m-t-3xl"
1:"ManagerCalendarHeader_m-t-3xl___gsr8","m-t-4xl":"ManagerCalendarHeader_m-t-4xl__Zv5cB","m-b-sm":"ManagerCalendarHeader_m-b-sm__VbwTV","m-b-md":"ManagerCalendarHeader_m-b-md__3H84n","m-b-lg":"ManagerCalendarHeader_m-b-lg__rDP3y","m-b-xl":"ManagerCalendarHeader_m-b-xl__M8CJG","m-b-3xl":"ManagerCalendarHeader_m-b-3xl__nqCbs","m-r-xl":"ManagerCalendarHeader_m-r-xl__S2e_W","m-l-sm":"ManagerCalendarHeader_m-l-sm__lzbFF",header:"ManagerCalendarHeader_header__y8XAo",header__group:"ManagerCalendarHeader_header__group__Msfbn",header__item:"ManagerCalendarHeader_header__item__GGz_P","header__item--input":"ManagerCalendarHeader_header__item--input__HhpNh","rotate-three-sixty":"ManagerCalendarHeader_rotate-three-sixty__CJ5Fh","slide-in-to-left":"ManagerCalendarHeader_slide-in-to-left__M4wUS","slide-out-to-left":"ManagerCalendarHeader_slide-out-to-left__gg3FT","slide-in-to-right":"ManagerCalendarHeader_slide-in-to-right__xrsFW","slide-out-to-right":"ManagerCalendarHeader_slide-out-to-right__e1ufq"}},6998:(e,a,t)=>{"use strict";t.d(a,{A:()=>d,h:()=>m});var r=t(37876),_=t(14232),l=t(18559),n=t(88992),o=t(45308),s=t(92506),c=t(56538),i=t.n(c);function d(e){let{children:a,className:t,formOptions:c,id:d,onError:m,onSubmit:p=()=>{},focusInputName:u,resetValues:b,afterSubmit:g}=e,C=(0,n.mN)({mode:"onTouched",reValidateMode:"onChange",...c}),{defaultValues:x}=c||{},{formState:{dirtyFields:A,isSubmitSuccessful:h},setFocus:M,reset:y,setError:f,clearErrors:v,handleSubmit:F,getValues:w}=C,N=(0,s.A)(),k=(0,o.A)(),j=(0,_.useRef)(new Map);(0,_.useEffect)(()=>{u&&M(u)},[M,u]),(0,_.useEffect)(()=>{h&&(null==g||g())},[h,g]);let R=(0,_.useCallback)(e=>{j.current.set(e.name,e)},[]),D=(0,_.useCallback)(e=>{j.current.delete(e.name)},[]),E=async(e,a)=>{try{await p(k(e,A,x),a),b?y(b):y(e)}catch(a){let e=N(a)[0];f("submit",{type:"custom",message:e}),l.Cp(e)}},S=async e=>{e.preventDefault(),v("submit");let a=w();for(let e of j.current.values())await e(a);F(E,m)(e)};return(0,r.jsx)(n.Op,{...C,addBeforeSubmitCallback:R,removeBeforeSubmitCallback:D,children:(0,r.jsx)("form",{id:d,className:"".concat(i().component||""," ").concat(t||""),onSubmit:S,children:a})})}let m=d},11869:(e,a,t)=>{"use strict";t.d(a,{D:()=>l});var r=t(14232),_=t(23814);function l(e,a,t){let[l,n]=(0,r.useState)(null);return{validationObject:a?{validate:t=>{let r=e.replace(".",""),l=(0,_.validate)({[r]:t},{[r]:a});if(l){let e=l[r];e.length>0&&n(e[0])}else n(null);return!l}}:t,validateJsError:l}}},21991:(e,a,t)=>{"use strict";t.d(a,{A:()=>d});var r=t(37876),_=t(14232),l=t(74441),n=t.n(l);let o=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px",[t,r]=(0,_.useState)(!1);return(0,_.useEffect)(()=>{let t=e.current,_=new IntersectionObserver(e=>{let[a]=e;r(a.isIntersecting)},{rootMargin:a});return t&&_.observe(t),()=>{t&&_.unobserve(t)}},[e,a]),t};var s=t(43193),c=t(56538),i=t.n(c);let d=e=>{let{className:a,errors:t,shouldScroll:l=!0}=e,c=(0,s.Z)(t),d=(0,_.useRef)(null),m=o(d);return(0,_.useEffect)(()=>{if(!n()(t)&&c!==t&&!m&&l){var e;null==d||null==(e=d.current)||e.scrollIntoView({behavior:"smooth",block:"start"})}},[t,l,m,c,d]),(0,r.jsx)("div",{ref:d,className:"".concat(i()["error-box"]," ").concat(a||""),children:!!(null==t?void 0:t.filter(Boolean).length)&&(0,r.jsx)("div",{className:i()["error-box__inner"],children:t.map((e,a)=>(0,r.jsx)("p",{className:i()["error-box__error"],children:e},"error-box-".concat(a)))})})}},25477:(e,a,t)=>{"use strict";t.d(a,{A:()=>j});var r=t(37876),_=t(14232),l=t(30578),n=t.n(l),o=t(49811),s=t(48798),c=t(71667),i=t(18685),d=t(40606),m=t(81814),p=t(6998),u=t(21991),b=t(86975),g=t(66674),C=t(48215),x=t(338),A=t(88992),h=t(43193),M=t(51826);let y=e=>{let{calendars:a,loading:t}=e,{reset:l}=(0,A.xW)(),n=(0,h.Z)(a.length);return(0,_.useEffect)(()=>{n<a.length&&l({name:"",url:""},{keepErrors:!1})},[n,a.length,l]),(0,r.jsx)(M.A,{type:"submit",id:"add_clanedar",label:"Add Calendar",dataEvent:"manager_add_calendar",borderless:!0,ghost:!0,icon:"plus",iconBefore:!0,disabled:!!t&&"loading"})};var f=t(52789),v=t.n(f),F=t(50154),w=t.n(F);
1let N=n().bind(v()),k="Copy URL",j=e=>{let{className:a,id:t,availabilityCalendarUrl:l,calendars:n,setCalendars:A}=e,[h,M]=(0,_.useState)(k),{createRecord:f,loading:F,errors:j}=(0,i.A)(),{deleteRecord:R,errors:D}=(0,d.A)(),E=async e=>{await f({...e,url:e.url.trim(),type:"external-calendars"},{"campground-accommodation":{data:{id:t,type:"campground-accommodations"}}},e=>{A([...n,e])})},S=async e=>{e.preventDefault();let a=e.currentTarget.name;R(n.find(e=>{let{id:t}=e;return t===a}),()=>{A(n.filter(e=>{let{id:t}=e;return t!==a}))})};async function H(e){M(void 0!==(0,s.D)(e)?"Error, copy not supported":"Copied!"),setTimeout(()=>{M(k)},2e3)}return(0,r.jsxs)("section",{id:"name-description",className:"".concat(w().section," ").concat(v().wrapper," ").concat(a||""),children:[(0,r.jsxs)("article",{className:v().wrapper__content,children:[!!l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{className:w().section__title,children:"Export Site Calendar"}),(0,r.jsx)("p",{className:w().section__description,children:"Paste this site's .ics URL on all other bookings platforms where it is listed to sync calendars and availability information."}),(0,r.jsxs)("div",{className:w().section__row,children:[(0,r.jsx)(C.A,{className:v().copiable,name:"availabilityCalendarUrl",value:l,readOnly:!0}),(0,r.jsx)(m.A,{type:"button",icon:"copy",label:h,onClick:()=>H(l),dataEvent:"click_copy_coordinates"})]})]}),(0,r.jsx)("h2",{className:w().section__title,children:"Import Site Calendar"}),(0,r.jsx)("p",{className:w().section__description,children:"Add .ics URLs from all other booking platforms where this site is listed to sync calendars and availability information."}),(0,r.jsxs)(p.h,{onSubmit:E,children:[(0,r.jsxs)("div",{className:w().section__row,children:[(0,r.jsx)(b.A,{className:"".concat(w().section__column," ").concat(w()["section__column--is-1-2"]),name:"name",label:"Calendar name",placeholder:"e.g. Hipcamp Feed",validation:{required:{value:!0,message:"You must provide a name"}}}),(0,r.jsx)(b.A,{className:"".concat(w().section__column," ").concat(w()["section__column--is-1-2"]),name:"url",label:"External feed URL",placeholder:"Paste your calendar feed URL",validation:{required:{value:!0,message:"You must provide a calendar feed URL"},...o.dK}})]}),(0,r.jsx)("div",{className:w().section__row,children:(0,r.jsx)(y,{calendars:n,loading:F})}),(0,r.jsx)("div",{className:"".concat(w().footer__errors),children:(0,r.jsx)(u.A,{errors:j,className:w().footer__error})})]}),!!(null==n?void 0:n.length)&&(0,r.jsx)("ol",{className:w().section__row,children:n.map((e,a)=>{let t=e.syncedAt?"Updated ".concat((0,c.tj)(e.syncedAt)):"Not updated yet",_=N({cal:!0,"cal--error":!!e.message});return(0,r.jsxs)("li",{className:"".concat(w().section__row," ").concat(_),children:[(0,r.jsxs)("div",{className:"".concat(w().section__column," ").concat(w()["section__column--is-5-6"]," ").concat(v().cal__info),children:[(0,r.jsxs)("p",{className:v().cal__title,children:[e.message&&(0,r.jsx)(g.A,{classNameWrapper:v().cal__alert,classNameSvg:[v()["cal__alert-svg"]],icon:"alert"}),e.name]}),(0,r.jsx)("p",{className:v().cal__text,children:e.url}),(0,r.jsx)("p",{className:v().cal__text,children:t}),(0,r.jsx)("p",{className:v().cal__text,children:e.message})]}),(0,r.jsx)(m.A,{type:"button",className:"".concat(w().section__column," ").concat(w()["section__column--is-1-6"]," ").concat(w()["section__column--flex-end"]," ").concat(v().cal__delete),icon:"delete",onClick:S,dataEvent:"click_remove_calendar",name:e.id})]},a)})}),(0,r.jsx)("div",{className:"".concat(w().footer__errors),children:(0,r.jsx)(u.A,{errors:D,className:w().footer__error})})]}),(0,r.jsxs)("aside",{className:v().wrapper__aside,children:[(0,r.jsx)("h3",{className:v().wrapper__aside__title,children:"Need Help?"}),(0,r.jsxs)("p",{className:v().wrapper__aside__description,children:["If you list your property on other websites, Calendar Sync is a great way to make sure you don't get double bookings. Learn more about syncing your calendar with your listings on",(0,r.jsx)(x.A,{href:"https://support.thedyrt.com/hc/en-us/articles/5140340229780-Airbnb-How-to-import-and-export-calendars",children:(0,r.jsxs)("a",{className:v().wrapper__aside__link,target:"_blank","data-event":"Manager_Calendars_Support-AirBnb",children:[" ","Airbnb"]})}),",",(0,r.jsx)(x.A,{href:"https://support.thedyrt.com/hc/en-us/articles/5141150593428-VRBO-How-to-import-and-export-calendars",children:(0,r.jsxs)("a",{className:v().wrapper__aside__link,target:"_blank","data-event":"Manager_Calendars_Support-VRBO",children:[" ","VRBO"]})}),", or",(0,r.jsx)(x.A,{href:"https://support.thedyrt.com/hc/en-us/articles/5139112044436-Hipcamp-How-to-import-and-export-calendars",children:(0,r.jsxs)("a",{className:v().wrapper__aside__link,target:"_blank","data-event":"Manager_Calendars_Support-Hipcamp",children:[" ","Hipcamp"]})}),"."]})]})]})}},40606:(e,a,t)=>{"use strict";t.d(a,{A:()=>o});var r=t(14232),_=t(72767),l=t(31468),n=t(92506);let o=()=>{let e=(0,l.A)(),a=(0,n.A)(),[t,o]=(0,r.useState)({loading:!1,errors:null});return{deleteRecord:(0,r.useCallback)(async(t,r)=>{o({loading:!0,errors:null});try{await (0,_.LK)(t,{},e),o({loading:!1,errors:null}),r&&r()}catch(e){o({loading:!1,errors:a(e)})}},[o,e,a]),...t}}}
1,42910:e=>{e.exports={"m-t-2xs":"AppAction_m-t-2xs__lYjY_","m-t-xs":"AppAction_m-t-xs__9kc6i","m-t-sm":"AppAction_m-t-sm__FfO0Z","m-t-md":"AppAction_m-t-md__xGrzv","m-t-lg":"AppAction_m-t-lg__bMVLY","m-t-xl":"AppAction_m-t-xl__YXy1w","m-t-xl--desktop":"AppAction_m-t-xl--desktop__ApceP","m-t-2xl":"AppAction_m-t-2xl__yJFuD","m-t-3xl":"AppAction_m-t-3xl__0ezNE","m-t-4xl":"AppAction_m-t-4xl__5Hm_6","m-b-sm":"AppAction_m-b-sm__7JW5f","m-b-md":"AppAction_m-b-md__Geah9","m-b-lg":"AppAction_m-b-lg__U782z","m-b-xl":"AppAction_m-b-xl__mBgDM","m-b-3xl":"AppAction_m-b-3xl__u8tRx","m-r-xl":"AppAction_m-r-xl__Hq4K8","m-l-sm":"AppAction_m-l-sm__hsnMH",action:"AppAction_action__F1Q2U",action__label:"AppAction_action__label__d5_xC","action__icon-container":"AppAction_action__icon-container__85kd6","action__icon-container--transparent":"AppAction_action__icon-container--transparent__tlrgc",action__icon:"AppAction_action__icon__OJSP_","rotate-three-sixty":"AppAction_rotate-three-sixty__lzkHy","slide-in-to-left":"AppAction_slide-in-to-left__CBH3j","slide-out-to-left":"AppAction_slide-out-to-left__Z6wk_","slide-in-to-right":"AppAction_slide-in-to-right__jOeUg","slide-out-to-right":"AppAction_slide-out-to-right__CRV_T"}},43193:(e,a,t)=>{"use strict";t.d(a,{Z:()=>_});var r=t(14232);function _(e){let a=(0,r.useRef)(e);return(0,r.useEffect)(()=>{a.current=e},[e]),a.current}},45308:(e,a,t)=>{"use strict";t.d(a,{A:()=>_});var r=t(14232);let _=()=>(0,r.useCallback)((e,a,t)=>{if(t&&t.id&&t.type){let r=Object.keys(a||{});return r.length?r.reduce((a,t)=>(a[t]=e[t],a),{id:t.id,type:t.type}):{}}return e},[])},48215:(e,a,t)=>{"use strict";t.d(a,{A:()=>i});var r=t(37876);t(14232);var _=t(30578),l=t.n(_),n=t(66674),o=t(47580),s=t.n(o);let c=l().bind(s()),i=e=>{let{className:a,error:t,hideErrorMessage:_=!1,inputRef:l,label:o,name:i,onBlur:d,onChange:m,placeholder:p,required:u,value:b,disabled:g,readOnly:C,icon:x,iconAction:A,iconDataEvent:h,type:M="text",requiredForm:y,step:f,dataTestId:v,...F}=e,w=c({input__field:!0,"input__field--has-error":t}),N=c({input__label:!0,"input__label--disabled":g,"input__label--required":y});return(0,r.jsxs)("label",{className:"".concat(s().input," ").concat(a||""),children:[o&&(0,r.jsx)("span",{className:N,children:o}),(0,r.jsx)("input",{className:w,name:i,onChange:m,onBlur:d,placeholder:p,ref:l,required:u,step:f,type:M,value:b,disabled:g,readOnly:C,"data-testid":v,...F}),x&&(0,r.jsx)(n.A,{classNameSvg:[s()["input__icon-svg"]],classNameWrapper:s()["input__icon-svg-wrapper"],icon:x,onClick:A,dataEvent:h}),t&&!_&&(0,r.jsx)("span",{className:s()["input__error-message"],children:t})]})}},48798:(e,a,t)=>{"use strict";t.d(a,{D:()=>r});let r=e=>{let a=document.createElement("textarea");a.textContent=e,a.style.position="fixed",a.style.bottom="0",a.style.left="0",document.body.appendChild(a),a.select();try{document.execCommand("copy")}catch(e){}finally{document.body.removeChild(a)}}},49811:(e,a,t)=>{"use strict";t.d(a,{$z:()=>d,C2:()=>o,HG:()=>n,dK:()=>c,eh:()=>l,f2:()=>s,kc:()=>i,tf:()=>_,wj:()=>r});let r={pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"Please enter a valid email."}},_={required:"Please enter an email.",...r},l={required:"Please enter a password."},n={...l,minLength:{value:8,message:"Please enter a password at least 8 characters long."}},o={pattern:{message:"Please enter a valid URL.",value:/^((ftp|http|https):\/\/)(www.)?(?!.*(ftp|http|https|www.))?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/gm}},s={pattern:{message:"Please enter a valid phone number.",value:/(\+\d{1,3}\s?)?((\(\d{3}\)\s?)|(\d{3})(\s|-?))(\d{3}(\s|-?))(\d{4})(\s?(([E|e]xt[:|.|]?)|x|X)(\s?\d+))?/g}},c={pattern:{message:"Please enter a valid .ics URL.",value:/(\.ics)|(ical)/gm}},i="(___) ___-____",d={_:/\d/}},50154:e=>{e.exports={"m-t-2xs":"AppFormCollection_m-t-2xs__mLJKB","m-t-xs":"AppFormCollection_m-t-xs___Dgv5","m-t-sm":"AppFormCollection_m-t-sm__h74dI","m-t-md":"AppFormCollection_m-t-md__KU_L1","m-t-lg":"AppFormCollection_m-t-lg__3Ix5U","m-t-xl":"AppFormCollection_m-t-xl__GUEaR","m-t-xl--desktop":"AppFormCollection_m-t-xl--desktop__npA7o","m-t-2xl":"AppFormCollection_m-t-2xl__muOyv","m-t-3xl"
1:"AppFormCollection_m-t-3xl__QkG0o","m-t-4xl":"AppFormCollection_m-t-4xl__3DhGR","m-b-sm":"AppFormCollection_m-b-sm__H_11B","m-b-md":"AppFormCollection_m-b-md__0Ps0y","m-b-lg":"AppFormCollection_m-b-lg__LXhnm","m-b-xl":"AppFormCollection_m-b-xl__lsO3c","m-b-3xl":"AppFormCollection_m-b-3xl__bHJl8","m-r-xl":"AppFormCollection_m-r-xl__aELQn","m-l-sm":"AppFormCollection_m-l-sm__nqh_S",header:"AppFormCollection_header__cMW8z",header__title:"AppFormCollection_header__title__KvWu_",section:"AppFormCollection_section__MWOIY","section--small":"AppFormCollection_section--small__D_X2Y",section__title:"AppFormCollection_section__title__cx0xt",section__row:"AppFormCollection_section__row__6U7CD",section__subtitle:"AppFormCollection_section__subtitle__0OUqa",section__description:"AppFormCollection_section__description___cume","section__title-small":"AppFormCollection_section__title-small__RNolN","section-icon-title":"AppFormCollection_section-icon-title__mir_c",section__info:"AppFormCollection_section__info__KhcHh","section__info-icon":"AppFormCollection_section__info-icon__7YKov","section__subtitle--lightweight":"AppFormCollection_section__subtitle--lightweight__PoBK4",section__message:"AppFormCollection_section__message__V1SXU","section__required-message":"AppFormCollection_section__required-message__G233W",section__toggle:"AppFormCollection_section__toggle__8Bn_0","section__toggle-description":"AppFormCollection_section__toggle-description__2g5Ja","section__toggle-options":"AppFormCollection_section__toggle-options__Qu_4v",section__option:"AppFormCollection_section__option__kaw8v","section__row--grouped":"AppFormCollection_section__row--grouped__W7SeQ","section__row--disabled":"AppFormCollection_section__row--disabled__4n_ZT","section__row--is-sb":"AppFormCollection_section__row--is-sb__OqKpn",section__column:"AppFormCollection_section__column__FUy_A","section__column--is-1-6":"AppFormCollection_section__column--is-1-6__CL7yB","section__column--is-1-4":"AppFormCollection_section__column--is-1-4__k5piB","section__column--is-1-3":"AppFormCollection_section__column--is-1-3__SFFW0","section__column--is-1-2":"AppFormCollection_section__column--is-1-2___lQxq","section__column--is-2-3":"AppFormCollection_section__column--is-2-3__JG17r","section__column--is-3-4":"AppFormCollection_section__column--is-3-4__ujxx0","section__column--is-5-6":"AppFormCollection_section__column--is-5-6__wSzhE","section__column--flex-end":"AppFormCollection_section__column--flex-end__htQ9X","section__text-block":"AppFormCollection_section__text-block__52hRe",section__sub:"AppFormCollection_section__sub__LV1oo",section__sub__group:"AppFormCollection_section__sub__group__6xqEw",field_group:"AppFormCollection_field_group__lbfBP",field_group__input:"AppFormCollection_field_group__input__9E_Ml","section__sub-preview":"AppFormCollection_section__sub-preview__CPQFD","section__sub-preview-box":"AppFormCollection_section__sub-preview-box__yEjMK","section__error-message":"AppFormCollection_section__error-message__1qZew",success:"AppFormCollection_success__ryzIU",success__title:"AppFormCollection_success__title__YDr_5",success__image:"AppFormCollection_success__image__vG0cA",footer:"AppFormCollection_footer__7Pobz",footer__actions:"AppFormCollection_footer__actions__B7JHh",footer__action:"AppFormCollection_footer__action__XgaBR",footer__errors:"AppFormCollection_footer__errors__tGclC",footer__error:"AppFormCollection_footer__error__YTOS1","modal-container":"AppFormCollection_modal-container__2BG_e",modal:"AppFormCollection_modal__UQWUi",modal__close:"AppFormCollection_modal__close__BpviD",modal__title:"AppFormCollection_modal__title__uPRZS",modal__description:"AppFormCollection_modal__description__7SQ0y","modal__action--contact":"AppFormCollection_modal__action--contact__tgv1P","modal__action--save":"AppFormCollection_modal__action--save__832cZ",fees:"AppFormCollection_fees__QLi_Z",fee:"AppFormCollection_fee__Et9mG","overflow-visible":"AppFormCollection_overflow-visible__3sq1o",disclaimer:"AppFormCollection_disclaimer___BtcR","text--display-only":"AppFormCollection_text--display-only__XTsaL","text__title--display-only":"AppFormCollection_text__title--display-only__QaXdm","site-description-editor":"AppFormCollection_site-description-editor__1aal4",required:"AppFormCollection_required__rC_uT",price__checkboxes:"AppFormCollection_price__checkboxes__5o1EV","rotate-three-sixty":"AppFormCollection_rotate-three-sixty__KXonb","slide-in-to-left":"AppFormCollection_slide-in-to-left__uu6_H","slide-out-to-left":"AppFormCollection_slide-out-to-left__ITcQo","slide-in-to-right":"AppFormCollection_slide-in-to-right__YR3fy","slide-out-to-right":"AppFormCollection_slide-out-to-right__3M95G"}},52789:e=>{e.exports={"m-t-2xs":"AddCalendar_m-t-2xs__NZT6s","m-t-xs":"AddCalendar_m-t-xs__XEkTP","m-t-sm":"AddCalendar_m-t-sm__EuAch","m-t-md":"AddCalendar_m-t-md__61eFj","m-t-lg":"AddCalendar_m-t-lg__LPixA","m-t-xl":"AddCalendar_m-t-xl__PWl_7","m-t-xl--desktop":"AddCalendar_m-t-xl--desktop__Ew5TO","m-t-2xl":"AddCalendar_m-t-2xl__ePyf4","m-t-3xl"
1:"AddCalendar_m-t-3xl__0lZ_Y","m-t-4xl":"AddCalendar_m-t-4xl__6jZJi","m-b-sm":"AddCalendar_m-b-sm__BHMrf","m-b-md":"AddCalendar_m-b-md__kEGam","m-b-lg":"AddCalendar_m-b-lg__KYFFp","m-b-xl":"AddCalendar_m-b-xl__iN8cf","m-b-3xl":"AddCalendar_m-b-3xl__8npwT","m-r-xl":"AddCalendar_m-r-xl__zXO68","m-l-sm":"AddCalendar_m-l-sm__VU8iK",copiable:"AddCalendar_copiable__hRp91",cal:"AddCalendar_cal__AYPqT","cal--error":"AddCalendar_cal--error__4YB0g",cal__text:"AddCalendar_cal__text__RdTUp",cal__alert:"AddCalendar_cal__alert__MK6Ng","cal__alert-svg":"AddCalendar_cal__alert-svg__s5r3e",cal__title:"AddCalendar_cal__title___9nf5",cal__delete:"AddCalendar_cal__delete___Cwpo",wrapper:"AddCalendar_wrapper__9DW14",wrapper__content:"AddCalendar_wrapper__content__e5JPe",wrapper__aside:"AddCalendar_wrapper__aside__3ZCH0",wrapper__aside__title:"AddCalendar_wrapper__aside__title__fx22m",wrapper__aside__link:"AddCalendar_wrapper__aside__link__nZIlP","rotate-three-sixty":"AddCalendar_rotate-three-sixty__hfTfe","slide-in-to-left":"AddCalendar_slide-in-to-left__DLWwA","slide-out-to-left":"AddCalendar_slide-out-to-left__ZSF3B","slide-in-to-right":"AddCalendar_slide-in-to-right__kbgfD","slide-out-to-right":"AddCalendar_slide-out-to-right__suxh1"}},56351:(e,a,t)=>{"use strict";t.d(a,{A:()=>o,d:()=>n});var r=t(37876);t(14232);var _=t(66599),l=t.n(_);let n=e=>{let{message:a,className:t}=e;return(0,r.jsx)("div",{className:"".concat(l()["no-results__container"]," ").concat(t||""),children:(0,r.jsx)("p",{className:l()["no-results__text"],children:a})})},o=n},56538:e=>{e.exports={"m-t-2xs":"AppForm_m-t-2xs__7i6Pj","m-t-xs":"AppForm_m-t-xs__6hh5D","m-t-sm":"AppForm_m-t-sm__yneH1","m-t-md":"AppForm_m-t-md__4ePjl","m-t-lg":"AppForm_m-t-lg__aRWKu","m-t-xl":"AppForm_m-t-xl__M_nFx","m-t-xl--desktop":"AppForm_m-t-xl--desktop__bVDEx","m-t-2xl":"AppForm_m-t-2xl__s5dV5","m-t-3xl":"AppForm_m-t-3xl__xTZHV","m-t-4xl":"AppForm_m-t-4xl__2TfwV","m-b-sm":"AppForm_m-b-sm__b9mg8","m-b-md":"AppForm_m-b-md__gqA6I","m-b-lg":"AppForm_m-b-lg__Qyc6f","m-b-xl":"AppForm_m-b-xl__7MvEv","m-b-3xl":"AppForm_m-b-3xl___gW05","m-r-xl":"AppForm_m-r-xl__7jIER","m-l-sm":"AppForm_m-l-sm__XGEui",group__row:"AppForm_group__row__qmnSZ","group__error-message":"AppForm_group__error-message__fJyDA","group__required-message":"AppForm_group__required-message__YUtOD",group__input:"AppForm_group__input__G76z_","radio-group":"AppForm_radio-group__AFnjI","error-box":"AppForm_error-box___lxF9","error-box__inner":"AppForm_error-box__inner__u3V2f","error-box__error":"AppForm_error-box__error__6R2Mn",boxed:"AppForm_boxed__pvphk",boxed__container:"AppForm_boxed__container__y8s3d","boxed__container--has-sublabel":"AppForm_boxed__container--has-sublabel__gsc5e","boxed__label-container":"AppForm_boxed__label-container__X_x6t",boxed__label:"AppForm_boxed__label__Zz1Yg","boxed--is-selected":"AppForm_boxed--is-selected__ntAsl",boxed__sublabel:"AppForm_boxed__sublabel__qH5Mb","boxed__pro-pill":"AppForm_boxed__pro-pill__TDM8q","rotate-three-sixty":"AppForm_rotate-three-sixty__MuHwR","slide-in-to-left":"AppForm_slide-in-to-left__pnOuR","slide-out-to-left":"AppForm_slide-out-to-left__Bhdlw","slide-in-to-right":"AppForm_slide-in-to-right__t1F9j","slide-out-to-right":"AppForm_slide-out-to-right__TfqAA"}},66599:e=>{e.exports={"m-t-2xs":"ManagerCalloutNoResults_m-t-2xs__M_W36","m-t-xs":"ManagerCalloutNoResults_m-t-xs__rt7O_","m-t-sm":"ManagerCalloutNoResults_m-t-sm__VXjYE","m-t-md":"ManagerCalloutNoResults_m-t-md__HuYgw","m-t-lg":"ManagerCalloutNoResults_m-t-lg__YFEhj","m-t-xl":"ManagerCalloutNoResults_m-t-xl__r4R2q","m-t-xl--desktop":"ManagerCalloutNoResults_m-t-xl--desktop__DVzp1","m-t-2xl":"ManagerCalloutNoResults_m-t-2xl__s0VCz","m-t-3xl"
1:"ManagerCalloutNoResults_m-t-3xl__aIawk","m-t-4xl":"ManagerCalloutNoResults_m-t-4xl__cZ8yd","m-b-sm":"ManagerCalloutNoResults_m-b-sm__IepsM","m-b-md":"ManagerCalloutNoResults_m-b-md__QTUA_","m-b-lg":"ManagerCalloutNoResults_m-b-lg__9eWeq","m-b-xl":"ManagerCalloutNoResults_m-b-xl__bXlZc","m-b-3xl":"ManagerCalloutNoResults_m-b-3xl__KsfK9","m-r-xl":"ManagerCalloutNoResults_m-r-xl__PLYFM","m-l-sm":"ManagerCalloutNoResults_m-l-sm__kLrME","no-results__container":"ManagerCalloutNoResults_no-results__container__vVxcv","no-results__text":"ManagerCalloutNoResults_no-results__text__10SG6","rotate-three-sixty":"ManagerCalloutNoResults_rotate-three-sixty__eTwRC","slide-in-to-left":"ManagerCalloutNoResults_slide-in-to-left__PajoU","slide-out-to-left":"ManagerCalloutNoResults_slide-out-to-left__9_lNI","slide-in-to-right":"ManagerCalloutNoResults_slide-in-to-right__YXOhi","slide-out-to-right":"ManagerCalloutNoResults_slide-out-to-right__7UeHB"}},71667:(e,a,t)=>{"use strict";t.d(a,{Fn:()=>o,K:()=>i,M8:()=>c,N0:()=>d,Py:()=>h,Vd:()=>m,WS:()=>n,jL:()=>C,lj:()=>x,n0:()=>g,qI:()=>s,r8:()=>A,sL:()=>p,tj:()=>b,x4:()=>u,yg:()=>M});var r=t(67547),_=t(72273),l=t(15325);let n=e=>Array(e).fill(0).map((e,a)=>a+1).reduce((e,a)=>{let t="".concat(a).padStart(2,"0");return e.push({id:t,label:"".concat(a)}),e},[]),o=e=>e?e.split("-").slice(2):[],s=e=>{let a=e instanceof Date?e:(0,l.A)(e);return(0,_.A)(a,{representation:"date"})},c=(e,a)=>{if(e){let t=e instanceof Date?e:(0,l.A)(e);return a?(0,r.A)(t,"MMM. d, yyyy"):(0,r.A)(t,"MMMM d, yyyy")}},i=e=>{let a=e.split("T")[0];return(0,r.A)((0,l.A)(a),"MMM. d, yyyy")},d=e=>{if(e){let a=e instanceof Date?e:(0,l.A)(e);return(0,r.A)(a,"MMMM yyyy")}},m=e=>{if(e){let a=e instanceof Date?e:(0,l.A)(e);return(0,r.A)(a,"MM/dd/yyyy")}},p=e=>{if(e){let a=e instanceof Date?e:(0,l.A)(e);return(0,r.A)(a,"M/d/yy")}},u=e=>{if(e){let a=e instanceof Date?e:(0,l.A)(e);return(0,r.A)(a,"EEEE, MM/dd/yyyy")}},b=e=>{if(e){let a=e instanceof Date?e:(0,l.A)(e);return(0,r.A)(a,"M/d/yyyy, PP")}},g=e=>{if(e){let a=e instanceof Date?e:(0,l.A)(e);return(0,r.A)(a,"EEE MMM dd, yyyy")}},C=e=>(0,r.A)(e,"MM/dd"),x=e=>(0,l.A)(e),A=e=>null==e?void 0:e.map(e=>x(e)),h=e=>(0,_.A)(e,{representation:"date"}),M=e=>{let a=e.getMonth()+1,t=e.getDate(),r=e.getFullYear().toString().substr(2,2);return"".concat(a,"/").concat(t,"/").concat(r)}},76361:(e,a,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/manager/campgrounds/[campground]/calendar",function(){return t(78595)}])},78595:(e,a,t)=>{"use strict";t.r(a),t.d(a,{__N_SSP:()=>O,default:()=>W});var r=t(37876),_=t(14232),l=t(89099),n=t(66149),o=t(39074),s=t(28395),c=t(25477),i=t(52789),d=t.n(i),m=t(50154),p=t.n(m);let u=()=>(0,r.jsx)("section",{id:"name-description",className:p().section,children:(0,r.jsxs)("article",{className:d().wrapper__content,children:[(0,r.jsx)("h2",{className:p().section__title,children:"Export & Import Calendar"}),(0,r.jsx)("p",{className:p().section__description,children:"Calendar sync is only available for single unit sites."})]})});t(74538);var b=t(30523),g=t(52243),C=t(67547),x=t(72273),A=t(38327),h=t(79727),M=t(4566),y=t(1665),f=t(15325),v=t(37256),F=t(76664),w=t(8156),N=t(66674),k=t(3122),j=t.n(k);let R={"en-US":M.A},D=(0,b.Hz)({format:C.A,parse:y.A,startOfWeek:F.A,getDay:A.A,locales:R});function E(e){let{onNavigate:a,date:t}=e;return(0,r.jsxs)("div",{className:j().toolbar,children:[(0,r.jsxs)("div",{className:j()["toolbar__button-group"],children:[(0,r.jsx)("button",{type:"button",className:j().toolbar__button,onClick:()=>a("PREV"),children:(0,r.jsx)(N.A,{icon:"chevron_left"})}),(0,r.jsx)("button",{type:"button",className:"".concat(j().toolbar__button," ").concat(j()["toolbar__button-today"]),onClick:()=>a("TODAY"),children:"Today"}),(0,r.jsx)("button",{type:"button",className:j().toolbar__button,onClick:()=>a("NEXT"),children:(0,r.jsx)(N.A,{icon:"chevron_right"})})]}),(0,r.jsx)("h4",{className:j().toolbar__heading,children:(0,C.A)(t,"MMMM yyyy")}),(0,r.jsx)("div",{className:j()["toolbar__button-group"]})]})}let S=e=>{let{className:a,blockedDateRanges:t,onSelectNewDateRange:_,onSelectManualBlock:l,onSelectExternalBooking:n,onSelectReservation:o}=e,s=[],c=[];
1return null==t||t.forEach(e=>{"manual"===e.sourceCategory?c.push({start:(0,v.A)((0,f.A)(e.startDate)),end:(0,g.A)((0,f.A)(e.endDate)),blockedDateRange:e}):s.push({title:"reservation"===e.sourceCategory?e.summary?"".concat(e.summary.replace("Reserved: ","")):"Booking":e.summary?e.summary:"External Booking",start:(0,v.A)((0,f.A)(e.startDate)),end:(0,g.A)((0,f.A)(e.endDate)),allDay:!0,blockedDateRange:e})}),(0,r.jsx)("div",{className:"".concat(j().calendar," ").concat(a||""," m-t-lg"),children:(0,r.jsx)(b.Vv,{localizer:D,events:s,formats:{dateFormat:"d"},views:["month"],components:{toolbar:E},showMultiDayTimes:!0,onSelectSlot:e=>{let a=(0,v.A)(e.start),t=(0,g.A)((0,w.A)(e.end,1)),r=c.find(e=>{let{start:r,end:_}=e;return(0,h.A)(a,{start:r,end:_})||(0,h.A)(t,{start:r,end:_})});r?l(r.blockedDateRange):_({startDate:(0,x.A)(a,{representation:"date"}),endDate:(0,x.A)(t,{representation:"date"})})},onSelectEvent:e=>{"reservation"===e.blockedDateRange.sourceCategory?o(e.blockedDateRange):n(e.blockedDateRange)},eventPropGetter:e=>({className:"event-".concat(e.blockedDateRange.sourceCategory),style:{fontSize:"0.825rem",backgroundColor:"reservation"==e.blockedDateRange.sourceCategory?"#920b66":"#6a6b6c"}}),dayPropGetter:e=>({className:c.find(a=>{let{start:t,end:r}=a;return(0,h.A)(e,{start:t,end:r})})?j()["blocked-date"]:""}),selectable:!0,popup:!0})})},H=e=>{let{blockedDateRanges:a,calendars:t,accommodation:_,handleDataUpdate:l}=e,n=(0,s.yg)(),i=(0,o.A)(),d=!(null==_?void 0:_.singleSite);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S,{blockedDateRanges:a,onSelectReservation:e=>n({type:"manager-internal-booking",blockedDateRange:e}),onSelectExternalBooking:e=>n({type:"manager-external-booking",blockedDateRange:e}),onSelectManualBlock:e=>{"pms_bookings"!==i&&n({type:"manager-block-dates-edit",blockedDateRange:e,onUpdate:l,onRemove:l})},onSelectNewDateRange:e=>{"pms_bookings"!==i&&n({type:"manager-block-dates-create",...e,accommodation:_,onCreate:l})}}),"pms_bookings"!==i?d?(0,r.jsx)(u,{}):(0,r.jsx)(c.A,{calendars:t,id:_.id,setCalendars:l,availabilityCalendarUrl:_.availabilityCalendarUrl}):""]})};var P=t(81814),T=t(84105),q=t(4973),Z=t.n(q);let B=e=>{let{className:a,accommodations:t,accommodation:_,addBlockedDateRange:n}=e,c=(0,s.yg)(),i=(0,l.useRouter)(),d=(0,o.A)(),m=_?t:[{id:"",name:"Select a Site"},...t];return(0,r.jsxs)("div",{className:"".concat(Z().header," ").concat(a||""),children:[(0,r.jsx)("div",{className:"".concat(Z().header__group),children:(0,r.jsx)(T.A,{className:"".concat(Z().header__item," ").concat(Z()["header__item--input"]),label:"Select a Site",labelAccessor:"name",options:m,requiredForm:!0,onSelect:e=>{i.replace({pathname:i.pathname,query:{campground:i.query.campground,site:e}},void 0,{shallow:!0})},value:i.query.site||"",valueAccessor:"id"})}),!!_&&"pms_bookings"!==d&&(0,r.jsxs)("div",{className:"".concat(Z().header__group),children:[(0,r.jsx)(P.A,{type:"submit",className:"".concat(Z().header__item),dataEvent:"sync_calendars",icon:"refresh",label:"Sync Calendars",onClick:()=>{let e=document.querySelector("#add_clanedar");e&&e.scrollIntoView()}}),(0,r.jsx)(P.A,{type:"button",className:"".concat(Z().header__item),dataEvent:"sync_calendars",icon:"lock_fill",label:"Block Dates",disabled:!_,onClick:()=>{_&&c({type:"manager-block-dates-create",onCreate:n,accommodation:_})}})]})]})};var L=t(56351),U=t(16165),V=t(96422),O=!0;let W=e=>{let{accommodations:a}=e,[t,o]=(0,_.useState)({calendars:[],blockedDateRanges:[]}),{loadRecord:s}=(0,n.A)(),c=(0,l.useRouter)(),i=a.find(e=>e.id==c.query.site)||null,d=(0,_.useCallback)(async()=>{if(null==i?void 0:i.id){var e,a,t,r;let _=await Promise.all([s("campground-accommodations",i.id,{include:"blocked-date-ranges,external-calendars",time:new Date().toLocaleString()}),s("campgrounds",i.campgroundId,{include:"blocked-date-ranges",time:new Date().toLocaleString()})]),l=[...null!=(t=null==(e=_[0])?void 0:e.included)?t:[],...null!=(r=null==(a=_[1])?void 0:a.included)?r:[]];o({calendars:null==l?void 0:l.filter(e=>{let{type:a}=e;return"external-calendars"===a}),blockedDateRanges:null==l?void 0:l.filter(e=>{let{type:a}=e;return"blocked-date-ranges"===a})})}else o({calendars:[],blockedDateRanges:[]})},[o,s,i]);return(0,_.useEffect)(()=>{d()},[d,i]),(0,r.jsx)(U.A,{pageTitle:"Manager Calendar | The Dyrt",content:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(V.A,{title:"Calendar"}),(0,r.jsx)(B,{accommodations:a,accommodation:i,addBlockedDateRange:d}),!!i&&(0,r.jsx)(H,{calendars:t.calendars,handleDataUpdate:d,accommodation:i,blockedDateRanges:t.blockedDateRanges}),!i&&(0,r.jsx)(L.d,{message:"Select a Site to load the calendar.",className:"m-t-2xl"})]})})}},78752:(e,a,t)=>{"use strict";t.d(a,{A:()=>n});var r=t(37876);t(14232);var _=t(88992),l=t(11869);let n=function(e,a,t){var n;let{register:o,formState:s}=(0,_.xW)(),{name:c,validation:i,validatejs:d}=a,{validationObject:m,validateJsError:p}=(0,l.D)(c,d||null,i||{}),{ref:u,...b}=o(c,m),{errors:g}=s||{},C={};return t&&(C=t()),(0,r.jsx)(e,{inputRef:u,error:p||(null==(n=g[c])?void 0:n.message),...a,...b,...C})}},81814:(e,a,t)=>{"use strict";t.d(a,{A:()=>i});var r=t(37876);t(14232);var _=t(30578),l=t.n(_),n=t(66674),o=t(42910),s=t.n(o);let c=l().bind(s()),i=e=>{let{type:a,className:t,classNameIcon:_,classNameSvg:l,classNameLabel:o,dataEvent:i,disabled:d,icon:m,label:p,name:u,onClick:b,transparentBackgroun
1d:g,fillColor:C}=e,x=c({"action__icon-container":!0,"action__icon-container--transparent":g});return(0,r.jsxs)("button",{type:a,className:"".concat(s().action," ").concat(t||""),disabled:d,onClick:b,"data-event":i,name:u,children:[(0,r.jsx)(n.A,{classNameWrapper:"".concat(x," ").concat(_||""),classNameSvg:["".concat(s().action__icon),"".concat(l)],icon:m,fillColor:C}),!!p&&(0,r.jsx)("span",{className:"".concat(s().action__label," ").concat(o||""),children:p})]})}},86975:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});var r=t(78752),_=t(48215);let l=function(e){let{required:a,...t}=e;return(0,r.A)(_.A,{...t,requiredForm:a})}}},e=>{e.O(0,[8531,9469,4587,2867,7547,8992,3814,3652,9465,9548,6215,7122,5419,636,6593,8792],()=>e(e.s=76361)),_N_E=e.O()}]); 2//# sourceMappingURL=calendar-181f0b9e402132e9.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.