@xapp/form-widget 1.87.0 → 1.87.1
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.
- package/dist/xapp-form-widget.js +1 -1
- package/package.json +6 -6
package/dist/xapp-form-widget.js
CHANGED
|
@@ -131,4 +131,4 @@
|
|
|
131
131
|
}
|
|
132
132
|
`:null,Fg=ts("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(ns(({theme:e})=>{const t=(n=e.shape.borderRadius,String(n).match(/[\d.\-+]*\s*(.*)/)[1]||""||"px");var n;const r=function(e){return parseFloat(e)}(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:e.alpha(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${t}/${Math.round(r/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:e})=>e.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:e})=>e.hasChildren&&!e.width,style:{maxWidth:"fit-content"}},{props:({ownerState:e})=>e.hasChildren&&!e.height,style:{height:"auto"}},{props:{animation:"pulse"},style:zg||{animation:`${Ig} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(\n 90deg,\n transparent,\n ${(e.vars||e).palette.action.hover},\n transparent\n )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:Lg||{"&::after":{animation:`${Ag} 2s linear 0.5s infinite`}}}]}})),$g=b.forwardRef(function(e,t){const n=rs({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:o,component:a="span",height:i,style:l,variant:s="text",width:u,...c}=n,d={...n,animation:r,component:a,variant:s,hasChildren:Boolean(c.children)},f=(e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:a,height:i}=e;return Dt({root:["root",n,r,o&&"withChildren",o&&!a&&"fitContent",o&&!i&&"heightAuto"]},jg,t)})(d);return S.jsx(Fg,{as:a,ref:t,className:Nt(f.root,o),ownerState:d,...c,style:{width:u,height:i,...l}})});function Vg(e){return ga("MuiTextField",e)}"production"!==process.env.NODE_ENV&&($g.propTypes={animation:_t.oneOf(["pulse","wave",!1]),children:_t.node,classes:_t.object,className:_t.string,component:_t.elementType,height:_t.oneOfType([_t.number,_t.string]),style:_t.object,sx:_t.oneOfType([_t.arrayOf(_t.oneOfType([_t.func,_t.object,_t.bool])),_t.func,_t.object]),variant:_t.oneOfType([_t.oneOf(["circular","rectangular","rounded","text"]),_t.string]),width:_t.oneOfType([_t.number,_t.string])}),ya("MuiTextField",["root"]);const Bg={standard:Eh,filled:fh,outlined:vg},Ug=ts(ed,{name:"MuiTextField",slot:"Root"})({}),Hg=b.forwardRef(function(e,t){const n=rs({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:o=!1,children:a,className:i,color:l="primary",defaultValue:s,disabled:u=!1,error:c=!1,FormHelperTextProps:d,fullWidth:f=!1,helperText:p,id:m,InputLabelProps:h,inputProps:g,InputProps:y,inputRef:b,label:v,maxRows:w,minRows:k,multiline:x=!1,name:T,onBlur:E,onChange:C,onFocus:O,placeholder:_,required:P=!1,rows:N,select:R=!1,SelectProps:D,slots:M={},slotProps:j={},type:I,value:A,variant:z="outlined",...L}=n,F={...n,autoFocus:o,color:l,disabled:u,error:c,fullWidth:f,multiline:x,required:P,select:R,variant:z},$=(e=>{const{classes:t}=e;return Dt({root:["root"]},Vg,t)})(F);"production"!==process.env.NODE_ENV&&R&&!a&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const V=ii(m),B=p&&V?`${V}-helper-text`:void 0,U=v&&V?`${V}-label`:void 0,H=Bg[z],W={slots:M,slotProps:{input:y,inputLabel:h,htmlInput:g,formHelperText:d,select:D,...j}},q={},Y=W.slotProps.inputLabel;"outlined"===z&&(Y&&void 0!==Y.shrink&&(q.notched=Y.shrink),q.label=v),R&&(D&&D.native||(q.id=void 0),q["aria-describedby"]=void 0);const[K,G]=yc("root",{elementType:Ug,shouldForwardComponentProp:!0,externalForwardedProps:{...W,...L},ownerState:F,className:Nt($.root,i),ref:t,additionalProps:{disabled:u,error:c,fullWidth:f,required:P,color:l,variant:z}}),[Q,X]=yc("input",{elementType:H,externalForwardedProps:W,additionalProps:q,ownerState:F}),[J,Z]=yc("inputLabel",{elementType:_h,externalForwardedProps:W,ownerState:F}),[ee,te]=yc("htmlInput",{elementType:"input",externalForwardedProps:W,ownerState:F}),[ne,re]=yc("formHelperText",{elementType:yd,externalForwardedProps:W,ownerState:F}),[oe,ae]=yc("select",{elementType:Mg,externalForwardedProps:W,ownerState:F}),ie=S.jsx(Q,{"aria-describedby":B,autoComplete:r,autoFocus:o,defaultValue:s,fullWidth:f,multiline:x,name:T,rows:N,maxRows:w,minRows:k,type:I,value:A,id:V,inputRef:b,onBlur:E,onChange:C,onFocus:O,placeholder:_,inputProps:te,slots:{input:M.htmlInput?ee:void 0},...X});return S.jsxs(K,{...G,children:[null!=v&&""!==v&&S.jsx(J,{htmlFor:V,id:U,...Z,children:v}),R?S.jsx(oe,{"aria-describedby":B,id:V,labelId:U,value:A,input:ie,...ae,children:a}):ie,p&&S.jsx(ne,{id:B,...re,children:p})]})});"production"!==process.env.NODE_ENV&&(Hg.propTypes={autoComplete:_t.string,autoFocus:_t.bool,children:_t.node,classes:_t.object,className:_t.string,color:_t.oneOfType([_t.oneOf(["primary","secondary","error","info","success","warning"]),_t.string]),defaultValue:_t.any,disabled:_t.bool,error:_t.bool,FormHelperTextProps:_t.object,fullWidth:_t.bool,helperText:_t.node,id:_t.string,InputLabelProps:_t.object,inputProps:_t.object,InputProps:_t.object,inputRef:gs,label:_t.node,margin:_t.oneOf(["dense","none","normal"]),maxRows:_t.oneOfType([_t.number,_t.string]),minRows:_t.oneOfType([_t.number,_t.string]),multiline:_t.bool,name:_t.string,onBlur:_t.func,onChange:_t.func,onFocus:_t.func,placeholder:_t.string,required:_t.bool,rows:_t.oneOfType([_t.number,_t.string]),select:_t.bool,SelectProps:_t.object,size:_t.oneOfType([_t.oneOf(["medium","small"]),_t.string]),slotProps:_t.shape({formHelperText:_t.oneOfType([_t.func,_t.object]),htmlInput:_t.oneOfType([_t.func,_t.object]),input:_t.oneOfType([_t.func,_t.object]),inputLabel:_t.oneOfType([_t.func,_t.object]),select:_t.oneOfType([_t.func,_t.object])}),slots:_t.shape({formHelperText:_t.elementType,htmlInput:_t.elementType,input:_t.elementType,inputLabel:_t.elementType,root:_t.elementType,select:_t.elementType}),sx:_t.oneOfType([_t.arrayOf(_t.oneOfType([_t.func,_t.object,_t.bool])),_t.func,_t.object]),type:_t.string,value:_t.any,variant:_t.oneOf(["filled","outlined","standard"])});const Wg=za({themeId:Ql});var qg="FormFieldCard-module_xapp_form_card__AcVAf",Yg={backgroundColor:"transparent",boxShadow:"none",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},Kg={padding:"4px"},Gg={whiteSpace:"pre-line"},Qg=function(e){var t=e.field;return S.jsx("div",{className:qg,children:S.jsxs(Rd,{style:Yg,children:[t.header&&S.jsx(Vd,{title:t.header.title,subheader:t.header.subheader}),t.media&&S.jsx(qd,{component:"img",alt:t.media.alt,height:t.media.height,width:t.media.width,image:t.media.imageUrl}),t.text&&S.jsx(jd,{style:Kg,children:S.jsx(ld,{variant:t.variant||"body2",color:t.color||"textSecondary",align:t.align||"center",style:n(n({},Gg),t.style),children:t.text})})]})})},Xg=ls(S.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Jg="FormFieldChips-module_xapp_checkbox_chip__8DRkb",Zg="FormFieldChips-module_xapp_chip_clicked__S8xmo",ey="FormFieldChips-module_xapp_chips_container__ZITF5",ty="FormFieldChips-module_xapp_chip_wrapper__AGfKl",ny="FormFieldChips-module_xapp_chips_title_container__VGw77";function ry(e){return!!e&&!e.url}var oy=function(e){var t=e.field,r=e.onFieldChange,o=e.errorMessage,i=e.field.items.filter(ry).filter(function(e){return e.selected}).map(function(e){return e.id}),l=b.useState(i),s=l[0],u=l[1];return b.useEffect(function(){"function"==typeof r&&r(t.name,s)},[s,t.name,r]),S.jsxs("div",{style:{display:"flex",flexDirection:"column",alignContent:"center",alignItems:"center"},children:[S.jsx("div",{className:"".concat(ny).concat(t.title?"":"__empty"),style:n({},t.style),children:S.jsx("p",{children:t.title})}),S.jsx("div",{className:ey,children:t.items.map(function(e,n){return ry(e)?S.jsx("div",{className:ty,children:S.jsx(Jp,{label:e.label,clickable:!0,color:s.includes(e.id)?"primary":"default",onClick:function(){return n=e.id,r=s.includes(n),void(t.radio?u(function(e){return r?[]:[n]}):u(function(e){return r?e.filter(function(e){return e!==n}):a(a([],e,!0),[n],!1)}));var n,r},icon:s.includes(e.id)?S.jsx(Xg,{}):void 0,className:"".concat(Jg," ").concat(s.includes(e.id)?Zg:"")})},n):function(e){return!!e.url}(e)?S.jsx("div",{className:ty,children:S.jsx(Jp,{sx:{"& .MuiChip-label":{textDecoration:"underline"}},label:e.label,component:"a",clickable:!0,color:s.includes(e.id)?"primary":"default",icon:s.includes(e.id)?S.jsx(Xg,{}):void 0,className:"".concat(Jg," ").concat(s.includes(e.id)?Zg:""),href:e.url})},n):S.jsx(S.Fragment,{})})}),o&&S.jsx(yd,{error:!0,style:{marginLeft:"14px"},children:o})]})},ay={xapp_text_input_container__title:"FormFieldTextInput-module_xapp_text_input_container__title__zeqDT",xapp_text_input_container__field:"FormFieldTextInput-module_xapp_text_input_container__field__B5K33",xapp_text_input_counter:"FormFieldTextInput-module_xapp_text_input_counter__oSgo1","xapp_text_input_counter--limit":"FormFieldTextInput-module_xapp_text_input_counter--limit__59Lau",xapp_text_input_text:"FormFieldTextInput-module_xapp_text_input_text__3rHVn"},iy=function(e){var t=e.field,n=e.onFieldChange,r=e.value,o=e.errorMessage,a=e.required,i=b.useState(r||""),l=i[0],s=i[1];b.useEffect(function(){n(t.name,l)},[t.name,n,l]),b.useEffect(function(){s(r||"")},[r]);var u=t.maxLength,c=l.length,d=void 0!==u&&c>=u,f=void 0!==u&&c>=.8*u;return S.jsxs("div",{className:ay.xapp_text_input_container,children:[t.title&&S.jsx("div",{className:ay.xapp_text_input_container__title,children:S.jsx("p",{children:t.title})}),S.jsxs("div",{className:ay.xapp_text_input_container__field,children:[S.jsx(Hg,{className:ay.xapp_text_input_text,label:t.label,fullWidth:!0,margin:"normal",type:t.type,name:t.name,placeholder:t.placeholder,value:l,onChange:function(e){var t=e.target.value;s(t)},variant:"filled",size:"small",error:!!o,helperText:o,required:a,multiline:t.multiline,rows:t.rows,maxRows:t.rowsMax,style:t.style,slotProps:t.maxLength?{htmlInput:{maxLength:t.maxLength}}:void 0}),f&&S.jsxs("div",{className:"".concat(ay.xapp_text_input_counter," ").concat(d?ay["xapp_text_input_counter--limit"]:""),children:[c,"/",u]})]})]})},ly=function(e){var t=e.field,n=e.onFieldChange,r=e.errorMessage,o=e.required,a=e.freeFormErrorMessage,i=b.useState(function(){var e=t.items.find(function(e){return e.selected});return(null==e?void 0:e.id)||"none"}),l=i[0],s=i[1],u=b.useState(""),c=u[0],d=u[1],f=b.useState(function(){var e=t.items.find(function(e){return e.selected});return(null==e?void 0:e.freeFormInput)||!1}),p=f[0],m=f[1],h=b.useRef(n);b.useEffect(function(){"development"===process.env.NODE_ENV&&h.current!==n&&console.warn("FormFieldDropdown: onFieldChange prop is not memoized. This may cause performance issues. Please wrap it in useCallback in the parent component."),h.current=n},[n]);var g=v.useMemo(function(){if(p){var e=t.items.find(function(e){return e.id===l});return(null==e?void 0:e.freeFormFieldName)||"message"}return null},[p,l,t.items]);return b.useEffect(function(){"none"!==l&&n(t.name,l),p&&c&&g&&n(g,c)},[l,c,p,t.name,g,n]),S.jsxs("div",{style:{marginTop:"20px",marginBottom:"20px"},children:[S.jsxs(ed,{fullWidth:!0,error:!!r,size:"small",children:[S.jsx(_h,{id:"".concat(t.name,"-label"),children:t.title}),S.jsxs(Mg,{name:t.name,id:t.name,labelId:"".concat(t.name,"-label"),value:l,onChange:function(e){var r=e.target.value,o=t.items.find(function(e){return e.id===l});s(r);var a=t.items.find(function(e){return e.id===r});if(a&&a.freeFormInput)m(!0);else if(m(!1),(null==o?void 0:o.freeFormInput)&&c){var i=(null==o?void 0:o.freeFormFieldName)||"message";d(""),n(i,"")}},size:"small",displayEmpty:!0,fullWidth:!0,required:o,label:t.title,children:[S.jsx(og,{value:"none",children:S.jsx("em",{children:"Select an option"})}),t.items.map(function(e){return S.jsx(og,{value:e.id,children:e.label},e.id)})]}),r&&S.jsx(yd,{children:r})]}),p&&S.jsx(Hg,{fullWidth:!0,size:"small",required:!0,placeholder:"Please specify",value:c,onChange:function(e){d(e.target.value)},style:{marginTop:"8px"},error:!!a,helperText:a,slotProps:t.maxLength?{htmlInput:{maxLength:t.maxLength}}:void 0})]})},sy={exports:{}};!function(e){e.exports=function(){var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",s="week",u="month",c="quarter",d="year",f="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},y=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},b={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,u),a=n-o<0,i=t.clone().add(r+(a?-1:1),u);return+(-(r+(n-o)/(a?o-i:i-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:d,w:s,d:l,D:f,h:i,m:a,s:o,ms:r,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",w={};w[v]=g;var k="$isDayjsObject",S=function(e){return e instanceof C||!(!e||!e[k])},x=function e(t,n,r){var o;if(!t)return v;if("string"==typeof t){var a=t.toLowerCase();w[a]&&(o=a),n&&(w[a]=n,o=a);var i=t.split("-");if(!o&&i.length>1)return e(i[0])}else{var l=t.name;w[l]=t,o=l}return!r&&o&&(v=o),o||!r&&v},T=function(e,t){if(S(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},E=b;E.l=x,E.i=S,E.w=function(e,t){return T(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function g(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[k]=!0}var y=g.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(m);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return E},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(e,t){var n=T(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return T(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<T(e)},y.$g=function(e,t,n){return E.u(e)?this[t]:this.set(n,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var n=this,r=!!E.u(t)||t,c=E.p(e),p=function(e,t){var o=E.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(l)},m=function(e,t){return E.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,y=this.$D,b="set"+(this.$u?"UTC":"");switch(c){case d:return r?p(1,0):p(31,11);case u:return r?p(1,g):p(0,g+1);case s:var v=this.$locale().weekStart||0,w=(h<v?h+7:h)-v;return p(r?y-w:y+(6-w),g);case l:case f:return m(b+"Hours",0);case i:return m(b+"Minutes",1);case a:return m(b+"Seconds",2);case o:return m(b+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var n,s=E.p(e),c="set"+(this.$u?"UTC":""),p=(n={},n[l]=c+"Date",n[f]=c+"Date",n[u]=c+"Month",n[d]=c+"FullYear",n[i]=c+"Hours",n[a]=c+"Minutes",n[o]=c+"Seconds",n[r]=c+"Milliseconds",n)[s],m=s===l?this.$D+(t-this.$W):t;if(s===u||s===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[E.p(e)]()},y.add=function(r,c){var f,p=this;r=Number(r);var m=E.p(c),h=function(e){var t=T(p);return E.w(t.date(t.date()+Math.round(e*r)),p)};if(m===u)return this.set(u,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===l)return h(1);if(m===s)return h(7);var g=(f={},f[a]=t,f[i]=n,f[o]=e,f)[m]||1,y=this.$d.getTime()+r*g;return E.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=E.z(this),a=this.$H,i=this.$m,l=this.$M,s=n.weekdays,u=n.months,c=n.meridiem,d=function(e,n,o,a){return e&&(e[n]||e(t,r))||o[n].slice(0,a)},f=function(e){return E.s(a%12||12,e,"0")},m=c||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(h,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return E.s(t.$y,4,"0");case"M":return l+1;case"MM":return E.s(l+1,2,"0");case"MMM":return d(n.monthsShort,l,u,3);case"MMMM":return d(u,l);case"D":return t.$D;case"DD":return E.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,s,2);case"ddd":return d(n.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(a);case"HH":return E.s(a,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(a,i,!0);case"A":return m(a,i,!1);case"m":return String(i);case"mm":return E.s(i,2,"0");case"s":return String(t.$s);case"ss":return E.s(t.$s,2,"0");case"SSS":return E.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,f,p){var m,h=this,g=E.p(f),y=T(r),b=(y.utcOffset()-this.utcOffset())*t,v=this-y,w=function(){return E.m(h,y)};switch(g){case d:m=w()/12;break;case u:m=w();break;case c:m=w()/3;break;case s:m=(v-b)/6048e5;break;case l:m=(v-b)/864e5;break;case i:m=v/n;break;case a:m=v/t;break;case o:m=v/e;break;default:m=v}return p?m:E.a(m)},y.daysInMonth=function(){return this.endOf(u).$D},y.$locale=function(){return w[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=x(e,t,!0);return r&&(n.$L=r),n},y.clone=function(){return E.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},g}(),O=C.prototype;return T.prototype=O,[["$ms",r],["$s",o],["$m",a],["$H",i],["$W",l],["$M",u],["$y",d],["$D",f]].forEach(function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),T.extend=function(e,t){return e.$i||(e(t,C,T),e.$i=!0),T},T.locale=x,T.isDayjs=S,T.unix=function(e){return T(1e3*e)},T.en=w[v],T.Ls=w,T.p={},T}()}(sy);var uy=l(sy.exports);function cy(){return cy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cy.apply(null,arguments)}function dy(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const fy=["localeText"],py=b.createContext(null);"production"!==process.env.NODE_ENV&&(py.displayName="MuiPickersAdapterContext");const my=function(e){const{localeText:t}=e,n=dy(e,fy),{utils:r,localeText:o}=b.useContext(py)??{utils:void 0,localeText:void 0},a=Yd({props:n,name:"MuiLocalizationProvider"}),{children:i,dateAdapter:l,dateFormats:s,dateLibInstance:u,adapterLocale:c,localeText:d}=a,f=b.useMemo(()=>cy({},d,o,t),[d,o,t]),p=b.useMemo(()=>{if(!l)return r||null;const e=new l({locale:c,formats:s,instance:u});if(!e.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join("\n"));return e},[l,c,s,u,r]),m=b.useMemo(()=>p?{minDate:p.date("1900-01-01T00:00:00.000"),maxDate:p.date("2099-12-31T00:00:00.000")}:null,[p]),h=b.useMemo(()=>({utils:p,defaultDates:m,localeText:f}),[m,p,f]);return S.jsx(py.Provider,{value:h,children:i})};function hy(...e){const t=b.useRef(void 0),n=b.useCallback(t=>{const n=e.map(e=>{if(null==e)return null;if("function"==typeof e){const n=e,r=n(t);return"function"==typeof r?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return b.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))},e)}function gy(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t}function yy(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:a}=e;if(!t){const e=Nt(n?.className,a,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},i={...n,...o,...r};return e.length>0&&(i.className=e),Object.keys(t).length>0&&(i.style=t),{props:i,internalRef:void 0}}const i=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}({...o,...r}),l=gy(r),s=gy(o),u=t(i),c=Nt(u?.className,n?.className,a,o?.className,r?.className),d={...u?.style,...n?.style,...o?.style,...r?.style},f={...u,...n,...s,...l};return c.length>0&&(f.className=c),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:u.ref}}function by(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...a}=e,i=o?{}:function(e,t,n){return"function"==typeof e?e(t,n):e}(n,r),{props:l,internalRef:s}=yy({...a,externalSlotProps:i}),u=function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(t,{...l,ref:hy(s,i?.ref,e.additionalProps?.ref)},r);return u}"production"!==process.env.NODE_ENV&&(my.propTypes={adapterLocale:_t.any,children:_t.node,dateAdapter:_t.func,dateFormats:_t.shape({dayOfMonth:_t.string,dayOfMonthFull:_t.string,fullDate:_t.string,fullTime:_t.string,fullTime12h:_t.string,fullTime24h:_t.string,hours12h:_t.string,hours24h:_t.string,keyboardDate:_t.string,keyboardDateTime:_t.string,keyboardDateTime12h:_t.string,keyboardDateTime24h:_t.string,meridiem:_t.string,minutes:_t.string,month:_t.string,monthShort:_t.string,normalDate:_t.string,normalDateWithWeekday:_t.string,seconds:_t.string,shortDate:_t.string,weekday:_t.string,weekdayShort:_t.string,year:_t.string}),dateLibInstance:_t.any,localeText:_t.object});const vy="undefined"!=typeof window?b.useLayoutEffect:b.useEffect;let wy=0;const ky={...w}.useId;function Sy(e){if(void 0!==ky){return ky()}return function(e){const[t,n]=b.useState(e),r=t;return b.useEffect(()=>{null==t&&(wy+=1,n(`mui-${wy}`))},[t]),r}(e)}function xy(e){const{controlled:t,default:n,name:r,state:o="value"}=e,{current:a}=b.useRef(void 0!==t),[i,l]=b.useState(n),s=a?t:i;if("production"!==process.env.NODE_ENV){b.useEffect(()=>{a!==(void 0!==t)&&console.error([`MUI: A component is changing the ${a?"":"un"}controlled ${o} state of ${r} to be ${a?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join("\n"))},[o,r,t]);const{current:e}=b.useRef(n);b.useEffect(()=>{a||JSON.stringify(n)===JSON.stringify(e)||console.error([`MUI: A component is changing the default ${o} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join("\n"))},[JSON.stringify(n)])}return[s,b.useCallback(e=>{a||l(e)},[])]}function Ty(e){const t=b.useRef(e);return vy(()=>{t.current=e}),b.useRef((...e)=>(0,t.current)(...e)).current}function Ey(e,t,n=void 0){const r={};for(const o in e){const a=e[o];let i="",l=!0;for(let e=0;e<a.length;e+=1){const r=a[e];r&&(i+=(!0===l?"":" ")+t(r),l=!1,n&&n[r]&&(i+=" "+n[r]))}r[o]=i}return r}const Cy=e=>e,Oy=(()=>{let e=Cy;return{configure(t){e=t},generate:t=>e(t),reset(){e=Cy}}})(),_y={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Py(e,t,n="Mui"){const r=_y[t];return r?`${n}-${r}`:`${Oy.generate(e)}-${t}`}function Ny(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=Py(e,t,n)}),r}const Ry=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},Dy=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:a,utils:i,timezone:l})=>{const s=Ry(i,i.date(void 0,l),e);n&&i.isBefore(o,s)&&(o=s),t&&i.isAfter(r,s)&&(r=s);let u=e,c=e;for(i.isBefore(e,o)&&(u=o,c=null),i.isAfter(e,r)&&(c&&(c=r),u=null);u||c;){if(u&&i.isAfter(u,r)&&(u=null),c&&i.isBefore(c,o)&&(c=null),u){if(!a(u))return u;u=i.addDays(u,1)}if(c){if(!a(c))return c;c=i.addDays(c,-1)}}return null},My=(e,t,n)=>null!=t&&e.isValid(t)?t:n,jy=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const t=n[n.length-1];n.push(e.addMonths(t,1))}return n},Iy=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),Ay=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(t=>e.addDays(n,t))},zy=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),Ly=1,Fy=2,$y=3,Vy=5,By=6,Uy=7,Hy=(e,t,n)=>{if(t===Ly)return e.startOfYear(n);if(t===Fy)return e.startOfMonth(n);if(t===$y)return e.startOfDay(n);let r=n;return t<Vy&&(r=e.setMinutes(r,0)),t<By&&(r=e.setSeconds(r,0)),t<Uy&&(r=e.setMilliseconds(r,0)),r},Wy=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{let a=o?o():Hy(t,n,Iy(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,a)&&(a=Hy(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,a)&&(a=Hy(t,n,e.maxDate));const i=((e,t)=>(n,r)=>e?t.isAfter(n,r):zy(n,t)>zy(r,t))(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&i(e.minTime,a)&&(a=Hy(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:Ry(t,a,e.minTime))),null!=e.maxTime&&i(a,e.maxTime)&&(a=Hy(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:Ry(t,a,e.maxTime))),a},qy=["value","referenceDate"],Yy={emptyValue:null,getTodayValue:Iy,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=dy(e,qy);return null!=t&&r.utils.isValid(t)?t:null!=n?n:Wy(r)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},Ky=({props:e,value:t,timezone:n,adapter:r})=>{if(null===t)return null;const{shouldDisableDate:o,shouldDisableMonth:a,shouldDisableYear:i,disablePast:l,disableFuture:s}=e,u=r.utils.date(void 0,n),c=My(r.utils,e.minDate,r.defaultDates.minDate),d=My(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case Boolean(o&&o(t)):return"shouldDisableDate";case Boolean(a&&a(t)):return"shouldDisableMonth";case Boolean(i&&i(t)):return"shouldDisableYear";case Boolean(s&&r.utils.isAfterDay(t,u)):return"disableFuture";case Boolean(l&&r.utils.isBeforeDay(t,u)):return"disablePast";case Boolean(c&&r.utils.isBeforeDay(t,c)):return"minDate";case Boolean(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};Ky.valueManager=Yy;const Gy={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${r||null!==t&&n.isValid(t)?`Selected time is ${r??n.format(t,"fullTime")}`:"No time selected"}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},Qy=Gy;cy({},Gy);const Xy=()=>{const e=b.useContext(py);if(null===e)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.utils)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=b.useMemo(()=>cy({},Qy,e.localeText),[e.localeText]);return b.useMemo(()=>cy({},e,{localeText:t}),[e,t])},Jy=()=>Xy().utils,Zy=()=>Xy().defaultDates,eb=e=>{const t=Jy(),n=b.useRef(void 0);return void 0===n.current&&(n.current=t.date(void 0,e)),n.current},tb=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:a,disablePast:i,timezone:l})=>{const s=Xy();return b.useCallback(u=>null!==Ky({adapter:s,value:u,timezone:l,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:a,disablePast:i}}),[s,e,t,n,r,o,a,i,l])},nb=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:a=!1,maxDate:i,minDate:l,onMonthChange:s,reduceAnimations:u,shouldDisableDate:c,timezone:d}=e,f=Jy(),p=b.useRef(((e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return cy({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const e=o.newTimezone;if(n.getTimezone(r.currentMonth)===e)return r;let t=n.setTimezone(r.currentMonth,e);return n.getMonth(t)!==n.getMonth(r.currentMonth)&&(t=n.setMonth(t,n.getMonth(r.currentMonth))),cy({},r,{currentMonth:t})}case"finishMonthSwitchingAnimation":return cy({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=r.focusedDay&&null!=o.focusedDay&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const a=null!=o.focusedDay&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return cy({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:a&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:a?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:null!=o.focusedDay&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(Boolean(u),a,f)).current,m=b.useMemo(()=>Yy.getInitialReferenceValue({value:t,utils:f,timezone:d,props:e,referenceDate:n,granularity:$y}),[n,d]),[h,g]=b.useReducer(p,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:f.startOfMonth(m),slideDirection:"left"});b.useEffect(()=>{g({type:"changeMonthTimezone",newTimezone:f.getTimezone(m)})},[m,f]);const y=b.useCallback(e=>{g(cy({type:"changeMonth"},e)),s&&s(e.newMonth)},[s]),v=b.useCallback(e=>{const t=e;f.isSameMonth(t,h.currentMonth)||y({newMonth:f.startOfMonth(t),direction:f.isAfterDay(t,h.currentMonth)?"left":"right"})},[h.currentMonth,y,f]),w=tb({shouldDisableDate:c,minDate:l,maxDate:i,disableFuture:r,disablePast:o,timezone:d}),k=b.useCallback(()=>{g({type:"finishMonthSwitchingAnimation"})},[]),S=Ty((e,t)=>{w(e)||g({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})});return{referenceDate:m,calendarState:h,changeMonth:v,changeFocusedDay:S,isDateDisabled:w,onMonthSwitchingAnimationEnd:k,handleChangeMonth:y}},rb=e=>Py("MuiPickersFadeTransitionGroup",e);Ny("MuiPickersFadeTransitionGroup",["root"]);const ob=ts(Ys,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function ab(e){const t=Yd({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:a}=t,i=(e=>{const{classes:t}=e;return Ey({root:["root"]},rb,t)})(t),l=Xl();return o?n:S.jsx(ob,{className:Nt(i.root,r),children:S.jsx(Lm,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:l.transitions.duration.enteringScreen,enter:l.transitions.duration.enteringScreen,exit:0},children:n},a)})}const ib=36;function lb(e){return Py("MuiPickersDay",e)}const sb=Ny("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),ub=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],cb=({theme:e})=>cy({},e.typography.caption,{width:ib,height:ib,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Wa(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Wa(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${sb.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${sb.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${sb.disabled}:not(.${sb.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${sb.disabled}&.${sb.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:"0 2px"}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${sb.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),db=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},fb=ts(su,{name:"MuiPickersDay",slot:"Root",overridesResolver:db})(cb),pb=ts("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:db})(({theme:e})=>cy({},cb({theme:e}),{opacity:0,pointerEvents:"none"})),mb=()=>{},hb=b.forwardRef(function(e,t){const n=Yd({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:o,day:a,disabled:i=!1,disableHighlightToday:l=!1,disableMargin:s=!1,isAnimating:u,onClick:c,onDaySelect:d,onFocus:f=mb,onBlur:p=mb,onKeyDown:m=mb,onMouseDown:h=mb,onMouseEnter:g=mb,outsideCurrentMonth:y,selected:v=!1,showDaysOutsideCurrentMonth:w=!1,children:k,today:x=!1}=n,T=dy(n,ub),E=cy({},n,{autoFocus:r,disabled:i,disableHighlightToday:l,disableMargin:s,selected:v,showDaysOutsideCurrentMonth:w,today:x}),C=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:a,outsideCurrentMonth:i,showDaysOutsideCurrentMonth:l,classes:s}=e,u=i&&!l;return Ey({root:["root",t&&!u&&"selected",a&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",i&&l&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},lb,s)})(E),O=Jy(),_=b.useRef(null),P=hy(_,t);vy(()=>{!r||i||u||y||_.current.focus()},[r,i,u,y]);return y&&!w?S.jsx(pb,{className:Nt(C.root,C.hiddenDaySpacingFiller,o),ownerState:E,role:T.role}):S.jsx(fb,cy({className:Nt(C.root,o),ref:P,centerRipple:!0,disabled:i,tabIndex:v?0:-1,onKeyDown:e=>m(e,a),onFocus:e=>f(e,a),onBlur:e=>p(e,a),onMouseEnter:e=>g(e,a),onClick:e=>{i||d(a),y&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{h(e),y&&e.preventDefault()}},T,{ownerState:E,children:k||O.format(a,"dayOfMonth")}))});"production"!==process.env.NODE_ENV&&(hb.propTypes={action:_t.oneOfType([_t.func,_t.shape({current:_t.shape({focusVisible:_t.func.isRequired})})]),centerRipple:_t.bool,classes:_t.object,className:_t.string,component:_t.elementType,day:_t.object.isRequired,disabled:_t.bool,disableHighlightToday:_t.bool,disableMargin:_t.bool,disableRipple:_t.bool,disableTouchRipple:_t.bool,focusRipple:_t.bool,focusVisibleClassName:_t.string,isAnimating:_t.bool,isFirstVisibleCell:_t.bool.isRequired,isLastVisibleCell:_t.bool.isRequired,onBlur:_t.func,onDaySelect:_t.func.isRequired,onFocus:_t.func,onFocusVisible:_t.func,onKeyDown:_t.func,onMouseEnter:_t.func,outsideCurrentMonth:_t.bool.isRequired,selected:_t.bool,showDaysOutsideCurrentMonth:_t.bool,style:_t.object,sx:_t.oneOfType([_t.arrayOf(_t.oneOfType([_t.func,_t.object,_t.bool])),_t.func,_t.object]),tabIndex:_t.number,today:_t.bool,TouchRippleProps:_t.object,touchRippleRef:_t.oneOfType([_t.func,_t.shape({current:_t.shape({pulsate:_t.func.isRequired,start:_t.func.isRequired,stop:_t.func.isRequired})})])});const gb=b.memo(hb),yb=()=>Xy().localeText,bb=e=>Py("MuiPickersSlideTransition",e),vb=Ny("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),wb=["children","className","reduceAnimations","slideDirection","transKey","classes"],kb=ts(Ys,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${vb["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${vb["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${vb.slideEnterActive}`]:t.slideEnterActive},{[`.${vb.slideExit}`]:t.slideExit},{[`.${vb["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${vb["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${vb["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${vb["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${vb.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${vb.slideExit}`]:{transform:"translate(0%)"},[`& .${vb["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${vb["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});const Sb=e=>Py("MuiDayCalendar",e);Ny("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const xb=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Tb=["ownerState"],Eb=ts("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Cb=ts("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Ob=ts(ld,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),_b=ts(ld,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),Pb=ts(ld,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>cy({},e.typography.caption,{width:ib,height:ib,padding:0,margin:"0 2px",color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),Nb=ts("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),Rb=ts(function(e){const t=Yd({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:a}=t,i=dy(t,wb),l=(e=>{const{classes:t,slideDirection:n}=e;return Ey({root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]},bb,t)})(t),s=Xl();if(o)return S.jsx("div",{className:Nt(l.root,r),children:n});const u={exit:l.exit,enterActive:l.enterActive,enter:l.enter,exitActive:l.exitActive};return S.jsx(kb,{className:Nt(l.root,r),childFactory:e=>b.cloneElement(e,{classNames:u}),role:"presentation",children:S.jsx(Bs,cy({mountOnEnter:!0,unmountOnExit:!0,timeout:s.transitions.duration.complex,classNames:u},i,{children:n}),a)})},{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),Db=ts("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),Mb=ts("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function jb(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:a,currentMonthNumber:i,isViewFocused:l}=e,s=dy(e,xb);const{disabled:u,disableHighlightToday:c,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:f,slots:p,slotProps:m,timezone:h}=t,g=Jy(),y=eb(h),v=null!==r&&g.isSameDay(n,r),w=o.some(e=>g.isSameDay(e,n)),k=g.isSameDay(n,y),x=p?.day??gb,T=dy(by({elementType:x,externalSlotProps:m?.day,additionalProps:cy({disableHighlightToday:c,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:d,"data-timestamp":g.toJsDate(n).valueOf()},s),ownerState:cy({},t,{day:n,selected:w})}),Tb),E=b.useMemo(()=>u||a(n),[u,a,n]),C=b.useMemo(()=>g.getMonth(n)!==i,[g,n,i]),O=b.useMemo(()=>{const e=g.startOfMonth(g.setMonth(n,i));return f?g.isSameDay(n,g.startOfWeek(e)):g.isSameDay(n,e)},[i,n,f,g]),_=b.useMemo(()=>{const e=g.endOfMonth(g.setMonth(n,i));return f?g.isSameDay(n,g.endOfWeek(e)):g.isSameDay(n,e)},[i,n,f,g]);return S.jsx(x,cy({},T,{day:n,disabled:E,autoFocus:l&&v,today:k,outsideCurrentMonth:C,isFirstVisibleCell:O,isLastVisibleCell:_,selected:w,tabIndex:v?0:-1,"aria-selected":w,"aria-current":k?"date":void 0}))}function Ib(e){const t=Yd({props:e,name:"MuiDayCalendar"}),n=Jy(),{onFocusedDayChange:r,className:o,currentMonth:a,selectedDays:i,focusedDay:l,loading:s,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:c,readOnly:d,reduceAnimations:f,renderLoading:p=()=>S.jsx("span",{children:"..."}),slideDirection:m,TransitionProps:h,disablePast:g,disableFuture:y,minDate:v,maxDate:w,shouldDisableDate:k,shouldDisableMonth:x,shouldDisableYear:T,dayOfWeekFormatter:E=e=>n.format(e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:C,onFocusedViewChange:O,gridLabelId:_,displayWeekNumber:P,fixedWeekNumber:N,autoFocus:R,timezone:D}=t,M=eb(D),j=(e=>{const{classes:t}=e;return Ey({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Sb,t)})(t),I=ti(),A=tb({shouldDisableDate:k,shouldDisableMonth:x,shouldDisableYear:T,minDate:v,maxDate:w,disablePast:g,disableFuture:y,timezone:D}),z=yb(),[L,F]=xy({name:"DayCalendar",state:"hasFocus",controlled:C,default:R??!1}),[$,V]=b.useState(()=>l||M),B=Ty(e=>{d||u(e)}),U=e=>{A(e)||(r(e),V(e),O?.(!0),F(!0))},H=Ty((e,t)=>{switch(e.key){case"ArrowUp":U(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":U(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const r=n.addDays(t,I?1:-1),o=n.addMonths(t,I?1:-1),a=Dy({utils:n,date:r,minDate:I?r:n.startOfMonth(o),maxDate:I?n.endOfMonth(o):r,isDateDisabled:A,timezone:D});U(a||r),e.preventDefault();break}case"ArrowRight":{const r=n.addDays(t,I?-1:1),o=n.addMonths(t,I?-1:1),a=Dy({utils:n,date:r,minDate:I?n.startOfMonth(o):r,maxDate:I?r:n.endOfMonth(o),isDateDisabled:A,timezone:D});U(a||r),e.preventDefault();break}case"Home":U(n.startOfWeek(t)),e.preventDefault();break;case"End":U(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":U(n.addMonths(t,1)),e.preventDefault();break;case"PageDown":U(n.addMonths(t,-1)),e.preventDefault()}}),W=Ty((e,t)=>U(t)),q=Ty((e,t)=>{L&&n.isSameDay($,t)&&O?.(!1)}),Y=n.getMonth(a),K=n.getYear(a),G=b.useMemo(()=>i.filter(e=>!!e).map(e=>n.startOfDay(e)),[n,i]),Q=`${K}-${Y}`,X=b.useMemo(()=>b.createRef(),[Q]),J=b.useMemo(()=>{const e=n.startOfMonth(a),t=n.endOfMonth(a);return A($)||n.isAfterDay($,t)||n.isBeforeDay($,e)?Dy({utils:n,date:$,minDate:e,maxDate:t,disablePast:g,disableFuture:y,isDateDisabled:A,timezone:D}):$},[a,y,g,$,A,n,D]),Z=b.useMemo(()=>{const e=n.getWeekArray(a);let t=n.addMonths(a,1);for(;N&&e.length<N;){const r=n.getWeekArray(t),o=n.isSameDay(e[e.length-1][0],r[0][0]);r.slice(o?1:0).forEach(t=>{e.length<N&&e.push(t)}),t=n.addMonths(t,1)}return e},[a,N,n]);return S.jsxs(Eb,{role:"grid","aria-labelledby":_,className:j.root,children:[S.jsxs(Cb,{role:"row",className:j.header,children:[P&&S.jsx(_b,{variant:"caption",role:"columnheader","aria-label":z.calendarWeekNumberHeaderLabel,className:j.weekNumberLabel,children:z.calendarWeekNumberHeaderText}),Ay(n,M).map((e,t)=>S.jsx(Ob,{variant:"caption",role:"columnheader","aria-label":n.format(e,"weekday"),className:j.weekDayLabel,children:E(e)},t.toString()))]}),s?S.jsx(Nb,{className:j.loadingContainer,children:p()}):S.jsx(Rb,cy({transKey:Q,onExited:c,reduceAnimations:f,slideDirection:m,className:Nt(o,j.slideTransition)},h,{nodeRef:X,children:S.jsx(Db,{ref:X,role:"rowgroup",className:j.monthContainer,children:Z.map((e,r)=>S.jsxs(Mb,{role:"row",className:j.weekContainer,"aria-rowindex":r+1,children:[P&&S.jsx(Pb,{className:j.weekNumber,role:"rowheader","aria-label":z.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:z.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map((e,n)=>S.jsx(jb,{parentProps:t,day:e,selectedDays:G,focusableDay:J,onKeyDown:H,onFocus:W,onBlur:q,onDaySelect:B,isDateDisabled:A,currentMonthNumber:Y,isViewFocused:L,"aria-colindex":n+1},e.toString()))]},`week-${e[0]}`))})}))]})}function Ab(e){return Py("MuiPickersMonth",e)}const zb=Ny("MuiPickersMonth",["root","monthButton","disabled","selected"]),Lb=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],Fb=ts("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),$b=ts("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${zb.disabled}`]:t.disabled},{[`&.${zb.selected}`]:t.selected}]})(({theme:e})=>cy({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Wa(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Wa(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${zb.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${zb.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Vb=b.memo(function(e){const t=Yd({props:e,name:"MuiPickersMonth"}),{autoFocus:n,className:r,children:o,disabled:a,selected:i,value:l,tabIndex:s,onClick:u,onKeyDown:c,onFocus:d,onBlur:f,"aria-current":p,"aria-label":m,slots:h,slotProps:g}=t,y=dy(t,Lb),v=b.useRef(null),w=(e=>{const{disabled:t,selected:n,classes:r}=e;return Ey({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},Ab,r)})(t);vy(()=>{n&&v.current?.focus()},[n]);const k=h?.monthButton??$b,x=by({elementType:k,externalSlotProps:g?.monthButton,additionalProps:{children:o,disabled:a,tabIndex:s,ref:v,type:"button",role:"radio","aria-current":p,"aria-checked":i,"aria-label":m,onClick:e=>u(e,l),onKeyDown:e=>c(e,l),onFocus:e=>d(e,l),onBlur:e=>f(e,l)},ownerState:t,className:w.monthButton});return S.jsx(Fb,cy({className:Nt(w.root,r),ownerState:t},y,{children:S.jsx(k,cy({},x))}))});function Bb(e){return Py("MuiMonthCalendar",e)}Ny("MuiMonthCalendar",["root"]);const Ub=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:a,valueManager:i})=>{const[l,s]=xy({name:e,state:"value",controlled:n,default:r??i.emptyValue});return(({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:o,valueManager:a})=>{const i=Jy(),l=b.useRef(n),s=t??l.current??a.emptyValue,u=b.useMemo(()=>a.getTimezone(i,s),[i,a,s]),c=Ty(e=>null==u?e:a.setTimezone(i,u,e));let d;return d=e||u||(r?i.getTimezone(r):"default"),{value:b.useMemo(()=>a.setTimezone(i,d,s),[a,i,d,s]),handleValueChange:Ty((e,...t)=>{const n=c(e);o?.(n,...t)}),timezone:d}})({timezone:t,value:l,defaultValue:void 0,referenceDate:o,onChange:Ty((e,...t)=>{s(e),a?.(e,...t)}),valueManager:i})},Hb=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"];const Wb=ts("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:320,boxSizing:"border-box"}),qb=b.forwardRef(function(e,t){const n=function(e,t){const n=Jy(),r=Zy(),o=Yd({props:e,name:t});return cy({disableFuture:!1,disablePast:!1},o,{minDate:My(n,o.minDate,r.minDate),maxDate:My(n,o.maxDate,r.maxDate)})}(e,"MuiMonthCalendar"),{className:r,value:o,defaultValue:a,referenceDate:i,disabled:l,disableFuture:s,disablePast:u,maxDate:c,minDate:d,onChange:f,shouldDisableMonth:p,readOnly:m,autoFocus:h=!1,onMonthFocus:g,hasFocus:y,onFocusedViewChange:v,monthsPerRow:w=3,timezone:k,gridLabelId:x,slots:T,slotProps:E}=n,C=dy(n,Hb),{value:O,handleValueChange:_,timezone:P}=Ub({name:"MonthCalendar",timezone:k,value:o,defaultValue:a,referenceDate:i,onChange:f,valueManager:Yy}),N=eb(P),R=ti(),D=Jy(),M=b.useMemo(()=>Yy.getInitialReferenceValue({value:O,utils:D,props:n,timezone:P,referenceDate:i,granularity:Fy}),[]),j=n,I=(e=>{const{classes:t}=e;return Ey({root:["root"]},Bb,t)})(j),A=b.useMemo(()=>D.getMonth(N),[D,N]),z=b.useMemo(()=>null!=O?D.getMonth(O):null,[O,D]),[L,F]=b.useState(()=>z||D.getMonth(M)),[$,V]=xy({name:"MonthCalendar",state:"hasFocus",controlled:y,default:h??!1}),B=Ty(e=>{V(e),v&&v(e)}),U=b.useCallback(e=>{const t=D.startOfMonth(u&&D.isAfter(N,d)?N:d),n=D.startOfMonth(s&&D.isBefore(N,c)?N:c),r=D.startOfMonth(e);return!!D.isBefore(r,t)||(!!D.isAfter(r,n)||!!p&&p(r))},[s,u,c,d,N,p,D]),H=Ty((e,t)=>{if(m)return;const n=D.setMonth(O??M,t);_(n)}),W=Ty(e=>{U(D.setMonth(O??M,e))||(F(e),B(!0),g&&g(e))});b.useEffect(()=>{F(e=>null!==z&&e!==z?z:e)},[z]);const q=Ty((e,t)=>{const n=12;switch(e.key){case"ArrowUp":W((n+t-3)%n),e.preventDefault();break;case"ArrowDown":W((n+t+3)%n),e.preventDefault();break;case"ArrowLeft":W((n+t+(R?1:-1))%n),e.preventDefault();break;case"ArrowRight":W((n+t+(R?-1:1))%n),e.preventDefault()}}),Y=Ty((e,t)=>{W(t)}),K=Ty((e,t)=>{L===t&&B(!1)});return S.jsx(Wb,cy({ref:t,className:Nt(I.root,r),ownerState:j,role:"radiogroup","aria-labelledby":x},C,{children:jy(D,O??M).map(e=>{const t=D.getMonth(e),n=D.format(e,"monthShort"),r=D.format(e,"month"),o=t===z,a=l||U(e);return S.jsx(Vb,{selected:o,value:t,onClick:H,onKeyDown:q,autoFocus:$&&t===L,disabled:a,tabIndex:t!==L||a?-1:0,onFocus:Y,onBlur:K,"aria-current":A===t?"date":void 0,"aria-label":r,monthsPerRow:w,slots:T,slotProps:E,children:n},n)})}))});function Yb(e){return Py("MuiPickersYear",e)}"production"!==process.env.NODE_ENV&&(qb.propTypes={autoFocus:_t.bool,classes:_t.object,className:_t.string,defaultValue:_t.object,disabled:_t.bool,disableFuture:_t.bool,disableHighlightToday:_t.bool,disablePast:_t.bool,gridLabelId:_t.string,hasFocus:_t.bool,maxDate:_t.object,minDate:_t.object,monthsPerRow:_t.oneOf([3,4]),onChange:_t.func,onFocusedViewChange:_t.func,onMonthFocus:_t.func,readOnly:_t.bool,referenceDate:_t.object,shouldDisableMonth:_t.func,slotProps:_t.object,slots:_t.object,sx:_t.oneOfType([_t.arrayOf(_t.oneOfType([_t.func,_t.object,_t.bool])),_t.func,_t.object]),timezone:_t.string,value:_t.object});const Kb=Ny("MuiPickersYear",["root","yearButton","selected","disabled"]),Gb=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],Qb=ts("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),Xb=ts("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${Kb.disabled}`]:t.disabled},{[`&.${Kb.selected}`]:t.selected}]})(({theme:e})=>cy({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:Wa(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Wa(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Kb.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Kb.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Jb=b.memo(function(e){const t=Yd({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:r,children:o,disabled:a,selected:i,value:l,tabIndex:s,onClick:u,onKeyDown:c,onFocus:d,onBlur:f,"aria-current":p,slots:m,slotProps:h}=t,g=dy(t,Gb),y=b.useRef(null),v=(e=>{const{disabled:t,selected:n,classes:r}=e;return Ey({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},Yb,r)})(t);vy(()=>{n&&y.current?.focus()},[n]);const w=m?.yearButton??Xb,k=by({elementType:w,externalSlotProps:h?.yearButton,additionalProps:{children:o,disabled:a,tabIndex:s,ref:y,type:"button",role:"radio","aria-current":p,"aria-checked":i,onClick:e=>u(e,l),onKeyDown:e=>c(e,l),onFocus:e=>d(e,l),onBlur:e=>f(e,l)},ownerState:t,className:v.yearButton});return S.jsx(Qb,cy({className:Nt(v.root,r),ownerState:t},g,{children:S.jsx(w,cy({},k))}))});function Zb(e){return Py("MuiYearCalendar",e)}Ny("MuiYearCalendar",["root"]);const ev=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"];const tv=ts("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:320,maxHeight:280,boxSizing:"border-box",position:"relative"}),nv=b.forwardRef(function(e,t){const n=function(e,t){const n=Jy(),r=Zy(),o=Yd({props:e,name:t});return cy({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:My(n,o.minDate,r.minDate),maxDate:My(n,o.maxDate,r.maxDate)})}(e,"MuiYearCalendar"),{autoFocus:r,className:o,value:a,defaultValue:i,referenceDate:l,disabled:s,disableFuture:u,disablePast:c,maxDate:d,minDate:f,onChange:p,readOnly:m,shouldDisableYear:h,onYearFocus:g,hasFocus:y,onFocusedViewChange:v,yearsOrder:w="asc",yearsPerRow:k,timezone:x,gridLabelId:T,slots:E,slotProps:C}=n,O=dy(n,ev),{value:_,handleValueChange:P,timezone:N}=Ub({name:"YearCalendar",timezone:x,value:a,defaultValue:i,referenceDate:l,onChange:p,valueManager:Yy}),R=eb(N),D=ti(),M=Jy(),j=b.useMemo(()=>Yy.getInitialReferenceValue({value:_,utils:M,props:n,timezone:N,referenceDate:l,granularity:Ly}),[]),I=n,A=(e=>{const{classes:t}=e;return Ey({root:["root"]},Zb,t)})(I),z=b.useMemo(()=>M.getYear(R),[M,R]),L=b.useMemo(()=>null!=_?M.getYear(_):null,[_,M]),[F,$]=b.useState(()=>L||M.getYear(j)),[V,B]=xy({name:"YearCalendar",state:"hasFocus",controlled:y,default:r??!1}),U=Ty(e=>{B(e),v&&v(e)}),H=b.useCallback(e=>{if(c&&M.isBeforeYear(e,R))return!0;if(u&&M.isAfterYear(e,R))return!0;if(f&&M.isBeforeYear(e,f))return!0;if(d&&M.isAfterYear(e,d))return!0;if(!h)return!1;const t=M.startOfYear(e);return h(t)},[u,c,d,f,R,h,M]),W=Ty((e,t)=>{if(m)return;const n=M.setYear(_??j,t);P(n)}),q=Ty(e=>{H(M.setYear(_??j,e))||($(e),U(!0),g?.(e))});b.useEffect(()=>{$(e=>null!==L&&e!==L?L:e)},[L]);const Y="desc"!==w?1*k:-1*k,K=D&&"asc"===w||!D&&"desc"===w?-1:1,G=Ty((e,t)=>{switch(e.key){case"ArrowUp":q(t-Y),e.preventDefault();break;case"ArrowDown":q(t+Y),e.preventDefault();break;case"ArrowLeft":q(t-K),e.preventDefault();break;case"ArrowRight":q(t+K),e.preventDefault()}}),Q=Ty((e,t)=>{q(t)}),X=Ty((e,t)=>{F===t&&U(!1)}),J=b.useRef(null),Z=hy(t,J);b.useEffect(()=>{if(r||null===J.current)return;const e=J.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,o=J.current.clientHeight,a=J.current.scrollTop,i=n+t;t>o||n<a||(J.current.scrollTop=i-o/2-t/2)},[r]);const ee=M.getYearRange([f,d]);return"desc"===w&&ee.reverse(),S.jsx(tv,cy({ref:Z,className:Nt(A.root,o),ownerState:I,role:"radiogroup","aria-labelledby":T},O,{children:ee.map(e=>{const t=M.getYear(e),n=t===L,r=s||H(e);return S.jsx(Jb,{selected:n,value:t,onClick:W,onKeyDown:G,autoFocus:V&&t===F,disabled:r,tabIndex:t!==F||r?-1:0,onFocus:Q,onBlur:X,"aria-current":z===t?"date":void 0,yearsPerRow:k,slots:E,slotProps:C,children:M.format(e,"year")},M.format(e,"year"))})}))});"production"!==process.env.NODE_ENV&&(nv.propTypes={autoFocus:_t.bool,classes:_t.object,className:_t.string,defaultValue:_t.object,disabled:_t.bool,disableFuture:_t.bool,disableHighlightToday:_t.bool,disablePast:_t.bool,gridLabelId:_t.string,hasFocus:_t.bool,maxDate:_t.object,minDate:_t.object,onChange:_t.func,onFocusedViewChange:_t.func,onYearFocus:_t.func,readOnly:_t.bool,referenceDate:_t.object,shouldDisableYear:_t.func,slotProps:_t.object,slots:_t.object,sx:_t.oneOfType([_t.arrayOf(_t.oneOfType([_t.func,_t.object,_t.bool])),_t.func,_t.object]),timezone:_t.string,value:_t.object,yearsOrder:_t.oneOf(["asc","desc"]),yearsPerRow:_t.oneOf([3,4])});let rv=!1;const ov=e=>Py("MuiPickersCalendarHeader",e),av=Ny("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),iv=ls(S.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),lv=ls(S.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),sv=ls(S.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight");function uv(e){return Py("MuiPickersArrowSwitcher",e)}ls(S.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),ls(S.jsxs(b.Fragment,{children:[S.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),S.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),ls(S.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),ls(S.jsxs(b.Fragment,{children:[S.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),S.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),ls(S.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),Ny("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const cv=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],dv=["ownerState"],fv=["ownerState"],pv=ts("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),mv=ts("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),hv=ts(lf,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),gv=b.forwardRef(function(e,t){const n=ti(),r=Yd({props:e,name:"MuiPickersArrowSwitcher"}),{children:o,className:a,slots:i,slotProps:l,isNextDisabled:s,isNextHidden:u,onGoToNext:c,nextLabel:d,isPreviousDisabled:f,isPreviousHidden:p,onGoToPrevious:m,previousLabel:h,labelId:g}=r,y=dy(r,cv),b=r,v=(e=>{const{classes:t}=e;return Ey({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},uv,t)})(b),w={isDisabled:s,isHidden:u,goTo:c,label:d},k={isDisabled:f,isHidden:p,goTo:m,label:h},x=i?.previousIconButton??hv,T=by({elementType:x,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"end",onClick:k.goTo},ownerState:cy({},b,{hidden:k.isHidden}),className:Nt(v.button,v.previousIconButton)}),E=i?.nextIconButton??hv,C=by({elementType:E,externalSlotProps:l?.nextIconButton,additionalProps:{size:"medium",title:w.label,"aria-label":w.label,disabled:w.isDisabled,edge:"start",onClick:w.goTo},ownerState:cy({},b,{hidden:w.isHidden}),className:Nt(v.button,v.nextIconButton)}),O=i?.leftArrowIcon??lv,_=dy(by({elementType:O,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:b,className:v.leftArrowIcon}),dv),P=i?.rightArrowIcon??sv,N=dy(by({elementType:P,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:b,className:v.rightArrowIcon}),fv);return S.jsxs(pv,cy({ref:t,className:Nt(v.root,a),ownerState:b},y,{children:[S.jsx(x,cy({},T,{children:n?S.jsx(P,cy({},N)):S.jsx(O,cy({},_))})),o?S.jsx(ld,{variant:"subtitle1",component:"span",id:g,children:o}):S.jsx(mv,{className:v.spacer,ownerState:b}),S.jsx(E,cy({},C,{children:n?S.jsx(O,cy({},_)):S.jsx(P,cy({},N))}))]}))});const yv=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],bv=["ownerState"],vv=ts("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),wv=ts("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>cy({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),kv=ts("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),Sv=ts(lf,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${av.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),xv=ts(iv,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),Tv=b.forwardRef(function(e,t){const n=yb(),r=Jy(),o=Yd({props:e,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:i,currentMonth:l,disabled:s,disableFuture:u,disablePast:c,maxDate:d,minDate:f,onMonthChange:p,onViewChange:m,view:h,reduceAnimations:g,views:y,labelId:v,className:w,timezone:k,format:x=`${r.formats.month} ${r.formats.year}`}=o,T=dy(o,yv),E=o,C=(e=>{const{classes:t}=e;return Ey({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},ov,t)})(o),O=a?.switchViewButton??Sv,_=by({elementType:O,externalSlotProps:i?.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(h)},ownerState:E,className:C.switchViewButton}),P=a?.switchViewIcon??xv,N=dy(by({elementType:P,externalSlotProps:i?.switchViewIcon,ownerState:E,className:C.switchViewIcon}),bv),R=function(e,{disableFuture:t,maxDate:n,timezone:r}){const o=Jy();return b.useMemo(()=>{const a=o.date(void 0,r),i=o.startOfMonth(t&&o.isBefore(a,n)?a:n);return!o.isAfter(i,e)},[t,n,e,o,r])}(l,{disableFuture:u,maxDate:d,timezone:k}),D=function(e,{disablePast:t,minDate:n,timezone:r}){const o=Jy();return b.useMemo(()=>{const a=o.date(void 0,r),i=o.startOfMonth(t&&o.isAfter(a,n)?a:n);return!o.isBefore(i,e)},[t,n,e,o,r])}(l,{disablePast:c,minDate:f,timezone:k});if(1===y.length&&"year"===y[0])return null;const M=r.formatByString(l,x);return S.jsxs(vv,cy({},T,{ownerState:E,className:Nt(C.root,w),ref:t,children:[S.jsxs(wv,{role:"presentation",onClick:()=>{if(1!==y.length&&m&&!s)if(2===y.length)m(y.find(e=>e!==h)||y[0]);else{const e=0!==y.indexOf(h)?0:1;m(y[e])}},ownerState:E,"aria-live":"polite",className:C.labelContainer,children:[S.jsx(ab,{reduceAnimations:g,transKey:M,children:S.jsx(kv,{id:v,ownerState:E,className:C.label,children:M})}),y.length>1&&!s&&S.jsx(O,cy({},_,{children:S.jsx(P,cy({},N))}))]}),S.jsx(Lm,{in:"day"===h,appear:!g,enter:!g,children:S.jsx(gv,{slots:a,slotProps:i,onGoToPrevious:()=>p(r.addMonths(l,-1),"right"),isPreviousDisabled:D,previousLabel:n.previousMonth,onGoToNext:()=>p(r.addMonths(l,1),"left"),isNextDisabled:R,nextLabel:n.nextMonth})})]}))});"production"!==process.env.NODE_ENV&&(Tv.propTypes={classes:_t.object,className:_t.string,currentMonth:_t.object.isRequired,disabled:_t.bool,disableFuture:_t.bool,disablePast:_t.bool,format:_t.string,labelId:_t.string,maxDate:_t.object.isRequired,minDate:_t.object.isRequired,onMonthChange:_t.func.isRequired,onViewChange:_t.func,reduceAnimations:_t.bool.isRequired,slotProps:_t.object,slots:_t.object,sx:_t.oneOfType([_t.arrayOf(_t.oneOfType([_t.func,_t.object,_t.bool])),_t.func,_t.object]),timezone:_t.string.isRequired,view:_t.oneOf(["day","month","year"]).isRequired,views:_t.arrayOf(_t.oneOf(["day","month","year"]).isRequired).isRequired});const Ev=ts("div")({overflow:"hidden",width:320,maxHeight:336,display:"flex",flexDirection:"column",margin:"0 auto"}),Cv="undefined"!=typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Ov=Cv&&Cv[1]?parseInt(Cv[1],10):null,_v=Cv&&Cv[2]?parseInt(Cv[2],10):null,Pv=Ov&&Ov<10||_v&&_v<13||!1,Nv=e=>Py("MuiDateCalendar",e);Ny("MuiDateCalendar",["root","viewTransitionContainer"]);const Rv=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"];function Dv(e,t){const n=Jy(),r=Zy(),o=Wg("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||Pv,a=Yd({props:e,name:t});return cy({},a,{loading:a.loading??!1,disablePast:a.disablePast??!1,disableFuture:a.disableFuture??!1,openTo:a.openTo??"day",views:a.views??["year","day"],reduceAnimations:a.reduceAnimations??o,renderLoading:a.renderLoading??(()=>S.jsx("span",{children:"..."})),minDate:My(n,a.minDate,r.minDate),maxDate:My(n,a.maxDate,r.maxDate)})}const Mv=ts(Ev,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:336}),jv=ts(ab,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Iv=b.forwardRef(function(e,t){const n=Jy(),r=Sy(),o=Dv(e,"MuiDateCalendar"),{autoFocus:a,onViewChange:i,value:l,defaultValue:s,referenceDate:u,disableFuture:c,disablePast:d,onChange:f,onYearChange:p,onMonthChange:m,reduceAnimations:h,shouldDisableDate:g,shouldDisableMonth:y,shouldDisableYear:v,view:w,views:k,openTo:x,className:T,disabled:E,readOnly:C,minDate:O,maxDate:_,disableHighlightToday:P,focusedView:N,onFocusedViewChange:R,showDaysOutsideCurrentMonth:D,fixedWeekNumber:M,dayOfWeekFormatter:j,slots:I,slotProps:A,loading:z,renderLoading:L,displayWeekNumber:F,yearsOrder:$,yearsPerRow:V,monthsPerRow:B,timezone:U}=o,H=dy(o,Rv),{value:W,handleValueChange:q,timezone:Y}=Ub({name:"DateCalendar",timezone:U,value:l,defaultValue:s,referenceDate:u,onChange:f,valueManager:Yy}),{view:K,setView:G,focusedView:Q,setFocusedView:X,goToNextView:J,setValueAndGoToNextView:Z}=function({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:a,focusedView:i,onFocusedViewChange:l}){"production"!==process.env.NODE_ENV&&(rv||(null==r||o.includes(r)||(console.warn(`MUI X: \`view="${r}"\` is not a valid prop.`,`It must be an element of \`views=["${o.join('", "')}"]\`.`),rv=!0),null!=r||null==n||o.includes(n)||(console.warn(`MUI X: \`openTo="${n}"\` is not a valid prop.`,`It must be an element of \`views=["${o.join('", "')}"]\`.`),rv=!0)));const s=b.useRef(n),u=b.useRef(o),c=b.useRef(o.includes(n)?n:o[0]),[d,f]=xy({name:"useViews",state:"view",controlled:r,default:c.current}),p=b.useRef(a?d:null),[m,h]=xy({name:"useViews",state:"focusedView",controlled:i,default:p.current});b.useEffect(()=>{(s.current&&s.current!==n||u.current&&u.current.some(e=>!o.includes(e)))&&(f(o.includes(n)?n:o[0]),u.current=o,s.current=n)},[n,f,d,o]);const g=o.indexOf(d),y=o[g-1]??null,v=o[g+1]??null,w=Ty((e,t)=>{h(t?e:t=>e===t?null:t),l?.(e,t)}),k=Ty(e=>{w(e,!0),e!==d&&(f(e),t&&t(e))}),S=Ty(()=>{v&&k(v)}),x=Ty((t,n,r)=>{const a="finish"===n,i=r?o.indexOf(r)<o.length-1:Boolean(v);if(e(t,a&&i?"partial":n,r),r&&r!==d){const e=o[o.indexOf(r)+1];e&&k(e)}else a&&S()});return{view:d,setView:k,focusedView:m,setFocusedView:w,nextView:v,previousView:y,defaultView:o.includes(n)?n:o[0],goToNextView:S,setValueAndGoToNextView:x}}({view:w,views:k,openTo:x,onChange:q,onViewChange:i,autoFocus:a,focusedView:N,onFocusedViewChange:R}),{referenceDate:ee,calendarState:te,changeFocusedDay:ne,changeMonth:re,handleChangeMonth:oe,isDateDisabled:ae,onMonthSwitchingAnimationEnd:ie}=nb({value:W,referenceDate:u,reduceAnimations:h,onMonthChange:m,minDate:O,maxDate:_,shouldDisableDate:g,disablePast:d,disableFuture:c,timezone:Y}),le=E&&W||O,se=E&&W||_,ue=`${r}-grid-label`,ce=null!==Q,de=I?.calendarHeader??Tv,fe=by({elementType:de,externalSlotProps:A?.calendarHeader,additionalProps:{views:k,view:K,currentMonth:te.currentMonth,onViewChange:G,onMonthChange:(e,t)=>oe({newMonth:e,direction:t}),minDate:le,maxDate:se,disabled:E,disablePast:d,disableFuture:c,reduceAnimations:h,timezone:Y,labelId:ue},ownerState:o}),pe=Ty(e=>{const t=n.startOfMonth(e),r=n.endOfMonth(e),o=ae(e)?Dy({utils:n,date:e,minDate:n.isBefore(O,t)?t:O,maxDate:n.isAfter(_,r)?r:_,disablePast:d,disableFuture:c,isDateDisabled:ae,timezone:Y}):e;o?(Z(o,"finish"),m?.(t)):(J(),re(t)),ne(o,!0)}),me=Ty(e=>{const t=n.startOfYear(e),r=n.endOfYear(e),o=ae(e)?Dy({utils:n,date:e,minDate:n.isBefore(O,t)?t:O,maxDate:n.isAfter(_,r)?r:_,disablePast:d,disableFuture:c,isDateDisabled:ae,timezone:Y}):e;o?(Z(o,"finish"),p?.(o)):(J(),re(t)),ne(o,!0)}),he=Ty(e=>q(e?Ry(n,e,W??ee):e,"finish",K));b.useEffect(()=>{null!=W&&n.isValid(W)&&re(W)},[W]);const ge=o,ye=(e=>{const{classes:t}=e;return Ey({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Nv,t)})(ge),be={disablePast:d,disableFuture:c,maxDate:_,minDate:O},ve={disableHighlightToday:P,readOnly:C,disabled:E,timezone:Y,gridLabelId:ue,slots:I,slotProps:A},we=b.useRef(K);b.useEffect(()=>{we.current!==K&&(Q===we.current&&X(K,!0),we.current=K)},[Q,X,K]);const ke=b.useMemo(()=>[W],[W]);return S.jsxs(Mv,cy({ref:t,className:Nt(ye.root,T),ownerState:ge},H,{children:[S.jsx(de,cy({},fe,{slots:I,slotProps:A})),S.jsx(jv,{reduceAnimations:h,className:ye.viewTransitionContainer,transKey:K,ownerState:ge,children:S.jsxs("div",{children:["year"===K&&S.jsx(nv,cy({},be,ve,{value:W,onChange:me,shouldDisableYear:v,hasFocus:ce,onFocusedViewChange:e=>X("year",e),yearsOrder:$,yearsPerRow:V,referenceDate:ee})),"month"===K&&S.jsx(qb,cy({},be,ve,{hasFocus:ce,className:T,value:W,onChange:pe,shouldDisableMonth:y,onFocusedViewChange:e=>X("month",e),monthsPerRow:B,referenceDate:ee})),"day"===K&&S.jsx(Ib,cy({},te,be,ve,{onMonthSwitchingAnimationEnd:ie,onFocusedDayChange:ne,reduceAnimations:h,selectedDays:ke,onSelectedDaysChange:he,shouldDisableDate:g,shouldDisableMonth:y,shouldDisableYear:v,hasFocus:ce,onFocusedViewChange:e=>X("day",e),showDaysOutsideCurrentMonth:D,fixedWeekNumber:M,dayOfWeekFormatter:j,displayWeekNumber:F,loading:z,renderLoading:L}))]})})]}))});"production"!==process.env.NODE_ENV&&(Iv.propTypes={autoFocus:_t.bool,classes:_t.object,className:_t.string,dayOfWeekFormatter:_t.func,defaultValue:_t.object,disabled:_t.bool,disableFuture:_t.bool,disableHighlightToday:_t.bool,disablePast:_t.bool,displayWeekNumber:_t.bool,fixedWeekNumber:_t.number,focusedView:_t.oneOf(["day","month","year"]),loading:_t.bool,maxDate:_t.object,minDate:_t.object,monthsPerRow:_t.oneOf([3,4]),onChange:_t.func,onFocusedViewChange:_t.func,onMonthChange:_t.func,onViewChange:_t.func,onYearChange:_t.func,openTo:_t.oneOf(["day","month","year"]),readOnly:_t.bool,reduceAnimations:_t.bool,referenceDate:_t.object,renderLoading:_t.func,shouldDisableDate:_t.func,shouldDisableMonth:_t.func,shouldDisableYear:_t.func,showDaysOutsideCurrentMonth:_t.bool,slotProps:_t.object,slots:_t.object,sx:_t.oneOfType([_t.arrayOf(_t.oneOfType([_t.func,_t.object,_t.bool])),_t.func,_t.object]),timezone:_t.string,value:_t.object,view:_t.oneOf(["day","month","year"]),views:_t.arrayOf(_t.oneOf(["day","month","year"]).isRequired),yearsOrder:_t.oneOf(["asc","desc"]),yearsPerRow:_t.oneOf([3,4])});var Av={exports:{}};!function(e){var t,n;e.exports=(t="week",n="year",function(e,r,o){var a=r.prototype;a.week=function(e){if(void 0===e&&(e=null),null!==e)return this.add(7*(e-this.week()),"day");var r=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var a=o(this).startOf(n).add(1,n).date(r),i=o(this).endOf(t);if(a.isBefore(i))return 1}var l=o(this).startOf(n).date(r).startOf(t).subtract(1,"millisecond"),s=this.diff(l,t,!0);return s<0?o(this).startOf("week").week():Math.ceil(s)},a.weeks=function(e){return void 0===e&&(e=null),this.week(e)}})}(Av);var zv=l(Av.exports),Lv={exports:{}};!function(e){e.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,o=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},l=function(e){return(e=+e)+(e>68?1900:2e3)},s=function(e){return function(t){this[e]=+t}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],c=function(e){var t=i[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=i.meridiem;if(r){for(var o=1;o<=24;o+=1)if(e.indexOf(r(o,0,t))>-1){n=o>12;break}}else n=e===(t?"pm":"PM");return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[o,s("seconds")],ss:[o,s("seconds")],m:[o,s("minutes")],mm:[o,s("minutes")],H:[o,s("hours")],h:[o,s("hours")],HH:[o,s("hours")],hh:[o,s("hours")],D:[o,s("day")],DD:[r,s("day")],Do:[a,function(e){var t=i.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],w:[o,s("week")],ww:[r,s("week")],M:[o,s("month")],MM:[r,s("month")],MMM:[a,function(e){var t=c("months"),n=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[a,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,s("year")],YY:[r,function(e){this.year=l(e)}],YYYY:[/\d{4}/,s("year")],Z:u,ZZ:u};function p(n){var r,o;r=n,o=i&&i.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,n,r){var a=r&&r.toUpperCase();return n||o[r]||e[r]||o[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})).match(t),l=a.length,s=0;s<l;s+=1){var u=a[s],c=f[u],d=c&&c[0],p=c&&c[1];a[s]=p?{regex:d,parser:p}:u.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<l;n+=1){var o=a[n];if("string"==typeof o)r+=o.length;else{var i=o.regex,s=o.parser,u=e.slice(r),c=i.exec(u)[0];s.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(l=e.parseTwoDigitYear);var r=t.prototype,o=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var l=a[1];if("string"==typeof l){var s=!0===a[2],u=!0===a[3],c=s||u,d=a[2];u&&(d=a[2]),i=this.$locale(),!s&&d&&(i=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var o=p(t)(e),a=o.year,i=o.month,l=o.day,s=o.hours,u=o.minutes,c=o.seconds,d=o.milliseconds,f=o.zone,m=o.week,h=new Date,g=l||(a||i?1:h.getDate()),y=a||h.getFullYear(),b=0;a&&!i||(b=i>0?i-1:h.getMonth());var v,w=s||0,k=u||0,S=c||0,x=d||0;return f?new Date(Date.UTC(y,b,g,w,k,S,x+60*f.offset*1e3)):n?new Date(Date.UTC(y,b,g,w,k,S,x)):(v=new Date(y,b,g,w,k,S,x),m&&(v=r(v).week(m).toDate()),v)}catch(e){return new Date("")}}(t,l,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),c&&t!=this.format(l)&&(this.$d=new Date("")),i={}}else if(l instanceof Array)for(var f=l.length,m=1;m<=f;m+=1){a[1]=l[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(""))}else o.call(this,e)}}}()}(Lv);var Fv=l(Lv.exports),$v={exports:{}};!function(e){var t;e.exports=(t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},function(e,n,r){var o=n.prototype,a=o.format;r.en.formats=t,o.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(e,n){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,r,o){var a=o&&o.toUpperCase();return r||n[o]||t[o]||n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})}(e,void 0===n?{}:n);return a.call(this,r)}})}($v);var Vv=l($v.exports),Bv={exports:{}};!function(e){e.exports=function(e,t,n){t.prototype.isBetween=function(e,t,r,o){var a=n(e),i=n(t),l="("===(o=o||"()")[0],s=")"===o[1];return(l?this.isAfter(a,r):!this.isBefore(a,r))&&(s?this.isBefore(i,r):!this.isAfter(i,r))||(l?this.isBefore(a,r):!this.isAfter(a,r))&&(s?this.isAfter(i,r):!this.isBefore(i,r))}}}(Bv);var Uv=l(Bv.exports),Hv={exports:{}};!function(e){e.exports=function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var o=this.$utils(),a=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return n.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return n.ordinal(t.week(),"W");case"w":case"ww":return o.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return o.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return o.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}});return r.bind(this)(a)}}}(Hv);var Wv=l(Hv.exports);const qv=new Set;uy.extend(Vv),uy.extend(zv),uy.extend(Uv),uy.extend(Wv);const Yv={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Kv={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},Gv=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n"),Qv=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");class Xv{constructor({locale:e,formats:t}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=Yv,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasUTCPlugin=()=>void 0!==uy.utc,this.hasTimezonePlugin=()=>void 0!==uy.tz,this.isSame=(e,t,n)=>{const r=this.setTimezone(t,this.getTimezone(e));return e.format(n)===r.format(n)},this.cleanTimezone=e=>{switch(e){case"default":return;case"system":return uy.tz.guess();default:return e}},this.createSystemDate=e=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const t=uy.tz.guess();return"UTC"!==t?uy.tz(e,t):uy(e)}return uy(e)},this.createUTCDate=e=>{if(!this.hasUTCPlugin())throw new Error(Gv);return uy.utc(e)},this.createTZDate=(e,t)=>{if(!this.hasUTCPlugin())throw new Error(Gv);if(!this.hasTimezonePlugin())throw new Error(Qv);const n=void 0!==e&&!e.endsWith("Z");return uy(e).tz(this.cleanTimezone(t),n)},this.getLocaleFormats=()=>{const e=uy.Ls;let t=e[this.locale||"en"];return void 0===t&&("production"!==process.env.NODE_ENV&&function(e,t="warning"){if("production"===process.env.NODE_ENV)return;const n=Array.isArray(e)?e.join("\n"):e;qv.has(n)||(qv.add(n),"error"===t?console.error(n):console.warn(n))}(["MUI X: Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale."]),t=e.en),t.formats},this.adjustOffset=e=>{if(!this.hasTimezonePlugin())return e;const t=this.getTimezone(e);if("UTC"!==t){const n=e.tz(this.cleanTimezone(t),!0);if(n.$offset===(e.$offset??0))return e;e.$offset=n.$offset}return e},this.date=(e,t="default")=>{if(null===e)return null;let n;return n="UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t),void 0===this.locale?n:n.locale(this.locale)},this.getInvalidDate=()=>uy(new Date("Invalid date")),this.getTimezone=e=>{if(this.hasTimezonePlugin()){const t=e.$x?.$timezone;if(t)return t}return this.hasUTCPlugin()&&e.isUTC()?"UTC":"system"},this.setTimezone=(e,t)=>{if(this.getTimezone(e)===t)return e;if("UTC"===t){if(!this.hasUTCPlugin())throw new Error(Gv);return e.utc()}if("system"===t)return e.local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(Qv)}return uy.tz(e,this.cleanTimezone(t))},this.toJsDate=e=>e.toDate(),this.parse=(e,t)=>""===e?null:this.dayjs(e,t,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=e=>{const t=this.getLocaleFormats();return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(e,n,r)=>{const o=r&&r.toUpperCase();return n||t[r]||t[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(e,t,n)=>t||n.slice(1))})},this.isValid=e=>null!=e&&e.isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>this.dayjs(e).format(t),this.formatNumber=e=>e,this.isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&e.toDate().getTime()===t.toDate().getTime(),this.isSameYear=(e,t)=>this.isSame(e,t,"YYYY"),this.isSameMonth=(e,t)=>this.isSame(e,t,"YYYY-MM"),this.isSameDay=(e,t)=>this.isSame(e,t,"YYYY-MM-DD"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e>t,this.isAfterYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()>t.utc():e.isAfter(t,"year"),this.isAfterDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()>t.utc():e.isAfter(t,"day"),this.isBefore=(e,t)=>e<t,this.isBeforeYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()<t.utc():e.isBefore(t,"year"),this.isBeforeDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()<t.utc():e.isBefore(t,"day"),this.isWithinRange=(e,[t,n])=>e>=t&&e<=n,this.startOfYear=e=>this.adjustOffset(e.startOf("year")),this.startOfMonth=e=>this.adjustOffset(e.startOf("month")),this.startOfWeek=e=>this.adjustOffset(this.setLocaleToValue(e).startOf("week")),this.startOfDay=e=>this.adjustOffset(e.startOf("day")),this.endOfYear=e=>this.adjustOffset(e.endOf("year")),this.endOfMonth=e=>this.adjustOffset(e.endOf("month")),this.endOfWeek=e=>this.adjustOffset(this.setLocaleToValue(e).endOf("week")),this.endOfDay=e=>this.adjustOffset(e.endOf("day")),this.addYears=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"year"):e.add(t,"year")),this.addMonths=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"month"):e.add(t,"month")),this.addWeeks=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"week"):e.add(t,"week")),this.addDays=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"day"):e.add(t,"day")),this.addHours=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"hour"):e.add(t,"hour")),this.addMinutes=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"minute"):e.add(t,"minute")),this.addSeconds=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"second"):e.add(t,"second")),this.getYear=e=>e.year(),this.getMonth=e=>e.month(),this.getDate=e=>e.date(),this.getHours=e=>e.hour(),this.getMinutes=e=>e.minute(),this.getSeconds=e=>e.second(),this.getMilliseconds=e=>e.millisecond(),this.setYear=(e,t)=>this.adjustOffset(e.set("year",t)),this.setMonth=(e,t)=>this.adjustOffset(e.set("month",t)),this.setDate=(e,t)=>this.adjustOffset(e.set("date",t)),this.setHours=(e,t)=>this.adjustOffset(e.set("hour",t)),this.setMinutes=(e,t)=>this.adjustOffset(e.set("minute",t)),this.setSeconds=(e,t)=>this.adjustOffset(e.set("second",t)),this.setMilliseconds=(e,t)=>this.adjustOffset(e.set("millisecond",t)),this.getDaysInMonth=e=>e.daysInMonth(),this.getWeekArray=e=>{const t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e));let r=0,o=t;const a=[];for(;o<n;){const e=Math.floor(r/7);a[e]=a[e]||[],a[e].push(o),o=this.addDays(o,1),r+=1}return a},this.getWeekNumber=e=>e.week(),this.getYearRange=([e,t])=>{const n=this.startOfYear(e),r=this.endOfYear(t),o=[];let a=n;for(;this.isBefore(a,r);)o.push(a),a=this.addYears(a,1);return o},this.dayjs=((e,t)=>t?(...n)=>e(...n).locale(t):e)(uy,e),this.locale=e,this.formats=cy({},Kv,t),uy.extend(Fv)}getDayOfWeek(e){return e.day()+1}}const Jv=e=>Py("MuiDayCalendarSkeleton",e);Ny("MuiDayCalendarSkeleton",["root","week","daySkeleton"]);const Zv=["className"],ew=ts("div",{name:"MuiDayCalendarSkeleton",slot:"Root",overridesResolver:(e,t)=>t.root})({alignSelf:"start"}),tw=ts("div",{name:"MuiDayCalendarSkeleton",slot:"Week",overridesResolver:(e,t)=>t.week})({margin:"2px 0",display:"flex",justifyContent:"center"}),nw=ts($g,{name:"MuiDayCalendarSkeleton",slot:"DaySkeleton",overridesResolver:(e,t)=>t.daySkeleton})({margin:"0 2px",variants:[{props:{day:0},style:{visibility:"hidden"}}]}),rw=[[0,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,0,0,0]];function ow(e){const t=Yd({props:e,name:"MuiDayCalendarSkeleton"}),{className:n}=t,r=dy(t,Zv),o=(e=>{const{classes:t}=e;return Ey({root:["root"],week:["week"],daySkeleton:["daySkeleton"]},Jv,t)})(r);return S.jsx(ew,cy({className:Nt(o.root,n)},r,{children:rw.map((e,t)=>S.jsx(tw,{className:o.week,children:e.map((e,t)=>S.jsx(nw,{variant:"circular",width:ib,height:ib,className:o.daySkeleton,ownerState:{day:e}},t))},t))}))}"production"!==process.env.NODE_ENV&&(ow.propTypes={classes:_t.object,sx:_t.oneOfType([_t.arrayOf(_t.oneOfType([_t.func,_t.object,_t.bool])),_t.func,_t.object])});var aw="FormFieldDate-module_xapp_date_picker_container__d8LYB",iw="FormFieldDate-module_xapp_date_picker__Rvtj1",lw="FormFieldDate-module_xapp_date_picker_past__ECo-S",sw="FormFieldDate-module_xapp_date_picker_available__2Xtlu",uw={blockWeekends:!0,blockCurrentDay:!0,blockNextBusinessDays:2};function cw(e,t){var n=t.split("*").map(dw).join(".*");return new RegExp("^".concat(n,"$")).test(e)}function dw(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fw=function(e){var t=uy().add(2,"month"),r=uy(),o=e.field,a=e.onFieldChange,i=e.errorMessage,l=e.busyDays,s=e.loading,u=function(){return S.jsx(ow,{})},c=v.useState(),d=c[0],f=c[1];b.useEffect(function(){a(o.name,d)},[d,o.name,a]);var p=l?l.split(","):void 0,m=b.useCallback(function(e){var t=e.format("YYYY-MM-DD");if(!p){var n=Object.keys((null==o?void 0:o.defaultBusyDays)||{}).length>0?o.defaultBusyDays||{}:uw;if(n.blockWeekends&&(0===e.day()||6===e.day()))return!0;if(n.blockCurrentDay&&e.isSame(r,"day"))return!0;if(n.blockNextBusinessDays){for(var a=r,i=0;i<n.blockNextBusinessDays;)0!==(a=a.add(1,"day")).day()&&6!==a.day()&&i++;if(e.isBefore(a,"day"))return!0}if(n.currentDayAvailableUntil&&e.isSame(r,"day"))if(uy().format("HH:mm")>n.currentDayAvailableUntil)return!0;if(Array.isArray(n.availableDays)&&n.availableDays.length>0){var l=e.format("dddd");if(!n.availableDays.map(function(e){return e.toLowerCase()}).includes(l.toLowerCase()))return!0}return!1}try{var s=e.format("dddd");if(p.some(function(e){return!(!cw(t,e)&&!cw(s,e))}))return!0}catch(e){e("shouldDisableDate: ".concat(e))}return!1},[r,p,o.defaultBusyDays]);return S.jsxs("div",{style:{display:"flex",flexDirection:"column",alignContent:"center",alignItems:"center"},children:[S.jsx("div",{className:aw,children:S.jsx(my,{dateAdapter:Xv,children:S.jsx(Iv,{className:iw,disableHighlightToday:!1,disablePast:!0,fixedWeekNumber:6,loading:s,maxDate:t,onChange:function(e){f(e)},renderLoading:function(){return S.jsx(u,{})},shouldDisableDate:m,showDaysOutsideCurrentMonth:!0,slots:{day:function(e){var o=e.day,a=e.disabled,i=o.isBefore(r,"day"),l=o.isAfter(t,"day");return i||l?S.jsx(gb,n({},e,{className:lw})):a?S.jsx(gb,n({},e)):S.jsx(gb,n({},e,{className:sw}))}},value:d,views:["day"]})})}),s&&S.jsx(yd,{error:!0,style:{color:"inherit",marginLeft:"98px",marginTop:"14px",marginBottom:"-14px"},children:"Getting latest availability..."}),!s&&i&&S.jsx(yd,{error:!0,style:{marginLeft:"14px",marginTop:"14px",marginBottom:"-14px"},children:i})]})},pw=function(e){var t=e.field,r=e.onFieldChange,o=b.useState({from:"",to:""}),a=o[0],i=o[1],l=function(e){var o=e.target.value;e.target.id.endsWith("-from")?i(n(n({},a),{from:o})):i(n(n({},a),{to:o})),r(t.name,a),i(a)};return S.jsxs("div",{children:[S.jsx("h2",{children:t.title}),S.jsx("input",{id:"".concat(t.name,"-from"),value:a.from,onChange:l}),S.jsx("input",{id:"".concat(t.name,"-to"),value:a.to,onChange:l})]})},mw=ls(S.jsx("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"LocationOn"),hw={exports:{}};!function(e){var t,n;e.exports=(t={705:e=>{e.exports=function(e,t){const n=[];return 0===t.length?n.push({text:e,highlight:!1}):t[0][0]>0&&n.push({text:e.slice(0,t[0][0]),highlight:!1}),t.forEach((r,o)=>{const a=r[0],i=r[1];n.push({text:e.slice(a,i),highlight:!0}),o===t.length-1?i<e.length&&n.push({text:e.slice(i,e.length),highlight:!1}):i<t[o+1][0]&&n.push({text:e.slice(i,t[o+1][0]),highlight:!1})}),n}}},n={},function e(r){var o=n[r];if(void 0!==o)return o.exports;var a=n[r]={exports:{}};return t[r](a,a.exports,e),a.exports}(705))}(hw);var gw=l(hw.exports);function yw(e,t){var n=new URL(e),r=new URLSearchParams(function(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=String(e[n]));return t}(t));return n.search=r.toString(),n.toString()}var bw,vw=function(){function e(e){this.baseUrl=e.baseUrl||"https://places.xapp.ai",this.key=e.apiKey}return e.prototype.getPlacePredictions=function(e,t){var r=e.params?n(n({},e.params),{input:e.input}):{input:e.input};if(e.componentRestrictions){var o=Object.entries(e.componentRestrictions).map(function(e){var t=e[0],n=e[1];return"".concat(t,":").concat(n)}).join(",");r.components=o}e.params||r.components||(r.components="country:us"),this.key&&(r.key=this.key);var a=yw("".concat(this.baseUrl,"/maps/api/place/autocomplete/json"),r);fetch(a).then(function(e){if(!e.ok)throw new Error("getPlacePredictions: HTTP error! Status: ".concat(e.status));return e.json()}).then(function(e){"INVALID_REQUEST"===e.status&&Q("getPlacePredictions: INVALID_REQUEST. Url: ".concat(a)),t(e.predictions)}).catch(function(e){return Q("getPlacePredictions: Fetch error:",e)})},e}(),ww="FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM",kw=function(e){var t=e.field,r=e.onFieldChange,o=e.errorMessage,i=e.required,l=e.googleMapsApiKey,s=e.mapsBaseUrl,u=b.useState(null),c=u[0],d=u[1],f=b.useState(""),p=f[0],m=f[1],h=b.useState([]),g=h[0],y=h[1],v=function(e){y(e)};b.useEffect(function(){r(t.name,p)},[t.name,r,p]);var w=t.googleMapsApiKey||l,k=t.mapsBaseUrl||s,x=b.useMemo(function(){return ss(function(e,t){bw.getPlacePredictions(e,t)},400)},[]);return b.useEffect(function(){var e=!0;if(bw||(bw=new vw({apiKey:w,baseUrl:k})),""!==p){var n=t.mapsUrlQueryParams||void 0;return x({input:p,params:n},function(t){if(e){var n=[];c&&(n=[c]),t&&(n=a(a([],n,!0),t,!0)),v(n)}}),function(){e=!1}}v(c?[c]:[])},[c,p,x,w,k,t.mapsUrlQueryParams]),S.jsx(jm,{id:"google-map-input",getOptionLabel:function(e){return"string"==typeof e?e:e.description},filterOptions:function(e){return e},options:g,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:c,noOptionsText:"No locations",onChange:function(e,t){v(t?a([t],g,!0):g),d(t)},onInputChange:function(e,t){m(t)},renderInput:function(e){return S.jsx(Hg,n({className:ww},e,{variant:"filled",size:"small",margin:"normal",label:t.label,error:!!o,helperText:o,name:t.name,placeholder:t.placeholder,required:i,fullWidth:!0,style:t.style,slotProps:t.maxLength?{htmlInput:n(n({},e.inputProps),{maxLength:t.maxLength})}:void 0}))},renderOption:function(e,t){var r=t.structured_formatting.main_text_matched_substrings||[],o=gw(t.structured_formatting.main_text,r.map(function(e){return[e.offset,e.offset+e.length]}));return S.jsx("li",n({},e,{children:S.jsxs(bh,{container:!0,alignItems:"center",children:[S.jsx(bh,{sx:{display:"flex",width:44},children:S.jsx(mw,{sx:{color:"text.secondary"}})}),S.jsxs(bh,{sx:{width:"calc(100% - 44px)",wordWrap:"break-word"},children:[o.map(function(e,t){return S.jsx(Hm,{component:"span",sx:{fontWeight:e.highlight?"bold":"regular"},children:e.text},t)}),S.jsx(ld,{variant:"body2",color:"text.secondary",children:t.structured_formatting.secondary_text})]})]})}))}})},Sw=function(e){return"string"!=typeof e||0===e.trim().length},xw=function(e){var t=e.replace(/\D/g,"");if(10===t.length||11===t.length&&t.startsWith("1")){return/^(1)?[-. ]?\(?(\d{3})\)?[-. ]?(\d{3})[-. ]?(\d{4})$/.test(t)}return!1},Tw=function(e){return null==e||(Array.isArray(e)?0===e.length:("object"==typeof e&&e.constructor===Object||"object"==typeof e)&&0===Object.keys(e).length)},Ew="FormStepDisplay-module_xapp_step_iframe_wrapper__BBFRw",Cw="FormStepDisplay-module_xapp_formfield__hRmVx",Ow="FormStepDisplay-module_active__fCsMz",_w="FormStepDisplay-module_xapp_formfield_title__INjeF",Pw="FormStepDisplay-module_xapp_final_button_container__Gco-E",Nw="FormStepDisplay-module_xapp_form_nav_buttons__lI4BI",Rw="FormStepDisplay-module_xapp_dummy_button__Q-nE6",Dw="FormStepDisplay-module_xapp_primary_button__d2wra",Mw="FormStepDisplay-module_xapp_secondary_button__LuMfN",jw="FormStepDisplay-module_xapp_disabled_button__RjSfL";function Iw(e){return!!e&&void 0!==e.mandatoryGroup}var Aw=function(e){var t=b.useRef({}),r=b.useRef({}),o=b.useState({}),a=o[0],i=o[1],l=b.useState({}),s=l[0],u=l[1],c=b.useState({}),d=c[0],f=c[1],p=e.formStep,m=e.onNextStep,h=e.onPrevStep,g=e.onData,y=e.onDataWithLabels,v=e.getData,w=e.getDataWithLabels,k=e.loading,x=e.currentStepIndex,T=e.totalSteps,E=e.onTrackNextStep,C=e.currentStepDataRef,O=b.useCallback(function(){var e={};Object.entries(r.current).forEach(function(r){var o=r[0],a=r[1];try{var i=n(n(n({},v()),t.current),{safeIncludes:function(e,t){return Array.isArray(e)?e.includes(t):"string"==typeof e&&e===t}});e[o]=a.call(i)}catch(t){"development"===process.env.NODE_ENV&&console.error('Condition evaluation failed for field "'.concat(o,'":'),t),e[o]=!1}}),function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0,a=n;o<a.length;o++){var i=a[o];if(e[i]!==t[i])return!1}return!0}(e,s)||u(e)},[s,v]);b.useEffect(function(){for(var e={},t=0,n=p.fields;t<n.length;t++){var r=n[t];if(Iw(r)){var o=r.mandatoryGroup;o&&(e[o]||(e[o]=[]),e[o].push(r.name))}}i(e)},[p.fields]),b.useEffect(function(){for(var e=0,n=p.fields;e<n.length;e++){var o=n[e];if("CHIPS"===o.type){var a=o.items.filter(function(e){return ry(e)}).filter(function(e){return e.selected}).map(function(e){return e.id});a.length>0&&(t.current[o.name]=a)}if(o.condition){var i=Mu(o.condition);r.current[o.name]=new Function("return (".concat(i,");"))}}O()},[O,p.fields]);var _=b.useCallback(function(){var e={},r=!0,o={};p.fields.forEach(function(n){var a={valid:!0},i=t.current[n.name];if(!1!==s[n.name]){if(function(e){return!!e&&"DROPDOWN"===e.type}(n))if(!n.mandatory||null!=i&&"none"!==i){if(null!=i&&"none"!==i){var l=n.items.find(function(e){return e.id===i});if(l&&l.freeFormInput){var u=l.freeFormFieldName||"message",c=t.current[u];(!c||"string"==typeof c&&""===c.trim())&&(e[u]={valid:!1,message:"Please specify additional details"},a={valid:!1,message:""})}}}else a={valid:!1,message:n.mandatoryError||"Please select an option"};else if(t.current.hasOwnProperty(n.name))if(function(e){return!!e&&"TEXT"===e.type}(n))if(!0===n.mandatory&&Sw(i))a={valid:!1,message:n.mandatoryError||"This field is mandatory"};else if("EMAIL"!==n.format||Sw(i)){if("PHONE"!==n.format||Sw(i)){if("ZIP_CODE"===n.format&&!Sw(i)&&(a=function(e){if(Sw(e))return{valid:!0};var t=/^\d{5}$/.test(e)||/^\d{5}-\d{4}$/.test(e)||/^[A-Za-z]\d[A-Za-z]\s?\d[A-Za-z]\d$/.test(e);return{valid:t,message:t?void 0:"Invalid zip code or postal code"}}(i),a.valid)){var d=function(e){if(Sw(e))return e;var t=e.trim(),n=t.match(/^([A-Za-z]\d[A-Za-z])(\d[A-Za-z]\d)$/);return n?"".concat(n[1].toUpperCase()," ").concat(n[2].toUpperCase()):/^[A-Za-z]\d[A-Za-z]\s\d[A-Za-z]\d$/.test(t)?t.toUpperCase():e}(i);d!==i&&(o[n.name]=d)}}else if(a=function(e){if(Sw(e))return{valid:!0};var t=xw(e);return{valid:t,message:t?void 0:"Invalid phone number"}}(i),a.valid){var f=function(e){if(Sw(e)||!xw(e))return e;var t=e.replace(/\D/g,"");return 11===t.length&&t.startsWith("1")&&(t=t.slice(1)),t.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3")}(i);f!==i&&(o[n.name]=f)}}else a={valid:p=/^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/.test(String(i).toLowerCase()),message:p?void 0:"Invalid email address"};else!function(e){return!!e&&"CHIPS"===e.type}(n)?function(e){return!!e&&"DATE"===e.type}(n)&&n.mandatory&&null==i?a={valid:!1,message:"Please select a day"}:function(e){return!!e&&"CHECK"===e.type}(n)&&n.mandatory&&1!==(null==i?void 0:i.length)&&(a={valid:!1,message:"This field is mandatory"}):n.minRequired&&i.length<n.minRequired?a={valid:!1,message:"Please select at least ".concat(n.minRequired," option(s)")}:n.maxAllowed&&i.length>n.maxAllowed?a={valid:!1,message:"Please select no more than ".concat(n.maxAllowed," option(s)")}:n.mandatory&&1!==(null==i?void 0:i.length)&&(a={valid:!1,message:"Please select one option"});var p;r=r&&a.valid,e[n.name]=a}else e[n.name]=a});for(var i=function(n){if(!n.some(function(e){return!Tw(t.current[e])})){var o=p.fields.find(function(e){return e.name===n[0]}),a=d[n[0]],i=(null==a?void 0:a.message)||(null==o?void 0:o.mandatoryError)||"At least one of these fields is required";n.forEach(function(t){e[t]={valid:!1,message:i}}),r=!1}},l=0,u=Object.entries(a);l<u.length;l++){i(u[l][1])}return Tw(o)||(t.current=n(n({},t.current),o)),function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0,a=n;o<a.length;o++){var i=a[o];if(!t.hasOwnProperty(i))return!1;var l=e[i],s=t[i];if(l.valid!==s.valid)return!1}return!0}(d,e)||f(e),r},[s,d,p.fields,a]),P=function(){if(_()){if(N(t.current),E&&void 0!==x&&void 0!==T){var e=x===T-1;E(p.name,x,t.current,e)}m&&m("submit"===p.nextAction)}},N=function(e){g(e);for(var t={},n=function(n){var r=e[n],o=p.fields.find(function(e){return e.name===n});if("CHIPS"===(null==o?void 0:o.type)&&void 0!==r){var a=[];r.forEach(function(e){var t=o.items.find(function(t){return t.id===e});t&&a.push(t.label)}),t[n]=function(e){if(0===e.length)return"";if(1===e.length)return e[0];if(2===e.length)return e.join(" and ");var t=e.pop();return e.join(", ")+", and "+t}(a)}else if("DROPDOWN"===(null==o?void 0:o.type)&&void 0!==r){var i=o.items.find(function(e){return e.id===r});i?i.label&&i.label.trim().length>0?t[n]=i.label:t[n]=r.replace(/_/g," ").split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join(" "):t[n]=r}else"DATE"===(null==o?void 0:o.type)&&void 0!==r?t[n]=lc(r):t[n]=r},r=0,o=Object.keys(e);r<o.length;r++){n(o[r])}y(t)},R=function(){for(var e in d)if(!1!==s[e]&&!d[e].valid)return!0;return!1},D=b.useCallback(function(e,r){var o;(!t.current.hasOwnProperty(e)||t.current[e]!==r)&&(Array.isArray(r)&&0===r.length&&(r=void 0),t.current=n(n({},t.current),((o={})[e]=r,o)),C&&(C.current=t.current),O(),Tw(d)||_())},[O,d,_,C]),M=b.useContext(Se),j=ie().context;O();var I;return S.jsxs("div",{children:[!!p&&p.title&&S.jsx("div",{className:_w,children:S.jsx("p",{children:p.title})}),!!p&&p.warnBeforeUnloadMessage&&S.jsxs("div",{style:{backgroundColor:"#fff3cd",color:"#856404",padding:"12px 16px",marginBottom:"16px",borderRadius:"4px",border:"1px solid #ffeaa7",display:"flex",alignItems:"center",gap:"8px"},children:[S.jsx("span",{style:{fontSize:"20px"},children:"⚠️"}),S.jsx("span",{children:p.warnBeforeUnloadMessage})]}),(I=p,!!I&&void 0!==I.iframe&&S.jsx("div",{className:Ew,children:S.jsx("iframe",{src:p.iframe.src,title:p.title,width:p.iframe.width||"100%",height:p.iframe.height||"100%",frameBorder:"0",allowFullScreen:!0})})),S.jsx("div",{children:function(){if(!p)return[];var e=(p.fields||[]).map(function(e,n){var r,o,a,i,l,u,c,f;switch(e.type){case"TEXT":f="ADDRESS"===e.format?S.jsx(kw,{field:e,onFieldChange:D,value:t.current[e.name],errorMessage:null===(r=d[e.name])||void 0===r?void 0:r.message,required:e.mandatory,googleMapsApiKey:M.googleMapsApiKey,mapsBaseUrl:M.mapsBaseUrl},e.name):S.jsx(iy,{field:e,onFieldChange:D,value:t.current[e.name],errorMessage:null===(o=d[e.name])||void 0===o?void 0:o.message,required:e.mandatory},e.name);break;case"DROPDOWN":var p=e,m=t.current[p.name],h=void 0;if(m&&"none"!==m){var g=p.items.find(function(e){return e.id===m});if(g&&g.freeFormInput){var y=g.freeFormFieldName||"message";h=null===(a=d[y])||void 0===a?void 0:a.message}}f=S.jsx(ly,{field:p,onFieldChange:D,errorMessage:null===(i=d[e.name])||void 0===i?void 0:i.message,required:e.mandatory,freeFormErrorMessage:h},e.name);break;case"CHECK":f=S.jsx(kd,{field:e,onFieldChange:D,errorMessage:null===(l=d[e.name])||void 0===l?void 0:l.message},e.name);break;case"CHIPS":f=S.jsx(oy,{field:e,onFieldChange:D,errorMessage:null===(u=d[e.name])||void 0===u?void 0:u.message},e.name);break;case"DATE":var b=null==j?void 0:j.busyDays;f=S.jsx(fw,{field:e,onFieldChange:D,errorMessage:null===(c=d[e.name])||void 0===c?void 0:c.message,busyDays:b,loading:k},e.name);break;case"DATERANGE":f=S.jsx(pw,{field:e,onFieldChange:D},e.name);break;case"CARD":f=S.jsx(Qg,{field:ic(e,w()),onFieldChange:D},e.name);break;default:f=null}return S.jsx("div",{className:"".concat(Cw," ").concat(!1!==s[e.name]?Ow:""),children:f},n)});return e}()}),!!m&&"omit"!==p.nextAction&&p.final&&S.jsx("div",{className:Pw,children:S.jsx(Du,{className:R()?jw:p.nextLabel?Mw:Dw,onClick:P,variant:"contained",children:p.nextLabel||"Next"})}),S.jsxs("div",{className:Nw,children:[void 0===h&&S.jsx("div",{className:Rw}),!!h&&"omit"!==p.previousAction&&S.jsx(Du,{className:Dw,onClick:function(){N(t.current),h&&h()},variant:"contained",children:p.previousLabel||"Previous"}),!!m&&"omit"!==p.nextAction&&!p.final&&S.jsx(Du,{className:R()?jw:p.nextLabel?Mw:Dw,onClick:P,variant:"contained",children:p.nextLabel||"Next"})]})]})},zw="SimpleNavigationHeader-module_xapp_navigation_header__YhCD1",Lw="SimpleNavigationHeader-module_xapp_navigation_header_showcase__NhRLn",Fw="SimpleNavigationHeader-module_xapp_navigation_header_container__V9y-e",$w=function(e){var t=e.items,n=e.onHeaderClick,r=e.labelHeader,o=e.stepName,a=e.isShowCase;if(r){var i=t.find(function(e){return e.step===o}),l=null==i?void 0:i.label;return void 0!==l?S.jsx(Hm,{display:"flex",justifyContent:"center",gap:2,padding:2,"min-height":100,className:a?Lw:Fw,children:S.jsx(ld,{variant:"h4",color:"white",margin:0,children:l})}):S.jsx(Hm,{display:"flex",justifyContent:"center",gap:2,padding:2,"min-height":100,className:a?Lw:Fw,children:S.jsx("div",{className:"empty_step_header"})})}return S.jsx(Hm,{display:"flex",justifyContent:"center",gap:2,padding:2,"min-height":100,className:zw,children:S.jsx(Hm,{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",minHeight:"50px",sx:{"&::before":{content:'""',position:"absolute",top:"50%",left:0,right:0,height:"3px",backgroundColor:"white",zIndex:1}},children:t.map(function(e,t){return S.jsxs(Hm,{position:"relative",zIndex:2,display:"flex",flexDirection:"column",alignItems:"center",top:"10px",minWidth:100,children:[S.jsx(Du,{variant:"contained",color:"primary",size:"small",style:{borderRadius:"50%",minWidth:"auto",width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"3px solid white"},className:zw,onClick:function(){n("".concat(e.step))}}),S.jsx(ld,{variant:"body2",color:"white",margin:1,marginTop:1,children:e.label})]},t)})})})};
|
|
133
133
|
/*! Copyright (c) 2025, XAPP AI */
|
|
134
|
-
function Vw(e,t){var n=e.slice(0,5);return!!t.find(function(e){if(e===n)return!0;if(e.includes("*")){var t=e.replace(/\*/g,"\\d")+"$";return new RegExp("^".concat(t)).test(n)}return!1})}function Bw(e){if(e){var t=e.match(/\b\d{5}(?:-\d{4})?\b/g);if(t)for(var n=t.length-1;n>=0;n--){var r=t[n],o=e.indexOf(r),a=e.slice(0,o);if(/(,|\b[A-Z]{2})\s*$/.test(a.trim()))return r;if(o>15)return r}}}var Uw="FormDisplay-module_xapp_formstep__OW1rY",Hw="FormDisplay-module_active__5wTV3",Ww="FormDisplay-module_xapp_header_container__Y-eFl",qw="FormDisplay-module_xapp_header_container_showcase__MWJfr",Yw=function(e){var t,r=e.form,o=e.onActionResponse,a=e.isShowCase,i=e.loading,l=e.onTrackNextStep,s=e.onTrackPreviousStep,u=e.onTrackSubmit,c=e.currentStepDataRef,d=b.useState(0),f=d[0],p=d[1],m=b.useRef({});b.useEffect(function(){if(Array.isArray(r.steps)&&r.steps.length>0)for(var e=function(e){if(e.condition){var t=Mu(e.condition,"context",["isInServiceArea"]);m.current[e.name]=function(e){return new Function("context","isInServiceArea","return (".concat(t,");"))(e,Vw)}}},t=0,n=r.steps;t<n.length;t++){e(n[t])}},[null==r?void 0:r.steps]),b.useEffect(function(){var e;(f<0||f>=(null===(e=null==r?void 0:r.steps)||void 0===e?void 0:e.length))&&p(0)},[null==r?void 0:r.steps,f]);var h=b.useMemo(function(){var e,t,n=null===(e=r.steps)||void 0===e?void 0:e[f];return null!==(t=null==n?void 0:n.warnBeforeUnload)&&void 0!==t&&t},[f,r.steps]);b.useEffect(function(){if(h){var e=function(e){return e.preventDefault(),e.returnValue="",""};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}},[h]);var g=b.useRef({}),y=b.useRef({}),v=function(e){for(var t=f+1;t<r.steps.length;t++){var o=r.steps[t],a=m.current[o.name],i=g.current.zip_code||g.current.zip||Bw(g.current.address),l=n(n({},g.current),{zip:i});if(!a){p(t);break}if(a(l)){p(t);break}}e&&C(f)},w=function(){for(var e,t,o=f,a=(null===(t=null===(e=r.steps)||void 0===e?void 0:e[o])||void 0===t?void 0:t.name)||"unknown",i=f-1;i>=0;i--){var l=r.steps[i],u=m.current[l.name],c=g.current.zip_code||g.current.zip||Bw(g.current.address),d=n(n({},g.current),{zip:c});if(!u){s&&s(a,o,l.name,i),p(i);break}if(u(d)){s&&s(a,o,l.name,i),p(i);break}}},k=function(e){g.current=n(n({},g.current),e)},x=function(){return g.current},T=function(e){y.current=n(n({},y.current),e)},E=function(){return y.current},C=function(e){var t=null!=e?e:f,n=t>=0&&t<r.steps.length?t:0;u&&u(r.steps[n].name,n,g.current,r.steps.length);var a={result:g.current,form:r.name,step:r.steps[n].name,final:!!r.steps[n].final};"function"==typeof o&&o(a,"FORM_SUBMIT")},O=f;return(f<0||f>=(null===(t=null==r?void 0:r.steps)||void 0===t?void 0:t.length))&&(O=0),S.jsxs("div",{children:[r.header.length>0&&S.jsx("div",{className:a?qw:Ww,children:S.jsx($w,{items:r.header,onHeaderClick:function(e){var t=r.steps.findIndex(function(t){return t.name===e});-1!==t?p(t):Q("Header click: Cannot find step to jump to: ".concat(e))},labelHeader:r.labelHeader,stepName:r.steps[O].name,isShowCase:a})}),S.jsx("div",{children:r.steps.map(function(e,t){return S.jsx("div",{className:"".concat(Uw," ").concat(r.steps[O].name===e.name?Hw:""),children:S.jsx(Aw,{formStep:e,onData:k,onDataWithLabels:T,onNextStep:O<r.steps.length?v:void 0,onPrevStep:O>0?w:void 0,getData:x,getDataWithLabels:E,loading:i,currentStepIndex:t,totalSteps:r.steps.length,onTrackNextStep:l,currentStepDataRef:c})},t)})})]})},Kw=function(e){var t=e.display,n=e.onActionResponse,r=e.loading,o=e.onTrackNextStep,a=e.onTrackPreviousStep,i=e.onTrackSubmit,l=e.currentStepDataRef;return S.jsxs("div",{className:"xapp-search-response-display",children:[Z(t)&&S.jsx(Yw,{form:t,loading:r,onActionResponse:n,onTrackNextStep:o,onTrackPreviousStep:a,onTrackSubmit:i,currentStepDataRef:l}),J(t)&&S.jsx(ot,{list:t}),X(t)&&S.jsx(tt,{carousel:t})]})},Gw=function(e){var t=e.html;return S.jsx("div",{className:"xapp-search-response-html",dangerouslySetInnerHTML:{__html:t}})},Qw=function(e){var t=e.text;return S.jsx("div",{className:"xapp-search-response-text",children:S.jsx("p",{children:t})})},Xw=function(e){var t=e.audio,n=e.onAudioChange,r=b.useRef(null);return b.useEffect(function(){var e=r.current,t=function(){G("Audio finished playing"),n(!1)},o=function(){G("Audio started playing"),n(!0)};return e&&(e.addEventListener("ended",t),e.addEventListener("play",o)),function(){e&&(e.removeEventListener("ended",t),e.removeEventListener("play",o))}},[t,n]),S.jsx("audio",{ref:r,autoPlay:!0,src:t})},Jw="SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F";var Zw=function(e){var t,n=e.outputSpeech,r=e.onAudioChange,o="string"==typeof n?n:null==n?void 0:n.displayText,a="string"==typeof n||null==n?void 0:n.html,i="string"==typeof n||null==n?void 0:n.ssml;if(b.useContext(Se).isVoiceEnabled){var l=i?function(e){for(var t,n=/<audio\s+src\s*=\s*"(.+?)"\s*\/?>/g,r=[];null!==(t=n.exec(e));)r.push(t[1]);return r}(i):[];t=l.length>0?l[0]:void 0}return S.jsxs("div",{className:Jw,children:[!!a&&S.jsx(Gw,{html:a}),!!o&&!a&&S.jsx(Qw,{text:o}),!!t&&S.jsx(Xw,{audio:t,onAudioChange:r})]})},ek={};Object.defineProperty(ek,"__esModule",{value:!0});var tk=ek.isLinkoutSuggestion=function(e){if(!e)return!1;return void 0!==e.url};var nk,rk="Button-module_xapp_search_btn__cQf3T",ok="Button-module_xapp_search_btn__expand__dUwot",ak=function(e){var t=e.className,n=e.expand,r=e.onClick;return S.jsx("button",{type:"button",className:"".concat(rk," ").concat(n?ok:""," ").concat(t||""),onClick:r,children:e.children})},ik="SuggestedAction-module_xapp_search_suggested_action__gbLCz",lk=function(e){var t=e.action,n=e.className,r=e.onClick,o=b.useCallback(function(){r(t)},[t,r]);return tk(t)?S.jsx("span",{className:"".concat(ik," ").concat(n||""),children:S.jsx("a",{href:t.url,children:ke(t)})}):S.jsxs(ak,{className:"".concat(ik," ").concat(n||""),onClick:o,children:[" ",ke(t)]})},sk={xapp_search_suggested_actions__actions:"SuggestedActions-module_xapp_search_suggested_actions__actions__Apv0-",xapp_search_suggested_actions__item:"SuggestedActions-module_xapp_search_suggested_actions__item__Q7nQb"},uk=function(e){var t=e.actions,n=e.onActionClick;return S.jsx("div",{className:sk.xapp_search_suggested_actions,children:S.jsx("div",{className:sk.xapp_search_suggested_actions__actions,children:t.map(function(e,t){return S.jsx(lk,{action:e,className:sk.xapp_search_suggested_actions__item,onClick:n},t)})})})},ck="SearchResponsePart-module_xapp_search_response_part__sF6gs",dk=function(e){var t=e.extraClass;return S.jsx("div",{className:"".concat(ck," ").concat(t||""),children:e.children})},fk="FormResponse-module_xapp_search_response__r2YN1",pk=function(e){var t=e.response,n=e.className,r=e.onActionClick,o=e.onActionResponse,a=e.onAudioChange,i=e.loading,l=e.onTrackNextStep,s=e.onTrackPreviousStep,u=e.onTrackSubmit,c=e.currentStepDataRef,d=t.outputSpeech,f=t.displays,p="object"==typeof d?d.suggestions:void 0;return S.jsxs("div",{className:"".concat(fk," ").concat(n||""),children:[!!d&&S.jsx(dk,{children:S.jsx(_e,{children:S.jsx(Zw,{outputSpeech:d,onAudioChange:a})})}),!!(null==p?void 0:p.length)&&(null==p?void 0:p.length)>0&&S.jsx(uk,{actions:p,onActionClick:r}),!!(null==f?void 0:f.length)&&(null==f?void 0:f.length)>0&&f.map(function(e,t){var n=Z(e)&&(!e.header||0===e.header.length);return S.jsx(dk,{extraClass:n?"noHeaderForm":"",children:S.jsx(Kw,{display:e,onActionResponse:o,loading:i,onTrackNextStep:l,onTrackPreviousStep:s,onTrackSubmit:u,currentStepDataRef:c})},t)})]})},mk=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","gclid","fbclid","msclkid"],hk=function(){function e(e,t,n){this.api=e,this.sessionId=t,this.formId=n}return e.prototype.trackFormOpen=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"form_open",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] form_open event tracked: ".concat(e.formName)),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track form_open event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackNextStep=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"next_step",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] next_step event tracked: ".concat(e.completedStepName)),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track next_step event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPreviousStep=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"previous_step",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] previous_step event tracked: ".concat(e.fromStepName," -> ").concat(e.toStepName)),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track previous_step event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackStepChange=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"step_change",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] step_change event tracked: ".concat(e.fromStepName," -> ").concat(e.toStepName," (").concat(e.direction,")")),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track step_change event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackSubmit=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"submit",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] submit event tracked: ".concat(e.finalStepName)),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track submit event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackClose=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"close",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] close event tracked: ".concat(e.lastStepName)),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track close event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPartialData=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"partial_data",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] partial_data event tracked: ".concat(e.lastStepName," (").concat(e.abandonmentReason,")")),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track partial_data event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPartialDataBeacon=function(e){try{var t={eventType:"partial_data",metadata:this.buildMetadata(),data:e};return this.api.trackEventBeacon(t)}catch(e){return Q("[EventTracking] Failed to queue partial_data beacon: ".concat(e)),!1}},e.prototype.buildMetadata=function(){var e={timestamp:(new Date).toISOString(),sessionId:this.sessionId||"unknown",formId:this.formId||"unknown",userAgent:navigator.userAgent},t=this.getUserId();t&&"unknown"!==t&&(e.userId=t);try{var n=new URL(window.location.href);(null==n?void 0:n.host.toLowerCase().startsWith("localhost"))||(e.currentUrl=window.location.href)}catch(e){}var r=this.getTrackingParameters();return Object.assign(e,r),e},e.prototype.getUserId=function(){return localStorage.getItem("__xapp_form_user_id")||void 0},e.prototype.getTrackingParameters=function(){var e={},t=Date.now();mk.forEach(function(n){var r=localStorage.getItem("xa_tracking_".concat(n));if(r)try{var o=JSON.parse(r);o.expires>t&&(e[n]=o.value)}catch(e){}});for(var n=0;n<localStorage.length;n++){var r=localStorage.key(n);if(r&&r.startsWith("xa_tracking_track_"))try{var o=JSON.parse(localStorage.getItem(r)||"{}");if(o.expires>t){var a=r.replace("xa_tracking_","");e[a]=o.value}}catch(e){}}return e},e.prototype.sendEvent=function(e){return r(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.api.trackEvent(e.eventType,e)];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),Q("[EventTracking] API call failed: ".concat(t)),[3,3];case 3:return[2]}})})},e}(),gk="FormWidget-module_loading__aAJ-B",yk="FormWidget-module_xapp_form_widget__V-G-H",bk="FormWidget-module_xapp_form_widget__content__a9NXC",vk="FormWidget-module_xapp_form_widget__response__X8Hbz",wk="FormWidget-module_xapp_form_widget__spinner__FBxso",kk="FormWidget-module_xapp_form_widget__close__0lp0O",Sk=function(e){var t=e.config;return S.jsx(Se.Provider,{value:t,children:S.jsx(xk,{docked:e.docked,preselectChipLabel:e.preselectChipLabel,onPreselectChipUsed:e.onPreselectChipUsed})})},xk=function(e){var t=e.docked,r=e.preselectChipLabel,o=e.onPreselectChipUsed,a=ae(),i=a[0],l=a[1],s=xe(),u=s.loading,c=s.run,d=i.query,f=i.sendRequest,p=i.active,m=b.useState(e.response),h=m[0],g=m[1],y=b.useState(!1),v=y[0],w=y[1],k=b.useState(0),x=k[0],T=k[1],E=b.useContext(Se),C=b.useMemo(function(){return we.getApi({key:E.api.key,url:E.api.url})},[E]),O=b.useRef(null),_=b.useRef({}),P=b.useRef({}),N=b.useRef(0),R=b.useRef(!1),D=b.useRef(null),M=b.useRef(!1),j=b.useCallback(function(){g(void 0),l({type:"new-search"}),l({type:"set-modal-state",active:!1,minimized:!0,sendRequest:!1})},[l]),I=b.useCallback(function(){var e,t,r,o,a;if(O.current&&!R.current&&!M.current){var i=D.current;if(i){var s=(null===(e=i.steps)||void 0===e?void 0:e.length)||1,u=N.current,c=n(n({},_.current),P.current),d=Object.keys(c).length>0;O.current.trackClose({lastStepName:(null===(r=null===(t=i.steps)||void 0===t?void 0:t[u])||void 0===r?void 0:r.name)||"unknown",lastStepIndex:u,totalStepsCompleted:u,totalSteps:s,formData:d?c:void 0}),O.current.trackPartialData({lastStepName:(null===(a=null===(o=i.steps)||void 0===o?void 0:o[u])||void 0===a?void 0:a.name)||"unknown",lastStepIndex:u,totalStepsCompleted:u,totalSteps:s,partialData:d?c:void 0,abandonmentReason:"widget_close"}),M.current=!0}}g(void 0),l({type:"new-search"}),l({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),C.channelActionRequest({data:{result:{},step:"",form:""}},"FORM_CLOSE").then(function(e){G("ACTION Request (FORM_CLOSE). Data: Response: ".concat(JSON.stringify(e))),T(0)})},[C,l]);b.useEffect(function(){var e=Y(window.location.href,{persistToLocalStorage:!0,persistenceDays:30,preferUrlParameters:!0});"development"===process.env.NODE_ENV&&Object.keys(e).length>0&&G("[FormWidget] Captured tracking parameters:",e)},[]),b.useEffect(function(){var e=function(){var e,t,r,o=n(n({},_.current),P.current);if(O.current&&!R.current&&!M.current){var a=D.current;if(a){var i=(null===(e=a.steps)||void 0===e?void 0:e.length)||1,l=N.current;O.current.trackPartialDataBeacon({lastStepName:(null===(r=null===(t=a.steps)||void 0===t?void 0:t[l])||void 0===r?void 0:r.name)||"unknown",lastStepIndex:l,partialData:o,totalStepsCompleted:l,totalSteps:i,completionPercentage:Math.round(l/i*100),abandonmentReason:"close_tab"}),M.current=!0}}};return window.addEventListener("beforeunload",e),function(){return window.removeEventListener("beforeunload",e)}},[]),b.useEffect(function(){var e=null,t=function(){var e,t,r,o=n(n({},_.current),P.current);if(O.current&&!R.current&&!M.current){var a=D.current;if(a){var i=(null===(e=a.steps)||void 0===e?void 0:e.length)||1,l=N.current;O.current.trackPartialDataBeacon({lastStepName:(null===(r=null===(t=a.steps)||void 0===t?void 0:t[l])||void 0===r?void 0:r.name)||"unknown",lastStepIndex:l,partialData:o,totalStepsCompleted:l,totalSteps:i,completionPercentage:Math.round(l/i*100),abandonmentReason:"timeout"}),M.current=!0}}},r=function(){if(document.hidden){var n=(r=new Date,(o=new Date(r)).setHours(24,0,0,0),o.getTime()-r.getTime());e=setTimeout(t,n)}else e&&(clearTimeout(e),e=null);var r,o};return document.addEventListener("visibilitychange",r),function(){document.removeEventListener("visibilitychange",r),e&&clearTimeout(e)}},[]);var A=b.useCallback(function(e){l({query:e.query,intentId:e.intentId,type:"set-query"}),c(function(){return C.intentRequest(e).then(function(t){var n,r,o,a,i;g(t),l({type:"set-response",response:t,query:e.query,intentId:e.intentId});var s=null===(n=null==t?void 0:t.displays)||void 0===n?void 0:n.find(function(e){var t=e;return"FORM"===(null==t?void 0:t.type)});if(s){D.current=s;var u=(null===(r=C.session)||void 0===r?void 0:r.sessionId)||"unknown",c=s.name||"unknown";O.current=new hk(C,u,c);var d=(null===(o=s.steps)||void 0===o?void 0:o.length)||1,f=null===(i=null===(a=s.steps)||void 0===a?void 0:a[0])||void 0===i?void 0:i.name;O.current.trackFormOpen({formName:c,totalSteps:d,firstStepName:f})}})})},[C,l,c]),z=b.useCallback(function(e,t){c(function(){return C.channelActionRequest(e,t).then(function(n){var r;if(G("ACTION Request (".concat(t,"). Data: ").concat(JSON.stringify(e)," Response: ").concat(JSON.stringify(n))),(n.outputSpeech||n.displays)&&l({type:"set-response",response:n,query:""}),(null===(r=n.context)||void 0===r?void 0:r.active)&&n.context.active.length>0){var o=n.context.active[0].parameters||{};l({type:"set-context",context:o})}e.autoClose?T(1):e.autoMinimize?T(2):T(0)})})},[C,l,c]);b.useEffect(function(){(t||f&&p&&(E.autoGreeting||E.intentId))&&(C.resetSession(),A({query:E.autoGreeting,intentId:E.intentId}),l({type:"set-modal-state",active:!0,minimized:!1,sendRequest:!1}))},[t,f,p,A,l,E.autoGreeting,C,E.intentId]),b.useEffect(function(){v||(1===x?(g(void 0),l({type:"new-search"}),l({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),T(0)):2===x&&(g(void 0),l({type:"new-search"}),l({type:"set-modal-state",active:!1,minimized:!0,sendRequest:!1}),T(0)))},[v,l,x]);var L=b.useCallback(function(e){var t=ke(e);A({query:t})},[A]);b.useEffect(function(){if(r&&h){var e=h.outputSpeech,t="object"==typeof e&&null!==e?e.suggestions:void 0;if(t&&0!==t.length){var n=t.find(function(e){return ke(e).toLowerCase()===r.toLowerCase()});n&&(G("Auto-selecting chip: ".concat(ke(n))),setTimeout(function(){L(n)},100)),o&&o()}}},[h,r,L,o]);var F=b.useCallback(function(e,t){t||(t=e.action),e.timezoneOffset=(new Date).getTimezoneOffset(),z(e,t)},[z]),$=function(e){w(e)},V=b.useCallback(function(e,t,r,o){var a,i;if(_.current=n(n({},_.current),r),P.current={},N.current=t+1,O.current){var l=D.current,s=null===(i=null===(a=null==l?void 0:l.steps)||void 0===a?void 0:a[t+1])||void 0===i?void 0:i.name;O.current.trackNextStep({completedStepName:e,completedStepIndex:t,nextStepName:s,stepData:r,isLastStep:o}),s&&O.current.trackStepChange({fromStepName:e,fromStepIndex:t,toStepName:s,toStepIndex:t+1,direction:"forward"})}},[]),B=b.useCallback(function(e,t,n,r){P.current={},N.current=r,O.current&&(O.current.trackPreviousStep({fromStepName:e,fromStepIndex:t,toStepName:n,toStepIndex:r}),O.current.trackStepChange({fromStepName:e,fromStepIndex:t,toStepName:n,toStepIndex:r,direction:"backward"}))},[]),U=b.useCallback(function(e,t,n,r){_.current=n,R.current=!0,O.current&&O.current.trackSubmit({finalStepName:e,finalStepIndex:t,completedData:n,totalSteps:r})},[]),H=!!d||!!h;return t?S.jsx("div",{className:"".concat(yk," ").concat(u?gk:""),children:S.jsx("div",{className:"".concat(bk," ").concat(u?gk:""),children:h?S.jsx(pk,{response:h,className:vk,onActionClick:L,onActionResponse:F,onAudioChange:$,loading:u,onTrackNextStep:V,onTrackPreviousStep:B,onTrackSubmit:U,currentStepDataRef:P}):S.jsx("div",{className:wk,children:S.jsx(Ce,{})})})}):S.jsxs("div",{className:"".concat(yk," ").concat(u&&!h?gk:""),children:[H&&S.jsxs("div",{className:"".concat(bk," ").concat(u&&!h?gk:""),children:[!h&&u&&S.jsx("div",{className:wk,children:S.jsx(Ce,{})}),h&&S.jsx(pk,{response:h,className:vk,onActionClick:L,onActionResponse:F,onAudioChange:$,loading:u,onTrackNextStep:V,onTrackPreviousStep:B,onTrackSubmit:U,currentStepDataRef:P})]}),h&&!!j&&S.jsx("div",{className:kk,onClick:I,children:"✕"})]})},Tk=function(e){var t,n=e.theme;v.useEffect(function(){var e,t=null===(e=null==n?void 0:n.font)||void 0===e?void 0:e.link;return t&&function(e){try{var t=new URL(e);if("https:"!==t.protocol)return void console.warn("Only HTTPS font URLs are allowed:",e);["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com"].includes(t.hostname)||console.warn("Font URL from untrusted domain:",t.hostname),"fonts.googleapis.com"!==t.hostname||t.searchParams.has("display")||(t.searchParams.set("display","swap"),e=t.toString())}catch(t){return void console.error("Invalid font URL:",e,t)}var n="xapp-form-widget-font",r=document.getElementById(n);r&&r.remove();var o=document.createElement("link");o.id=n,o.rel="stylesheet",o.href=e,o.crossOrigin="anonymous",document.head.appendChild(o)}(t),function(){if(t){var e=document.getElementById("xapp-form-widget-font");e&&e.getAttribute("href")===t&&e.remove()}}},[null===(t=null==n?void 0:n.font)||void 0===t?void 0:t.link]);var r=function(e){var t=e||{};return"\n:root {\n ".concat(function(e){var t=e.next(),n="";for(;!1===t.done;){var r=t.value,o=r[0],a=r[1];null!=a&&""!==a&&(n+="".concat(o,": ").concat(a,";\n\r")),t=e.next()}return n}(Ek("\t--xapp-form-widget-",Ck(Ok("background-color",null==t?void 0:t.backgroundColor),Ok("header-background-color",null==t?void 0:t.headerBackgroundColor),Ok("header-text-color",null==t?void 0:t.headerTextColor),Ok("primary-button-color",null==t?void 0:t.primaryButtonColor),Ok("primary-button-text-color",null==t?void 0:t.primaryButtonTextColor),Ok("secondary-button-color",null==t?void 0:t.secondaryButtonColor),Ok("secondary-button-text-color",null==t?void 0:t.secondaryButtonTextColor),Ek("font-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["family",e.fontFamily]]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})}(null==t?void 0:t.font))),Ek("text-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,6];case 1:return t.sent(),[4,["background-color-dark",_k(e.backgroundColor,3)]];case 2:return t.sent(),[4,["color",e.color]];case 3:return t.sent(),[4,["font-size",e.fontSize]];case 4:return t.sent(),[4,["font-family",e.fontFamily]];case 5:t.sent(),t.label=6;case 6:return[2]}})}(null==t?void 0:t.text))),Ek("dropdown-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return t.sent(),[4,["color",e.color]];case 2:return t.sent(),[4,["font-size",e.fontSize]];case 3:return t.sent(),[4,["font-family",e.fontFamily]];case 4:t.sent(),t.label=5;case 5:return[2]}})}(null==t?void 0:t.dropdown))),Ek("checkbox-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return t.sent(),[4,["color",e.color]];case 2:return t.sent(),[4,["font-size",e.fontSize]];case 3:return t.sent(),[4,["font-family",e.fontFamily]];case 4:t.sent(),t.label=5;case 5:return[2]}})}(null==t?void 0:t.checkbox))),Ek("chips-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,8];case 1:return t.sent(),[4,["background-color-selected",e.backgroundColorSelected]];case 2:return t.sent(),[4,["background-color-dark",_k(e.backgroundColor,20)]];case 3:return t.sent(),[4,["color",e.color]];case 4:return t.sent(),[4,["color-selected",e.colorSelected]];case 5:return t.sent(),[4,["font-size",e.fontSize]];case 6:return t.sent(),[4,["font-family",e.fontFamily]];case 7:t.sent(),t.label=8;case 8:return[2]}})}(null==t?void 0:t.chips))),Ek("date-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,6];case 1:return t.sent(),[4,["background-color-selected",e.backgroundColorSelected]];case 2:return t.sent(),[4,["color",e.color]];case 3:return t.sent(),[4,["font-size",e.fontSize]];case 4:return t.sent(),[4,["font-family",e.fontFamily]];case 5:t.sent(),t.label=6;case 6:return[2]}})}(null==t?void 0:t.date))),Ek("card-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return t.sent(),[4,["color",e.color]];case 2:return t.sent(),[4,["font-size",e.fontSize]];case 3:return t.sent(),[4,["font-family",e.fontFamily]];case 4:t.sent(),t.label=5;case 5:return[2]}})}(null==t?void 0:t.card))),Ek("side-button-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,8];case 1:return t.sent(),[4,["background-color-dark",_k(e.backgroundColor,10)]];case 2:return t.sent(),[4,["color",e.color]];case 3:return t.sent(),[4,["font-size",e.fontSize]];case 4:return t.sent(),[4,["font-family",e.fontFamily]];case 5:return t.sent(),[4,["top",e.top]];case 6:return t.sent(),[4,["min-length",e.minLength]];case 7:t.sent(),t.label=8;case 8:return[2]}})}(null==t?void 0:t.sideButton)))))),"\n}\n\n")}(n);return S.jsx("style",{children:r})};function Ek(e,t){var n;return o(this,function(r){switch(r.label){case 0:n=t.next(),r.label=1;case 1:return n.done?[3,3]:[4,["".concat(e).concat(n.value[0]),n.value[1]]];case 2:return r.sent(),n=t.next(),[3,1];case 3:return[2]}})}function Ck(){var e,t,n,r,a,i=[];for(e=0;e<arguments.length;e++)i[e]=arguments[e];return o(this,function(e){switch(e.label){case 0:t=0,n=i,e.label=1;case 1:if(!(t<n.length))return[3,5];r=n[t],a=r.next(),e.label=2;case 2:return!1!==a.done?[3,4]:[4,a.value];case 3:return e.sent(),a=r.next(),[3,2];case 4:return t++,[3,1];case 5:return[2]}})}function Ok(e,t){return o(this,function(n){switch(n.label){case 0:return[4,[e,t]];case 1:return n.sent(),[2]}})}function _k(e,t){var n,r,o,a,i,l;if(!e)return e;try{if(e.startsWith("#")){var s=e.match(/\w\w/g);s&&(r=(n=s.map(function(e){return parseInt(e,16)}))[0],o=n[1],a=n[2])}else if(e.startsWith("rgb")){var u=function(e){var t,n=/^rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)$/,r=/^rgb?\((\d+),\s*(\d+),\s*(\d+)\)$/;return(t=e.match(n))?{r:parseInt(t[1]),g:parseInt(t[2]),b:parseInt(t[3]),a:parseFloat(t[4])}:(t=e.match(r))?{r:parseInt(t[1]),g:parseInt(t[2]),b:parseInt(t[3])}:null}(e);u&&(r=u.r,o=u.g,a=u.b,i=u.a)}if(void 0===r||void 0===o||void 0===a)return Q("Darken: Unsupported color format: ".concat(e)),e;if(void 0!==i){if(0===r&&0===o&&0===a)i+=t/100;else{var c=.3*r+.59*o+.11*a,d=c*(1-t/100)/c;r=Math.round(r*d),o=Math.round(o*d),a=Math.round(a*d)}l="rgba(".concat(r,", ").concat(o,", ").concat(a,", ").concat(i,")")}else r=Math.max(0,r-t),o=Math.max(0,o-t),a=Math.max(0,a-t),l="#".concat(r.toString(16).padStart(2,"0")).concat(o.toString(16).padStart(2,"0")).concat(a.toString(16).padStart(2,"0"))}catch(t){Q("Darken: Unsupported color format: ".concat(e," - Error: ").concat(t))}return l}!function(e){e.XAPP_FORM_BUTTON="xapp-form-button"}(nk||(nk={}));var Pk="SideButton-module_xapp_form_sticky_button__YqORL",Nk="SideButton-module_left__GT6z8",Rk="SideButton-module_right__Hy2FU",Dk=function(e){var t=e.onClick,n=e.position,r=e.label,o="right"===(null==n?void 0:n.toLowerCase())?Rk:Nk;return S.jsx("div",{onClick:t,className:"".concat(Pk," ").concat(o),"data-xapp-form-side-button":"true",children:S.jsx("span",{children:r||"Schedule Now"})})},Mk="xafw-auto-open-dismissed";function jk(e){if(!("number"!=typeof e||e<0))return Math.min(e,3e5)}function Ik(e){var t,n=e.config,r=e.isActive,o=e.onOpen,a=e.hasInteracted,i=b.useRef(new Set),l=b.useRef(!1),s=b.useRef(null),u=(null==n?void 0:n.sessionKey)||Mk,c=(null==n?void 0:n.mode)||"any",d=null==n?void 0:n.triggers,f=jk(null==d?void 0:d.delay),p=function(e){if("number"==typeof e)return Math.max(0,Math.min(e,100))}(null==d?void 0:d.scrollPercent),m=null==d?void 0:d.exitIntent,h="number"!=typeof(t=null==d?void 0:d.exitIntentThreshold)||t<0?50:t,g=jk(null==d?void 0:d.inactivity),y=null==n?void 0:n.patterns,v=null==n?void 0:n.minimumWidth,w=b.useMemo(function(){return JSON.stringify(null!=y?y:[])},[y]),k=b.useRef([]),S=b.useCallback(function(){var e=[];return void 0!==(null==d?void 0:d.delay)&&e.push("delay"),void 0!==(null==d?void 0:d.scrollPercent)&&e.push("scrollPercent"),(null==d?void 0:d.exitIntent)&&e.push("exitIntent"),void 0!==(null==d?void 0:d.inactivity)&&e.push("inactivity"),e},[null==d?void 0:d.delay,null==d?void 0:d.scrollPercent,null==d?void 0:d.exitIntent,null==d?void 0:d.inactivity]),x=b.useCallback(function(e){if(!l.current)if(i.current.add(e),"any"===c)l.current=!0,o();else if("all"===c){k.current.every(function(e){return i.current.has(e)})&&(l.current=!0,o())}},[c,o]);b.useEffect(function(){i.current=new Set,l.current=!1,k.current=S()},[S]),b.useEffect(function(){if((void 0!==f||void 0!==p||m||void 0!==g)&&!r&&!a&&!function(e){try{return"true"===sessionStorage.getItem(e)}catch(e){return!1}}(u)&&function(e){if(!e||0===e.length)return!0;var t=window.location.href;return e.some(function(e){return t.includes(e)})}(y)&&function(e){return"number"!=typeof e||window.innerWidth>=e}(v)){var e=[],t=[],n=function(e,n,r,o){e.addEventListener(n,r,o),t.push({target:e,event:n,handler:r,options:o})};if("number"==typeof f&&f>0){var o=setTimeout(function(){x("delay")},f);e.push(o)}if("number"==typeof p){var i=p,l=!1,c=function(){var e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight-window.innerHeight;t<=0||(e/t*100>=i&&x("scrollPercent"),l=!1)};n(window,"scroll",function(){l||(l=!0,"function"==typeof requestAnimationFrame?requestAnimationFrame(c):c())},{passive:!0}),c()}if(m&&!("ontouchstart"in window||navigator.maxTouchPoints>0)){var d=null!=h?h:50;n(document,"mouseout",function(e){e.clientY<=d&&x("exitIntent")})}if("number"==typeof g&&g>0){var b=function(){s.current&&clearTimeout(s.current),s.current=setTimeout(function(){x("inactivity")},g)};b();["mousemove","keydown","scroll","click","touchstart"].forEach(function(e){n(document,e,b,{passive:!0})})}return function(){e.forEach(function(e){return clearTimeout(e)}),s.current&&(clearTimeout(s.current),s.current=null),t.forEach(function(e){var t=e.target,n=e.event,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})}}},[f,p,m,h,g,w,v,r,a,u,x])}var Ak="Form-module_xapp_form__mMqzX",zk=function(e){return S.jsx(oe,{children:S.jsx(Lk,{config:e.config,theme:e.theme,button:e.button,buttonElementLookup:e.buttonElementLookup})})},Lk=function(e){var t,r,o,a,i,l,s,u=e.config,c=e.theme,d=ae()[1],f=ie(),p=f.active,m=f.minimized,h=b.useState(),g=h[0],y=h[1],v=b.useState(!1),w=v[0],k=v[1],x=b.useState(!1),T=x[0],E=x[1],C=b.useCallback(function(e){(null==e?void 0:e.preselectChipLabel)&&y(e.preselectChipLabel),d({type:"toggle-modal-state"})},[d]),O=b.useCallback(function(){C()},[C]),_=b.useCallback(function(e){C(e)},[C]),P=b.useCallback(function(){return{active:p,minimized:m}},[p,m]),N=b.useMemo(function(){return we.getApi({key:u.api.key,url:u.api.url})},[u]),R=b.useCallback(function(){var e;if(y(void 0),k(!0),T){try{var t=(null===(e=u.autoOpen)||void 0===e?void 0:e.sessionKey)||Mk;sessionStorage.setItem(t,"true")}catch(e){}E(!1)}d({type:"new-search"}),d({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),N.channelActionRequest({data:{result:{},step:"",form:""}},"FORM_CLOSE").then(function(e){G("ACTION Request (FORM_CLOSE). Data: Response: ".concat(JSON.stringify(e)))})},[N,null===(t=u.autoOpen)||void 0===t?void 0:t.sessionKey,d,T]),D=b.useCallback(function(){E(!0),d({type:"set-modal-state",active:!0,minimized:!1,sendRequest:!0})},[d]);return Ik({config:u.autoOpen,isActive:p,onOpen:D,hasInteracted:w}),b.useEffect(function(){var e=document.getElementsByClassName(nk.XAPP_FORM_BUTTON);if(e.length)G("Assigning ".concat(e.length," button(s) by class: ").concat(nk.XAPP_FORM_BUTTON)),Array.from(e).forEach(function(e){e.onclick=O,e.onfocus=O});else{var t=document.getElementById(nk.XAPP_FORM_BUTTON);t?(G("Assigning one button by id: ".concat(nk.XAPP_FORM_BUTTON,")}")),t.onclick=O,t.onfocus=O):G("Cannot assign buttons by class or id: ".concat(nk.XAPP_FORM_BUTTON,")}"))}window.xafwControl={openForm:_,formStatus:P}},[P,O,_]),s=e.button&&"object"==typeof e.button?S.jsx(e.button.type,n({},e.button.props,{onClick:O,onFocus:O})):S.jsx(S.Fragment,{}),S.jsxs("div",{className:Ak,children:[S.jsx(Tk,{theme:c}),u.sideButtonLabel&&!(null===(r=u.autoOpen)||void 0===r?void 0:r.enabled)&&S.jsx(Dk,{onClick:O,label:u.sideButtonLabel,position:null===(o=null==c?void 0:c.sideButton)||void 0===o?void 0:o.position}),s,(p||(null===(a=u.autoOpen)||void 0===a?void 0:a.enabled))&&S.jsx(de,{disableBackdrop:null===(i=u.autoOpen)||void 0===i?void 0:i.enabled,onClose:R,children:S.jsx(Sk,{docked:null===(l=u.autoOpen)||void 0===l?void 0:l.enabled,config:u,preselectChipLabel:g,onPreselectChipUsed:function(){return y(void 0)}})})]})};function Fk(e){return e.split("-").map(function(e,t){return e.length?t?e[0].toUpperCase()+e.substring(1).toLowerCase():e.toLowerCase():""}).join("")}function $k(e){return Object.keys(e).reduce(function(t,n){var r=n,o="string";n.endsWith("-FLAG")?(r=n.substring(0,n.length-5),o="boolean"):n.endsWith("-MSEC")&&(r=n.substring(0,n.length-5),o="number");for(var a=r.split("_").map(Fk),i=t;a.length>1;){(l=a.shift())&&i&&"object"==typeof i&&(i[l]||(i[l]={}),i=i[l])}if(i&&"object"==typeof i){var l=a.shift(),s=e[n];l&&s&&(i[l]=function(e,t){return"string"===t?e:"boolean"===t?"TRUE"===e:"number"===t?parseFloat(e):e}(s,o))}return t},{})}function Vk(){var e=null===document||void 0===document?void 0:document.getElementById("xapp-form-js");return function(e){if(!e)return{path:""};var t=e.lastIndexOf("/"),n="";t>=0&&(n=e.substr(0,t));var r=new URL(e),o=new URLSearchParams(r.search).get("key")||"";return{path:n,key:o}}(null==e?void 0:e.src)}var Bk="xapp-form-widget";function Uk(e){var t=e||"{{INJECT}}";try{var r=10===t.length?{}:JSON.parse(t);G("Config: ".concat(JSON.stringify(r,null,2)));var o=window.xafwConfig||{};window.xafwConfig=n(n(n({},r),o),{attributes:n(n({},r.attributes),o.attributes)})}catch(e){console.info("Unable to load search config: ".concat(e))}}function Hk(){var e,t=$k(process.env);return n(n({},t),(e=window)&&"object"==typeof e.xafwConfig&&window.xafwConfig||{})}var Wk=function(e){var t=e.env,n=function(){var e=b.useState(!1),t=e[0],n=e[1];return b.useEffect(function(){if(!document.getElementById("xapp-form-style")){var e=Vk(),t=document.createElement("link");t.id="xapp-form-style",e.key?t.href="".concat(e.path,"/xapp-form-widget.css?key=").concat(e.key):t.href="".concat(e.path,"/xapp-form-widget.css"),t.rel="stylesheet",G("CSS loaded: ".concat(t.href)),document.head.appendChild(t),t.addEventListener("load",function(){n(!0)})}},[]),[t]}()[0];if(t.disabled)return S.jsx(S.Fragment,{});var r=function(e){var t,n,r=(null===(t=e.connection)||void 0===t?void 0:t.accountKey)||Vk().key||"";return[{api:{url:(null===(n=e.connection)||void 0===n?void 0:n.serverUrl)||"",key:r},suggestionsUrl:e.autocompleteSuggestionsUrl,autoGreeting:e.autoGreeting||"contact us",intentId:e.intentId,sideButtonLabel:e.sideButtonLabel,googleMapsApiKey:e.googleMapsApiKey,mapsBaseUrl:e.mapsBaseUrl,autoOpen:e.autoOpen,disabled:e.disabled},e.theme]}(t),o=r[0],a=r[1];return n?S.jsx(zk,{config:o,theme:a,button:"xapp-form-widget-button",buttonElementLookup:e.buttonElementLookup}):S.jsx(S.Fragment,{})},qk=null;function Yk(){return r(this,void 0,void 0,function(){var e,t,n;return o(this,function(r){return(e=document.getElementById(Bk))||((e=document.createElement("div")).id=Bk,document.body.appendChild(e)),console.log("XAPP Form Bundle created on 3/12/2026, 1:17:14 PM (master)"),Uk(),t=Hk(),n=window.xappSearchButtonLookup,e.getAttribute("xapp-form-mounted")?console.log("XAPP Form already mounted"):(e.setAttribute("xapp-form-mounted","true"),qk||(qk=V.createRoot(e)),qk.render(S.jsx(Wk,{env:t,buttonElementLookup:n}))),[2]})})}window.addEventListener("load",function(){Yk()}),"complete"===document.readyState&&Yk(),e.React=v,e.injectConfig=Uk});
|
|
134
|
+
function Vw(e,t){var n=e.slice(0,5);return!!t.find(function(e){if(e===n)return!0;if(e.includes("*")){var t=e.replace(/\*/g,"\\d")+"$";return new RegExp("^".concat(t)).test(n)}return!1})}function Bw(e){if(e){var t=e.match(/\b\d{5}(?:-\d{4})?\b/g);if(t)for(var n=t.length-1;n>=0;n--){var r=t[n],o=e.indexOf(r),a=e.slice(0,o);if(/(,|\b[A-Z]{2})\s*$/.test(a.trim()))return r;if(o>15)return r}}}var Uw="FormDisplay-module_xapp_formstep__OW1rY",Hw="FormDisplay-module_active__5wTV3",Ww="FormDisplay-module_xapp_header_container__Y-eFl",qw="FormDisplay-module_xapp_header_container_showcase__MWJfr",Yw=function(e){var t,r=e.form,o=e.onActionResponse,a=e.isShowCase,i=e.loading,l=e.onTrackNextStep,s=e.onTrackPreviousStep,u=e.onTrackSubmit,c=e.currentStepDataRef,d=b.useState(0),f=d[0],p=d[1],m=b.useRef({});b.useEffect(function(){if(Array.isArray(r.steps)&&r.steps.length>0)for(var e=function(e){if(e.condition){var t=Mu(e.condition,"context",["isInServiceArea"]);m.current[e.name]=function(e){return new Function("context","isInServiceArea","return (".concat(t,");"))(e,Vw)}}},t=0,n=r.steps;t<n.length;t++){e(n[t])}},[null==r?void 0:r.steps]),b.useEffect(function(){var e;(f<0||f>=(null===(e=null==r?void 0:r.steps)||void 0===e?void 0:e.length))&&p(0)},[null==r?void 0:r.steps,f]);var h=b.useMemo(function(){var e,t,n=null===(e=r.steps)||void 0===e?void 0:e[f];return null!==(t=null==n?void 0:n.warnBeforeUnload)&&void 0!==t&&t},[f,r.steps]);b.useEffect(function(){if(h){var e=function(e){return e.preventDefault(),e.returnValue="",""};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}},[h]);var g=b.useRef({}),y=b.useRef({}),v=function(e){for(var t=f+1;t<r.steps.length;t++){var o=r.steps[t],a=m.current[o.name],i=g.current.zip_code||g.current.zip||Bw(g.current.address),l=n(n({},g.current),{zip:i});if(!a){p(t);break}if(a(l)){p(t);break}}e&&C(f)},w=function(){for(var e,t,o=f,a=(null===(t=null===(e=r.steps)||void 0===e?void 0:e[o])||void 0===t?void 0:t.name)||"unknown",i=f-1;i>=0;i--){var l=r.steps[i],u=m.current[l.name],c=g.current.zip_code||g.current.zip||Bw(g.current.address),d=n(n({},g.current),{zip:c});if(!u){s&&s(a,o,l.name,i),p(i);break}if(u(d)){s&&s(a,o,l.name,i),p(i);break}}},k=function(e){g.current=n(n({},g.current),e)},x=function(){return g.current},T=function(e){y.current=n(n({},y.current),e)},E=function(){return y.current},C=function(e){var t=null!=e?e:f,n=t>=0&&t<r.steps.length?t:0;u&&u(r.steps[n].name,n,g.current,r.steps.length);var a={result:g.current,form:r.name,step:r.steps[n].name,final:!!r.steps[n].final};"function"==typeof o&&o(a,"FORM_SUBMIT")},O=f;return(f<0||f>=(null===(t=null==r?void 0:r.steps)||void 0===t?void 0:t.length))&&(O=0),S.jsxs("div",{children:[r.header.length>0&&S.jsx("div",{className:a?qw:Ww,children:S.jsx($w,{items:r.header,onHeaderClick:function(e){var t=r.steps.findIndex(function(t){return t.name===e});-1!==t?p(t):Q("Header click: Cannot find step to jump to: ".concat(e))},labelHeader:r.labelHeader,stepName:r.steps[O].name,isShowCase:a})}),S.jsx("div",{children:r.steps.map(function(e,t){return S.jsx("div",{className:"".concat(Uw," ").concat(r.steps[O].name===e.name?Hw:""),children:S.jsx(Aw,{formStep:e,onData:k,onDataWithLabels:T,onNextStep:O<r.steps.length?v:void 0,onPrevStep:O>0?w:void 0,getData:x,getDataWithLabels:E,loading:i,currentStepIndex:t,totalSteps:r.steps.length,onTrackNextStep:l,currentStepDataRef:c})},t)})})]})},Kw=function(e){var t=e.display,n=e.onActionResponse,r=e.loading,o=e.onTrackNextStep,a=e.onTrackPreviousStep,i=e.onTrackSubmit,l=e.currentStepDataRef;return S.jsxs("div",{className:"xapp-search-response-display",children:[Z(t)&&S.jsx(Yw,{form:t,loading:r,onActionResponse:n,onTrackNextStep:o,onTrackPreviousStep:a,onTrackSubmit:i,currentStepDataRef:l}),J(t)&&S.jsx(ot,{list:t}),X(t)&&S.jsx(tt,{carousel:t})]})},Gw=function(e){var t=e.html;return S.jsx("div",{className:"xapp-search-response-html",dangerouslySetInnerHTML:{__html:t}})},Qw=function(e){var t=e.text;return S.jsx("div",{className:"xapp-search-response-text",children:S.jsx("p",{children:t})})},Xw=function(e){var t=e.audio,n=e.onAudioChange,r=b.useRef(null);return b.useEffect(function(){var e=r.current,t=function(){G("Audio finished playing"),n(!1)},o=function(){G("Audio started playing"),n(!0)};return e&&(e.addEventListener("ended",t),e.addEventListener("play",o)),function(){e&&(e.removeEventListener("ended",t),e.removeEventListener("play",o))}},[t,n]),S.jsx("audio",{ref:r,autoPlay:!0,src:t})},Jw="SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F";var Zw=function(e){var t,n=e.outputSpeech,r=e.onAudioChange,o="string"==typeof n?n:null==n?void 0:n.displayText,a="string"==typeof n||null==n?void 0:n.html,i="string"==typeof n||null==n?void 0:n.ssml;if(b.useContext(Se).isVoiceEnabled){var l=i?function(e){for(var t,n=/<audio\s+src\s*=\s*"(.+?)"\s*\/?>/g,r=[];null!==(t=n.exec(e));)r.push(t[1]);return r}(i):[];t=l.length>0?l[0]:void 0}return S.jsxs("div",{className:Jw,children:[!!a&&S.jsx(Gw,{html:a}),!!o&&!a&&S.jsx(Qw,{text:o}),!!t&&S.jsx(Xw,{audio:t,onAudioChange:r})]})},ek={};Object.defineProperty(ek,"__esModule",{value:!0});var tk=ek.isLinkoutSuggestion=function(e){if(!e)return!1;return void 0!==e.url};var nk,rk="Button-module_xapp_search_btn__cQf3T",ok="Button-module_xapp_search_btn__expand__dUwot",ak=function(e){var t=e.className,n=e.expand,r=e.onClick;return S.jsx("button",{type:"button",className:"".concat(rk," ").concat(n?ok:""," ").concat(t||""),onClick:r,children:e.children})},ik="SuggestedAction-module_xapp_search_suggested_action__gbLCz",lk=function(e){var t=e.action,n=e.className,r=e.onClick,o=b.useCallback(function(){r(t)},[t,r]);return tk(t)?S.jsx("span",{className:"".concat(ik," ").concat(n||""),children:S.jsx("a",{href:t.url,children:ke(t)})}):S.jsxs(ak,{className:"".concat(ik," ").concat(n||""),onClick:o,children:[" ",ke(t)]})},sk={xapp_search_suggested_actions__actions:"SuggestedActions-module_xapp_search_suggested_actions__actions__Apv0-",xapp_search_suggested_actions__item:"SuggestedActions-module_xapp_search_suggested_actions__item__Q7nQb"},uk=function(e){var t=e.actions,n=e.onActionClick;return S.jsx("div",{className:sk.xapp_search_suggested_actions,children:S.jsx("div",{className:sk.xapp_search_suggested_actions__actions,children:t.map(function(e,t){return S.jsx(lk,{action:e,className:sk.xapp_search_suggested_actions__item,onClick:n},t)})})})},ck="SearchResponsePart-module_xapp_search_response_part__sF6gs",dk=function(e){var t=e.extraClass;return S.jsx("div",{className:"".concat(ck," ").concat(t||""),children:e.children})},fk="FormResponse-module_xapp_search_response__r2YN1",pk=function(e){var t=e.response,n=e.className,r=e.onActionClick,o=e.onActionResponse,a=e.onAudioChange,i=e.loading,l=e.onTrackNextStep,s=e.onTrackPreviousStep,u=e.onTrackSubmit,c=e.currentStepDataRef,d=t.outputSpeech,f=t.displays,p="object"==typeof d?d.suggestions:void 0;return S.jsxs("div",{className:"".concat(fk," ").concat(n||""),children:[!!d&&S.jsx(dk,{children:S.jsx(_e,{children:S.jsx(Zw,{outputSpeech:d,onAudioChange:a})})}),!!(null==p?void 0:p.length)&&(null==p?void 0:p.length)>0&&S.jsx(uk,{actions:p,onActionClick:r}),!!(null==f?void 0:f.length)&&(null==f?void 0:f.length)>0&&f.map(function(e,t){var n=Z(e)&&(!e.header||0===e.header.length);return S.jsx(dk,{extraClass:n?"noHeaderForm":"",children:S.jsx(Kw,{display:e,onActionResponse:o,loading:i,onTrackNextStep:l,onTrackPreviousStep:s,onTrackSubmit:u,currentStepDataRef:c})},t)})]})},mk=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","gclid","fbclid","msclkid"],hk=function(){function e(e,t,n){this.api=e,this.sessionId=t,this.formId=n}return e.prototype.trackFormOpen=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"form_open",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] form_open event tracked: ".concat(e.formName)),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track form_open event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackNextStep=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"next_step",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] next_step event tracked: ".concat(e.completedStepName)),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track next_step event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPreviousStep=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"previous_step",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] previous_step event tracked: ".concat(e.fromStepName," -> ").concat(e.toStepName)),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track previous_step event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackStepChange=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"step_change",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] step_change event tracked: ".concat(e.fromStepName," -> ").concat(e.toStepName," (").concat(e.direction,")")),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track step_change event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackSubmit=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"submit",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] submit event tracked: ".concat(e.finalStepName)),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track submit event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackClose=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"close",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] close event tracked: ".concat(e.lastStepName)),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track close event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPartialData=function(e){return r(this,void 0,void 0,function(){var t,n,r;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),t=this.buildMetadata(),n={eventType:"partial_data",metadata:t,data:e},[4,this.sendEvent(n)];case 1:return o.sent(),G("[EventTracking] partial_data event tracked: ".concat(e.lastStepName," (").concat(e.abandonmentReason,")")),[3,3];case 2:return r=o.sent(),Q("[EventTracking] Failed to track partial_data event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPartialDataBeacon=function(e){try{var t={eventType:"partial_data",metadata:this.buildMetadata(),data:e};return this.api.trackEventBeacon(t)}catch(e){return Q("[EventTracking] Failed to queue partial_data beacon: ".concat(e)),!1}},e.prototype.buildMetadata=function(){var e={timestamp:(new Date).toISOString(),sessionId:this.sessionId||"unknown",formId:this.formId||"unknown",userAgent:navigator.userAgent},t=this.getUserId();t&&"unknown"!==t&&(e.userId=t);try{var n=new URL(window.location.href);(null==n?void 0:n.host.toLowerCase().startsWith("localhost"))||(e.currentUrl=window.location.href)}catch(e){}var r=this.getTrackingParameters();return Object.assign(e,r),e},e.prototype.getUserId=function(){return localStorage.getItem("__xapp_form_user_id")||void 0},e.prototype.getTrackingParameters=function(){var e={},t=Date.now();mk.forEach(function(n){var r=localStorage.getItem("xa_tracking_".concat(n));if(r)try{var o=JSON.parse(r);o.expires>t&&(e[n]=o.value)}catch(e){}});for(var n=0;n<localStorage.length;n++){var r=localStorage.key(n);if(r&&r.startsWith("xa_tracking_track_"))try{var o=JSON.parse(localStorage.getItem(r)||"{}");if(o.expires>t){var a=r.replace("xa_tracking_","");e[a]=o.value}}catch(e){}}return e},e.prototype.sendEvent=function(e){return r(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.api.trackEvent(e.eventType,e)];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),Q("[EventTracking] API call failed: ".concat(t)),[3,3];case 3:return[2]}})})},e}(),gk="FormWidget-module_loading__aAJ-B",yk="FormWidget-module_xapp_form_widget__V-G-H",bk="FormWidget-module_xapp_form_widget__content__a9NXC",vk="FormWidget-module_xapp_form_widget__response__X8Hbz",wk="FormWidget-module_xapp_form_widget__spinner__FBxso",kk="FormWidget-module_xapp_form_widget__close__0lp0O",Sk=function(e){var t=e.config;return S.jsx(Se.Provider,{value:t,children:S.jsx(xk,{docked:e.docked,preselectChipLabel:e.preselectChipLabel,onPreselectChipUsed:e.onPreselectChipUsed})})},xk=function(e){var t=e.docked,r=e.preselectChipLabel,o=e.onPreselectChipUsed,a=ae(),i=a[0],l=a[1],s=xe(),u=s.loading,c=s.run,d=i.query,f=i.sendRequest,p=i.active,m=b.useState(e.response),h=m[0],g=m[1],y=b.useState(!1),v=y[0],w=y[1],k=b.useState(0),x=k[0],T=k[1],E=b.useContext(Se),C=b.useMemo(function(){return we.getApi({key:E.api.key,url:E.api.url})},[E]),O=b.useRef(null),_=b.useRef({}),P=b.useRef({}),N=b.useRef(0),R=b.useRef(!1),D=b.useRef(null),M=b.useRef(!1),j=b.useCallback(function(){g(void 0),l({type:"new-search"}),l({type:"set-modal-state",active:!1,minimized:!0,sendRequest:!1})},[l]),I=b.useCallback(function(){var e,t,r,o,a;if(O.current&&!R.current&&!M.current){var i=D.current;if(i){var s=(null===(e=i.steps)||void 0===e?void 0:e.length)||1,u=N.current,c=n(n({},_.current),P.current),d=Object.keys(c).length>0;O.current.trackClose({lastStepName:(null===(r=null===(t=i.steps)||void 0===t?void 0:t[u])||void 0===r?void 0:r.name)||"unknown",lastStepIndex:u,totalStepsCompleted:u,totalSteps:s,formData:d?c:void 0}),O.current.trackPartialData({lastStepName:(null===(a=null===(o=i.steps)||void 0===o?void 0:o[u])||void 0===a?void 0:a.name)||"unknown",lastStepIndex:u,totalStepsCompleted:u,totalSteps:s,partialData:d?c:void 0,abandonmentReason:"widget_close"}),M.current=!0}}g(void 0),l({type:"new-search"}),l({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),C.channelActionRequest({data:{result:{},step:"",form:""}},"FORM_CLOSE").then(function(e){G("ACTION Request (FORM_CLOSE). Data: Response: ".concat(JSON.stringify(e))),T(0)})},[C,l]);b.useEffect(function(){var e=Y(window.location.href,{persistToLocalStorage:!0,persistenceDays:30,preferUrlParameters:!0});"development"===process.env.NODE_ENV&&Object.keys(e).length>0&&G("[FormWidget] Captured tracking parameters:",e)},[]),b.useEffect(function(){var e=function(){var e,t,r,o=n(n({},_.current),P.current);if(O.current&&!R.current&&!M.current){var a=D.current;if(a){var i=(null===(e=a.steps)||void 0===e?void 0:e.length)||1,l=N.current;O.current.trackPartialDataBeacon({lastStepName:(null===(r=null===(t=a.steps)||void 0===t?void 0:t[l])||void 0===r?void 0:r.name)||"unknown",lastStepIndex:l,partialData:o,totalStepsCompleted:l,totalSteps:i,completionPercentage:Math.round(l/i*100),abandonmentReason:"close_tab"}),M.current=!0}}};return window.addEventListener("beforeunload",e),function(){return window.removeEventListener("beforeunload",e)}},[]),b.useEffect(function(){var e=null,t=function(){var e,t,r,o=n(n({},_.current),P.current);if(O.current&&!R.current&&!M.current){var a=D.current;if(a){var i=(null===(e=a.steps)||void 0===e?void 0:e.length)||1,l=N.current;O.current.trackPartialDataBeacon({lastStepName:(null===(r=null===(t=a.steps)||void 0===t?void 0:t[l])||void 0===r?void 0:r.name)||"unknown",lastStepIndex:l,partialData:o,totalStepsCompleted:l,totalSteps:i,completionPercentage:Math.round(l/i*100),abandonmentReason:"timeout"}),M.current=!0}}},r=function(){if(document.hidden){var n=(r=new Date,(o=new Date(r)).setHours(24,0,0,0),o.getTime()-r.getTime());e=setTimeout(t,n)}else e&&(clearTimeout(e),e=null);var r,o};return document.addEventListener("visibilitychange",r),function(){document.removeEventListener("visibilitychange",r),e&&clearTimeout(e)}},[]);var A=b.useCallback(function(e){l({query:e.query,intentId:e.intentId,type:"set-query"}),c(function(){return C.intentRequest(e).then(function(t){var n,r,o,a,i;g(t),l({type:"set-response",response:t,query:e.query,intentId:e.intentId});var s=null===(n=null==t?void 0:t.displays)||void 0===n?void 0:n.find(function(e){var t=e;return"FORM"===(null==t?void 0:t.type)});if(s){D.current=s;var u=(null===(r=C.session)||void 0===r?void 0:r.sessionId)||"unknown",c=s.name||"unknown";O.current=new hk(C,u,c);var d=(null===(o=s.steps)||void 0===o?void 0:o.length)||1,f=null===(i=null===(a=s.steps)||void 0===a?void 0:a[0])||void 0===i?void 0:i.name;O.current.trackFormOpen({formName:c,totalSteps:d,firstStepName:f})}})})},[C,l,c]),z=b.useCallback(function(e,t){c(function(){return C.channelActionRequest(e,t).then(function(n){var r;if(G("ACTION Request (".concat(t,"). Data: ").concat(JSON.stringify(e)," Response: ").concat(JSON.stringify(n))),(n.outputSpeech||n.displays)&&l({type:"set-response",response:n,query:""}),(null===(r=n.context)||void 0===r?void 0:r.active)&&n.context.active.length>0){var o=n.context.active[0].parameters||{};l({type:"set-context",context:o})}e.autoClose?T(1):e.autoMinimize?T(2):T(0)})})},[C,l,c]);b.useEffect(function(){(t||f&&p&&(E.autoGreeting||E.intentId))&&(C.resetSession(),A({query:E.autoGreeting,intentId:E.intentId}),l({type:"set-modal-state",active:!0,minimized:!1,sendRequest:!1}))},[t,f,p,A,l,E.autoGreeting,C,E.intentId]),b.useEffect(function(){v||(1===x?(g(void 0),l({type:"new-search"}),l({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),T(0)):2===x&&(g(void 0),l({type:"new-search"}),l({type:"set-modal-state",active:!1,minimized:!0,sendRequest:!1}),T(0)))},[v,l,x]);var L=b.useCallback(function(e){var t=ke(e);A({query:t})},[A]);b.useEffect(function(){if(r&&h){var e=h.outputSpeech,t="object"==typeof e&&null!==e?e.suggestions:void 0;if(t&&0!==t.length){var n=t.find(function(e){return ke(e).toLowerCase()===r.toLowerCase()});n&&(G("Auto-selecting chip: ".concat(ke(n))),setTimeout(function(){L(n)},100)),o&&o()}}},[h,r,L,o]);var F=b.useCallback(function(e,t){t||(t=e.action),e.timezoneOffset=(new Date).getTimezoneOffset(),z(e,t)},[z]),$=function(e){w(e)},V=b.useCallback(function(e,t,r,o){var a,i;if(_.current=n(n({},_.current),r),P.current={},N.current=t+1,O.current){var l=D.current,s=null===(i=null===(a=null==l?void 0:l.steps)||void 0===a?void 0:a[t+1])||void 0===i?void 0:i.name;O.current.trackNextStep({completedStepName:e,completedStepIndex:t,nextStepName:s,stepData:r,isLastStep:o}),s&&O.current.trackStepChange({fromStepName:e,fromStepIndex:t,toStepName:s,toStepIndex:t+1,direction:"forward"})}},[]),B=b.useCallback(function(e,t,n,r){P.current={},N.current=r,O.current&&(O.current.trackPreviousStep({fromStepName:e,fromStepIndex:t,toStepName:n,toStepIndex:r}),O.current.trackStepChange({fromStepName:e,fromStepIndex:t,toStepName:n,toStepIndex:r,direction:"backward"}))},[]),U=b.useCallback(function(e,t,n,r){_.current=n,R.current=!0,O.current&&O.current.trackSubmit({finalStepName:e,finalStepIndex:t,completedData:n,totalSteps:r})},[]),H=!!d||!!h;return t?S.jsx("div",{className:"".concat(yk," ").concat(u?gk:""),children:S.jsx("div",{className:"".concat(bk," ").concat(u?gk:""),children:h?S.jsx(pk,{response:h,className:vk,onActionClick:L,onActionResponse:F,onAudioChange:$,loading:u,onTrackNextStep:V,onTrackPreviousStep:B,onTrackSubmit:U,currentStepDataRef:P}):S.jsx("div",{className:wk,children:S.jsx(Ce,{})})})}):S.jsxs("div",{className:"".concat(yk," ").concat(u&&!h?gk:""),children:[H&&S.jsxs("div",{className:"".concat(bk," ").concat(u&&!h?gk:""),children:[!h&&u&&S.jsx("div",{className:wk,children:S.jsx(Ce,{})}),h&&S.jsx(pk,{response:h,className:vk,onActionClick:L,onActionResponse:F,onAudioChange:$,loading:u,onTrackNextStep:V,onTrackPreviousStep:B,onTrackSubmit:U,currentStepDataRef:P})]}),h&&!!j&&S.jsx("div",{className:kk,onClick:I,children:"✕"})]})},Tk=function(e){var t,n=e.theme;v.useEffect(function(){var e,t=null===(e=null==n?void 0:n.font)||void 0===e?void 0:e.link;return t&&function(e){try{var t=new URL(e);if("https:"!==t.protocol)return void console.warn("Only HTTPS font URLs are allowed:",e);["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com"].includes(t.hostname)||console.warn("Font URL from untrusted domain:",t.hostname),"fonts.googleapis.com"!==t.hostname||t.searchParams.has("display")||(t.searchParams.set("display","swap"),e=t.toString())}catch(t){return void console.error("Invalid font URL:",e,t)}var n="xapp-form-widget-font",r=document.getElementById(n);r&&r.remove();var o=document.createElement("link");o.id=n,o.rel="stylesheet",o.href=e,o.crossOrigin="anonymous",document.head.appendChild(o)}(t),function(){if(t){var e=document.getElementById("xapp-form-widget-font");e&&e.getAttribute("href")===t&&e.remove()}}},[null===(t=null==n?void 0:n.font)||void 0===t?void 0:t.link]);var r=function(e){var t=e||{};return"\n:root {\n ".concat(function(e){var t=e.next(),n="";for(;!1===t.done;){var r=t.value,o=r[0],a=r[1];null!=a&&""!==a&&(n+="".concat(o,": ").concat(a,";\n\r")),t=e.next()}return n}(Ek("\t--xapp-form-widget-",Ck(Ok("background-color",null==t?void 0:t.backgroundColor),Ok("header-background-color",null==t?void 0:t.headerBackgroundColor),Ok("header-text-color",null==t?void 0:t.headerTextColor),Ok("primary-button-color",null==t?void 0:t.primaryButtonColor),Ok("primary-button-text-color",null==t?void 0:t.primaryButtonTextColor),Ok("secondary-button-color",null==t?void 0:t.secondaryButtonColor),Ok("secondary-button-text-color",null==t?void 0:t.secondaryButtonTextColor),Ek("font-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["family",e.fontFamily]]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})}(null==t?void 0:t.font))),Ek("text-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,6];case 1:return t.sent(),[4,["background-color-dark",_k(e.backgroundColor,3)]];case 2:return t.sent(),[4,["color",e.color]];case 3:return t.sent(),[4,["font-size",e.fontSize]];case 4:return t.sent(),[4,["font-family",e.fontFamily]];case 5:t.sent(),t.label=6;case 6:return[2]}})}(null==t?void 0:t.text))),Ek("dropdown-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return t.sent(),[4,["color",e.color]];case 2:return t.sent(),[4,["font-size",e.fontSize]];case 3:return t.sent(),[4,["font-family",e.fontFamily]];case 4:t.sent(),t.label=5;case 5:return[2]}})}(null==t?void 0:t.dropdown))),Ek("checkbox-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return t.sent(),[4,["color",e.color]];case 2:return t.sent(),[4,["font-size",e.fontSize]];case 3:return t.sent(),[4,["font-family",e.fontFamily]];case 4:t.sent(),t.label=5;case 5:return[2]}})}(null==t?void 0:t.checkbox))),Ek("chips-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,8];case 1:return t.sent(),[4,["background-color-selected",e.backgroundColorSelected]];case 2:return t.sent(),[4,["background-color-dark",_k(e.backgroundColor,20)]];case 3:return t.sent(),[4,["color",e.color]];case 4:return t.sent(),[4,["color-selected",e.colorSelected]];case 5:return t.sent(),[4,["font-size",e.fontSize]];case 6:return t.sent(),[4,["font-family",e.fontFamily]];case 7:t.sent(),t.label=8;case 8:return[2]}})}(null==t?void 0:t.chips))),Ek("date-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,6];case 1:return t.sent(),[4,["background-color-selected",e.backgroundColorSelected]];case 2:return t.sent(),[4,["color",e.color]];case 3:return t.sent(),[4,["font-size",e.fontSize]];case 4:return t.sent(),[4,["font-family",e.fontFamily]];case 5:t.sent(),t.label=6;case 6:return[2]}})}(null==t?void 0:t.date))),Ek("card-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return t.sent(),[4,["color",e.color]];case 2:return t.sent(),[4,["font-size",e.fontSize]];case 3:return t.sent(),[4,["font-family",e.fontFamily]];case 4:t.sent(),t.label=5;case 5:return[2]}})}(null==t?void 0:t.card))),Ek("side-button-",Ck(function(e){return o(this,function(t){switch(t.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,8];case 1:return t.sent(),[4,["background-color-dark",_k(e.backgroundColor,10)]];case 2:return t.sent(),[4,["color",e.color]];case 3:return t.sent(),[4,["font-size",e.fontSize]];case 4:return t.sent(),[4,["font-family",e.fontFamily]];case 5:return t.sent(),[4,["top",e.top]];case 6:return t.sent(),[4,["min-length",e.minLength]];case 7:t.sent(),t.label=8;case 8:return[2]}})}(null==t?void 0:t.sideButton)))))),"\n}\n\n")}(n);return S.jsx("style",{children:r})};function Ek(e,t){var n;return o(this,function(r){switch(r.label){case 0:n=t.next(),r.label=1;case 1:return n.done?[3,3]:[4,["".concat(e).concat(n.value[0]),n.value[1]]];case 2:return r.sent(),n=t.next(),[3,1];case 3:return[2]}})}function Ck(){var e,t,n,r,a,i=[];for(e=0;e<arguments.length;e++)i[e]=arguments[e];return o(this,function(e){switch(e.label){case 0:t=0,n=i,e.label=1;case 1:if(!(t<n.length))return[3,5];r=n[t],a=r.next(),e.label=2;case 2:return!1!==a.done?[3,4]:[4,a.value];case 3:return e.sent(),a=r.next(),[3,2];case 4:return t++,[3,1];case 5:return[2]}})}function Ok(e,t){return o(this,function(n){switch(n.label){case 0:return[4,[e,t]];case 1:return n.sent(),[2]}})}function _k(e,t){var n,r,o,a,i,l;if(!e)return e;try{if(e.startsWith("#")){var s=e.match(/\w\w/g);s&&(r=(n=s.map(function(e){return parseInt(e,16)}))[0],o=n[1],a=n[2])}else if(e.startsWith("rgb")){var u=function(e){var t,n=/^rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)$/,r=/^rgb?\((\d+),\s*(\d+),\s*(\d+)\)$/;return(t=e.match(n))?{r:parseInt(t[1]),g:parseInt(t[2]),b:parseInt(t[3]),a:parseFloat(t[4])}:(t=e.match(r))?{r:parseInt(t[1]),g:parseInt(t[2]),b:parseInt(t[3])}:null}(e);u&&(r=u.r,o=u.g,a=u.b,i=u.a)}if(void 0===r||void 0===o||void 0===a)return Q("Darken: Unsupported color format: ".concat(e)),e;if(void 0!==i){if(0===r&&0===o&&0===a)i+=t/100;else{var c=.3*r+.59*o+.11*a,d=c*(1-t/100)/c;r=Math.round(r*d),o=Math.round(o*d),a=Math.round(a*d)}l="rgba(".concat(r,", ").concat(o,", ").concat(a,", ").concat(i,")")}else r=Math.max(0,r-t),o=Math.max(0,o-t),a=Math.max(0,a-t),l="#".concat(r.toString(16).padStart(2,"0")).concat(o.toString(16).padStart(2,"0")).concat(a.toString(16).padStart(2,"0"))}catch(t){Q("Darken: Unsupported color format: ".concat(e," - Error: ").concat(t))}return l}!function(e){e.XAPP_FORM_BUTTON="xapp-form-button"}(nk||(nk={}));var Pk="SideButton-module_xapp_form_sticky_button__YqORL",Nk="SideButton-module_left__GT6z8",Rk="SideButton-module_right__Hy2FU",Dk=function(e){var t=e.onClick,n=e.position,r=e.label,o="right"===(null==n?void 0:n.toLowerCase())?Rk:Nk;return S.jsx("div",{onClick:t,className:"".concat(Pk," ").concat(o),"data-xapp-form-side-button":"true",children:S.jsx("span",{children:r||"Schedule Now"})})},Mk="xafw-auto-open-dismissed";function jk(e){if(!("number"!=typeof e||e<0))return Math.min(e,3e5)}function Ik(e){var t,n=e.config,r=e.isActive,o=e.onOpen,a=e.hasInteracted,i=b.useRef(new Set),l=b.useRef(!1),s=b.useRef(null),u=(null==n?void 0:n.sessionKey)||Mk,c=(null==n?void 0:n.mode)||"any",d=null==n?void 0:n.triggers,f=jk(null==d?void 0:d.delay),p=function(e){if("number"==typeof e)return Math.max(0,Math.min(e,100))}(null==d?void 0:d.scrollPercent),m=null==d?void 0:d.exitIntent,h="number"!=typeof(t=null==d?void 0:d.exitIntentThreshold)||t<0?50:t,g=jk(null==d?void 0:d.inactivity),y=null==n?void 0:n.patterns,v=null==n?void 0:n.minimumWidth,w=b.useMemo(function(){return JSON.stringify(null!=y?y:[])},[y]),k=b.useRef([]),S=b.useCallback(function(){var e=[];return void 0!==(null==d?void 0:d.delay)&&e.push("delay"),void 0!==(null==d?void 0:d.scrollPercent)&&e.push("scrollPercent"),(null==d?void 0:d.exitIntent)&&e.push("exitIntent"),void 0!==(null==d?void 0:d.inactivity)&&e.push("inactivity"),e},[null==d?void 0:d.delay,null==d?void 0:d.scrollPercent,null==d?void 0:d.exitIntent,null==d?void 0:d.inactivity]),x=b.useCallback(function(e){if(!l.current)if(i.current.add(e),"any"===c)l.current=!0,o();else if("all"===c){k.current.every(function(e){return i.current.has(e)})&&(l.current=!0,o())}},[c,o]);b.useEffect(function(){i.current=new Set,l.current=!1,k.current=S()},[S]),b.useEffect(function(){if((void 0!==f||void 0!==p||m||void 0!==g)&&!r&&!a&&!function(e){try{return"true"===sessionStorage.getItem(e)}catch(e){return!1}}(u)&&function(e){if(!e||0===e.length)return!0;var t=window.location.href;return e.some(function(e){return t.includes(e)})}(y)&&function(e){return"number"!=typeof e||window.innerWidth>=e}(v)){var e=[],t=[],n=function(e,n,r,o){e.addEventListener(n,r,o),t.push({target:e,event:n,handler:r,options:o})};if("number"==typeof f&&f>0){var o=setTimeout(function(){x("delay")},f);e.push(o)}if("number"==typeof p){var i=p,l=!1,c=function(){var e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight-window.innerHeight;t<=0||(e/t*100>=i&&x("scrollPercent"),l=!1)};n(window,"scroll",function(){l||(l=!0,"function"==typeof requestAnimationFrame?requestAnimationFrame(c):c())},{passive:!0}),c()}if(m&&!("ontouchstart"in window||navigator.maxTouchPoints>0)){var d=null!=h?h:50;n(document,"mouseout",function(e){e.clientY<=d&&x("exitIntent")})}if("number"==typeof g&&g>0){var b=function(){s.current&&clearTimeout(s.current),s.current=setTimeout(function(){x("inactivity")},g)};b();["mousemove","keydown","scroll","click","touchstart"].forEach(function(e){n(document,e,b,{passive:!0})})}return function(){e.forEach(function(e){return clearTimeout(e)}),s.current&&(clearTimeout(s.current),s.current=null),t.forEach(function(e){var t=e.target,n=e.event,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})}}},[f,p,m,h,g,w,v,r,a,u,x])}var Ak="Form-module_xapp_form__mMqzX",zk=function(e){return S.jsx(oe,{children:S.jsx(Lk,{config:e.config,theme:e.theme,button:e.button,buttonElementLookup:e.buttonElementLookup})})},Lk=function(e){var t,r,o,a,i,l,s,u=e.config,c=e.theme,d=ae()[1],f=ie(),p=f.active,m=f.minimized,h=b.useState(),g=h[0],y=h[1],v=b.useState(!1),w=v[0],k=v[1],x=b.useState(!1),T=x[0],E=x[1],C=b.useCallback(function(e){(null==e?void 0:e.preselectChipLabel)&&y(e.preselectChipLabel),d({type:"toggle-modal-state"})},[d]),O=b.useCallback(function(){C()},[C]),_=b.useCallback(function(e){C(e)},[C]),P=b.useCallback(function(){return{active:p,minimized:m}},[p,m]),N=b.useMemo(function(){return we.getApi({key:u.api.key,url:u.api.url})},[u]),R=b.useCallback(function(){var e;if(y(void 0),k(!0),T){try{var t=(null===(e=u.autoOpen)||void 0===e?void 0:e.sessionKey)||Mk;sessionStorage.setItem(t,"true")}catch(e){}E(!1)}d({type:"new-search"}),d({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),N.channelActionRequest({data:{result:{},step:"",form:""}},"FORM_CLOSE").then(function(e){G("ACTION Request (FORM_CLOSE). Data: Response: ".concat(JSON.stringify(e)))})},[N,null===(t=u.autoOpen)||void 0===t?void 0:t.sessionKey,d,T]),D=b.useCallback(function(){E(!0),d({type:"set-modal-state",active:!0,minimized:!1,sendRequest:!0})},[d]);return Ik({config:u.autoOpen,isActive:p,onOpen:D,hasInteracted:w}),b.useEffect(function(){var e=document.getElementsByClassName(nk.XAPP_FORM_BUTTON);if(e.length)G("Assigning ".concat(e.length," button(s) by class: ").concat(nk.XAPP_FORM_BUTTON)),Array.from(e).forEach(function(e){e.onclick=O,e.onfocus=O});else{var t=document.getElementById(nk.XAPP_FORM_BUTTON);t?(G("Assigning one button by id: ".concat(nk.XAPP_FORM_BUTTON,")}")),t.onclick=O,t.onfocus=O):G("Cannot assign buttons by class or id: ".concat(nk.XAPP_FORM_BUTTON,")}"))}window.xafwControl={openForm:_,formStatus:P}},[P,O,_]),s=e.button&&"object"==typeof e.button?S.jsx(e.button.type,n({},e.button.props,{onClick:O,onFocus:O})):S.jsx(S.Fragment,{}),S.jsxs("div",{className:Ak,children:[S.jsx(Tk,{theme:c}),u.sideButtonLabel&&!(null===(r=u.autoOpen)||void 0===r?void 0:r.enabled)&&S.jsx(Dk,{onClick:O,label:u.sideButtonLabel,position:null===(o=null==c?void 0:c.sideButton)||void 0===o?void 0:o.position}),s,(p||(null===(a=u.autoOpen)||void 0===a?void 0:a.enabled))&&S.jsx(de,{disableBackdrop:null===(i=u.autoOpen)||void 0===i?void 0:i.enabled,onClose:R,children:S.jsx(Sk,{docked:null===(l=u.autoOpen)||void 0===l?void 0:l.enabled,config:u,preselectChipLabel:g,onPreselectChipUsed:function(){return y(void 0)}})})]})};function Fk(e){return e.split("-").map(function(e,t){return e.length?t?e[0].toUpperCase()+e.substring(1).toLowerCase():e.toLowerCase():""}).join("")}function $k(e){return Object.keys(e).reduce(function(t,n){var r=n,o="string";n.endsWith("-FLAG")?(r=n.substring(0,n.length-5),o="boolean"):n.endsWith("-MSEC")&&(r=n.substring(0,n.length-5),o="number");for(var a=r.split("_").map(Fk),i=t;a.length>1;){(l=a.shift())&&i&&"object"==typeof i&&(i[l]||(i[l]={}),i=i[l])}if(i&&"object"==typeof i){var l=a.shift(),s=e[n];l&&s&&(i[l]=function(e,t){return"string"===t?e:"boolean"===t?"TRUE"===e:"number"===t?parseFloat(e):e}(s,o))}return t},{})}function Vk(){var e=null===document||void 0===document?void 0:document.getElementById("xapp-form-js");return function(e){if(!e)return{path:""};var t=e.lastIndexOf("/"),n="";t>=0&&(n=e.substr(0,t));var r=new URL(e),o=new URLSearchParams(r.search).get("key")||"";return{path:n,key:o}}(null==e?void 0:e.src)}var Bk="xapp-form-widget";function Uk(e){var t=e||"{{INJECT}}";try{var r=10===t.length?{}:JSON.parse(t);G("Config: ".concat(JSON.stringify(r,null,2)));var o=window.xafwConfig||{};window.xafwConfig=n(n(n({},r),o),{attributes:n(n({},r.attributes),o.attributes)})}catch(e){console.info("Unable to load search config: ".concat(e))}}function Hk(){var e,t=$k(process.env);return n(n({},t),(e=window)&&"object"==typeof e.xafwConfig&&window.xafwConfig||{})}var Wk=function(e){var t=e.env,n=function(){var e=b.useState(!1),t=e[0],n=e[1];return b.useEffect(function(){if(!document.getElementById("xapp-form-style")){var e=Vk(),t=document.createElement("link");t.id="xapp-form-style",e.key?t.href="".concat(e.path,"/xapp-form-widget.css?key=").concat(e.key):t.href="".concat(e.path,"/xapp-form-widget.css"),t.rel="stylesheet",G("CSS loaded: ".concat(t.href)),document.head.appendChild(t),t.addEventListener("load",function(){n(!0)})}},[]),[t]}()[0];if(t.disabled)return S.jsx(S.Fragment,{});var r=function(e){var t,n,r=(null===(t=e.connection)||void 0===t?void 0:t.accountKey)||Vk().key||"";return[{api:{url:(null===(n=e.connection)||void 0===n?void 0:n.serverUrl)||"",key:r},suggestionsUrl:e.autocompleteSuggestionsUrl,autoGreeting:e.autoGreeting||"contact us",intentId:e.intentId,sideButtonLabel:e.sideButtonLabel,googleMapsApiKey:e.googleMapsApiKey,mapsBaseUrl:e.mapsBaseUrl,autoOpen:e.autoOpen,disabled:e.disabled},e.theme]}(t),o=r[0],a=r[1];return n?S.jsx(zk,{config:o,theme:a,button:"xapp-form-widget-button",buttonElementLookup:e.buttonElementLookup}):S.jsx(S.Fragment,{})},qk=null;function Yk(){return r(this,void 0,void 0,function(){var e,t,n;return o(this,function(r){return(e=document.getElementById(Bk))||((e=document.createElement("div")).id=Bk,document.body.appendChild(e)),console.log("XAPP Form Bundle created on 3/18/2026, 2:24:57 PM (master)"),Uk(),t=Hk(),n=window.xappSearchButtonLookup,e.getAttribute("xapp-form-mounted")?console.log("XAPP Form already mounted"):(e.setAttribute("xapp-form-mounted","true"),qk||(qk=V.createRoot(e)),qk.render(S.jsx(Wk,{env:t,buttonElementLookup:n}))),[2]})})}window.addEventListener("load",function(){Yk()}),"complete"===document.readyState&&Yk(),e.React=v,e.injectConfig=Uk});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xapp/form-widget",
|
|
3
|
-
"version": "1.87.
|
|
3
|
+
"version": "1.87.1",
|
|
4
4
|
"description": "Form Widget",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf ./lib/* && rm -rf ./dist/*",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"postcss-loader": "6.2.1",
|
|
80
80
|
"postcss-modules": "6.0.1",
|
|
81
81
|
"prettier": "2.8.8",
|
|
82
|
-
"rollup": "4.
|
|
82
|
+
"rollup": "4.59.0",
|
|
83
83
|
"rollup-plugin-filesize": "10.0.0",
|
|
84
84
|
"rollup-plugin-inject-process-env": "1.3.1",
|
|
85
85
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"rollup-plugin-visualizer": "5.14.0",
|
|
92
92
|
"sass": "1.97.3",
|
|
93
93
|
"sass-loader": "10.5.2",
|
|
94
|
-
"stentor-models": "1.69.
|
|
94
|
+
"stentor-models": "1.69.14",
|
|
95
95
|
"storybook": "8.6.17",
|
|
96
96
|
"ts-jest": "29.4.6",
|
|
97
97
|
"typescript": "5.9.3"
|
|
@@ -111,12 +111,12 @@
|
|
|
111
111
|
"@mui/icons-material": "7.3.8",
|
|
112
112
|
"@mui/material": "7.3.8",
|
|
113
113
|
"@mui/x-date-pickers": "7.29.4",
|
|
114
|
-
"@xapp/stentor-form-widget-channel": "1.87.
|
|
114
|
+
"@xapp/stentor-form-widget-channel": "1.87.1",
|
|
115
115
|
"autosuggest-highlight": "3.3.4",
|
|
116
116
|
"dayjs": "1.11.19",
|
|
117
117
|
"lodash.template": "4.5.0",
|
|
118
|
-
"stentor-guards": "1.69.
|
|
118
|
+
"stentor-guards": "1.69.14",
|
|
119
119
|
"tslib": "2.8.1"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "29dffd57c1acb5b637610b8775d06a2333cab283"
|
|
122
122
|
}
|