airport-one-embeddable-widgets 2.0.1 → 2.0.2
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.
|
@@ -46,7 +46,7 @@ Error generating stack: `+o.message+`
|
|
|
46
46
|
Copyright (c) 2018 Jed Watson.
|
|
47
47
|
Licensed under the MIT License (MIT), see
|
|
48
48
|
http://jedwatson.github.io/classnames
|
|
49
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var u=typeof o;if(u==="string"||u==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var c=n.apply(null,o);c&&r.push(c)}}else if(u==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var f in o)t.call(o,f)&&o[f]&&r.push(f)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(mx);var ET=mx.exports;const Yi=Xt(ET),hv=250;function IT({date:e,startDate:t,endDate:n,onChange:r,onHover:i,price:o,priceIcons:u,priceLoading:c}){const f=Ic(new Date),d=t?Oc(e,t):!1;let p=t&&n?Uw(e,Ic(t))&&fu(e,n):!1,m=n?Oc(e,n):!1,g=fu(e,f);return t&&Uw(e,t),Ve("div",{className:Yi({"a1-w-11 a1-h-11 a1-flex a1-flex-col a1-items-center a1-justify-center a1-cursor-pointer":!0,"a1-text-white":d||m,"a1-bg-gray-200":p,"a1-text-gray-700":!d&&!m,"a1-opacity-50 a1-cursor-not-allowed":g,"a1-relative hover:after:a1-z-10 hover:after:a1-left-0 hover:after:a1-right-0 hover:after:a1-absolute hover:after:a1-w-full hover:after:a1-h-full hover:after:a1-rounded-full hover:after:a1-ring-2 hover:before:a1-ring-primary":!g,"a1-relative after:a1-absolute after:a1-bg-gray-600 after:a1-top-0 after:a1-bottom-0 after:a1-left-0 after:a1-right-0 after:a1-rounded-full":d,"before:a1-absolute before:a1-left-1/2 before:a1-right-0 before:a1-top-0 before:a1-bottom-0 before:a1-bg-gray-200":d&&!!n,"a1-rounded-none":p,"a1-relative after:a1-absolute after:a1-bg-gray-600 after:a1-top-0 after:a1-bottom-0 after:a1-left-0 after:a1-right-0 after:a1-rounded-full before:a1-absolute before:a1-left-0 before:a1-right-1/2 before:a1-top-0 before:a1-bottom-0 before:a1-bg-gray-200":m}),onClick:()=>{g||r(new Date(e))},onMouseOver:()=>{g||i(new Date(e))},children:[J("span",{className:"a1-relative a1-z-20 a1-font-semibold a1-leading-[16px] a1-text-base",children:e.getDate()}),J("span",{className:Yi({"a1-text-[11px] a1-text-gray-500 a1-relative a1-z-20":!0,"a1-text-white":d||m,"a1-text-gray-700":p,"a1-opacity-0":(o===void 0||o===0)&&!c,"a1-blur-[3px]":c,"a1-text-green-700 a1-font-bold":(u==null?void 0:u.length)===1&&!(d||m)}),children:u||"100"})]})}function OT({origin:e,destination:t,initialDate:n,startDate:r,endDate:i,priceCalendar:o,onMonthViewChange:u,onChange:c,onReset:f}){const[d,p]=M.useState(Rw(n)),m=Vi(d,"MMMM yyyy"),g=vI(d),[_,C]=M.useState(null),[E,T]=M.useState(null);M.useEffect(()=>{T(r&&!i?_:i)},[_,r,i]),M.useEffect(()=>{r&&p(Rw(r))},[r]),M.useEffect(()=>{d&&u(g,Ra(g,42))},[d]);const k=["S","M","T","W","T","F","S"],x=new Array(6*7).fill(0).map((b,P)=>Ra(g,P));return Ve("div",{className:"a1-w-max",children:[Ve("div",{className:"a1-px-4 a1-py-2 a1-flex a1-gap-4",children:[J("button",{type:"button",onClick:()=>f(),className:"a1-text-white a1-tracking-wide a1-text-sm a1-bold a1-capitalize a1-bg-gray-600 a1-rounded-lg a1-px-2 a1-py-0.5",children:"Reset"}),Ve("div",{className:"a1-flex a1-flex-grow a1-justify-between a1-items-center a1-text-gray-700",children:[J("button",{type:"button",className:"a1-w-8 a1-h-8 a1-bg-white a1-rounded-full a1-flex a1-items-center a1-justify-center a1-text-gray-700 a1-p-0",onClick:()=>p(AO(d,{months:1})),children:J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"a1-w-6 a1-h-6",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),J("div",{className:"mx-2 a1-text-base",children:m}),J("button",{type:"button",className:"a1-w-8 a1-h-8 a1-bg-white a1-rounded-full a1-flex a1-items-center a1-justify-center a1-text-gray-700 a1-p-0",onClick:()=>p(dI(d,{months:1})),children:J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"a1-w-6 a1-h-6",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]})]}),J("div",{className:"a1-grid a1-grid-cols-7",children:k.map((b,P)=>J("div",{className:"a1-w-10 a1-h-10 a1-rounded-full a1-flex a1-items-center a1-justify-center a1-text-black a1-text-base",children:b},`${b}-${P}`))}),J("div",{className:"a1-grid a1-grid-cols-7 a1-grid-rows-6",children:x.map(b=>{const P=Vi(b,"yyyy-MM-dd"),R=o==null?void 0:o[P];return J(IT,{date:b,startDate:r,endDate:E,onChange:c,onHover:()=>C(b),price:R==null?void 0:R.transformedPrice,priceIcons:R==null?void 0:R.priceIcons,priceLoading:!!(R!=null&&R.loading)},b.toISOString())})}),J("div",{children:J("div",{className:"a1-text-xs a1-gray-700 a1-w-[250px] a1-px-3 a1-py-2 a1-leading-[12px]",children:"Estimated one-way fares; actual fares may vary"})})]})}function TT({origin:e,destination:t,onChange:n,onMonthViewChange:r,priceCalendar:i,className:o,primaryColor:u,secondaryColor:c,startDateLabel:f="Start Date",endDateLabel:d="End Date"}){const[p,m]=M.useState(null),[g,_]=M.useState(null),[C,E]=M.useState(!1),[T,k]=M.useState(new Date),x=M.useRef(null),b=M.useRef(!1),[P,R]=M.useState(new Gw),D=G=>{const j=G.getTime()<((p==null?void 0:p.getTime())||0);p?!g&&j?m(G):g?p&&g&&(Oc(G,p)&&Oc(G,g)?(m(G),_(null)):fu(G,g)&&fu(G,Ra(p,3))?(b.current=!0,m(G),setTimeout(()=>{E(!1)},hv)):(b.current=!0,_(G),setTimeout(()=>{E(!1)},hv))):(b.current=!0,_(G),setTimeout(()=>{E(!1)},hv)):m(G)},F=()=>{m(null),_(null)};M.useEffect(()=>{let G=null;if(x!=null&&x.current){const j=Nc(document,"click"),Y=Nc(x.current,"click");G=kT(j.pipe(hu(()=>({tag:"body",value:!1}))),P.pipe(hu(fe=>({tag:"calendar",value:fe}))),Y.pipe(hu(()=>({tag:"controls",value:!0})))).pipe(CT(50),ST(fe=>fe.length>0)).subscribe(fe=>{let _e=fe.some(Pe=>Pe.value===!0);b.current?b.current=!1:E(_e)})}return()=>{G==null||G.unsubscribe()}},[x]),M.useEffect(()=>{n(p,g)},[p,g]);const Q="a1-bg-white a1-border a1-border-gray-300 a1-rounded-lg a1-shadow-md",te="a1-absolute a1-left-2 a1-right-2 a1-top-1/2 @2xl:a1-top-2 @2xl:a1-bottom-2 @2xl:a1-left-1/2 a1-rounded-lg a1-h-[2px] @2xl:a1-h-[initial] @2xl:a1-w-[2px] a1-bg-gray-200";let q={};return u&&(q["--color-primary"]=u),c&&(q["--color-secondary"]=c),J("div",{id:"A1-DateRangePicker",className:o,style:q,children:Ve("div",{ref:x,className:Yi({"a1-relative a1-h-full a1-flex a1-flex-col @2xl:a1-flex-row md:a1-items-center a1-gap-4 a1-px-3 a1-py-2 a1-rounded-lg a1-bg-white":!0,"a1-border-2 a1-border-primary":C,"a1-border-2 a1-border-gray-200":!C}),children:[Ve("div",{className:"a1-flex a1-grow a1-gap-2 a1-overflow-hidden",children:[J("span",{children:J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,className:"a1-w-6 a1-h-6 a1-stroke-black",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z"})})}),J("input",{type:"text",name:"start-date",value:p?p.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}):"",placeholder:f,autoComplete:"off",className:"a1-all-initial focus:a1-outline-none disabled:a1-bg-white a1-text-black a1-text-base a1-w-full",readOnly:!0})]}),J("div",{className:te}),Ve("div",{className:"a1-flex a1-grow a1-gap-2 a1-overflow-hidden",children:[J("span",{className:"@2xl:a1-hidden",children:J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,className:"a1-w-6 a1-h-6 a1-stroke-black",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z"})})}),J("input",{type:"text",name:"end-date",value:g?g.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}):"",placeholder:d,autoComplete:"off",className:"focus:a1-outline-none disabled:a1-bg-white a1-text-black a1-text-base a1-w-full",readOnly:!0})]}),J(fI,{show:C,className:"a1-absolute a1-z-10 a1-top-full a1-left-1/2 a1--translate-x-1/2",enter:"a1-transition a1-duration-100 a1-ease-out",enterFrom:"a1-transform a1-scale-95 a1-opacity-0",enterTo:"a1-transform a1-scale-100 a1-opacity-100",leave:"a1-transition a1-duration-75 a1-ease-out",leaveFrom:"a1-transform a1-scale-100 a1-opacity-100",leaveTo:"a1-transform a1-scale-95 a1-opacity-0",children:J("div",{id:"Calendar",className:`a1-mt-2 ${Q}`,onClick:G=>P.next(!0),children:J(OT,{origin:e,destination:t,initialDate:T,startDate:p,endDate:g,onChange:D,onReset:F,onMonthViewChange:r,priceCalendar:i},T.toISOString())})})]})})}var gx={exports:{}},PT="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",AT=PT,RT=AT;function yx(){}function wx(){}wx.resetWarningCache=yx;var MT=function(){function e(r,i,o,u,c,f){if(f!==RT){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:wx,resetWarningCache:yx};return n.PropTypes=n,n};gx.exports=MT();var NT=gx.exports;const H=Xt(NT);function pu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,rv(e,t)}var vu=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(r){var i=this,o=r||function(){};return this.listeners.push(o),this.onSubscribe(),function(){i.listeners=i.listeners.filter(function(u){return u!==o}),i.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}();function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ve.apply(this,arguments)}var Dc=typeof window=="undefined";function rn(){}function DT(e,t){return typeof e=="function"?e(t):e}function pv(e){return typeof e=="number"&&e>=0&&e!==1/0}function Lc(e){return Array.isArray(e)?e:[e]}function xx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fc(e,t,n){return Uc(e)?typeof t=="function"?ve({},n,{queryKey:e,queryFn:t}):ve({},t,{queryKey:e}):e}function qi(e,t,n){return Uc(e)?[ve({},t,{queryKey:e}),n]:[e||{},t]}function LT(e,t){if(e===!0&&t===!0||e==null&&t==null)return"all";if(e===!1&&t===!1)return"none";var n=e!=null?e:!t;return n?"active":"inactive"}function bx(e,t){var n=e.active,r=e.exact,i=e.fetching,o=e.inactive,u=e.predicate,c=e.queryKey,f=e.stale;if(Uc(c)){if(r){if(t.queryHash!==vv(c,t.options))return!1}else if(!$c(t.queryKey,c))return!1}var d=LT(n,o);if(d==="none")return!1;if(d!=="all"){var p=t.isActive();if(d==="active"&&!p||d==="inactive"&&p)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||typeof i=="boolean"&&t.isFetching()!==i||u&&!u(t))}function _x(e,t){var n=e.exact,r=e.fetching,i=e.predicate,o=e.mutationKey;if(Uc(o)){if(!t.options.mutationKey)return!1;if(n){if(Fa(t.options.mutationKey)!==Fa(o))return!1}else if(!$c(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function vv(e,t){var n=(t==null?void 0:t.queryKeyHashFn)||Fa;return n(e)}function Fa(e){var t=Lc(e);return FT(t)}function FT(e){return JSON.stringify(e,function(t,n){return mv(n)?Object.keys(n).sort().reduce(function(r,i){return r[i]=n[i],r},{}):n})}function $c(e,t){return kx(Lc(e),Lc(t))}function kx(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(function(n){return!kx(e[n],t[n])}):!1}function zc(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||mv(e)&&mv(t)){for(var r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,u=n?[]:{},c=0,f=0;f<o;f++){var d=n?f:i[f];u[d]=zc(e[d],t[d]),u[d]===e[d]&&c++}return r===o&&c===r?e:u}return t}function $T(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function mv(e){if(!Sx(e))return!1;var t=e.constructor;if(typeof t=="undefined")return!0;var n=t.prototype;return!(!Sx(n)||!n.hasOwnProperty("isPrototypeOf"))}function Sx(e){return Object.prototype.toString.call(e)==="[object Object]"}function Uc(e){return typeof e=="string"||Array.isArray(e)}function zT(e){return new Promise(function(t){setTimeout(t,e)})}function Cx(e){Promise.resolve().then(e).catch(function(t){return setTimeout(function(){throw t})})}function Ex(){if(typeof AbortController=="function")return new AbortController}var UT=function(e){pu(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(i){var o;if(!Dc&&((o=window)!=null&&o.addEventListener)){var u=function(){return i()};return window.addEventListener("visibilitychange",u,!1),window.addEventListener("focus",u,!1),function(){window.removeEventListener("visibilitychange",u),window.removeEventListener("focus",u)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},n.setEventListener=function(i){var o,u=this;this.setup=i,(o=this.cleanup)==null||o.call(this),this.cleanup=i(function(c){typeof c=="boolean"?u.setFocused(c):u.onFocus()})},n.setFocused=function(i){this.focused=i,i&&this.onFocus()},n.onFocus=function(){this.listeners.forEach(function(i){i()})},n.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},t}(vu),mu=new UT,jT=function(e){pu(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(i){var o;if(!Dc&&((o=window)!=null&&o.addEventListener)){var u=function(){return i()};return window.addEventListener("online",u,!1),window.addEventListener("offline",u,!1),function(){window.removeEventListener("online",u),window.removeEventListener("offline",u)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},n.setEventListener=function(i){var o,u=this;this.setup=i,(o=this.cleanup)==null||o.call(this),this.cleanup=i(function(c){typeof c=="boolean"?u.setOnline(c):u.onOnline()})},n.setOnline=function(i){this.online=i,i&&this.onOnline()},n.onOnline=function(){this.listeners.forEach(function(i){i()})},n.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine},t}(vu),jc=new jT;function WT(e){return Math.min(1e3*Math.pow(2,e),3e4)}function Wc(e){return typeof(e==null?void 0:e.cancel)=="function"}var Ix=function(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent};function Hc(e){return e instanceof Ix}var Ox=function(t){var n=this,r=!1,i,o,u,c;this.abort=t.abort,this.cancel=function(g){return i==null?void 0:i(g)},this.cancelRetry=function(){r=!0},this.continueRetry=function(){r=!1},this.continue=function(){return o==null?void 0:o()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(g,_){u=g,c=_});var f=function(_){n.isResolved||(n.isResolved=!0,t.onSuccess==null||t.onSuccess(_),o==null||o(),u(_))},d=function(_){n.isResolved||(n.isResolved=!0,t.onError==null||t.onError(_),o==null||o(),c(_))},p=function(){return new Promise(function(_){o=_,n.isPaused=!0,t.onPause==null||t.onPause()}).then(function(){o=void 0,n.isPaused=!1,t.onContinue==null||t.onContinue()})},m=function g(){if(!n.isResolved){var _;try{_=t.fn()}catch(C){_=Promise.reject(C)}i=function(E){if(!n.isResolved&&(d(new Ix(E)),n.abort==null||n.abort(),Wc(_)))try{_.cancel()}catch(T){}},n.isTransportCancelable=Wc(_),Promise.resolve(_).then(f).catch(function(C){var E,T;if(!n.isResolved){var k=(E=t.retry)!=null?E:3,x=(T=t.retryDelay)!=null?T:WT,b=typeof x=="function"?x(n.failureCount,C):x,P=k===!0||typeof k=="number"&&n.failureCount<k||typeof k=="function"&&k(n.failureCount,C);if(r||!P){d(C);return}n.failureCount++,t.onFail==null||t.onFail(n.failureCount,C),zT(b).then(function(){if(!mu.isFocused()||!jc.isOnline())return p()}).then(function(){r?d(C):g()})}})}};m()},HT=function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(n){n()},this.batchNotifyFn=function(n){n()}}var t=e.prototype;return t.batch=function(r){var i;this.transactions++;try{i=r()}finally{this.transactions--,this.transactions||this.flush()}return i},t.schedule=function(r){var i=this;this.transactions?this.queue.push(r):Cx(function(){i.notifyFn(r)})},t.batchCalls=function(r){var i=this;return function(){for(var o=arguments.length,u=new Array(o),c=0;c<o;c++)u[c]=arguments[c];i.schedule(function(){r.apply(void 0,u)})}},t.flush=function(){var r=this,i=this.queue;this.queue=[],i.length&&Cx(function(){r.batchNotifyFn(function(){i.forEach(function(o){r.notifyFn(o)})})})},t.setNotifyFunction=function(r){this.notifyFn=r},t.setBatchNotifyFunction=function(r){this.batchNotifyFn=r},e}(),_t=new HT,Tx=console;function Bc(){return Tx}function BT(e){Tx=e}var VT=function(){function e(n){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.cache=n.cache,this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.initialState=n.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=n.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(r){var i;this.options=ve({},this.defaultOptions,r),this.meta=r==null?void 0:r.meta,this.cacheTime=Math.max(this.cacheTime||0,(i=this.options.cacheTime)!=null?i:5*60*1e3)},t.setDefaultOptions=function(r){this.defaultOptions=r},t.scheduleGc=function(){var r=this;this.clearGcTimeout(),pv(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){r.optionalRemove()},this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(r,i){var o,u,c=this.state.data,f=DT(r,c);return(o=(u=this.options).isDataEqual)!=null&&o.call(u,c,f)?f=c:this.options.structuralSharing!==!1&&(f=zc(c,f)),this.dispatch({data:f,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt}),f},t.setState=function(r,i){this.dispatch({type:"setState",state:r,setStateOptions:i})},t.cancel=function(r){var i,o=this.promise;return(i=this.retryer)==null||i.cancel(r),o?o.then(rn).catch(rn):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some(function(r){return r.options.enabled!==!1})},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(r){return r.getCurrentResult().isStale})},t.isStaleByTime=function(r){return r===void 0&&(r=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!xx(this.state.dataUpdatedAt,r)},t.onFocus=function(){var r,i=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});i&&i.refetch(),(r=this.retryer)==null||r.continue()},t.onOnline=function(){var r,i=this.observers.find(function(o){return o.shouldFetchOnReconnect()});i&&i.refetch(),(r=this.retryer)==null||r.continue()},t.addObserver=function(r){this.observers.indexOf(r)===-1&&(this.observers.push(r),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:r}))},t.removeObserver=function(r){this.observers.indexOf(r)!==-1&&(this.observers=this.observers.filter(function(i){return i!==r}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:r}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(r,i){var o=this,u,c,f;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var d;return(d=this.retryer)==null||d.continueRetry(),this.promise}}if(r&&this.setOptions(r),!this.options.queryFn){var p=this.observers.find(function(x){return x.options.queryFn});p&&this.setOptions(p.options)}var m=Lc(this.queryKey),g=Ex(),_={queryKey:m,pageParam:void 0,meta:this.meta};Object.defineProperty(_,"signal",{enumerable:!0,get:function(){if(g)return o.abortSignalConsumed=!0,g.signal}});var C=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(_)):Promise.reject("Missing queryFn")},E={fetchOptions:i,options:this.options,queryKey:m,state:this.state,fetchFn:C,meta:this.meta};if((u=this.options.behavior)!=null&&u.onFetch){var T;(T=this.options.behavior)==null||T.onFetch(E)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((c=E.fetchOptions)==null?void 0:c.meta)){var k;this.dispatch({type:"fetch",meta:(k=E.fetchOptions)==null?void 0:k.meta})}return this.retryer=new Ox({fn:E.fetchFn,abort:g==null||(f=g.abort)==null?void 0:f.bind(g),onSuccess:function(b){o.setData(b),o.cache.config.onSuccess==null||o.cache.config.onSuccess(b,o),o.cacheTime===0&&o.optionalRemove()},onError:function(b){Hc(b)&&b.silent||o.dispatch({type:"error",error:b}),Hc(b)||(o.cache.config.onError==null||o.cache.config.onError(b,o),Bc().error(b)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:E.options.retry,retryDelay:E.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(r){var i=this;this.state=this.reducer(this.state,r),_t.batch(function(){i.observers.forEach(function(o){o.onQueryUpdate(r)}),i.cache.notify({query:i,type:"queryUpdated",action:r})})},t.getDefaultState=function(r){var i=typeof r.initialData=="function"?r.initialData():r.initialData,o=typeof r.initialData!="undefined",u=o?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0,c=typeof i!="undefined";return{data:i,dataUpdateCount:0,dataUpdatedAt:c?u!=null?u:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:c?"success":"idle"}},t.reducer=function(r,i){var o,u;switch(i.type){case"failed":return ve({},r,{fetchFailureCount:r.fetchFailureCount+1});case"pause":return ve({},r,{isPaused:!0});case"continue":return ve({},r,{isPaused:!1});case"fetch":return ve({},r,{fetchFailureCount:0,fetchMeta:(o=i.meta)!=null?o:null,isFetching:!0,isPaused:!1},!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return ve({},r,{data:i.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(u=i.dataUpdatedAt)!=null?u:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var c=i.error;return Hc(c)&&c.revert&&this.revertState?ve({},this.revertState):ve({},r,{error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return ve({},r,{isInvalidated:!0});case"setState":return ve({},r,i.state);default:return r}},e}(),QT=function(e){pu(t,e);function t(r){var i;return i=e.call(this)||this,i.config=r||{},i.queries=[],i.queriesMap={},i}var n=t.prototype;return n.build=function(i,o,u){var c,f=o.queryKey,d=(c=o.queryHash)!=null?c:vv(f,o),p=this.get(d);return p||(p=new VT({cache:this,queryKey:f,queryHash:d,options:i.defaultQueryOptions(o),state:u,defaultOptions:i.getQueryDefaults(f),meta:o.meta}),this.add(p)),p},n.add=function(i){this.queriesMap[i.queryHash]||(this.queriesMap[i.queryHash]=i,this.queries.push(i),this.notify({type:"queryAdded",query:i}))},n.remove=function(i){var o=this.queriesMap[i.queryHash];o&&(i.destroy(),this.queries=this.queries.filter(function(u){return u!==i}),o===i&&delete this.queriesMap[i.queryHash],this.notify({type:"queryRemoved",query:i}))},n.clear=function(){var i=this;_t.batch(function(){i.queries.forEach(function(o){i.remove(o)})})},n.get=function(i){return this.queriesMap[i]},n.getAll=function(){return this.queries},n.find=function(i,o){var u=qi(i,o),c=u[0];return typeof c.exact=="undefined"&&(c.exact=!0),this.queries.find(function(f){return bx(c,f)})},n.findAll=function(i,o){var u=qi(i,o),c=u[0];return Object.keys(c).length>0?this.queries.filter(function(f){return bx(c,f)}):this.queries},n.notify=function(i){var o=this;_t.batch(function(){o.listeners.forEach(function(u){u(i)})})},n.onFocus=function(){var i=this;_t.batch(function(){i.queries.forEach(function(o){o.onFocus()})})},n.onOnline=function(){var i=this;_t.batch(function(){i.queries.forEach(function(o){o.onOnline()})})},t}(vu),KT=function(){function e(n){this.options=ve({},n.defaultOptions,n.options),this.mutationId=n.mutationId,this.mutationCache=n.mutationCache,this.observers=[],this.state=n.state||YT(),this.meta=n.meta}var t=e.prototype;return t.setState=function(r){this.dispatch({type:"setState",state:r})},t.addObserver=function(r){this.observers.indexOf(r)===-1&&this.observers.push(r)},t.removeObserver=function(r){this.observers=this.observers.filter(function(i){return i!==r})},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(rn).catch(rn)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var r=this,i,o=this.state.status==="loading",u=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),u=u.then(function(){r.mutationCache.config.onMutate==null||r.mutationCache.config.onMutate(r.state.variables,r)}).then(function(){return r.options.onMutate==null?void 0:r.options.onMutate(r.state.variables)}).then(function(c){c!==r.state.context&&r.dispatch({type:"loading",context:c,variables:r.state.variables})})),u.then(function(){return r.executeMutation()}).then(function(c){i=c,r.mutationCache.config.onSuccess==null||r.mutationCache.config.onSuccess(i,r.state.variables,r.state.context,r)}).then(function(){return r.options.onSuccess==null?void 0:r.options.onSuccess(i,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(i,null,r.state.variables,r.state.context)}).then(function(){return r.dispatch({type:"success",data:i}),i}).catch(function(c){return r.mutationCache.config.onError==null||r.mutationCache.config.onError(c,r.state.variables,r.state.context,r),Bc().error(c),Promise.resolve().then(function(){return r.options.onError==null?void 0:r.options.onError(c,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(void 0,c,r.state.variables,r.state.context)}).then(function(){throw r.dispatch({type:"error",error:c}),c})})},t.executeMutation=function(){var r=this,i;return this.retryer=new Ox({fn:function(){return r.options.mutationFn?r.options.mutationFn(r.state.variables):Promise.reject("No mutationFn found")},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:(i=this.options.retry)!=null?i:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(r){var i=this;this.state=qT(this.state,r),_t.batch(function(){i.observers.forEach(function(o){o.onMutationUpdate(r)}),i.mutationCache.notify(i)})},e}();function YT(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function qT(e,t){switch(t.type){case"failed":return ve({},e,{failureCount:e.failureCount+1});case"pause":return ve({},e,{isPaused:!0});case"continue":return ve({},e,{isPaused:!1});case"loading":return ve({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return ve({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return ve({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return ve({},e,t.state);default:return e}}var ZT=function(e){pu(t,e);function t(r){var i;return i=e.call(this)||this,i.config=r||{},i.mutations=[],i.mutationId=0,i}var n=t.prototype;return n.build=function(i,o,u){var c=new KT({mutationCache:this,mutationId:++this.mutationId,options:i.defaultMutationOptions(o),state:u,defaultOptions:o.mutationKey?i.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(c),c},n.add=function(i){this.mutations.push(i),this.notify(i)},n.remove=function(i){this.mutations=this.mutations.filter(function(o){return o!==i}),i.cancel(),this.notify(i)},n.clear=function(){var i=this;_t.batch(function(){i.mutations.forEach(function(o){i.remove(o)})})},n.getAll=function(){return this.mutations},n.find=function(i){return typeof i.exact=="undefined"&&(i.exact=!0),this.mutations.find(function(o){return _x(i,o)})},n.findAll=function(i){return this.mutations.filter(function(o){return _x(i,o)})},n.notify=function(i){var o=this;_t.batch(function(){o.listeners.forEach(function(u){u(i)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var i=this.mutations.filter(function(o){return o.state.isPaused});return _t.batch(function(){return i.reduce(function(o,u){return o.then(function(){return u.continue().catch(rn)})},Promise.resolve())})},t}(vu);function GT(){return{onFetch:function(t){t.fetchFn=function(){var n,r,i,o,u,c,f=(n=t.fetchOptions)==null||(r=n.meta)==null?void 0:r.refetchPage,d=(i=t.fetchOptions)==null||(o=i.meta)==null?void 0:o.fetchMore,p=d==null?void 0:d.pageParam,m=(d==null?void 0:d.direction)==="forward",g=(d==null?void 0:d.direction)==="backward",_=((u=t.state.data)==null?void 0:u.pages)||[],C=((c=t.state.data)==null?void 0:c.pageParams)||[],E=Ex(),T=E==null?void 0:E.signal,k=C,x=!1,b=t.options.queryFn||function(){return Promise.reject("Missing queryFn")},P=function(se,fe,_e,Pe){return k=Pe?[fe].concat(k):[].concat(k,[fe]),Pe?[_e].concat(se):[].concat(se,[_e])},R=function(se,fe,_e,Pe){if(x)return Promise.reject("Cancelled");if(typeof _e=="undefined"&&!fe&&se.length)return Promise.resolve(se);var V={queryKey:t.queryKey,signal:T,pageParam:_e,meta:t.meta},re=b(V),de=Promise.resolve(re).then(function(ze){return P(se,_e,ze,Pe)});if(Wc(re)){var we=de;we.cancel=re.cancel}return de},D;if(!_.length)D=R([]);else if(m){var F=typeof p!="undefined",Q=F?p:Px(t.options,_);D=R(_,F,Q)}else if(g){var te=typeof p!="undefined",q=te?p:XT(t.options,_);D=R(_,te,q,!0)}else(function(){k=[];var Y=typeof t.options.getNextPageParam=="undefined",se=f&&_[0]?f(_[0],0,_):!0;D=se?R([],Y,C[0]):Promise.resolve(P([],C[0],_[0]));for(var fe=function(V){D=D.then(function(re){var de=f&&_[V]?f(_[V],V,_):!0;if(de){var we=Y?C[V]:Px(t.options,re);return R(re,Y,we)}return Promise.resolve(P(re,C[V],_[V]))})},_e=1;_e<_.length;_e++)fe(_e)})();var G=D.then(function(Y){return{pages:Y,pageParams:k}}),j=G;return j.cancel=function(){x=!0,E==null||E.abort(),Wc(D)&&D.cancel()},G}}}}function Px(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function XT(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}var Ax=function(){function e(n){n===void 0&&(n={}),this.queryCache=n.queryCache||new QT,this.mutationCache=n.mutationCache||new ZT,this.defaultOptions=n.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var r=this;this.unsubscribeFocus=mu.subscribe(function(){mu.isFocused()&&jc.isOnline()&&(r.mutationCache.onFocus(),r.queryCache.onFocus())}),this.unsubscribeOnline=jc.subscribe(function(){mu.isFocused()&&jc.isOnline()&&(r.mutationCache.onOnline(),r.queryCache.onOnline())})},t.unmount=function(){var r,i;(r=this.unsubscribeFocus)==null||r.call(this),(i=this.unsubscribeOnline)==null||i.call(this)},t.isFetching=function(r,i){var o=qi(r,i),u=o[0];return u.fetching=!0,this.queryCache.findAll(u).length},t.isMutating=function(r){return this.mutationCache.findAll(ve({},r,{fetching:!0})).length},t.getQueryData=function(r,i){var o;return(o=this.queryCache.find(r,i))==null?void 0:o.state.data},t.getQueriesData=function(r){return this.getQueryCache().findAll(r).map(function(i){var o=i.queryKey,u=i.state,c=u.data;return[o,c]})},t.setQueryData=function(r,i,o){var u=Fc(r),c=this.defaultQueryOptions(u);return this.queryCache.build(this,c).setData(i,o)},t.setQueriesData=function(r,i,o){var u=this;return _t.batch(function(){return u.getQueryCache().findAll(r).map(function(c){var f=c.queryKey;return[f,u.setQueryData(f,i,o)]})})},t.getQueryState=function(r,i){var o;return(o=this.queryCache.find(r,i))==null?void 0:o.state},t.removeQueries=function(r,i){var o=qi(r,i),u=o[0],c=this.queryCache;_t.batch(function(){c.findAll(u).forEach(function(f){c.remove(f)})})},t.resetQueries=function(r,i,o){var u=this,c=qi(r,i,o),f=c[0],d=c[1],p=this.queryCache,m=ve({},f,{active:!0});return _t.batch(function(){return p.findAll(f).forEach(function(g){g.reset()}),u.refetchQueries(m,d)})},t.cancelQueries=function(r,i,o){var u=this,c=qi(r,i,o),f=c[0],d=c[1],p=d===void 0?{}:d;typeof p.revert=="undefined"&&(p.revert=!0);var m=_t.batch(function(){return u.queryCache.findAll(f).map(function(g){return g.cancel(p)})});return Promise.all(m).then(rn).catch(rn)},t.invalidateQueries=function(r,i,o){var u,c,f,d=this,p=qi(r,i,o),m=p[0],g=p[1],_=ve({},m,{active:(u=(c=m.refetchActive)!=null?c:m.active)!=null?u:!0,inactive:(f=m.refetchInactive)!=null?f:!1});return _t.batch(function(){return d.queryCache.findAll(m).forEach(function(C){C.invalidate()}),d.refetchQueries(_,g)})},t.refetchQueries=function(r,i,o){var u=this,c=qi(r,i,o),f=c[0],d=c[1],p=_t.batch(function(){return u.queryCache.findAll(f).map(function(g){return g.fetch(void 0,ve({},d,{meta:{refetchPage:f==null?void 0:f.refetchPage}}))})}),m=Promise.all(p).then(rn);return d!=null&&d.throwOnError||(m=m.catch(rn)),m},t.fetchQuery=function(r,i,o){var u=Fc(r,i,o),c=this.defaultQueryOptions(u);typeof c.retry=="undefined"&&(c.retry=!1);var f=this.queryCache.build(this,c);return f.isStaleByTime(c.staleTime)?f.fetch(c):Promise.resolve(f.state.data)},t.prefetchQuery=function(r,i,o){return this.fetchQuery(r,i,o).then(rn).catch(rn)},t.fetchInfiniteQuery=function(r,i,o){var u=Fc(r,i,o);return u.behavior=GT(),this.fetchQuery(u)},t.prefetchInfiniteQuery=function(r,i,o){return this.fetchInfiniteQuery(r,i,o).then(rn).catch(rn)},t.cancelMutations=function(){var r=this,i=_t.batch(function(){return r.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(i).then(rn).catch(rn)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(r){return this.mutationCache.build(this,r).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(r){this.defaultOptions=r},t.setQueryDefaults=function(r,i){var o=this.queryDefaults.find(function(u){return Fa(r)===Fa(u.queryKey)});o?o.defaultOptions=i:this.queryDefaults.push({queryKey:r,defaultOptions:i})},t.getQueryDefaults=function(r){var i;return r?(i=this.queryDefaults.find(function(o){return $c(r,o.queryKey)}))==null?void 0:i.defaultOptions:void 0},t.setMutationDefaults=function(r,i){var o=this.mutationDefaults.find(function(u){return Fa(r)===Fa(u.mutationKey)});o?o.defaultOptions=i:this.mutationDefaults.push({mutationKey:r,defaultOptions:i})},t.getMutationDefaults=function(r){var i;return r?(i=this.mutationDefaults.find(function(o){return $c(r,o.mutationKey)}))==null?void 0:i.defaultOptions:void 0},t.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var i=ve({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!i.queryHash&&i.queryKey&&(i.queryHash=vv(i.queryKey,i)),i},t.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},t.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:ve({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),JT=function(e){pu(t,e);function t(r,i){var o;return o=e.call(this)||this,o.client=r,o.options=i,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(i),o}var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),Rx(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return gv(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return gv(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(i,o){var u=this.options,c=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(i),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=u.queryKey),this.updateQuery();var f=this.hasListeners();f&&Mx(this.currentQuery,c,this.options,u)&&this.executeFetch(),this.updateResult(o),f&&(this.currentQuery!==c||this.options.enabled!==u.enabled||this.options.staleTime!==u.staleTime)&&this.updateStaleTimeout();var d=this.computeRefetchInterval();f&&(this.currentQuery!==c||this.options.enabled!==u.enabled||d!==this.currentRefetchInterval)&&this.updateRefetchInterval(d)},n.getOptimisticResult=function(i){var o=this.client.defaultQueryObserverOptions(i),u=this.client.getQueryCache().build(this.client,o);return this.createResult(u,o)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(i,o){var u=this,c={},f=function(p){u.trackedProps.includes(p)||u.trackedProps.push(p)};return Object.keys(i).forEach(function(d){Object.defineProperty(c,d,{configurable:!1,enumerable:!0,get:function(){return f(d),i[d]}})}),(o.useErrorBoundary||o.suspense)&&f("error"),c},n.getNextResult=function(i){var o=this;return new Promise(function(u,c){var f=o.subscribe(function(d){d.isFetching||(f(),d.isError&&(i!=null&&i.throwOnError)?c(d.error):u(d))})})},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(i){return this.fetch(ve({},i,{meta:{refetchPage:i==null?void 0:i.refetchPage}}))},n.fetchOptimistic=function(i){var o=this,u=this.client.defaultQueryObserverOptions(i),c=this.client.getQueryCache().build(this.client,u);return c.fetch().then(function(){return o.createResult(c,u)})},n.fetch=function(i){var o=this;return this.executeFetch(i).then(function(){return o.updateResult(),o.currentResult})},n.executeFetch=function(i){this.updateQuery();var o=this.currentQuery.fetch(this.options,i);return i!=null&&i.throwOnError||(o=o.catch(rn)),o},n.updateStaleTimeout=function(){var i=this;if(this.clearStaleTimeout(),!(Dc||this.currentResult.isStale||!pv(this.options.staleTime))){var o=xx(this.currentResult.dataUpdatedAt,this.options.staleTime),u=o+1;this.staleTimeoutId=setTimeout(function(){i.currentResult.isStale||i.updateResult()},u)}},n.computeRefetchInterval=function(){var i;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(i=this.options.refetchInterval)!=null?i:!1},n.updateRefetchInterval=function(i){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=i,!(Dc||this.options.enabled===!1||!pv(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||mu.isFocused())&&o.executeFetch()},this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(i,o){var u=this.currentQuery,c=this.options,f=this.currentResult,d=this.currentResultState,p=this.currentResultOptions,m=i!==u,g=m?i.state:this.currentQueryInitialState,_=m?this.currentResult:this.previousQueryResult,C=i.state,E=C.dataUpdatedAt,T=C.error,k=C.errorUpdatedAt,x=C.isFetching,b=C.status,P=!1,R=!1,D;if(o.optimisticResults){var F=this.hasListeners(),Q=!F&&Rx(i,o),te=F&&Mx(i,u,o,c);(Q||te)&&(x=!0,E||(b="loading"))}if(o.keepPreviousData&&!C.dataUpdateCount&&(_!=null&&_.isSuccess)&&b!=="error")D=_.data,E=_.dataUpdatedAt,b=_.status,P=!0;else if(o.select&&typeof C.data!="undefined")if(f&&C.data===(d==null?void 0:d.data)&&o.select===this.selectFn)D=this.selectResult;else try{this.selectFn=o.select,D=o.select(C.data),o.structuralSharing!==!1&&(D=zc(f==null?void 0:f.data,D)),this.selectResult=D,this.selectError=null}catch(j){Bc().error(j),this.selectError=j}else D=C.data;if(typeof o.placeholderData!="undefined"&&typeof D=="undefined"&&(b==="loading"||b==="idle")){var q;if(f!=null&&f.isPlaceholderData&&o.placeholderData===(p==null?void 0:p.placeholderData))q=f.data;else if(q=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof q!="undefined")try{q=o.select(q),o.structuralSharing!==!1&&(q=zc(f==null?void 0:f.data,q)),this.selectError=null}catch(j){Bc().error(j),this.selectError=j}typeof q!="undefined"&&(b="success",D=q,R=!0)}this.selectError&&(T=this.selectError,D=this.selectResult,k=Date.now(),b="error");var G={status:b,isLoading:b==="loading",isSuccess:b==="success",isError:b==="error",isIdle:b==="idle",data:D,dataUpdatedAt:E,error:T,errorUpdatedAt:k,failureCount:C.fetchFailureCount,errorUpdateCount:C.errorUpdateCount,isFetched:C.dataUpdateCount>0||C.errorUpdateCount>0,isFetchedAfterMount:C.dataUpdateCount>g.dataUpdateCount||C.errorUpdateCount>g.errorUpdateCount,isFetching:x,isRefetching:x&&b!=="loading",isLoadingError:b==="error"&&C.dataUpdatedAt===0,isPlaceholderData:R,isPreviousData:P,isRefetchError:b==="error"&&C.dataUpdatedAt!==0,isStale:yv(i,o),refetch:this.refetch,remove:this.remove};return G},n.shouldNotifyListeners=function(i,o){if(!o)return!0;var u=this.options,c=u.notifyOnChangeProps,f=u.notifyOnChangePropsExclusions;if(!c&&!f||c==="tracked"&&!this.trackedProps.length)return!0;var d=c==="tracked"?this.trackedProps:c;return Object.keys(i).some(function(p){var m=p,g=i[m]!==o[m],_=d==null?void 0:d.some(function(E){return E===p}),C=f==null?void 0:f.some(function(E){return E===p});return g&&!C&&(!d||_)})},n.updateResult=function(i){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!$T(this.currentResult,o)){var u={cache:!0};(i==null?void 0:i.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(u.listeners=!0),this.notify(ve({},u,i))}},n.updateQuery=function(){var i=this.client.getQueryCache().build(this.client,this.options);if(i!==this.currentQuery){var o=this.currentQuery;this.currentQuery=i,this.currentQueryInitialState=i.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o==null||o.removeObserver(this),i.addObserver(this))}},n.onQueryUpdate=function(i){var o={};i.type==="success"?o.onSuccess=!0:i.type==="error"&&!Hc(i.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},n.notify=function(i){var o=this;_t.batch(function(){i.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):i.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),i.listeners&&o.listeners.forEach(function(u){u(o.currentResult)}),i.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},t}(vu);function e5(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rx(e,t){return e5(e,t)||e.state.dataUpdatedAt>0&&gv(e,t,t.refetchOnMount)}function gv(e,t,n){if(t.enabled!==!1){var r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&yv(e,t)}return!1}function Mx(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&yv(e,n)}function yv(e,t){return e.isStaleByTime(t.staleTime)}var t5=UE.unstable_batchedUpdates;_t.setBatchNotifyFunction(t5);var n5=console;BT(n5);var Nx=Ye.createContext(void 0),Dx=Ye.createContext(!1);function Lx(e){return e&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Nx),window.ReactQueryClientContext):Nx}var r5=function(){var t=Ye.useContext(Lx(Ye.useContext(Dx)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Fx=function(t){var n=t.client,r=t.contextSharing,i=r===void 0?!1:r,o=t.children;Ye.useEffect(function(){return n.mount(),function(){n.unmount()}},[n]);var u=Lx(i);return Ye.createElement(Dx.Provider,{value:i},Ye.createElement(u.Provider,{value:n},o))};function i5(){var e=!1;return{clearReset:function(){e=!1},reset:function(){e=!0},isReset:function(){return e}}}var a5=Ye.createContext(i5()),o5=function(){return Ye.useContext(a5)};function s5(e,t,n){return typeof t=="function"?t.apply(void 0,n):typeof t=="boolean"?t:!!e}function u5(e,t){var n=Ye.useRef(!1),r=Ye.useState(0),i=r[1],o=r5(),u=o5(),c=o.defaultQueryObserverOptions(e);c.optimisticResults=!0,c.onError&&(c.onError=_t.batchCalls(c.onError)),c.onSuccess&&(c.onSuccess=_t.batchCalls(c.onSuccess)),c.onSettled&&(c.onSettled=_t.batchCalls(c.onSettled)),c.suspense&&(typeof c.staleTime!="number"&&(c.staleTime=1e3),c.cacheTime===0&&(c.cacheTime=1)),(c.suspense||c.useErrorBoundary)&&(u.isReset()||(c.retryOnMount=!1));var f=Ye.useState(function(){return new t(o,c)}),d=f[0],p=d.getOptimisticResult(c);if(Ye.useEffect(function(){n.current=!0,u.clearReset();var m=d.subscribe(_t.batchCalls(function(){n.current&&i(function(g){return g+1})}));return d.updateResult(),function(){n.current=!1,m()}},[u,d]),Ye.useEffect(function(){d.setOptions(c,{listeners:!1})},[c,d]),c.suspense&&p.isLoading)throw d.fetchOptimistic(c).then(function(m){var g=m.data;c.onSuccess==null||c.onSuccess(g),c.onSettled==null||c.onSettled(g,null)}).catch(function(m){u.clearReset(),c.onError==null||c.onError(m),c.onSettled==null||c.onSettled(void 0,m)});if(p.isError&&!u.isReset()&&!p.isFetching&&s5(c.suspense,c.useErrorBoundary,[p.error,d.getCurrentQuery()]))throw p.error;return c.notifyOnChangeProps==="tracked"&&(p=d.trackResult(p,c)),p}function $x(e,t,n){var r=Fc(e,t,n);return u5(r,JT)}const l5={MIA:"MIA,FLL",TPA:"TPA,PIE",PHX:"PHX,AZA",RSW:"RSW,PGD",MCO:"MCO,SFB"};function c5(e){return e&&l5[e]||null}function f5(e,t){const n=[];let r=e;for(;fu(r,t);)n.push(r),r=Ra(r,1);return n}var Vc={exports:{}};/**
|
|
49
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var u=typeof o;if(u==="string"||u==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var c=n.apply(null,o);c&&r.push(c)}}else if(u==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var f in o)t.call(o,f)&&o[f]&&r.push(f)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(mx);var ET=mx.exports;const Yi=Xt(ET),hv=250;function IT({date:e,startDate:t,endDate:n,onChange:r,onHover:i,price:o,priceIcons:u,priceLoading:c}){const f=Ic(new Date),d=t?Oc(e,t):!1;let p=t&&n?Uw(e,Ic(t))&&fu(e,n):!1,m=n?Oc(e,n):!1,g=fu(e,f);return t&&Uw(e,t),Ve("div",{className:Yi({"a1-w-11 a1-h-11 a1-flex a1-flex-col a1-items-center a1-justify-center a1-cursor-pointer":!0,"a1-text-white":d||m,"a1-bg-gray-200":p,"a1-text-gray-700":!d&&!m,"a1-opacity-50 a1-cursor-not-allowed":g,"a1-relative hover:after:a1-z-10 hover:after:a1-left-0 hover:after:a1-right-0 hover:after:a1-absolute hover:after:a1-w-full hover:after:a1-h-full hover:after:a1-rounded-full hover:after:a1-ring-2 hover:before:a1-ring-primary":!g,"a1-relative after:a1-absolute after:a1-bg-gray-600 after:a1-top-0 after:a1-bottom-0 after:a1-left-0 after:a1-right-0 after:a1-rounded-full":d,"before:a1-absolute before:a1-left-1/2 before:a1-right-0 before:a1-top-0 before:a1-bottom-0 before:a1-bg-gray-200":d&&!!n,"a1-rounded-none":p,"a1-relative after:a1-absolute after:a1-bg-gray-600 after:a1-top-0 after:a1-bottom-0 after:a1-left-0 after:a1-right-0 after:a1-rounded-full before:a1-absolute before:a1-left-0 before:a1-right-1/2 before:a1-top-0 before:a1-bottom-0 before:a1-bg-gray-200":m}),onClick:()=>{g||r(new Date(e))},onMouseOver:()=>{g||i(new Date(e))},children:[J("span",{className:"a1-relative a1-z-20 a1-font-semibold a1-leading-[16px] a1-text-base",children:e.getDate()}),J("span",{className:Yi({"a1-text-[11px] a1-text-gray-500 a1-relative a1-z-20":!0,"a1-text-white":d||m,"a1-text-gray-700":p,"a1-opacity-0":(o===void 0||o===0)&&!c,"a1-blur-[3px]":c,"a1-text-green-700 a1-font-bold":(u==null?void 0:u.length)===1&&!(d||m)}),children:u||"100"})]})}function OT({origin:e,destination:t,initialDate:n,startDate:r,endDate:i,priceCalendar:o,onMonthViewChange:u,onChange:c,onReset:f}){const[d,p]=M.useState(Rw(n)),m=Vi(d,"MMMM yyyy"),g=vI(d),[_,C]=M.useState(null),[E,T]=M.useState(null);M.useEffect(()=>{T(r&&!i?_:i)},[_,r,i]),M.useEffect(()=>{r&&p(Rw(r))},[r]),M.useEffect(()=>{d&&u(g,Ra(g,42))},[d]);const k=["S","M","T","W","T","F","S"],x=new Array(6*7).fill(0).map((b,P)=>Ra(g,P));return Ve("div",{className:"a1-w-max",children:[Ve("div",{className:"a1-px-4 a1-py-2 a1-flex a1-gap-4",children:[J("button",{type:"button",onClick:()=>f(),className:"a1-text-white a1-tracking-wide a1-text-sm a1-bold a1-capitalize a1-bg-gray-600 a1-rounded-lg a1-px-2 a1-py-0.5",children:"Reset"}),Ve("div",{className:"a1-flex a1-flex-grow a1-justify-between a1-items-center a1-text-gray-700",children:[J("button",{type:"button",className:"a1-w-8 a1-h-8 a1-bg-white a1-rounded-full a1-flex a1-items-center a1-justify-center a1-text-gray-700 a1-p-0",onClick:()=>p(AO(d,{months:1})),children:J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"a1-w-6 a1-h-6",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),J("div",{className:"mx-2 a1-text-base",children:m}),J("button",{type:"button",className:"a1-w-8 a1-h-8 a1-bg-white a1-rounded-full a1-flex a1-items-center a1-justify-center a1-text-gray-700 a1-p-0",onClick:()=>p(dI(d,{months:1})),children:J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"a1-w-6 a1-h-6",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]})]}),J("div",{className:"a1-grid a1-grid-cols-7",children:k.map((b,P)=>J("div",{className:"a1-w-10 a1-h-10 a1-rounded-full a1-flex a1-items-center a1-justify-center a1-text-black a1-text-base",children:b},`${b}-${P}`))}),J("div",{className:"a1-grid a1-grid-cols-7 a1-grid-rows-6",children:x.map(b=>{const P=Vi(b,"yyyy-MM-dd"),R=o==null?void 0:o[P];return J(IT,{date:b,startDate:r,endDate:E,onChange:c,onHover:()=>C(b),price:R==null?void 0:R.transformedPrice,priceIcons:R==null?void 0:R.priceIcons,priceLoading:!!(R!=null&&R.loading)},b.toISOString())})}),J("div",{children:J("div",{className:"a1-text-xs a1-gray-700 a1-w-[250px] a1-px-3 a1-py-2 a1-leading-[12px]",children:"Estimated one-way fares; actual fares may vary"})})]})}function TT({origin:e,destination:t,onChange:n,onMonthViewChange:r,priceCalendar:i,className:o,primaryColor:u,secondaryColor:c,startDateLabel:f="Start Date",endDateLabel:d="End Date"}){const[p,m]=M.useState(null),[g,_]=M.useState(null),[C,E]=M.useState(!1),[T,k]=M.useState(new Date),x=M.useRef(null),b=M.useRef(!1),[P,R]=M.useState(new Gw),D=G=>{const j=G.getTime()<((p==null?void 0:p.getTime())||0);p?!g&&j?m(G):g?p&&g&&(Oc(G,p)&&Oc(G,g)?(m(G),_(null)):fu(G,g)&&fu(G,Ra(p,3))?(b.current=!0,m(G),setTimeout(()=>{E(!1)},hv)):(b.current=!0,_(G),setTimeout(()=>{E(!1)},hv))):(b.current=!0,_(G),setTimeout(()=>{E(!1)},hv)):m(G)},F=()=>{m(null),_(null)};M.useEffect(()=>{let G=null;if(x!=null&&x.current){const j=Nc(document,"click"),Y=Nc(x.current,"click");G=kT(j.pipe(hu(()=>({tag:"body",value:!1}))),P.pipe(hu(fe=>({tag:"calendar",value:fe}))),Y.pipe(hu(()=>({tag:"controls",value:!0})))).pipe(CT(50),ST(fe=>fe.length>0)).subscribe(fe=>{let _e=fe.some(Pe=>Pe.value===!0);b.current?b.current=!1:E(_e)})}return()=>{G==null||G.unsubscribe()}},[x]),M.useEffect(()=>{n(p,g)},[p,g]);const Q="a1-bg-white a1-border a1-border-gray-300 a1-rounded-lg a1-shadow-md",te="a1-absolute a1-left-2 a1-right-2 a1-top-1/2 @2xl:a1-top-2 @2xl:a1-bottom-2 @2xl:a1-left-1/2 a1-rounded-lg a1-h-[2px] @2xl:a1-h-[initial] @2xl:a1-w-[2px] a1-bg-gray-200";let q={};return u&&(q["--color-primary"]=u),c&&(q["--color-secondary"]=c),J("div",{id:"A1-DateRangePicker",className:o,style:q,children:Ve("div",{ref:x,className:Yi({"a1-relative a1-h-full a1-flex a1-flex-col @2xl:a1-flex-row @2xl:a1-items-center a1-gap-4 a1-px-3 a1-py-2 a1-rounded-lg a1-bg-white":!0,"a1-border-2 a1-border-primary":C,"a1-border-2 a1-border-gray-200":!C}),children:[Ve("div",{className:"a1-flex a1-grow a1-gap-2 a1-overflow-hidden",children:[J("span",{children:J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,className:"a1-w-6 a1-h-6 a1-stroke-black",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z"})})}),J("input",{type:"text",name:"start-date",value:p?p.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}):"",placeholder:f,autoComplete:"off",className:"a1-all-initial focus:a1-outline-none disabled:a1-bg-white a1-text-black a1-text-base a1-w-full",readOnly:!0})]}),J("div",{className:te}),Ve("div",{className:"a1-flex a1-grow a1-gap-2 a1-overflow-hidden",children:[J("span",{className:"@2xl:a1-hidden",children:J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,className:"a1-w-6 a1-h-6 a1-stroke-black",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z"})})}),J("input",{type:"text",name:"end-date",value:g?g.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}):"",placeholder:d,autoComplete:"off",className:"focus:a1-outline-none disabled:a1-bg-white a1-text-black a1-text-base a1-w-full",readOnly:!0})]}),J(fI,{show:C,className:"a1-absolute a1-z-10 a1-top-full a1-left-1/2 a1--translate-x-1/2",enter:"a1-transition a1-duration-100 a1-ease-out",enterFrom:"a1-transform a1-scale-95 a1-opacity-0",enterTo:"a1-transform a1-scale-100 a1-opacity-100",leave:"a1-transition a1-duration-75 a1-ease-out",leaveFrom:"a1-transform a1-scale-100 a1-opacity-100",leaveTo:"a1-transform a1-scale-95 a1-opacity-0",children:J("div",{id:"Calendar",className:`a1-mt-2 ${Q}`,onClick:G=>P.next(!0),children:J(OT,{origin:e,destination:t,initialDate:T,startDate:p,endDate:g,onChange:D,onReset:F,onMonthViewChange:r,priceCalendar:i},T.toISOString())})})]})})}var gx={exports:{}},PT="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",AT=PT,RT=AT;function yx(){}function wx(){}wx.resetWarningCache=yx;var MT=function(){function e(r,i,o,u,c,f){if(f!==RT){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:wx,resetWarningCache:yx};return n.PropTypes=n,n};gx.exports=MT();var NT=gx.exports;const H=Xt(NT);function pu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,rv(e,t)}var vu=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(r){var i=this,o=r||function(){};return this.listeners.push(o),this.onSubscribe(),function(){i.listeners=i.listeners.filter(function(u){return u!==o}),i.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}();function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ve.apply(this,arguments)}var Dc=typeof window=="undefined";function rn(){}function DT(e,t){return typeof e=="function"?e(t):e}function pv(e){return typeof e=="number"&&e>=0&&e!==1/0}function Lc(e){return Array.isArray(e)?e:[e]}function xx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fc(e,t,n){return Uc(e)?typeof t=="function"?ve({},n,{queryKey:e,queryFn:t}):ve({},t,{queryKey:e}):e}function qi(e,t,n){return Uc(e)?[ve({},t,{queryKey:e}),n]:[e||{},t]}function LT(e,t){if(e===!0&&t===!0||e==null&&t==null)return"all";if(e===!1&&t===!1)return"none";var n=e!=null?e:!t;return n?"active":"inactive"}function bx(e,t){var n=e.active,r=e.exact,i=e.fetching,o=e.inactive,u=e.predicate,c=e.queryKey,f=e.stale;if(Uc(c)){if(r){if(t.queryHash!==vv(c,t.options))return!1}else if(!$c(t.queryKey,c))return!1}var d=LT(n,o);if(d==="none")return!1;if(d!=="all"){var p=t.isActive();if(d==="active"&&!p||d==="inactive"&&p)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||typeof i=="boolean"&&t.isFetching()!==i||u&&!u(t))}function _x(e,t){var n=e.exact,r=e.fetching,i=e.predicate,o=e.mutationKey;if(Uc(o)){if(!t.options.mutationKey)return!1;if(n){if(Fa(t.options.mutationKey)!==Fa(o))return!1}else if(!$c(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function vv(e,t){var n=(t==null?void 0:t.queryKeyHashFn)||Fa;return n(e)}function Fa(e){var t=Lc(e);return FT(t)}function FT(e){return JSON.stringify(e,function(t,n){return mv(n)?Object.keys(n).sort().reduce(function(r,i){return r[i]=n[i],r},{}):n})}function $c(e,t){return kx(Lc(e),Lc(t))}function kx(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(function(n){return!kx(e[n],t[n])}):!1}function zc(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||mv(e)&&mv(t)){for(var r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,u=n?[]:{},c=0,f=0;f<o;f++){var d=n?f:i[f];u[d]=zc(e[d],t[d]),u[d]===e[d]&&c++}return r===o&&c===r?e:u}return t}function $T(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function mv(e){if(!Sx(e))return!1;var t=e.constructor;if(typeof t=="undefined")return!0;var n=t.prototype;return!(!Sx(n)||!n.hasOwnProperty("isPrototypeOf"))}function Sx(e){return Object.prototype.toString.call(e)==="[object Object]"}function Uc(e){return typeof e=="string"||Array.isArray(e)}function zT(e){return new Promise(function(t){setTimeout(t,e)})}function Cx(e){Promise.resolve().then(e).catch(function(t){return setTimeout(function(){throw t})})}function Ex(){if(typeof AbortController=="function")return new AbortController}var UT=function(e){pu(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(i){var o;if(!Dc&&((o=window)!=null&&o.addEventListener)){var u=function(){return i()};return window.addEventListener("visibilitychange",u,!1),window.addEventListener("focus",u,!1),function(){window.removeEventListener("visibilitychange",u),window.removeEventListener("focus",u)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},n.setEventListener=function(i){var o,u=this;this.setup=i,(o=this.cleanup)==null||o.call(this),this.cleanup=i(function(c){typeof c=="boolean"?u.setFocused(c):u.onFocus()})},n.setFocused=function(i){this.focused=i,i&&this.onFocus()},n.onFocus=function(){this.listeners.forEach(function(i){i()})},n.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},t}(vu),mu=new UT,jT=function(e){pu(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(i){var o;if(!Dc&&((o=window)!=null&&o.addEventListener)){var u=function(){return i()};return window.addEventListener("online",u,!1),window.addEventListener("offline",u,!1),function(){window.removeEventListener("online",u),window.removeEventListener("offline",u)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},n.setEventListener=function(i){var o,u=this;this.setup=i,(o=this.cleanup)==null||o.call(this),this.cleanup=i(function(c){typeof c=="boolean"?u.setOnline(c):u.onOnline()})},n.setOnline=function(i){this.online=i,i&&this.onOnline()},n.onOnline=function(){this.listeners.forEach(function(i){i()})},n.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine},t}(vu),jc=new jT;function WT(e){return Math.min(1e3*Math.pow(2,e),3e4)}function Wc(e){return typeof(e==null?void 0:e.cancel)=="function"}var Ix=function(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent};function Hc(e){return e instanceof Ix}var Ox=function(t){var n=this,r=!1,i,o,u,c;this.abort=t.abort,this.cancel=function(g){return i==null?void 0:i(g)},this.cancelRetry=function(){r=!0},this.continueRetry=function(){r=!1},this.continue=function(){return o==null?void 0:o()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(g,_){u=g,c=_});var f=function(_){n.isResolved||(n.isResolved=!0,t.onSuccess==null||t.onSuccess(_),o==null||o(),u(_))},d=function(_){n.isResolved||(n.isResolved=!0,t.onError==null||t.onError(_),o==null||o(),c(_))},p=function(){return new Promise(function(_){o=_,n.isPaused=!0,t.onPause==null||t.onPause()}).then(function(){o=void 0,n.isPaused=!1,t.onContinue==null||t.onContinue()})},m=function g(){if(!n.isResolved){var _;try{_=t.fn()}catch(C){_=Promise.reject(C)}i=function(E){if(!n.isResolved&&(d(new Ix(E)),n.abort==null||n.abort(),Wc(_)))try{_.cancel()}catch(T){}},n.isTransportCancelable=Wc(_),Promise.resolve(_).then(f).catch(function(C){var E,T;if(!n.isResolved){var k=(E=t.retry)!=null?E:3,x=(T=t.retryDelay)!=null?T:WT,b=typeof x=="function"?x(n.failureCount,C):x,P=k===!0||typeof k=="number"&&n.failureCount<k||typeof k=="function"&&k(n.failureCount,C);if(r||!P){d(C);return}n.failureCount++,t.onFail==null||t.onFail(n.failureCount,C),zT(b).then(function(){if(!mu.isFocused()||!jc.isOnline())return p()}).then(function(){r?d(C):g()})}})}};m()},HT=function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(n){n()},this.batchNotifyFn=function(n){n()}}var t=e.prototype;return t.batch=function(r){var i;this.transactions++;try{i=r()}finally{this.transactions--,this.transactions||this.flush()}return i},t.schedule=function(r){var i=this;this.transactions?this.queue.push(r):Cx(function(){i.notifyFn(r)})},t.batchCalls=function(r){var i=this;return function(){for(var o=arguments.length,u=new Array(o),c=0;c<o;c++)u[c]=arguments[c];i.schedule(function(){r.apply(void 0,u)})}},t.flush=function(){var r=this,i=this.queue;this.queue=[],i.length&&Cx(function(){r.batchNotifyFn(function(){i.forEach(function(o){r.notifyFn(o)})})})},t.setNotifyFunction=function(r){this.notifyFn=r},t.setBatchNotifyFunction=function(r){this.batchNotifyFn=r},e}(),_t=new HT,Tx=console;function Bc(){return Tx}function BT(e){Tx=e}var VT=function(){function e(n){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.cache=n.cache,this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.initialState=n.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=n.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(r){var i;this.options=ve({},this.defaultOptions,r),this.meta=r==null?void 0:r.meta,this.cacheTime=Math.max(this.cacheTime||0,(i=this.options.cacheTime)!=null?i:5*60*1e3)},t.setDefaultOptions=function(r){this.defaultOptions=r},t.scheduleGc=function(){var r=this;this.clearGcTimeout(),pv(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){r.optionalRemove()},this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(r,i){var o,u,c=this.state.data,f=DT(r,c);return(o=(u=this.options).isDataEqual)!=null&&o.call(u,c,f)?f=c:this.options.structuralSharing!==!1&&(f=zc(c,f)),this.dispatch({data:f,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt}),f},t.setState=function(r,i){this.dispatch({type:"setState",state:r,setStateOptions:i})},t.cancel=function(r){var i,o=this.promise;return(i=this.retryer)==null||i.cancel(r),o?o.then(rn).catch(rn):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some(function(r){return r.options.enabled!==!1})},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(r){return r.getCurrentResult().isStale})},t.isStaleByTime=function(r){return r===void 0&&(r=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!xx(this.state.dataUpdatedAt,r)},t.onFocus=function(){var r,i=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});i&&i.refetch(),(r=this.retryer)==null||r.continue()},t.onOnline=function(){var r,i=this.observers.find(function(o){return o.shouldFetchOnReconnect()});i&&i.refetch(),(r=this.retryer)==null||r.continue()},t.addObserver=function(r){this.observers.indexOf(r)===-1&&(this.observers.push(r),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:r}))},t.removeObserver=function(r){this.observers.indexOf(r)!==-1&&(this.observers=this.observers.filter(function(i){return i!==r}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:r}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(r,i){var o=this,u,c,f;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var d;return(d=this.retryer)==null||d.continueRetry(),this.promise}}if(r&&this.setOptions(r),!this.options.queryFn){var p=this.observers.find(function(x){return x.options.queryFn});p&&this.setOptions(p.options)}var m=Lc(this.queryKey),g=Ex(),_={queryKey:m,pageParam:void 0,meta:this.meta};Object.defineProperty(_,"signal",{enumerable:!0,get:function(){if(g)return o.abortSignalConsumed=!0,g.signal}});var C=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(_)):Promise.reject("Missing queryFn")},E={fetchOptions:i,options:this.options,queryKey:m,state:this.state,fetchFn:C,meta:this.meta};if((u=this.options.behavior)!=null&&u.onFetch){var T;(T=this.options.behavior)==null||T.onFetch(E)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((c=E.fetchOptions)==null?void 0:c.meta)){var k;this.dispatch({type:"fetch",meta:(k=E.fetchOptions)==null?void 0:k.meta})}return this.retryer=new Ox({fn:E.fetchFn,abort:g==null||(f=g.abort)==null?void 0:f.bind(g),onSuccess:function(b){o.setData(b),o.cache.config.onSuccess==null||o.cache.config.onSuccess(b,o),o.cacheTime===0&&o.optionalRemove()},onError:function(b){Hc(b)&&b.silent||o.dispatch({type:"error",error:b}),Hc(b)||(o.cache.config.onError==null||o.cache.config.onError(b,o),Bc().error(b)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:E.options.retry,retryDelay:E.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(r){var i=this;this.state=this.reducer(this.state,r),_t.batch(function(){i.observers.forEach(function(o){o.onQueryUpdate(r)}),i.cache.notify({query:i,type:"queryUpdated",action:r})})},t.getDefaultState=function(r){var i=typeof r.initialData=="function"?r.initialData():r.initialData,o=typeof r.initialData!="undefined",u=o?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0,c=typeof i!="undefined";return{data:i,dataUpdateCount:0,dataUpdatedAt:c?u!=null?u:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:c?"success":"idle"}},t.reducer=function(r,i){var o,u;switch(i.type){case"failed":return ve({},r,{fetchFailureCount:r.fetchFailureCount+1});case"pause":return ve({},r,{isPaused:!0});case"continue":return ve({},r,{isPaused:!1});case"fetch":return ve({},r,{fetchFailureCount:0,fetchMeta:(o=i.meta)!=null?o:null,isFetching:!0,isPaused:!1},!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return ve({},r,{data:i.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(u=i.dataUpdatedAt)!=null?u:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var c=i.error;return Hc(c)&&c.revert&&this.revertState?ve({},this.revertState):ve({},r,{error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return ve({},r,{isInvalidated:!0});case"setState":return ve({},r,i.state);default:return r}},e}(),QT=function(e){pu(t,e);function t(r){var i;return i=e.call(this)||this,i.config=r||{},i.queries=[],i.queriesMap={},i}var n=t.prototype;return n.build=function(i,o,u){var c,f=o.queryKey,d=(c=o.queryHash)!=null?c:vv(f,o),p=this.get(d);return p||(p=new VT({cache:this,queryKey:f,queryHash:d,options:i.defaultQueryOptions(o),state:u,defaultOptions:i.getQueryDefaults(f),meta:o.meta}),this.add(p)),p},n.add=function(i){this.queriesMap[i.queryHash]||(this.queriesMap[i.queryHash]=i,this.queries.push(i),this.notify({type:"queryAdded",query:i}))},n.remove=function(i){var o=this.queriesMap[i.queryHash];o&&(i.destroy(),this.queries=this.queries.filter(function(u){return u!==i}),o===i&&delete this.queriesMap[i.queryHash],this.notify({type:"queryRemoved",query:i}))},n.clear=function(){var i=this;_t.batch(function(){i.queries.forEach(function(o){i.remove(o)})})},n.get=function(i){return this.queriesMap[i]},n.getAll=function(){return this.queries},n.find=function(i,o){var u=qi(i,o),c=u[0];return typeof c.exact=="undefined"&&(c.exact=!0),this.queries.find(function(f){return bx(c,f)})},n.findAll=function(i,o){var u=qi(i,o),c=u[0];return Object.keys(c).length>0?this.queries.filter(function(f){return bx(c,f)}):this.queries},n.notify=function(i){var o=this;_t.batch(function(){o.listeners.forEach(function(u){u(i)})})},n.onFocus=function(){var i=this;_t.batch(function(){i.queries.forEach(function(o){o.onFocus()})})},n.onOnline=function(){var i=this;_t.batch(function(){i.queries.forEach(function(o){o.onOnline()})})},t}(vu),KT=function(){function e(n){this.options=ve({},n.defaultOptions,n.options),this.mutationId=n.mutationId,this.mutationCache=n.mutationCache,this.observers=[],this.state=n.state||YT(),this.meta=n.meta}var t=e.prototype;return t.setState=function(r){this.dispatch({type:"setState",state:r})},t.addObserver=function(r){this.observers.indexOf(r)===-1&&this.observers.push(r)},t.removeObserver=function(r){this.observers=this.observers.filter(function(i){return i!==r})},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(rn).catch(rn)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var r=this,i,o=this.state.status==="loading",u=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),u=u.then(function(){r.mutationCache.config.onMutate==null||r.mutationCache.config.onMutate(r.state.variables,r)}).then(function(){return r.options.onMutate==null?void 0:r.options.onMutate(r.state.variables)}).then(function(c){c!==r.state.context&&r.dispatch({type:"loading",context:c,variables:r.state.variables})})),u.then(function(){return r.executeMutation()}).then(function(c){i=c,r.mutationCache.config.onSuccess==null||r.mutationCache.config.onSuccess(i,r.state.variables,r.state.context,r)}).then(function(){return r.options.onSuccess==null?void 0:r.options.onSuccess(i,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(i,null,r.state.variables,r.state.context)}).then(function(){return r.dispatch({type:"success",data:i}),i}).catch(function(c){return r.mutationCache.config.onError==null||r.mutationCache.config.onError(c,r.state.variables,r.state.context,r),Bc().error(c),Promise.resolve().then(function(){return r.options.onError==null?void 0:r.options.onError(c,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(void 0,c,r.state.variables,r.state.context)}).then(function(){throw r.dispatch({type:"error",error:c}),c})})},t.executeMutation=function(){var r=this,i;return this.retryer=new Ox({fn:function(){return r.options.mutationFn?r.options.mutationFn(r.state.variables):Promise.reject("No mutationFn found")},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:(i=this.options.retry)!=null?i:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(r){var i=this;this.state=qT(this.state,r),_t.batch(function(){i.observers.forEach(function(o){o.onMutationUpdate(r)}),i.mutationCache.notify(i)})},e}();function YT(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function qT(e,t){switch(t.type){case"failed":return ve({},e,{failureCount:e.failureCount+1});case"pause":return ve({},e,{isPaused:!0});case"continue":return ve({},e,{isPaused:!1});case"loading":return ve({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return ve({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return ve({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return ve({},e,t.state);default:return e}}var ZT=function(e){pu(t,e);function t(r){var i;return i=e.call(this)||this,i.config=r||{},i.mutations=[],i.mutationId=0,i}var n=t.prototype;return n.build=function(i,o,u){var c=new KT({mutationCache:this,mutationId:++this.mutationId,options:i.defaultMutationOptions(o),state:u,defaultOptions:o.mutationKey?i.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(c),c},n.add=function(i){this.mutations.push(i),this.notify(i)},n.remove=function(i){this.mutations=this.mutations.filter(function(o){return o!==i}),i.cancel(),this.notify(i)},n.clear=function(){var i=this;_t.batch(function(){i.mutations.forEach(function(o){i.remove(o)})})},n.getAll=function(){return this.mutations},n.find=function(i){return typeof i.exact=="undefined"&&(i.exact=!0),this.mutations.find(function(o){return _x(i,o)})},n.findAll=function(i){return this.mutations.filter(function(o){return _x(i,o)})},n.notify=function(i){var o=this;_t.batch(function(){o.listeners.forEach(function(u){u(i)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var i=this.mutations.filter(function(o){return o.state.isPaused});return _t.batch(function(){return i.reduce(function(o,u){return o.then(function(){return u.continue().catch(rn)})},Promise.resolve())})},t}(vu);function GT(){return{onFetch:function(t){t.fetchFn=function(){var n,r,i,o,u,c,f=(n=t.fetchOptions)==null||(r=n.meta)==null?void 0:r.refetchPage,d=(i=t.fetchOptions)==null||(o=i.meta)==null?void 0:o.fetchMore,p=d==null?void 0:d.pageParam,m=(d==null?void 0:d.direction)==="forward",g=(d==null?void 0:d.direction)==="backward",_=((u=t.state.data)==null?void 0:u.pages)||[],C=((c=t.state.data)==null?void 0:c.pageParams)||[],E=Ex(),T=E==null?void 0:E.signal,k=C,x=!1,b=t.options.queryFn||function(){return Promise.reject("Missing queryFn")},P=function(se,fe,_e,Pe){return k=Pe?[fe].concat(k):[].concat(k,[fe]),Pe?[_e].concat(se):[].concat(se,[_e])},R=function(se,fe,_e,Pe){if(x)return Promise.reject("Cancelled");if(typeof _e=="undefined"&&!fe&&se.length)return Promise.resolve(se);var V={queryKey:t.queryKey,signal:T,pageParam:_e,meta:t.meta},re=b(V),de=Promise.resolve(re).then(function(ze){return P(se,_e,ze,Pe)});if(Wc(re)){var we=de;we.cancel=re.cancel}return de},D;if(!_.length)D=R([]);else if(m){var F=typeof p!="undefined",Q=F?p:Px(t.options,_);D=R(_,F,Q)}else if(g){var te=typeof p!="undefined",q=te?p:XT(t.options,_);D=R(_,te,q,!0)}else(function(){k=[];var Y=typeof t.options.getNextPageParam=="undefined",se=f&&_[0]?f(_[0],0,_):!0;D=se?R([],Y,C[0]):Promise.resolve(P([],C[0],_[0]));for(var fe=function(V){D=D.then(function(re){var de=f&&_[V]?f(_[V],V,_):!0;if(de){var we=Y?C[V]:Px(t.options,re);return R(re,Y,we)}return Promise.resolve(P(re,C[V],_[V]))})},_e=1;_e<_.length;_e++)fe(_e)})();var G=D.then(function(Y){return{pages:Y,pageParams:k}}),j=G;return j.cancel=function(){x=!0,E==null||E.abort(),Wc(D)&&D.cancel()},G}}}}function Px(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function XT(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}var Ax=function(){function e(n){n===void 0&&(n={}),this.queryCache=n.queryCache||new QT,this.mutationCache=n.mutationCache||new ZT,this.defaultOptions=n.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var r=this;this.unsubscribeFocus=mu.subscribe(function(){mu.isFocused()&&jc.isOnline()&&(r.mutationCache.onFocus(),r.queryCache.onFocus())}),this.unsubscribeOnline=jc.subscribe(function(){mu.isFocused()&&jc.isOnline()&&(r.mutationCache.onOnline(),r.queryCache.onOnline())})},t.unmount=function(){var r,i;(r=this.unsubscribeFocus)==null||r.call(this),(i=this.unsubscribeOnline)==null||i.call(this)},t.isFetching=function(r,i){var o=qi(r,i),u=o[0];return u.fetching=!0,this.queryCache.findAll(u).length},t.isMutating=function(r){return this.mutationCache.findAll(ve({},r,{fetching:!0})).length},t.getQueryData=function(r,i){var o;return(o=this.queryCache.find(r,i))==null?void 0:o.state.data},t.getQueriesData=function(r){return this.getQueryCache().findAll(r).map(function(i){var o=i.queryKey,u=i.state,c=u.data;return[o,c]})},t.setQueryData=function(r,i,o){var u=Fc(r),c=this.defaultQueryOptions(u);return this.queryCache.build(this,c).setData(i,o)},t.setQueriesData=function(r,i,o){var u=this;return _t.batch(function(){return u.getQueryCache().findAll(r).map(function(c){var f=c.queryKey;return[f,u.setQueryData(f,i,o)]})})},t.getQueryState=function(r,i){var o;return(o=this.queryCache.find(r,i))==null?void 0:o.state},t.removeQueries=function(r,i){var o=qi(r,i),u=o[0],c=this.queryCache;_t.batch(function(){c.findAll(u).forEach(function(f){c.remove(f)})})},t.resetQueries=function(r,i,o){var u=this,c=qi(r,i,o),f=c[0],d=c[1],p=this.queryCache,m=ve({},f,{active:!0});return _t.batch(function(){return p.findAll(f).forEach(function(g){g.reset()}),u.refetchQueries(m,d)})},t.cancelQueries=function(r,i,o){var u=this,c=qi(r,i,o),f=c[0],d=c[1],p=d===void 0?{}:d;typeof p.revert=="undefined"&&(p.revert=!0);var m=_t.batch(function(){return u.queryCache.findAll(f).map(function(g){return g.cancel(p)})});return Promise.all(m).then(rn).catch(rn)},t.invalidateQueries=function(r,i,o){var u,c,f,d=this,p=qi(r,i,o),m=p[0],g=p[1],_=ve({},m,{active:(u=(c=m.refetchActive)!=null?c:m.active)!=null?u:!0,inactive:(f=m.refetchInactive)!=null?f:!1});return _t.batch(function(){return d.queryCache.findAll(m).forEach(function(C){C.invalidate()}),d.refetchQueries(_,g)})},t.refetchQueries=function(r,i,o){var u=this,c=qi(r,i,o),f=c[0],d=c[1],p=_t.batch(function(){return u.queryCache.findAll(f).map(function(g){return g.fetch(void 0,ve({},d,{meta:{refetchPage:f==null?void 0:f.refetchPage}}))})}),m=Promise.all(p).then(rn);return d!=null&&d.throwOnError||(m=m.catch(rn)),m},t.fetchQuery=function(r,i,o){var u=Fc(r,i,o),c=this.defaultQueryOptions(u);typeof c.retry=="undefined"&&(c.retry=!1);var f=this.queryCache.build(this,c);return f.isStaleByTime(c.staleTime)?f.fetch(c):Promise.resolve(f.state.data)},t.prefetchQuery=function(r,i,o){return this.fetchQuery(r,i,o).then(rn).catch(rn)},t.fetchInfiniteQuery=function(r,i,o){var u=Fc(r,i,o);return u.behavior=GT(),this.fetchQuery(u)},t.prefetchInfiniteQuery=function(r,i,o){return this.fetchInfiniteQuery(r,i,o).then(rn).catch(rn)},t.cancelMutations=function(){var r=this,i=_t.batch(function(){return r.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(i).then(rn).catch(rn)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(r){return this.mutationCache.build(this,r).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(r){this.defaultOptions=r},t.setQueryDefaults=function(r,i){var o=this.queryDefaults.find(function(u){return Fa(r)===Fa(u.queryKey)});o?o.defaultOptions=i:this.queryDefaults.push({queryKey:r,defaultOptions:i})},t.getQueryDefaults=function(r){var i;return r?(i=this.queryDefaults.find(function(o){return $c(r,o.queryKey)}))==null?void 0:i.defaultOptions:void 0},t.setMutationDefaults=function(r,i){var o=this.mutationDefaults.find(function(u){return Fa(r)===Fa(u.mutationKey)});o?o.defaultOptions=i:this.mutationDefaults.push({mutationKey:r,defaultOptions:i})},t.getMutationDefaults=function(r){var i;return r?(i=this.mutationDefaults.find(function(o){return $c(r,o.mutationKey)}))==null?void 0:i.defaultOptions:void 0},t.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var i=ve({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!i.queryHash&&i.queryKey&&(i.queryHash=vv(i.queryKey,i)),i},t.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},t.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:ve({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),JT=function(e){pu(t,e);function t(r,i){var o;return o=e.call(this)||this,o.client=r,o.options=i,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(i),o}var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),Rx(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return gv(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return gv(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(i,o){var u=this.options,c=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(i),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=u.queryKey),this.updateQuery();var f=this.hasListeners();f&&Mx(this.currentQuery,c,this.options,u)&&this.executeFetch(),this.updateResult(o),f&&(this.currentQuery!==c||this.options.enabled!==u.enabled||this.options.staleTime!==u.staleTime)&&this.updateStaleTimeout();var d=this.computeRefetchInterval();f&&(this.currentQuery!==c||this.options.enabled!==u.enabled||d!==this.currentRefetchInterval)&&this.updateRefetchInterval(d)},n.getOptimisticResult=function(i){var o=this.client.defaultQueryObserverOptions(i),u=this.client.getQueryCache().build(this.client,o);return this.createResult(u,o)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(i,o){var u=this,c={},f=function(p){u.trackedProps.includes(p)||u.trackedProps.push(p)};return Object.keys(i).forEach(function(d){Object.defineProperty(c,d,{configurable:!1,enumerable:!0,get:function(){return f(d),i[d]}})}),(o.useErrorBoundary||o.suspense)&&f("error"),c},n.getNextResult=function(i){var o=this;return new Promise(function(u,c){var f=o.subscribe(function(d){d.isFetching||(f(),d.isError&&(i!=null&&i.throwOnError)?c(d.error):u(d))})})},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(i){return this.fetch(ve({},i,{meta:{refetchPage:i==null?void 0:i.refetchPage}}))},n.fetchOptimistic=function(i){var o=this,u=this.client.defaultQueryObserverOptions(i),c=this.client.getQueryCache().build(this.client,u);return c.fetch().then(function(){return o.createResult(c,u)})},n.fetch=function(i){var o=this;return this.executeFetch(i).then(function(){return o.updateResult(),o.currentResult})},n.executeFetch=function(i){this.updateQuery();var o=this.currentQuery.fetch(this.options,i);return i!=null&&i.throwOnError||(o=o.catch(rn)),o},n.updateStaleTimeout=function(){var i=this;if(this.clearStaleTimeout(),!(Dc||this.currentResult.isStale||!pv(this.options.staleTime))){var o=xx(this.currentResult.dataUpdatedAt,this.options.staleTime),u=o+1;this.staleTimeoutId=setTimeout(function(){i.currentResult.isStale||i.updateResult()},u)}},n.computeRefetchInterval=function(){var i;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(i=this.options.refetchInterval)!=null?i:!1},n.updateRefetchInterval=function(i){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=i,!(Dc||this.options.enabled===!1||!pv(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||mu.isFocused())&&o.executeFetch()},this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(i,o){var u=this.currentQuery,c=this.options,f=this.currentResult,d=this.currentResultState,p=this.currentResultOptions,m=i!==u,g=m?i.state:this.currentQueryInitialState,_=m?this.currentResult:this.previousQueryResult,C=i.state,E=C.dataUpdatedAt,T=C.error,k=C.errorUpdatedAt,x=C.isFetching,b=C.status,P=!1,R=!1,D;if(o.optimisticResults){var F=this.hasListeners(),Q=!F&&Rx(i,o),te=F&&Mx(i,u,o,c);(Q||te)&&(x=!0,E||(b="loading"))}if(o.keepPreviousData&&!C.dataUpdateCount&&(_!=null&&_.isSuccess)&&b!=="error")D=_.data,E=_.dataUpdatedAt,b=_.status,P=!0;else if(o.select&&typeof C.data!="undefined")if(f&&C.data===(d==null?void 0:d.data)&&o.select===this.selectFn)D=this.selectResult;else try{this.selectFn=o.select,D=o.select(C.data),o.structuralSharing!==!1&&(D=zc(f==null?void 0:f.data,D)),this.selectResult=D,this.selectError=null}catch(j){Bc().error(j),this.selectError=j}else D=C.data;if(typeof o.placeholderData!="undefined"&&typeof D=="undefined"&&(b==="loading"||b==="idle")){var q;if(f!=null&&f.isPlaceholderData&&o.placeholderData===(p==null?void 0:p.placeholderData))q=f.data;else if(q=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof q!="undefined")try{q=o.select(q),o.structuralSharing!==!1&&(q=zc(f==null?void 0:f.data,q)),this.selectError=null}catch(j){Bc().error(j),this.selectError=j}typeof q!="undefined"&&(b="success",D=q,R=!0)}this.selectError&&(T=this.selectError,D=this.selectResult,k=Date.now(),b="error");var G={status:b,isLoading:b==="loading",isSuccess:b==="success",isError:b==="error",isIdle:b==="idle",data:D,dataUpdatedAt:E,error:T,errorUpdatedAt:k,failureCount:C.fetchFailureCount,errorUpdateCount:C.errorUpdateCount,isFetched:C.dataUpdateCount>0||C.errorUpdateCount>0,isFetchedAfterMount:C.dataUpdateCount>g.dataUpdateCount||C.errorUpdateCount>g.errorUpdateCount,isFetching:x,isRefetching:x&&b!=="loading",isLoadingError:b==="error"&&C.dataUpdatedAt===0,isPlaceholderData:R,isPreviousData:P,isRefetchError:b==="error"&&C.dataUpdatedAt!==0,isStale:yv(i,o),refetch:this.refetch,remove:this.remove};return G},n.shouldNotifyListeners=function(i,o){if(!o)return!0;var u=this.options,c=u.notifyOnChangeProps,f=u.notifyOnChangePropsExclusions;if(!c&&!f||c==="tracked"&&!this.trackedProps.length)return!0;var d=c==="tracked"?this.trackedProps:c;return Object.keys(i).some(function(p){var m=p,g=i[m]!==o[m],_=d==null?void 0:d.some(function(E){return E===p}),C=f==null?void 0:f.some(function(E){return E===p});return g&&!C&&(!d||_)})},n.updateResult=function(i){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!$T(this.currentResult,o)){var u={cache:!0};(i==null?void 0:i.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(u.listeners=!0),this.notify(ve({},u,i))}},n.updateQuery=function(){var i=this.client.getQueryCache().build(this.client,this.options);if(i!==this.currentQuery){var o=this.currentQuery;this.currentQuery=i,this.currentQueryInitialState=i.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o==null||o.removeObserver(this),i.addObserver(this))}},n.onQueryUpdate=function(i){var o={};i.type==="success"?o.onSuccess=!0:i.type==="error"&&!Hc(i.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},n.notify=function(i){var o=this;_t.batch(function(){i.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):i.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),i.listeners&&o.listeners.forEach(function(u){u(o.currentResult)}),i.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},t}(vu);function e5(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rx(e,t){return e5(e,t)||e.state.dataUpdatedAt>0&&gv(e,t,t.refetchOnMount)}function gv(e,t,n){if(t.enabled!==!1){var r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&yv(e,t)}return!1}function Mx(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&yv(e,n)}function yv(e,t){return e.isStaleByTime(t.staleTime)}var t5=UE.unstable_batchedUpdates;_t.setBatchNotifyFunction(t5);var n5=console;BT(n5);var Nx=Ye.createContext(void 0),Dx=Ye.createContext(!1);function Lx(e){return e&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Nx),window.ReactQueryClientContext):Nx}var r5=function(){var t=Ye.useContext(Lx(Ye.useContext(Dx)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Fx=function(t){var n=t.client,r=t.contextSharing,i=r===void 0?!1:r,o=t.children;Ye.useEffect(function(){return n.mount(),function(){n.unmount()}},[n]);var u=Lx(i);return Ye.createElement(Dx.Provider,{value:i},Ye.createElement(u.Provider,{value:n},o))};function i5(){var e=!1;return{clearReset:function(){e=!1},reset:function(){e=!0},isReset:function(){return e}}}var a5=Ye.createContext(i5()),o5=function(){return Ye.useContext(a5)};function s5(e,t,n){return typeof t=="function"?t.apply(void 0,n):typeof t=="boolean"?t:!!e}function u5(e,t){var n=Ye.useRef(!1),r=Ye.useState(0),i=r[1],o=r5(),u=o5(),c=o.defaultQueryObserverOptions(e);c.optimisticResults=!0,c.onError&&(c.onError=_t.batchCalls(c.onError)),c.onSuccess&&(c.onSuccess=_t.batchCalls(c.onSuccess)),c.onSettled&&(c.onSettled=_t.batchCalls(c.onSettled)),c.suspense&&(typeof c.staleTime!="number"&&(c.staleTime=1e3),c.cacheTime===0&&(c.cacheTime=1)),(c.suspense||c.useErrorBoundary)&&(u.isReset()||(c.retryOnMount=!1));var f=Ye.useState(function(){return new t(o,c)}),d=f[0],p=d.getOptimisticResult(c);if(Ye.useEffect(function(){n.current=!0,u.clearReset();var m=d.subscribe(_t.batchCalls(function(){n.current&&i(function(g){return g+1})}));return d.updateResult(),function(){n.current=!1,m()}},[u,d]),Ye.useEffect(function(){d.setOptions(c,{listeners:!1})},[c,d]),c.suspense&&p.isLoading)throw d.fetchOptimistic(c).then(function(m){var g=m.data;c.onSuccess==null||c.onSuccess(g),c.onSettled==null||c.onSettled(g,null)}).catch(function(m){u.clearReset(),c.onError==null||c.onError(m),c.onSettled==null||c.onSettled(void 0,m)});if(p.isError&&!u.isReset()&&!p.isFetching&&s5(c.suspense,c.useErrorBoundary,[p.error,d.getCurrentQuery()]))throw p.error;return c.notifyOnChangeProps==="tracked"&&(p=d.trackResult(p,c)),p}function $x(e,t,n){var r=Fc(e,t,n);return u5(r,JT)}const l5={MIA:"MIA,FLL",TPA:"TPA,PIE",PHX:"PHX,AZA",RSW:"RSW,PGD",MCO:"MCO,SFB"};function c5(e){return e&&l5[e]||null}function f5(e,t){const n=[];let r=e;for(;fu(r,t);)n.push(r),r=Ra(r,1);return n}var Vc={exports:{}};/**
|
|
50
50
|
* @license
|
|
51
51
|
* Lodash <https://lodash.com/>
|
|
52
52
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -841,5 +841,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
841
841
|
*
|
|
842
842
|
* This source code is licensed under the MIT license found in the
|
|
843
843
|
* LICENSE file in the root directory of this source tree.
|
|
844
|
-
*/var rm=Symbol.for("react.element"),im=Symbol.for("react.portal"),kf=Symbol.for("react.fragment"),Sf=Symbol.for("react.strict_mode"),Cf=Symbol.for("react.profiler"),Ef=Symbol.for("react.provider"),If=Symbol.for("react.context"),d3=Symbol.for("react.server_context"),Of=Symbol.for("react.forward_ref"),Tf=Symbol.for("react.suspense"),Pf=Symbol.for("react.suspense_list"),Af=Symbol.for("react.memo"),Rf=Symbol.for("react.lazy"),h3=Symbol.for("react.offscreen"),r_;r_=Symbol.for("react.module.reference");function nr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case rm:switch(e=e.type,e){case kf:case Cf:case Sf:case Tf:case Pf:return e;default:switch(e=e&&e.$$typeof,e){case d3:case If:case Of:case Rf:case Af:case Ef:return e;default:return t}}case im:return t}}}tt.ContextConsumer=If,tt.ContextProvider=Ef,tt.Element=rm,tt.ForwardRef=Of,tt.Fragment=kf,tt.Lazy=Rf,tt.Memo=Af,tt.Portal=im,tt.Profiler=Cf,tt.StrictMode=Sf,tt.Suspense=Tf,tt.SuspenseList=Pf,tt.isAsyncMode=function(){return!1},tt.isConcurrentMode=function(){return!1},tt.isContextConsumer=function(e){return nr(e)===If},tt.isContextProvider=function(e){return nr(e)===Ef},tt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===rm},tt.isForwardRef=function(e){return nr(e)===Of},tt.isFragment=function(e){return nr(e)===kf},tt.isLazy=function(e){return nr(e)===Rf},tt.isMemo=function(e){return nr(e)===Af},tt.isPortal=function(e){return nr(e)===im},tt.isProfiler=function(e){return nr(e)===Cf},tt.isStrictMode=function(e){return nr(e)===Sf},tt.isSuspense=function(e){return nr(e)===Tf},tt.isSuspenseList=function(e){return nr(e)===Pf},tt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kf||e===Cf||e===Sf||e===Tf||e===Pf||e===h3||typeof e=="object"&&e!==null&&(e.$$typeof===Rf||e.$$typeof===Af||e.$$typeof===Ef||e.$$typeof===If||e.$$typeof===Of||e.$$typeof===r_||e.getModuleId!==void 0)},tt.typeOf=nr;const i_=e=>typeof e=="object"&&e!=null&&e.nodeType===1,a_=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",am=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return a_(n.overflowY,t)||a_(n.overflowX,t)||(r=>{const i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch(u){return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},Mf=(e,t,n,r,i,o,u,c)=>o<e&&u>t||o>e&&u<t?0:o<=e&&c<=n||u>=t&&c>=n?o-e-r:u>t&&c<n||o<e&&c>n?u-t+i:0,p3=e=>{const t=e.parentElement;return t==null?e.getRootNode().host||null:t},v3=(e,t)=>{var n,r,i,o;if(typeof document=="undefined")return[];const{scrollMode:u,block:c,inline:f,boundary:d,skipOverflowHiddenElements:p}=t,m=typeof d=="function"?d:j=>j!==d;if(!i_(e))throw new TypeError("Invalid target");const g=document.scrollingElement||document.documentElement,_=[];let C=e;for(;i_(C)&&m(C);){if(C=p3(C),C===g){_.push(C);break}C!=null&&C===document.body&&am(C)&&!am(document.documentElement)||C!=null&&am(C,p)&&_.push(C)}const E=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,T=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:k,scrollY:x}=window,{height:b,width:P,top:R,right:D,bottom:F,left:Q}=e.getBoundingClientRect();let te=c==="start"||c==="nearest"?R:c==="end"?F:R+b/2,q=f==="center"?Q+P/2:f==="end"?D:Q;const G=[];for(let j=0;j<_.length;j++){const Y=_[j],{height:se,width:fe,top:_e,right:Pe,bottom:V,left:re}=Y.getBoundingClientRect();if(u==="if-needed"&&R>=0&&Q>=0&&F<=T&&D<=E&&R>=_e&&F<=V&&Q>=re&&D<=Pe)return G;const de=getComputedStyle(Y),we=parseInt(de.borderLeftWidth,10),ze=parseInt(de.borderTopWidth,10),Ke=parseInt(de.borderRightWidth,10),Be=parseInt(de.borderBottomWidth,10);let ge=0,ie=0;const xe="offsetWidth"in Y?Y.offsetWidth-Y.clientWidth-we-Ke:0,Ee="offsetHeight"in Y?Y.offsetHeight-Y.clientHeight-ze-Be:0,St="offsetWidth"in Y?Y.offsetWidth===0?0:fe/Y.offsetWidth:0,Lt="offsetHeight"in Y?Y.offsetHeight===0?0:se/Y.offsetHeight:0;if(g===Y)ge=c==="start"?te:c==="end"?te-T:c==="nearest"?Mf(x,x+T,T,ze,Be,x+te,x+te+b,b):te-T/2,ie=f==="start"?q:f==="center"?q-E/2:f==="end"?q-E:Mf(k,k+E,E,we,Ke,k+q,k+q+P,P),ge=Math.max(0,ge+x),ie=Math.max(0,ie+k);else{ge=c==="start"?te-_e-ze:c==="end"?te-V+Be+Ee:c==="nearest"?Mf(_e,V,se,ze,Be+Ee,te,te+b,b):te-(_e+se/2)+Ee/2,ie=f==="start"?q-re-we:f==="center"?q-(re+fe/2)+xe/2:f==="end"?q-Pe+Ke+xe:Mf(re,Pe,fe,we,Ke+xe,q,q+P,P);const{scrollLeft:Ft,scrollTop:Wt}=Y;ge=Math.max(0,Math.min(Wt+ge/Lt,Y.scrollHeight-se/Lt+Ee)),ie=Math.max(0,Math.min(Ft+ie/St,Y.scrollWidth-fe/St+xe)),te+=Wt-ge,q+=Ft-ie}G.push({el:Y,top:ge,left:ie})}return G};var Zo=function(){return Zo=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Zo.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;var m3=0;function om(){}function g3(e,t){if(e){var n=v3(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(r){var i=r.el,o=r.top,u=r.left;i.scrollTop=o,i.scrollLeft=u})}}function o_(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function s_(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var o=arguments.length,u=new Array(o),c=0;c<o;c++)u[c]=arguments[c];r(),n=setTimeout(function(){n=null,e.apply(void 0,u)},t)}return i.cancel=r,i}function zn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),u=1;u<i;u++)o[u-1]=arguments[u];return t.some(function(c){return c&&c.apply(void 0,[r].concat(o)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function Go(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}function y3(){return String(m3++)}function w3(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function Nf(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=u_(t,r)?t[r]:e[r],n},{})}function u_(e,t){return e[t]!==void 0}function sm(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function Df(e,t,n,r,i){i===void 0&&(i=!1);var o=n.length;if(o===0)return-1;var u=o-1;(typeof e!="number"||e<0||e>u)&&(e=t>0?-1:u+1);var c=e+t;c<0?c=i?u:0:c>u&&(c=i?0:u);var f=Lf(c,t<0,n,r,i);return f===-1?e>=o?-1:e:f}function Lf(e,t,n,r,i){i===void 0&&(i=!1);var o=n.length;if(t){for(var u=e;u>=0;u--)if(!r(n[u],u))return u}else for(var c=e;c<o;c++)if(!r(n[c],c))return c;return i?Lf(t?o-1:0,t,n,r):-1}function l_(e,t,n,r){return r===void 0&&(r=!0),n&&t.some(function(i){return i&&(o_(i,e,n)||r&&o_(i,n.document.activeElement,n))})}var x3=s_(function(e){c_(e).textContent=""},500);function c_(e){var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}function f_(e,t){if(!(!e||!t)){var n=c_(t);n.textContent=e,x3(t)}}var b3=["isInitialMount","highlightedIndex","items","environment"],d_={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function _3(e,t,n){var r=e.props,i=e.type,o={};Object.keys(t).forEach(function(u){k3(u,e,t,n),n[u]!==t[u]&&(o[u]=n[u])}),r.onStateChange&&Object.keys(o).length&&r.onStateChange(ve({type:i},o))}function k3(e,t,n,r){var i=t.props,o=t.type,u="on"+um(e)+"Change";i[u]&&r[e]!==void 0&&r[e]!==n[e]&&i[u](ve({type:o},r))}function S3(e,t){return t.changes}function C3(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var E3=s_(function(e,t){f_(e(),t)},200),I3=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?M.useLayoutEffect:M.useEffect,O3="useId"in Ye?function(t){var n=t.id,r=t.labelId,i=t.menuId,o=t.getItemId,u=t.toggleButtonId,c=t.inputId,f="downshift-"+Ye.useId();n||(n=f);var d=M.useRef({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:o||function(p){return n+"-item-"+p},toggleButtonId:u||n+"-toggle-button",inputId:c||n+"-input"});return d.current}:function(t){var n=t.id,r=n===void 0?"downshift-"+y3():n,i=t.labelId,o=t.menuId,u=t.getItemId,c=t.toggleButtonId,f=t.inputId,d=M.useRef({labelId:i||r+"-label",menuId:o||r+"-menu",getItemId:u||function(p){return r+"-item-"+p},toggleButtonId:c||r+"-toggle-button",inputId:f||r+"-input"});return d.current};function h_(e,t,n,r){var i,o;if(e===void 0){if(t===void 0)throw new Error(r);i=n[t],o=t}else o=t===void 0?n.indexOf(e):t,i=e;return[i,o]}function T3(e){return e?String(e):""}function um(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function lm(e){var t=M.useRef(e);return t.current=e,t}function p_(e,t,n){var r=M.useRef(),i=M.useRef(),o=M.useCallback(function(g,_){i.current=_,g=Nf(g,_.props);var C=e(g,_),E=_.props.stateReducer(g,ve({},_,{changes:C}));return E},[e]),u=M.useReducer(o,t),c=u[0],f=u[1],d=lm(n),p=M.useCallback(function(g){return f(ve({props:d.current},g))},[d]),m=i.current;return M.useEffect(function(){m&&r.current&&r.current!==c&&_3(m,Nf(r.current,m.props),c),r.current=c},[c,n,m]),[c,p]}function P3(e,t,n){var r=p_(e,t,n),i=r[0],o=r[1];return[Nf(i,n),o]}var Uu={itemToString:T3,stateReducer:S3,getA11ySelectionMessage:C3,scrollIntoView:g3,environment:typeof window=="undefined"?void 0:window};function Cr(e,t,n){n===void 0&&(n=d_);var r=e["default"+um(t)];return r!==void 0?r:n[t]}function Xo(e,t,n){n===void 0&&(n=d_);var r=e[t];if(r!==void 0)return r;var i=e["initial"+um(t)];return i!==void 0?i:Cr(e,t,n)}function A3(e){var t=Xo(e,"selectedItem"),n=Xo(e,"isOpen"),r=Xo(e,"highlightedIndex"),i=Xo(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function ju(e,t,n){var r=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,u=t.selectedItem,c=t.highlightedIndex;return r.length===0?-1:i!==void 0&&c===i?i:o!==void 0?o:u?r.indexOf(u):n===0?-1:n<0?r.length-1:0}function R3(e,t,n,r){var i=M.useRef({isMouseDown:!1,isTouchMove:!1});return M.useEffect(function(){if(n){var o=function(){i.current.isMouseDown=!0},u=function(m){i.current.isMouseDown=!1,e&&!l_(m.target,t.map(function(g){return g.current}),n)&&r()},c=function(){i.current.isTouchMove=!1},f=function(){i.current.isTouchMove=!0},d=function(m){e&&!i.current.isTouchMove&&!l_(m.target,t.map(function(g){return g.current}),n,!1)&&r()};return n.addEventListener("mousedown",o),n.addEventListener("mouseup",u),n.addEventListener("touchstart",c),n.addEventListener("touchmove",f),n.addEventListener("touchend",d),function(){n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",u),n.removeEventListener("touchstart",c),n.removeEventListener("touchmove",f),n.removeEventListener("touchend",d)}}},[e,n]),i}var v_=function(){return om};function m_(e,t,n){var r=n.isInitialMount,i=n.highlightedIndex,o=n.items,u=n.environment,c=Qa(n,b3);M.useEffect(function(){r||!(u!=null&&u.document)||E3(function(){return e(ve({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length},c))},u.document)},t)}function M3(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,u=e.scrollIntoView,c=M.useRef(!0);return I3(function(){t<0||!n||!Object.keys(r.current).length||(c.current===!1?c.current=!0:u(i(t),o))},[t]),c}var g_=om;function y_(e,t,n){var r;n===void 0&&(n=!0);var i=((r=e.items)==null?void 0:r.length)&&t>=0;return ve({isOpen:!1,highlightedIndex:-1},i&&ve({selectedItem:e.items[t],isOpen:Cr(e,"isOpen"),highlightedIndex:Cr(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}var w_={environment:H.shape({addEventListener:H.func.isRequired,removeEventListener:H.func.isRequired,document:H.shape({createElement:H.func.isRequired,getElementById:H.func.isRequired,activeElement:H.any.isRequired,body:H.any.isRequired}).isRequired,Node:H.func.isRequired}),itemToString:H.func,stateReducer:H.func},x_=ve({},w_,{getA11yStatusMessage:H.func,highlightedIndex:H.number,defaultHighlightedIndex:H.number,initialHighlightedIndex:H.number,isOpen:H.bool,defaultIsOpen:H.bool,initialIsOpen:H.bool,selectedItem:H.any,initialSelectedItem:H.any,defaultSelectedItem:H.any,id:H.string,labelId:H.string,menuId:H.string,getItemId:H.func,toggleButtonId:H.string,onSelectedItemChange:H.func,onHighlightedIndexChange:H.func,onStateChange:H.func,onIsOpenChange:H.func,scrollIntoView:H.func});function N3(e,t,n){var r=t.type,i=t.props,o;switch(r){case n.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:o={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:ju(i,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:ju(i,e,0)};break;case n.FunctionCloseMenu:o={isOpen:!1};break;case n.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:o={inputValue:t.inputValue};break;case n.FunctionReset:o={highlightedIndex:Cr(i,"highlightedIndex"),isOpen:Cr(i,"isOpen"),selectedItem:Cr(i,"selectedItem"),inputValue:Cr(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ve({},e,o)}Zo(Zo({},x_),{items:H.array.isRequired,isItemDisabled:H.func,getA11ySelectionMessage:H.func});function D3(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}Zo(Zo({},Uu),{getA11yStatusMessage:D3,isItemDisabled:function(){return!1}});var cm=0,fm=1,dm=2,hm=3,pm=4,vm=5,mm=6,gm=7,ym=8,Ff=9,wm=10,b_=11,__=12,xm=13,k_=14,S_=15,C_=16,E_=17,I_=18,bm=19,O_=20,T_=21,_m=22,P_=Object.freeze({__proto__:null,InputKeyDownArrowDown:cm,InputKeyDownArrowUp:fm,InputKeyDownEscape:dm,InputKeyDownHome:hm,InputKeyDownEnd:pm,InputKeyDownPageUp:vm,InputKeyDownPageDown:mm,InputKeyDownEnter:gm,InputChange:ym,InputBlur:Ff,InputClick:wm,MenuMouseLeave:b_,ItemMouseMove:__,ItemClick:xm,ToggleButtonClick:k_,FunctionToggleMenu:S_,FunctionOpenMenu:C_,FunctionCloseMenu:E_,FunctionSetHighlightedIndex:I_,FunctionSelectItem:bm,FunctionSetInputValue:O_,FunctionReset:T_,ControlledPropUpdatedSelectedItem:_m});function L3(e){var t=A3(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),ve({},t,{inputValue:r})}ve({},x_,{items:H.array.isRequired,isItemDisabled:H.func,selectedItemChanged:H.func,getA11ySelectionMessage:H.func,inputValue:H.string,defaultInputValue:H.string,initialInputValue:H.string,inputId:H.string,onInputValueChange:H.func});function F3(e,t,n){var r=M.useRef(),i=p_(e,t,n),o=i[0],u=i[1];return M.useEffect(function(){u_(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&u({type:_m,inputValue:n.itemToString(n.selectedItem)}),r.current=o.selectedItem===r.current?n.selectedItem:o.selectedItem)},[o.selectedItem,n.selectedItem]),[Nf(o,n),u]}var $3=ve({},Uu,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:w3,isItemDisabled:function(){return!1}});function z3(e,t){var n,r=t.type,i=t.props,o=t.altKey,u;switch(r){case xm:u={isOpen:Cr(i,"isOpen"),highlightedIndex:Cr(i,"highlightedIndex"),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case cm:e.isOpen?u={highlightedIndex:Df(e.highlightedIndex,1,i.items,i.isItemDisabled,!0)}:u={highlightedIndex:o&&e.selectedItem==null?-1:ju(i,e,1),isOpen:i.items.length>=0};break;case fm:e.isOpen?o?u=y_(i,e.highlightedIndex):u={highlightedIndex:Df(e.highlightedIndex,-1,i.items,i.isItemDisabled,!0)}:u={highlightedIndex:ju(i,e,-1),isOpen:i.items.length>=0};break;case gm:u=y_(i,e.highlightedIndex);break;case dm:u=ve({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case vm:u={highlightedIndex:Df(e.highlightedIndex,-10,i.items,i.isItemDisabled,!0)};break;case mm:u={highlightedIndex:Df(e.highlightedIndex,10,i.items,i.isItemDisabled,!0)};break;case hm:u={highlightedIndex:Lf(0,!1,i.items,i.isItemDisabled)};break;case pm:u={highlightedIndex:Lf(i.items.length-1,!0,i.items,i.isItemDisabled)};break;case Ff:u=ve({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case ym:u={isOpen:!0,highlightedIndex:Cr(i,"highlightedIndex"),inputValue:t.inputValue};break;case wm:u={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:ju(i,e,0)};break;case bm:u={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case _m:u={inputValue:t.inputValue};break;default:return N3(e,t,P_)}return ve({},e,u)}var U3=["onMouseLeave","refKey","ref"],j3=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],W3=["onClick","onPress","refKey","ref"],H3=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];ci.stateChangeTypes=P_;function ci(e){e===void 0&&(e={});var t=ve({},$3,e),n=t.items,r=t.scrollIntoView,i=t.environment,o=t.getA11yStatusMessage,u=t.getA11ySelectionMessage,c=t.itemToString,f=L3(t),d=F3(z3,f,t),p=d[0],m=d[1],g=p.isOpen,_=p.highlightedIndex,C=p.selectedItem,E=p.inputValue,T=M.useRef(null),k=M.useRef({}),x=M.useRef(null),b=M.useRef(null),P=M.useRef(!0),R=O3(t),D=M.useRef(),F=lm({state:p,props:t}),Q=M.useCallback(function(ge){return k.current[R.getItemId(ge)]},[R]);m_(o,[g,_,E,n],ve({isInitialMount:P.current,previousResultCount:D.current,items:n,environment:i,itemToString:c},p)),m_(u,[C],ve({isInitialMount:P.current,previousResultCount:D.current,items:n,environment:i,itemToString:c},p));var te=M3({menuElement:T.current,highlightedIndex:_,isOpen:g,itemRefs:k,scrollIntoView:r,getItemNodeFromIndex:Q});g_({isInitialMount:P.current,props:t,state:p}),M.useEffect(function(){var ge=Xo(t,"isOpen");ge&&x.current&&x.current.focus()},[]),M.useEffect(function(){P.current||(D.current=n.length)});var q=R3(g,[x,T,b],i,function(){m({type:Ff,selectItem:!1})}),G=v_();M.useEffect(function(){return P.current=!1,function(){P.current=!0}},[]),M.useEffect(function(){g||(k.current={})},[g]),M.useEffect(function(){var ge;!g||!(i!=null&&i.document)||!(x!=null&&(ge=x.current)!=null&&ge.focus)||i.document.activeElement!==x.current&&x.current.focus()},[g,i]);var j=M.useMemo(function(){return{ArrowDown:function(ie){ie.preventDefault(),m({type:cm,altKey:ie.altKey})},ArrowUp:function(ie){ie.preventDefault(),m({type:fm,altKey:ie.altKey})},Home:function(ie){F.current.state.isOpen&&(ie.preventDefault(),m({type:hm}))},End:function(ie){F.current.state.isOpen&&(ie.preventDefault(),m({type:pm}))},Escape:function(ie){var xe=F.current.state;(xe.isOpen||xe.inputValue||xe.selectedItem||xe.highlightedIndex>-1)&&(ie.preventDefault(),m({type:dm}))},Enter:function(ie){var xe=F.current.state;!xe.isOpen||ie.which===229||(ie.preventDefault(),m({type:gm}))},PageUp:function(ie){F.current.state.isOpen&&(ie.preventDefault(),m({type:vm}))},PageDown:function(ie){F.current.state.isOpen&&(ie.preventDefault(),m({type:mm}))}}},[m,F]),Y=M.useCallback(function(ge){return ve({id:R.labelId,htmlFor:R.inputId},ge)},[R]),se=M.useCallback(function(ge,ie){var xe,Ee=ge===void 0?{}:ge,St=Ee.onMouseLeave,Lt=Ee.refKey,Ft=Lt===void 0?"ref":Lt,Wt=Ee.ref,pn=Qa(Ee,U3),Ct=ie===void 0?{}:ie;return Ct.suppressRefError,ve((xe={},xe[Ft]=Go(Wt,function(on){T.current=on}),xe.id=R.menuId,xe.role="listbox",xe["aria-labelledby"]=pn&&pn["aria-label"]?void 0:""+R.labelId,xe.onMouseLeave=zn(St,function(){m({type:b_})}),xe),pn)},[m,G,R]),fe=M.useCallback(function(ge){var ie,xe,Ee=ge===void 0?{}:ge,St=Ee.item,Lt=Ee.index,Ft=Ee.refKey,Wt=Ft===void 0?"ref":Ft,pn=Ee.ref,Ct=Ee.onMouseMove,on=Ee.onMouseDown,fi=Ee.onClick;Ee.onPress;var Ht=Ee.disabled,sa=Qa(Ee,j3);Ht!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var Un=F.current,rr=Un.props,Bt=Un.state,Sn=h_(St,Lt,rr.items,"Pass either item or index to getItemProps!"),jr=Sn[0],jn=Sn[1],vn=rr.isItemDisabled(jr,jn),W="onClick",ee=fi,ue=function(){jn!==Bt.highlightedIndex&&(te.current=!1,m({type:__,index:jn,disabled:vn}))},Ae=function(){m({type:xm,index:jn})},Wn=function(di){return di.preventDefault()};return ve((ie={},ie[Wt]=Go(pn,function(Hn){Hn&&(k.current[R.getItemId(jn)]=Hn)}),ie["aria-disabled"]=vn,ie["aria-selected"]=""+(jn===Bt.highlightedIndex),ie.id=R.getItemId(jn),ie.role="option",ie),!vn&&(xe={},xe[W]=zn(ee,Ae),xe),{onMouseMove:zn(Ct,ue),onMouseDown:zn(on,Wn)},sa)},[m,F,te,R]),_e=M.useCallback(function(ge){var ie,xe=ge===void 0?{}:ge,Ee=xe.onClick;xe.onPress;var St=xe.refKey,Lt=St===void 0?"ref":St,Ft=xe.ref,Wt=Qa(xe,W3),pn=F.current.state,Ct=function(){m({type:k_})};return ve((ie={},ie[Lt]=Go(Ft,function(on){b.current=on}),ie["aria-controls"]=R.menuId,ie["aria-expanded"]=pn.isOpen,ie.id=R.toggleButtonId,ie.tabIndex=-1,ie),!Wt.disabled&&ve({},{onClick:zn(Ee,Ct)}),Wt)},[m,F,R]),Pe=M.useCallback(function(ge,ie){var xe,Ee=ge===void 0?{}:ge,St=Ee.onKeyDown,Lt=Ee.onChange,Ft=Ee.onInput,Wt=Ee.onBlur;Ee.onChangeText;var pn=Ee.onClick,Ct=Ee.refKey,on=Ct===void 0?"ref":Ct,fi=Ee.ref,Ht=Qa(Ee,H3),sa=ie===void 0?{}:ie;sa.suppressRefError;var Un=F.current.state,rr=function(ue){var Ae=sm(ue);Ae&&j[Ae]&&j[Ae](ue)},Bt=function(ue){m({type:ym,inputValue:ue.target.value})},Sn=function(ue){if(i!=null&&i.document&&Un.isOpen&&!q.current.isMouseDown){var Ae=ue.relatedTarget===null&&i.document.activeElement!==i.document.body;m({type:Ff,selectItem:!Ae})}},jr=function(){m({type:wm})},jn="onChange",vn={};if(!Ht.disabled){var W;vn=(W={},W[jn]=zn(Lt,Ft,Bt),W.onKeyDown=zn(St,rr),W.onBlur=zn(Wt,Sn),W.onClick=zn(pn,jr),W)}return ve((xe={},xe[on]=Go(fi,function(ee){x.current=ee}),xe["aria-activedescendant"]=Un.isOpen&&Un.highlightedIndex>-1?R.getItemId(Un.highlightedIndex):"",xe["aria-autocomplete"]="list",xe["aria-controls"]=R.menuId,xe["aria-expanded"]=Un.isOpen,xe["aria-labelledby"]=Ht&&Ht["aria-label"]?void 0:R.labelId,xe.autoComplete="off",xe.id=R.inputId,xe.role="combobox",xe.value=Un.inputValue,xe),vn,Ht)},[G,F,R,j,m,q,i]),V=M.useCallback(function(){m({type:S_})},[m]),re=M.useCallback(function(){m({type:E_})},[m]),de=M.useCallback(function(){m({type:C_})},[m]),we=M.useCallback(function(ge){m({type:I_,highlightedIndex:ge})},[m]),ze=M.useCallback(function(ge){m({type:bm,selectedItem:ge})},[m]),Ke=M.useCallback(function(ge){m({type:O_,inputValue:ge})},[m]),Be=M.useCallback(function(){m({type:T_})},[m]);return{getItemProps:fe,getLabelProps:Y,getMenuProps:se,getInputProps:Pe,getToggleButtonProps:_e,toggleMenu:V,openMenu:de,closeMenu:re,setHighlightedIndex:we,setInputValue:Ke,selectItem:ze,reset:Be,highlightedIndex:_,isOpen:g,selectedItem:C,inputValue:E}}var A_={activeIndex:-1,selectedItems:[]};function R_(e,t){return Xo(e,t,A_)}function M_(e,t){return Cr(e,t,A_)}function B3(e){var t=R_(e,"activeIndex"),n=R_(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function N_(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function V3(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}ve({},w_,{selectedItems:H.array,initialSelectedItems:H.array,defaultSelectedItems:H.array,getA11yRemovalMessage:H.func,activeIndex:H.number,initialActiveIndex:H.number,defaultActiveIndex:H.number,onActiveIndexChange:H.func,onSelectedItemsChange:H.func,keyNavigationNext:H.string,keyNavigationPrevious:H.string});var Q3={itemToString:Uu.itemToString,stateReducer:Uu.stateReducer,environment:Uu.environment,getA11yRemovalMessage:V3,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},K3=om,km=0,Sm=1,Cm=2,Em=3,Im=4,Om=5,Tm=6,Pm=7,Am=8,Rm=9,Mm=10,Nm=11,Dm=12,Y3=Object.freeze({__proto__:null,SelectedItemClick:km,SelectedItemKeyDownDelete:Sm,SelectedItemKeyDownBackspace:Cm,SelectedItemKeyDownNavigationNext:Em,SelectedItemKeyDownNavigationPrevious:Im,DropdownKeyDownNavigationPrevious:Om,DropdownKeyDownBackspace:Tm,DropdownClick:Pm,FunctionAddSelectedItem:Am,FunctionRemoveSelectedItem:Rm,FunctionSetSelectedItems:Mm,FunctionSetActiveIndex:Nm,FunctionReset:Dm});function q3(e,t){var n=t.type,r=t.index,i=t.props,o=t.selectedItem,u=e.activeIndex,c=e.selectedItems,f;switch(n){case km:f={activeIndex:r};break;case Im:f={activeIndex:u-1<0?0:u-1};break;case Em:f={activeIndex:u+1>=c.length?-1:u+1};break;case Cm:case Sm:{if(u<0)break;var d=u;c.length===1?d=-1:u===c.length-1&&(d=c.length-2),f=ve({selectedItems:[].concat(c.slice(0,u),c.slice(u+1))},{activeIndex:d});break}case Om:f={activeIndex:c.length-1};break;case Tm:f={selectedItems:c.slice(0,c.length-1)};break;case Am:f={selectedItems:[].concat(c,[o])};break;case Pm:f={activeIndex:-1};break;case Rm:{var p=u,m=c.indexOf(o);if(m<0)break;c.length===1?p=-1:m===c.length-1&&(p=c.length-2),f={selectedItems:[].concat(c.slice(0,m),c.slice(m+1)),activeIndex:p};break}case Mm:{var g=t.selectedItems;f={selectedItems:g};break}case Nm:{var _=t.activeIndex;f={activeIndex:_};break}case Dm:f={activeIndex:M_(i,"activeIndex"),selectedItems:M_(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ve({},e,f)}var Z3=["refKey","ref","onClick","onKeyDown","selectedItem","index"],G3=["refKey","ref","onKeyDown","onClick","preventKeyAction"];Lm.stateChangeTypes=Y3;function Lm(e){e===void 0&&(e={}),K3();var t=ve({},Q3,e),n=t.getA11yRemovalMessage,r=t.itemToString,i=t.environment,o=t.keyNavigationNext,u=t.keyNavigationPrevious,c=P3(q3,B3(t),t),f=c[0],d=c[1],p=f.activeIndex,m=f.selectedItems,g=M.useRef(!0),_=M.useRef(null),C=M.useRef(m),E=M.useRef();E.current=[];var T=lm({state:f,props:t});M.useEffect(function(){if(!(g.current||!(i!=null&&i.document))){if(m.length<C.current.length){var G=C.current.find(function(j){return m.indexOf(j)<0});f_(n({itemToString:r,resultCount:m.length,removedSelectedItem:G,activeIndex:p,activeSelectedItem:m[p]}),i.document)}C.current=m}},[m.length]),M.useEffect(function(){g.current||(p===-1&&_.current?_.current.focus():E.current[p]&&E.current[p].focus())},[p]),g_({isInitialMount:g.current,props:t,state:f});var k=v_();M.useEffect(function(){return g.current=!1,function(){g.current=!0}},[]);var x=M.useMemo(function(){var G;return G={},G[u]=function(){d({type:Im})},G[o]=function(){d({type:Em})},G.Delete=function(){d({type:Sm})},G.Backspace=function(){d({type:Cm})},G},[d,o,u]),b=M.useMemo(function(){var G;return G={},G[u]=function(j){N_(j)&&d({type:Om})},G.Backspace=function(Y){N_(Y)&&d({type:Tm})},G},[d,u]),P=M.useCallback(function(G){var j,Y=G===void 0?{}:G,se=Y.refKey,fe=se===void 0?"ref":se,_e=Y.ref,Pe=Y.onClick,V=Y.onKeyDown,re=Y.selectedItem,de=Y.index,we=Qa(Y,Z3),ze=T.current.state,Ke=h_(re,de,ze.selectedItems,"Pass either item or index to getSelectedItemProps!"),Be=Ke[1],ge=Be>-1&&Be===ze.activeIndex,ie=function(){d({type:km,index:Be})},xe=function(St){var Lt=sm(St);Lt&&x[Lt]&&x[Lt](St)};return ve((j={},j[fe]=Go(_e,function(Ee){Ee&&E.current.push(Ee)}),j.tabIndex=ge?0:-1,j.onClick=zn(Pe,ie),j.onKeyDown=zn(V,xe),j),we)},[d,T,x]),R=M.useCallback(function(G,j){var Y,se=G===void 0?{}:G,fe=se.refKey,_e=fe===void 0?"ref":fe,Pe=se.ref,V=se.onKeyDown,re=se.onClick,de=se.preventKeyAction,we=de===void 0?!1:de,ze=Qa(se,G3),Ke=j===void 0?{}:j;Ke.suppressRefError;var Be=function(xe){var Ee=sm(xe);Ee&&b[Ee]&&b[Ee](xe)},ge=function(){d({type:Pm})};return ve((Y={},Y[_e]=Go(Pe,function(ie){ie&&(_.current=ie)}),Y),!we&&{onKeyDown:zn(V,Be),onClick:zn(re,ge)},ze)},[d,b,k]),D=M.useCallback(function(G){d({type:Am,selectedItem:G})},[d]),F=M.useCallback(function(G){d({type:Rm,selectedItem:G})},[d]),Q=M.useCallback(function(G){d({type:Mm,selectedItems:G})},[d]),te=M.useCallback(function(G){d({type:Nm,activeIndex:G})},[d]),q=M.useCallback(function(){d({type:Dm})},[d]);return{getSelectedItemProps:P,getDropdownProps:R,addSelectedItem:D,removeSelectedItem:F,setSelectedItems:Q,setActiveIndex:te,reset:q,selectedItems:m,activeIndex:p}}function D_({items:e,selectedItems:t,onInputChange:n,onSelectedItemsChange:r,placeholder:i,icon:o,disabled:u,shadowRoot:c}){const[f,d]=M.useState(""),[p,m]=M.useState(!1),g=M.useRef(null),_=M.useMemo(()=>{let j=0;const Y=6;return e.reduce((se,fe)=>fe.type==="airport"&&fe.iata_code.toLowerCase()===f.toLowerCase()?[X(N({},fe),{sectionIndex:-1}),...se,...fe.sectionIndex>-1?[fe]:[]]:[...se,fe],[]).filter(se=>(se.type==="airport"&&(j+=1),se.type==="place"?j<Y:j<=Y))},[e]);function C(j){if(j.type==="airport"){const Y=j;return(t==null?void 0:t.length)>1?Y.iata_code:Y.country_code==="US"?`${Y.city} (${Y.iata_code})`:`${Y.city}, ${Y.country_code} (${Y.iata_code})`}else if(j.type==="place")return`${j.formatted_address}`}M.useEffect(()=>{u&&d("")},[u]);const{getSelectedItemProps:E,getDropdownProps:T,removeSelectedItem:k,addSelectedItem:x}=Lm({selectedItems:t,onStateChange({selectedItems:j,type:Y}){switch(Y){case Lm.stateChangeTypes.FunctionRemoveSelectedItem:r(j);break}}}),b=typeof Proxy=="function"&&!Object.isSealed(new Proxy({},{}));function P(j){const Y=j.ownerDocument,se={document:Y,addEventListener:Y.addEventListener.bind(j),removeEventListener:Y.removeEventListener.bind(j)};return b?new Proxy(j,{get:(fe,_e)=>se[_e]}):Object.create(j,Object.keys(se).reduce((fe,_e)=>(fe[_e]={get:()=>se[_e]},fe),{}))}const{isOpen:R,getMenuProps:D,getInputProps:F,highlightedIndex:Q,getItemProps:te,selectedItem:q}=ci({environment:c?P(c):void 0,items:_,itemToString(j){return(j==null?void 0:j.type)==="airport"?C(j):j==null?void 0:j.name},defaultHighlightedIndex:0,selectedItem:null,inputValue:f,stateReducer(j,Y){const{changes:se,type:fe}=Y;switch(fe){case ci.stateChangeTypes.InputKeyDownEnter:case ci.stateChangeTypes.ItemClick:return se;default:return se}},onStateChange({inputValue:j,type:Y,selectedItem:se}){switch(Y){case ci.stateChangeTypes.InputBlur:case ci.stateChangeTypes.InputKeyDownEnter:se&&(r([se]),d(""),n(""));break;case ci.stateChangeTypes.ItemClick:se&&(r([se]),d(""));break;case ci.stateChangeTypes.InputChange:d(j),n(j);break}switch(Y){case ci.stateChangeTypes.InputBlur:m(!1);break}}}),G=u||t.length>0;return Ve("div",{className:"a1-w-full a1-h-full a1-relative a1-z-10",children:[Ve("div",{className:Yi({"a1-bg-white a1-rounded-lg a1-gap-2 a1-items-center a1-py-2 a1-px-3 a1-h-full a1-w-full a1-overflow-hidden":!0,"a1-grid":!0,"a1-grid-cols-[24px_1fr]":t.length===0,"a1-grid-cols-[24px_auto_1fr]":t.length===1,"a1-grid-cols-[24px_auto_auto_1fr]":t.length===2,"a1-grid-cols-[24px_auto_auto_auto_1fr]":t.length===3,"a1-ring-2 a1-ring-primary":p,"a1-ring-2 a1-ring-gray-200":!p}),children:[o,t.map((j,Y)=>Ve("span",X(N({className:Yi({"a1-bg-gray-200 a1-rounded a1-px-1 focus:a1-bg-gray-400 a1-whitespace-nowrap a1-text-ellipsis a1-shrink-0":!0,"a1-text-xs":t.length>0,"a1-flex a1-items-center":!0})},E({selectedItem:j,index:Y})),{children:[J("span",{className:"a1-overflow-hidden a1-grow",children:C(j)}),!j.disabled&&J("span",{className:"a1-pl-1 a1-cursor-pointer",onClick:se=>{se.stopPropagation(),k(j)},children:"✕"})]}),Y)),J("input",X(N({className:"a1-outline-none disabled:a1-bg-transparent a1-text-base",placeholder:(p||t.length===0)&&!G?i:""},F(T({preventKeyAction:R}))),{onFocus:j=>m(!0),disabled:G}))]}),J("div",{className:"a1-absolute a1-w-inherit a1-bg-white a1-mt-2 a1-rounded-lg a1-overflow-hidden a1-shadow-md a1-p-0 a1-z-10",children:J("ul",X(N({ref:g,className:Yi({"a1-overflow-y-auto":!0,"a1-overflow-x-hidden":!0})},D()),{children:R&&(_==null?void 0:_.map((j,Y)=>{if(j.type==="airport"){const se=j,fe=se.distance||0*.621371;return Ve("li",X(N({className:Yi({"hover:a1-bg-blue-100":!0,"a1-font-bold":q===j,"a1-shadow-sm a1-py-2 a1-pl-3 a1-pr-2 a1-cursor-pointer":!0,"a1-pl-5 a1-border-l-4 a1-border-gray-500":j.sectionIndex>-1,"a1-grid a1-grid-cols-[26px_1fr_40px] a1-gap-2 a1-justify-start a1-items-center":!0})},te({item:j,index:Y})),{children:[J(oa,{className:"a1-w-6 a1-h-6 -a1-rotate-45",icon:w4}),Ve("div",{className:"a1-flex a1-flex-col a1-grow a1-gap-1 a1-overflow-hidden",children:[Ve("div",{className:"a1-gap-2 a1-flex a1-items-end",children:[J("span",{className:"a1-font-medium a1-text-base a1-whitespace-nowrap a1-overflow-hidden a1-text-ellipsis a1-shrink",children:se.name}),J("span",{className:"a1-text-sm a1-uppercase a1-shrink-0 a1-text-gray-500",children:se.iata_code})]}),Ve("span",{className:"a1-text-sm a1-text-gray-500",children:[se.city,", ",se.country_code,j.sectionIndex>-1&&Ve(LS,{children:[" • ",fe.toFixed(fe<1?1:0),"mi"]})]})]}),J("div",{className:"a1-flex a1-justify-end a1-pl-4",children:J("input",{type:"checkbox",checked:!!t.find(_e=>_e.key===j.key)})})]}),j.key)}if((j==null?void 0:j.type)==="place"){const se=j,fe=te({item:j,index:Y});return Ve("li",X(N({className:Yi({"hover:a1-bg-blue-100":!0,"a1-font-bold":q===j,"a1-shadow-sm a1-py-2 a1-pl-3 a1-pr-2 a1-cursor-pointer":!0,"a1-grid a1-grid-cols-[26px_1fr_40px] a1-gap-2 a1-justify-start a1-items-center":!0})},fe),{children:[J(oa,{className:"a1-w-6 a1-h-6",icon:y4}),Ve("div",{className:"a1-flex a1-flex-col a1-grow a1-gap-1 a1-overflow-hidden",children:[J("div",{className:"a1-gap-2 a1-flex a1-items-end",children:J("span",{className:"a1-font-medium a1-text-base a1-whitespace-nowrap a1-overflow-hidden a1-text-ellipsis a1-shrink",children:se.name})}),J("span",{className:"a1-text-sm a1-shrink-0 a1-text-gray-500",children:se.formatted_address})]}),J("div",{className:"a1-flex a1-justify-end a1-pl-4",children:J("input",{type:"checkbox",checked:!!t.find(_e=>_e.key===j.key)})})]}),j.key)}return null}))}))})]})}function L_(){return J("div",{"aria-label":"Loading...",role:"status",children:Ve("svg",{className:"a1-h-6 a1-w-6 a1-animate-spin",viewBox:"3 3 18 18",children:[J("path",{className:"a1-fill-indigo-200",d:"M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z"}),J("path",{className:"a1-fill-indigo-800",d:"M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z"})]})})}const F_={apiDomain:H.string.isRequired,locationId:H.string,origin:H.string,destination:H.string,destinations:H.string,primaryColor:H.string,secondaryColor:H.string,airlines:H.string,providers:H.string,workerUrl:H.string,theme:H.string,shadowRoot:H.any},X3=new Ax,Wu={XP:{code:"XP",name:"Avelo",website:"https://www.aveloair.com/"},B6:{code:"B6",name:"JetBlue",website:"https://www.jetblue.com/"},WS:{code:"WS",name:"WestJet",website:"https://www.westjet.com/en-us"}};function $_(e){let t="";for(let n=0;n<e.length;++n){const r=e[n];r.type==="place"&&(t+=r.nearbyAirports[0].iata_code+",nearby"),r.type==="airport"&&(t+=r.iata_code),n<e.length-1&&e.length>1&&(t+=",")}return t}function z_({apiDomain:e,origin:t,destination:n,airlines:r,providers:i,destinations:o,primaryColor:u,secondaryColor:c,locationId:f,experimentId:d,clickId:p,departureDateLabel:m="Departure Date",returnDateLabel:g="Return Date",workerUrl:_="https://worker.flymyairport.com",theme:C="light",channel:E}){const[T,k]=M.useState({origins:[],destinations:[],startDate:null,endDate:null}),x=M.useMemo(()=>$_(T.origins),[T.origins]),b=M.useMemo(()=>$_(T.destinations),[T.destinations]),[P,R]=M.useState(!1);if(M.useEffect(()=>{R(!!window.location.search.includes("unsupportedAirlines"))},[]),!Xx.safeParse(f).success)throw new Error("Unable to parse location id");if(d&&d!=="0"&&d!=="1")throw new Error("experimentId must be 0 or 1");if(p&&!/^[a-zA-Z0-9_]{1,50}$/.test(p))throw new Error("clickId must be 1-50 characters and can only use letters, numbers and _");t=t==null?void 0:t.toLocaleUpperCase(),n=n==null?void 0:n.toLocaleUpperCase();const D=r==null?void 0:r.split(",").map(W=>W.toLocaleUpperCase().trim()).filter(W=>W!==""),F=i==null?void 0:i.split(",").map(W=>W.toLocaleUpperCase().trim()).filter(W=>W!==""),Q=o==null?void 0:o.split(",").map(W=>W.toLocaleUpperCase().trim()).filter(W=>W!==""),[te,q]=M.useState(!1),[G,j]=M.useState(!!t),[Y,se]=M.useState(!!n),[fe,_e]=M.useState(null),[Pe,V]=M.useState(null),{data:re,status:de,setQuery:we}=n_({key:"origin-suggest",apiDomain:e}),ze=M.useMemo(()=>Zi.uniqBy(re==null?void 0:re.filter(W=>{var ee;return(ee=W.nearbyAirports)==null?void 0:ee.length}).map(W=>{const ee=W.types.includes("airport");return[X(N({},W),{sectionIndex:0,type:ee?"airport-place":"place",key:W.formatted_address}),...W.nearbyAirports.map((ue,Ae)=>X(N({},ue),{sectionIndex:ee?-1:Ae,type:"airport",key:`${ue.iata_code}`}))]}).flat(),W=>W.key).filter((W,ee,ue)=>{if(W.type==="place"){const Ae=ue.at(ee+1);if(Ae){if(Ae.type!=="airport")return!1}else return!1}return!0}),[re]),{data:Ke,status:Be,setQuery:ge}=n_({key:"destination-suggest",apiDomain:e}),ie=M.useMemo(()=>Zi.uniqBy(Ke==null?void 0:Ke.filter(W=>{var ee;return(ee=W.nearbyAirports)==null?void 0:ee.length}).map(W=>{const ee=W.types.includes("airport");return[X(N({},W),{sectionIndex:0,type:ee?"airport-place":"place",key:W.formatted_address}),...W.nearbyAirports.map((ue,Ae)=>X(N({},ue),{sectionIndex:ee?-1:Ae,type:"airport",key:`${ue.iata_code}`}))]}).flat(),W=>W.key).filter((W,ee,ue)=>{if(W.type==="place"){const Ae=ue.at(ee+1);if(Ae){if(Ae.type!=="airport")return!1}else return!1}return!0}),[Ke]),[xe,Ee]=M.useState(null),[St,Lt]=M.useState(null),[Ft,Wt]=M.useState(!1);M.useEffect(()=>{console.log("airport results changed",{originAirports:re,destinationAirports:Ke})},[re,Ke]),M.useEffect(()=>{Ee(fe?gI([fe,new Date]):null)},[fe]),M.useEffect(()=>{if(Lt(T.startDate?Ra(T.startDate,1):null),T.startDate){const W=Vi(T.startDate,"yyyy-MM-dd"),ee=pn[W];fi(ue=>(ue[W]=ee,ue))}},[T.startDate]);const{priceCalendar:pn,setPriceCalendar:Ct}=zx({key:"price-calendar-depart",apiDomain:e,destination:b,origin:x,startDate:xe,endDate:Pe,enabled:Ft,transformData(W){return W?Zi.transform(W,(ee,ue,Ae)=>{ee[Ae]=X(N({},ue),{transformedPrice:ue.price!==void 0&&ue.price>0?ue.price+10:ue.price})}):{}}}),{priceCalendar:on,setPriceCalendar:fi}=zx({key:"price-calendar-return",apiDomain:e,destination:x,origin:b,startDate:St,endDate:Pe,enabled:Ft,transformData(W){return W?Zi.transform(W,(ee,ue,Ae)=>{ee[Ae]=X(N({},ue),{transformedPrice:ue.price!==void 0&&ue.price>0?ue.price+10:ue.price})}):{}}}),Ht=()=>{const{origins:W,destinations:ee,startDate:ue,endDate:Ae}=T;W!=null&&W.length&&(ee!=null&&ee.length)&&ue&&Ae?q(!0):q(!1)};M.useEffect(()=>{t&&nm(e,t,["airport"]).then(W=>{const ee=W==null?void 0:W.map(ue=>ue.nearbyAirports).flat().find(ue=>ue.iata_code.toLowerCase()===(t==null?void 0:t.toLowerCase()));ee&&k(ue=>X(N({},ue),{origins:[X(N({},ee),{type:"airport",key:ee.iata_code,sectionIndex:-1,disabled:!0})]}))}),n&&nm(e,n,["airport"]).then(W=>{const ee=W==null?void 0:W.map(ue=>ue.nearbyAirports).flat().find(ue=>ue.iata_code.toLowerCase()===(n==null?void 0:n.toLowerCase()));ee&&k(ue=>X(N({},ue),{destinations:[X(N({},ee),{type:"airport",key:ee.iata_code,sectionIndex:-1,disabled:!0})]}))}),j(!!t),se(!!n)},[t,n]),M.useEffect(()=>{Ct({}),fi({})},[T.origins,T.destinations]),M.useEffect(()=>{Ht()},[T.origins,T.destinations,T.startDate,T.endDate]);const sa=(W,ee)=>{var ue;T.startDate!==W&&fi({}),k(X(N({},T),{startDate:W,endDate:ee})),(ue=window==null?void 0:window.dataLayer)==null||ue.push({event:"fma.flightSearch.dateRangeChange","fma.flightSearch.dateRange":{startDate:W==null?void 0:W.toISOString(),endDate:ee==null?void 0:ee.toISOString()}})},Un=(W,ee)=>{_e(W),V(ee)};M.useEffect(()=>{Wt(!!window.location.search.includes("priceCalendar"))},[]),Q!=null&&Q.length&&(Ke!=null&&Ke.length)&&Ke.map(W=>X(N({},W),{nearbyAirports:W.nearbyAirports.filter(ee=>Q==null?void 0:Q.find(ue=>ue===ee.iata_code))}));const rr=()=>{const{origins:W,destinations:ee}=T;j(Y),se(G),k(X(N({},T),{origins:ee,destinations:W}))},Bt=W=>{var Hf;W.preventDefault();const ee=new FormData(W.currentTarget),ue=Object.fromEntries(ee.entries()),Ae=x,Wn=b,Hn=T.startDate,di=T.endDate;if(!Ae||!Wn||!Hn||!di)throw new Error("All fields must be filled out");let Jo=Hn.toISOString().split("T")[0],es=di.toISOString().split("T")[0],ir={},Wr={};if(ue["flexible-dates"]){const Cn="-flexible-3days";Jo+=Cn,es+=Cn}const Hu=ue.cabin||"economy",Fm=ue.pax||"1adult";let zf="";if(n){const Cn=T.destinations[0];if(Cn.type==="airport"){const Bu=c5(Cn.iata_code);T.destinations.length===1&&Bu&&(zf=",nearby")}}let $m=`/fma/${t||Ae}/${Ae}-${Wn}${zf}/${Jo}/${es}/${Hu}/${Fm}/`;ir=X(N({},ir),{enc_lid:h4({airport:t||Ae,channel:E||"EMB",action:"SEARCH",userDefinedPage:f||"UNDEF",originIATA:Ae,destinationIATA:Wn}),enc_cid:p||v5()}),d&&(ir=X(N({},ir),{enc_eid:d})),D!=null&&D.length&&(Wr=X(N({},Wr),{airlines:D.join(",")})),F!=null&&F.length&&(Wr=X(N({},Wr),{providers:F.join(",")}));const Uf=_;let jf=Object.entries(Wr).filter(([Cn,qt])=>!!qt&&qt!=="").map(([Cn,qt])=>`${Cn}=${qt}`).join(";");ir=X(N({},ir),{fs:jf});let Ka=Object.entries(ir).filter(([Cn,qt])=>!!qt&&qt!=="").map(([Cn,qt])=>`${Cn}=${qt}`).join("&");Ka&&Ka!==""&&(Ka="?"+Ka);const Wf=`${Uf}${$m}${Ka}`;(Hf=window==null?void 0:window.dataLayer)==null||Hf.push({event:"fma.flightSearch.searchClicked","fma.flightSearch.link":Wf,"fma.flightSearch.query":ir,"fma.flightSearch.filterState":Wr,"fma.flightSearch.formState":{origin:Ae,destination:Wn,startDate:Hn,endDate:di}}),window.open(Wf,"_blank"),P&&(qt=>{qt==null||qt.forEach(Bu=>{const Bf=Wu[Bu];Bf&&window.open(Bf.website,"_blank")})})(F)},Sn={};u&&u!=""&&u!=null&&(Sn["--color-primary"]=u),c&&c!=""&&c!=null&&(Sn["--color-secondary"]=c);const jr=[{display:"Economy",value:"economy"},{display:"Premium Economy",value:"premium"},{display:"Business",value:"business"},{display:"First",value:"first"}],jn=new Array(9).fill(0).map((W,ee)=>{const ue=ee+1,Ae=ue>1;return{value:`${ue}adult${Ae?"s":""}`,display:`${ue} Traveler${Ae?"s":""}`}});let vn=()=>null;return P&&(vn=W=>{const ee=Array.isArray(W)?W.filter(Ae=>Object.keys(Wu).includes(Ae)):typeof W=="string"&&Object.keys(Wu).includes(W)?[W]:[];return ee.length===0?null:Ve("span",{children:["Some airlines choose not to participate in this search tool. Visit"," ",ee.map((Ae,Wn)=>Ve(Ye.Fragment,{children:[J("u",{children:J("a",{href:Wu[Ae].website,target:"_blank",rel:"noopener noreferrer",children:Wu[Ae].name})}),Wn<ee.length-2&&", ",Wn===ee.length-2&&" or "]},Ae))," to search for their destinations."]})}),J(Fx,{client:X3,contextSharing:!0,children:Ve("div",{"data-mode":C,style:Sn,className:"a1-w-full a1-@container a1-relative",children:[Ve("form",{className:"a1-flex a1-flex-col a1-gap-2",onSubmit:Bt,children:[Ve("div",{className:"a1-flex a1-flex-wrap a1-justify-between a1-gap-4 a1-max-w-full a1-w-full",children:[Ve("div",{className:"a1-flex a1-gap-4",children:[J("select",{name:"pax",className:"a1-text-black dark:a1-text-white a1-text-base a1-bg-transparent a1-grow-0",children:jn.map((W,ee)=>J("option",{className:"dark:a1-bg-black dark:a1-text-white a1-text-base",value:W.value,selected:ee===0,children:W.display},`${W.value}-${ee}`))}),J("select",{name:"cabin",className:"a1-text-black dark:a1-text-white a1-text-base a1-bg-transparent a1-max-w-[125px] md:a1-max-w-[185px] lg:a1-max-w-[185px]",children:jr.map((W,ee)=>J("option",{className:"dark:a1-bg-black dark:a1-text-white a1-text-base",value:W.value,selected:ee===0,children:W.display},`${W.value}-${ee}`))})]}),Ve("label",{className:"a1-hidden @5xl:a1-block a1-text-black dark:a1-text-white a1-flex a1-items-center a1-text-base",children:[J("input",{type:"checkbox",name:"flexible-dates"})," Show nearby dates for lower fares"]})]}),Ve("div",{className:"a1-flex a1-flex-col a1-gap-6 @5xl:a1-grid @5xl:a1-grid-cols-2",children:[Ve("div",{className:"a1-flex a1-flex-col a1-items-center @xl:a1-grid @xl:a1-grid-cols-[calc(50%-20px)_24px_calc(50%-20px)] a1-w-full a1-gap-2",children:[J("div",{className:"a1-flex a1-items-center a1-w-full",children:J(D_,{icon:de!=="loading"?J(oa,{className:"a1-w-6 a1-h-6",icon:m4}):J(L_,{}),placeholder:"From?",disabled:G,items:ze||[],selectedItems:T.origins,onInputChange:W=>we(W),onSelectedItemsChange:W=>{k(ee=>X(N({},ee),{origins:(W==null?void 0:W.slice(0,1))||[]}))}})}),J("button",{type:"button",className:"a1-w-6 a1-text-gray-500 a1-rotate-90 @2xl:a1-rotate-0",onClick:rr,children:J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,className:"a1-w-6 a1-h-6 a1-stroke-gray-500 dark:a1-stroke-gray-100",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"})})}),J("div",{className:"a1-flex a1-items-center a1-w-full",children:J(D_,{icon:Be!=="loading"?J(oa,{className:"a1-w-6 a1-h-6",icon:g4}):J(L_,{}),placeholder:"To?",disabled:Y,items:ie||[],selectedItems:T.destinations,onInputChange:W=>ge(W),onSelectedItemsChange:W=>{k(ee=>X(N({},ee),{destinations:(W==null?void 0:W.slice(0,1))||[]}))}})})]}),Ve("div",{className:"a1-flex a1-flex-col a1-items-center a1-gap-4 a1-grow @5xl:a1-grid @5xl:a1-grid-cols-[1fr_56px]",children:[J("div",{className:"a1-w-full",children:J(TT,{origin:x,destination:b,startDateLabel:m,endDateLabel:g,onChange:sa,onMonthViewChange:Un,priceCalendar:T.startDate?on:pn})}),Ve("div",{className:"a1-flex a1-flex-col a1-gap-6 a1-items-center a1-justify-center",children:[Ve("label",{className:"a1-text-black a1-text-base dark:a1-text-white a1-flex a1-items-center @5xl:a1-hidden a1-gap-3",children:[J("input",{type:"checkbox",name:"flexible-dates"}),J("span",{children:"Show nearby dates for lower fares"})]}),Ve("button",{disabled:!te,type:"submit",className:"a1-h-[44px] a1-grow-0 a1-rounded-lg a1-flex a1-align-center a1-items-center a1-gap-1 a1-bg-primary a1-text-white a1-px-4 hover:a1-bg-secondary disabled:a1-bg-gray-400",children:[J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"white",className:"a1-w-6 a1-h-6",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})}),J("span",{className:"@5xl:a1-hidden a1-text-base",children:"Search"})]})]})]})]})]}),J("div",{className:"a1-text-white",children:!!P&&vn(F)})]})})}z_.propTypes=F_;const J3=`/*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}flight-search-form{--color-primary:#1d4ed8;--color-secondary:#bfdbfe}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.a1-absolute{position:absolute}.a1-relative{position:relative}.a1-left-1\\/2{left:50%}.a1-left-2{left:.5rem}.a1-right-2{right:.5rem}.a1-top-1\\/2{top:50%}.a1-top-full{top:100%}.a1-z-10{z-index:10}.a1-z-20{z-index:20}.a1-col-span-1{grid-column:span 1/span 1}.a1-mr-2{margin-right:8px}.a1-mt-2{margin-top:8px}.a1-mt-4{margin-top:16px}.a1-block{display:block}.a1-flex{display:flex}.a1-grid{display:grid}.a1-hidden{display:none}.a1-h-10{height:40px}.a1-h-11{height:44px}.a1-h-6{height:24px}.a1-h-8{height:32px}.a1-h-\\[2px\\]{height:2px}.a1-h-\\[44px\\]{height:44px}.a1-h-full{height:100%}.a1-max-h-56{max-height:224px}.a1-max-h-\\[400px\\]{max-height:400px}.a1-max-h-\\[600px\\]{max-height:600px}.a1-w-10{width:40px}.a1-w-11{width:44px}.a1-w-6{width:24px}.a1-w-8{width:32px}.a1-w-\\[250px\\]{width:250px}.a1-w-full{width:100%}.a1-w-max{width:-moz-max-content;width:max-content}.a1-max-w-\\[125px\\]{max-width:125px}.a1-max-w-full{max-width:100%}.a1-shrink{flex-shrink:1}.a1-shrink-0{flex-shrink:0}.a1-flex-grow,.a1-grow{flex-grow:1}.a1-grow-0{flex-grow:0}.a1-grow-\\[4\\]{flex-grow:4}.-a1-translate-x-1\\/2{--tw-translate-x:-50%}.-a1-translate-x-1\\/2,.-a1-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-a1-translate-y-1\\/2{--tw-translate-y:-50%}.a1--translate-x-1\\/2{--tw-translate-x:-50%}.a1--translate-x-1\\/2,.a1-translate-y-\\[10px\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.a1-translate-y-\\[10px\\]{--tw-translate-y:10px}.-a1-rotate-45{--tw-rotate:-45deg}.-a1-rotate-45,.a1-rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.a1-rotate-180{--tw-rotate:180deg}.a1-rotate-90{--tw-rotate:90deg}.a1-rotate-90,.a1-scale-100{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.a1-scale-100{--tw-scale-x:1;--tw-scale-y:1}.a1-scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.a1-scale-95,.a1-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes a1-spin{to{transform:rotate(1turn)}}.a1-animate-spin{animation:a1-spin 1s linear infinite}.a1-cursor-not-allowed{cursor:not-allowed}.a1-cursor-pointer{cursor:pointer}.a1-appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.a1-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.a1-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.a1-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.a1-grid-cols-\\[24px_1fr\\]{grid-template-columns:24px 1fr}.a1-grid-cols-\\[24px_auto_1fr\\]{grid-template-columns:24px auto 1fr}.a1-grid-cols-\\[24px_auto_auto_1fr\\]{grid-template-columns:24px auto auto 1fr}.a1-grid-cols-\\[24px_auto_auto_auto_1fr\\]{grid-template-columns:24px auto auto auto 1fr}.a1-grid-cols-\\[26px_1fr_40px\\]{grid-template-columns:26px 1fr 40px}.a1-grid-rows-6{grid-template-rows:repeat(6,minmax(0,1fr))}.a1-flex-row{flex-direction:row}.a1-flex-col{flex-direction:column}.a1-flex-wrap{flex-wrap:wrap}.a1-items-end{align-items:flex-end}.a1-items-center{align-items:center}.a1-justify-start{justify-content:flex-start}.a1-justify-end{justify-content:flex-end}.a1-justify-center{justify-content:center}.a1-justify-between{justify-content:space-between}.a1-gap-1{gap:4px}.a1-gap-2{gap:8px}.a1-gap-3{gap:12px}.a1-gap-4{gap:16px}.a1-gap-6{gap:24px}.a1-overflow-hidden{overflow:hidden}.a1-overflow-y-auto{overflow-y:auto}.a1-overflow-x-hidden{overflow-x:hidden}.a1-truncate{overflow:hidden;white-space:nowrap}.a1-text-ellipsis,.a1-truncate{text-overflow:ellipsis}.a1-whitespace-nowrap{white-space:nowrap}.a1-rounded{border-radius:.25rem}.a1-rounded-full{border-radius:9999px}.a1-rounded-lg{border-radius:8px}.a1-rounded-none{border-radius:0}.a1-border{border-width:1px}.a1-border-2{border-width:2px}.a1-border-b{border-bottom-width:1px}.a1-border-l-0{border-left-width:0}.a1-border-l-4{border-left-width:4px}.a1-border-r-0{border-right-width:0}.a1-border-none{border-style:none}.a1-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.a1-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.a1-border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.a1-border-primary{border-color:var(--color-primary)}.a1-bg-\\[\\#D2490E\\]{--tw-bg-opacity:1;background-color:rgb(210 73 14/var(--tw-bg-opacity))}.a1-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.a1-bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.a1-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.a1-bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.a1-bg-primary{background-color:var(--color-primary)}.a1-bg-stone-200{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity))}.a1-bg-transparent{background-color:transparent}.a1-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.a1-fill-\\[\\#D2490E\\]{fill:#d2490e}.a1-fill-indigo-200{fill:#c7d2fe}.a1-fill-indigo-800{fill:#3730a3}.a1-stroke-black{stroke:#000}.a1-stroke-gray-500{stroke:#6b7280}.a1-p-0{padding:0}.a1-px-1{padding-left:4px;padding-right:4px}.a1-px-2{padding-left:8px;padding-right:8px}.a1-px-3{padding-left:12px;padding-right:12px}.a1-px-4{padding-left:16px;padding-right:16px}.a1-py-0{padding-bottom:0;padding-top:0}.a1-py-0\\.5{padding-bottom:2px;padding-top:2px}.a1-py-1{padding-bottom:4px;padding-top:4px}.a1-py-2{padding-bottom:8px;padding-top:8px}.a1-pb-\\[10px\\]{padding-bottom:10px}.a1-pl-1{padding-left:4px}.a1-pl-3{padding-left:12px}.a1-pl-4{padding-left:16px}.a1-pl-5{padding-left:20px}.a1-pr-2{padding-right:8px}.a1-text-left{text-align:left}.a1-text-center{text-align:center}.a1-text-\\[11px\\]{font-size:11px}.a1-text-base{font-size:16px}.a1-text-sm{font-size:14px}.a1-text-xs{font-size:12px}.a1-font-bold{font-weight:700}.a1-font-medium{font-weight:500}.a1-font-semibold{font-weight:600}.a1-uppercase{text-transform:uppercase}.a1-capitalize{text-transform:capitalize}.a1-leading-\\[12px\\]{line-height:12px}.a1-leading-\\[16px\\]{line-height:16px}.a1-tracking-wide{letter-spacing:.025em}.a1-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.a1-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.a1-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.a1-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.a1-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.a1-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.a1-opacity-0{opacity:0}.a1-opacity-100{opacity:1}.a1-opacity-50{opacity:.5}.a1-opacity-60{opacity:.6}.a1-opacity-70{opacity:.7}.a1-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.a1-shadow-lg,.a1-shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.a1-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.a1-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.a1-outline-none{outline:2px solid transparent;outline-offset:2px}.a1-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.a1-ring-gray-200{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity))}.a1-ring-primary{--tw-ring-color:var(--color-primary)}.a1-blur-\\[3px\\]{--tw-blur:blur(3px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.a1-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.a1-duration-100{transition-duration:.1s}.a1-duration-75{transition-duration:75ms}.a1-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.a1-\\@container{container-type:inline-size}.before\\:a1-absolute:before{content:var(--tw-content);position:absolute}.before\\:a1-bottom-0:before{bottom:0;content:var(--tw-content)}.before\\:a1-left-0:before{content:var(--tw-content);left:0}.before\\:a1-left-1\\/2:before{content:var(--tw-content);left:50%}.before\\:a1-right-0:before{content:var(--tw-content);right:0}.before\\:a1-right-1\\/2:before{content:var(--tw-content);right:50%}.before\\:a1-top-0:before{content:var(--tw-content);top:0}.before\\:a1-bg-gray-200:before{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity));content:var(--tw-content)}.after\\:a1-absolute:after{content:var(--tw-content);position:absolute}.after\\:a1-bottom-0:after{bottom:0;content:var(--tw-content)}.after\\:a1-left-0:after{content:var(--tw-content);left:0}.after\\:a1-right-0:after{content:var(--tw-content);right:0}.after\\:a1-top-0:after{content:var(--tw-content);top:0}.after\\:a1-rounded-full:after{border-radius:9999px;content:var(--tw-content)}.after\\:a1-bg-gray-600:after{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity));content:var(--tw-content)}.hover\\:a1-bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.hover\\:a1-bg-secondary:hover{background-color:var(--color-secondary)}.hover\\:before\\:a1-ring-primary:hover:before{--tw-ring-color:var(--color-primary);content:var(--tw-content)}.hover\\:after\\:a1-absolute:hover:after{content:var(--tw-content);position:absolute}.hover\\:after\\:a1-left-0:hover:after{content:var(--tw-content);left:0}.hover\\:after\\:a1-right-0:hover:after{content:var(--tw-content);right:0}.hover\\:after\\:a1-z-10:hover:after{content:var(--tw-content);z-index:10}.hover\\:after\\:a1-h-full:hover:after{content:var(--tw-content);height:100%}.hover\\:after\\:a1-w-full:hover:after{content:var(--tw-content);width:100%}.hover\\:after\\:a1-rounded-full:hover:after{border-radius:9999px;content:var(--tw-content)}.hover\\:after\\:a1-ring-2:hover:after{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);content:var(--tw-content)}.focus\\:a1-border-primary:focus{border-color:var(--color-primary)}.focus\\:a1-bg-gray-400:focus{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.focus\\:a1-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\\:a1-bg-gray-400:disabled{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.disabled\\:a1-bg-transparent:disabled{background-color:transparent}.disabled\\:a1-bg-white:disabled{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}@container (min-width: 576px){.\\@xl\\:a1-grid{display:grid}.\\@xl\\:a1-grid-cols-\\[calc\\(50\\%-20px\\)_24px_calc\\(50\\%-20px\\)\\]{grid-template-columns:calc(50% - 20px) 24px calc(50% - 20px)}}@container (min-width: 672px){.\\@2xl\\:a1-bottom-2{bottom:.5rem}.\\@2xl\\:a1-left-1\\/2{left:50%}.\\@2xl\\:a1-top-2{top:.5rem}.\\@2xl\\:a1-hidden{display:none}.\\@2xl\\:a1-h-\\[initial\\]{height:auto}.\\@2xl\\:a1-w-\\[2px\\]{width:2px}.\\@2xl\\:a1-rotate-0{--tw-rotate:0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\@2xl\\:a1-flex-row{flex-direction:row}}@container (min-width: 1024px){.\\@5xl\\:a1-block{display:block}.\\@5xl\\:a1-grid{display:grid}.\\@5xl\\:a1-hidden{display:none}.\\@5xl\\:a1-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.\\@5xl\\:a1-grid-cols-\\[1fr_56px\\]{grid-template-columns:1fr 56px}}:is([data-mode=dark] .dark\\:a1-bg-black){--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}:is([data-mode=dark] .dark\\:a1-bg-white){--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}:is([data-mode=dark] .dark\\:a1-stroke-gray-100){stroke:#f3f4f6}:is([data-mode=dark] .dark\\:a1-text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is([data-mode=dark] .dark\\:a1-opacity-60){opacity:.6}@media (min-width:768px){.md\\:a1-max-w-\\[185px\\]{max-width:185px}.md\\:a1-items-center{align-items:center}}@media (min-width:1024px){.lg\\:a1-block{display:block}.lg\\:a1-hidden{display:none}.lg\\:a1-max-w-\\[185px\\]{max-width:185px}.lg\\:a1-max-w-\\[none\\]{max-width:none}.lg\\:a1-rotate-0{--tw-rotate:0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:a1-flex-row{flex-direction:row}.lg\\:a1-text-left{text-align:left}}
|
|
844
|
+
*/var rm=Symbol.for("react.element"),im=Symbol.for("react.portal"),kf=Symbol.for("react.fragment"),Sf=Symbol.for("react.strict_mode"),Cf=Symbol.for("react.profiler"),Ef=Symbol.for("react.provider"),If=Symbol.for("react.context"),d3=Symbol.for("react.server_context"),Of=Symbol.for("react.forward_ref"),Tf=Symbol.for("react.suspense"),Pf=Symbol.for("react.suspense_list"),Af=Symbol.for("react.memo"),Rf=Symbol.for("react.lazy"),h3=Symbol.for("react.offscreen"),r_;r_=Symbol.for("react.module.reference");function nr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case rm:switch(e=e.type,e){case kf:case Cf:case Sf:case Tf:case Pf:return e;default:switch(e=e&&e.$$typeof,e){case d3:case If:case Of:case Rf:case Af:case Ef:return e;default:return t}}case im:return t}}}tt.ContextConsumer=If,tt.ContextProvider=Ef,tt.Element=rm,tt.ForwardRef=Of,tt.Fragment=kf,tt.Lazy=Rf,tt.Memo=Af,tt.Portal=im,tt.Profiler=Cf,tt.StrictMode=Sf,tt.Suspense=Tf,tt.SuspenseList=Pf,tt.isAsyncMode=function(){return!1},tt.isConcurrentMode=function(){return!1},tt.isContextConsumer=function(e){return nr(e)===If},tt.isContextProvider=function(e){return nr(e)===Ef},tt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===rm},tt.isForwardRef=function(e){return nr(e)===Of},tt.isFragment=function(e){return nr(e)===kf},tt.isLazy=function(e){return nr(e)===Rf},tt.isMemo=function(e){return nr(e)===Af},tt.isPortal=function(e){return nr(e)===im},tt.isProfiler=function(e){return nr(e)===Cf},tt.isStrictMode=function(e){return nr(e)===Sf},tt.isSuspense=function(e){return nr(e)===Tf},tt.isSuspenseList=function(e){return nr(e)===Pf},tt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kf||e===Cf||e===Sf||e===Tf||e===Pf||e===h3||typeof e=="object"&&e!==null&&(e.$$typeof===Rf||e.$$typeof===Af||e.$$typeof===Ef||e.$$typeof===If||e.$$typeof===Of||e.$$typeof===r_||e.getModuleId!==void 0)},tt.typeOf=nr;const i_=e=>typeof e=="object"&&e!=null&&e.nodeType===1,a_=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",am=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return a_(n.overflowY,t)||a_(n.overflowX,t)||(r=>{const i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch(u){return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},Mf=(e,t,n,r,i,o,u,c)=>o<e&&u>t||o>e&&u<t?0:o<=e&&c<=n||u>=t&&c>=n?o-e-r:u>t&&c<n||o<e&&c>n?u-t+i:0,p3=e=>{const t=e.parentElement;return t==null?e.getRootNode().host||null:t},v3=(e,t)=>{var n,r,i,o;if(typeof document=="undefined")return[];const{scrollMode:u,block:c,inline:f,boundary:d,skipOverflowHiddenElements:p}=t,m=typeof d=="function"?d:j=>j!==d;if(!i_(e))throw new TypeError("Invalid target");const g=document.scrollingElement||document.documentElement,_=[];let C=e;for(;i_(C)&&m(C);){if(C=p3(C),C===g){_.push(C);break}C!=null&&C===document.body&&am(C)&&!am(document.documentElement)||C!=null&&am(C,p)&&_.push(C)}const E=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,T=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:k,scrollY:x}=window,{height:b,width:P,top:R,right:D,bottom:F,left:Q}=e.getBoundingClientRect();let te=c==="start"||c==="nearest"?R:c==="end"?F:R+b/2,q=f==="center"?Q+P/2:f==="end"?D:Q;const G=[];for(let j=0;j<_.length;j++){const Y=_[j],{height:se,width:fe,top:_e,right:Pe,bottom:V,left:re}=Y.getBoundingClientRect();if(u==="if-needed"&&R>=0&&Q>=0&&F<=T&&D<=E&&R>=_e&&F<=V&&Q>=re&&D<=Pe)return G;const de=getComputedStyle(Y),we=parseInt(de.borderLeftWidth,10),ze=parseInt(de.borderTopWidth,10),Ke=parseInt(de.borderRightWidth,10),Be=parseInt(de.borderBottomWidth,10);let ge=0,ie=0;const xe="offsetWidth"in Y?Y.offsetWidth-Y.clientWidth-we-Ke:0,Ee="offsetHeight"in Y?Y.offsetHeight-Y.clientHeight-ze-Be:0,St="offsetWidth"in Y?Y.offsetWidth===0?0:fe/Y.offsetWidth:0,Lt="offsetHeight"in Y?Y.offsetHeight===0?0:se/Y.offsetHeight:0;if(g===Y)ge=c==="start"?te:c==="end"?te-T:c==="nearest"?Mf(x,x+T,T,ze,Be,x+te,x+te+b,b):te-T/2,ie=f==="start"?q:f==="center"?q-E/2:f==="end"?q-E:Mf(k,k+E,E,we,Ke,k+q,k+q+P,P),ge=Math.max(0,ge+x),ie=Math.max(0,ie+k);else{ge=c==="start"?te-_e-ze:c==="end"?te-V+Be+Ee:c==="nearest"?Mf(_e,V,se,ze,Be+Ee,te,te+b,b):te-(_e+se/2)+Ee/2,ie=f==="start"?q-re-we:f==="center"?q-(re+fe/2)+xe/2:f==="end"?q-Pe+Ke+xe:Mf(re,Pe,fe,we,Ke+xe,q,q+P,P);const{scrollLeft:Ft,scrollTop:Wt}=Y;ge=Math.max(0,Math.min(Wt+ge/Lt,Y.scrollHeight-se/Lt+Ee)),ie=Math.max(0,Math.min(Ft+ie/St,Y.scrollWidth-fe/St+xe)),te+=Wt-ge,q+=Ft-ie}G.push({el:Y,top:ge,left:ie})}return G};var Zo=function(){return Zo=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Zo.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;var m3=0;function om(){}function g3(e,t){if(e){var n=v3(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(r){var i=r.el,o=r.top,u=r.left;i.scrollTop=o,i.scrollLeft=u})}}function o_(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function s_(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var o=arguments.length,u=new Array(o),c=0;c<o;c++)u[c]=arguments[c];r(),n=setTimeout(function(){n=null,e.apply(void 0,u)},t)}return i.cancel=r,i}function zn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),u=1;u<i;u++)o[u-1]=arguments[u];return t.some(function(c){return c&&c.apply(void 0,[r].concat(o)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function Go(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}function y3(){return String(m3++)}function w3(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function Nf(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=u_(t,r)?t[r]:e[r],n},{})}function u_(e,t){return e[t]!==void 0}function sm(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function Df(e,t,n,r,i){i===void 0&&(i=!1);var o=n.length;if(o===0)return-1;var u=o-1;(typeof e!="number"||e<0||e>u)&&(e=t>0?-1:u+1);var c=e+t;c<0?c=i?u:0:c>u&&(c=i?0:u);var f=Lf(c,t<0,n,r,i);return f===-1?e>=o?-1:e:f}function Lf(e,t,n,r,i){i===void 0&&(i=!1);var o=n.length;if(t){for(var u=e;u>=0;u--)if(!r(n[u],u))return u}else for(var c=e;c<o;c++)if(!r(n[c],c))return c;return i?Lf(t?o-1:0,t,n,r):-1}function l_(e,t,n,r){return r===void 0&&(r=!0),n&&t.some(function(i){return i&&(o_(i,e,n)||r&&o_(i,n.document.activeElement,n))})}var x3=s_(function(e){c_(e).textContent=""},500);function c_(e){var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}function f_(e,t){if(!(!e||!t)){var n=c_(t);n.textContent=e,x3(t)}}var b3=["isInitialMount","highlightedIndex","items","environment"],d_={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function _3(e,t,n){var r=e.props,i=e.type,o={};Object.keys(t).forEach(function(u){k3(u,e,t,n),n[u]!==t[u]&&(o[u]=n[u])}),r.onStateChange&&Object.keys(o).length&&r.onStateChange(ve({type:i},o))}function k3(e,t,n,r){var i=t.props,o=t.type,u="on"+um(e)+"Change";i[u]&&r[e]!==void 0&&r[e]!==n[e]&&i[u](ve({type:o},r))}function S3(e,t){return t.changes}function C3(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var E3=s_(function(e,t){f_(e(),t)},200),I3=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?M.useLayoutEffect:M.useEffect,O3="useId"in Ye?function(t){var n=t.id,r=t.labelId,i=t.menuId,o=t.getItemId,u=t.toggleButtonId,c=t.inputId,f="downshift-"+Ye.useId();n||(n=f);var d=M.useRef({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:o||function(p){return n+"-item-"+p},toggleButtonId:u||n+"-toggle-button",inputId:c||n+"-input"});return d.current}:function(t){var n=t.id,r=n===void 0?"downshift-"+y3():n,i=t.labelId,o=t.menuId,u=t.getItemId,c=t.toggleButtonId,f=t.inputId,d=M.useRef({labelId:i||r+"-label",menuId:o||r+"-menu",getItemId:u||function(p){return r+"-item-"+p},toggleButtonId:c||r+"-toggle-button",inputId:f||r+"-input"});return d.current};function h_(e,t,n,r){var i,o;if(e===void 0){if(t===void 0)throw new Error(r);i=n[t],o=t}else o=t===void 0?n.indexOf(e):t,i=e;return[i,o]}function T3(e){return e?String(e):""}function um(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function lm(e){var t=M.useRef(e);return t.current=e,t}function p_(e,t,n){var r=M.useRef(),i=M.useRef(),o=M.useCallback(function(g,_){i.current=_,g=Nf(g,_.props);var C=e(g,_),E=_.props.stateReducer(g,ve({},_,{changes:C}));return E},[e]),u=M.useReducer(o,t),c=u[0],f=u[1],d=lm(n),p=M.useCallback(function(g){return f(ve({props:d.current},g))},[d]),m=i.current;return M.useEffect(function(){m&&r.current&&r.current!==c&&_3(m,Nf(r.current,m.props),c),r.current=c},[c,n,m]),[c,p]}function P3(e,t,n){var r=p_(e,t,n),i=r[0],o=r[1];return[Nf(i,n),o]}var Uu={itemToString:T3,stateReducer:S3,getA11ySelectionMessage:C3,scrollIntoView:g3,environment:typeof window=="undefined"?void 0:window};function Cr(e,t,n){n===void 0&&(n=d_);var r=e["default"+um(t)];return r!==void 0?r:n[t]}function Xo(e,t,n){n===void 0&&(n=d_);var r=e[t];if(r!==void 0)return r;var i=e["initial"+um(t)];return i!==void 0?i:Cr(e,t,n)}function A3(e){var t=Xo(e,"selectedItem"),n=Xo(e,"isOpen"),r=Xo(e,"highlightedIndex"),i=Xo(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function ju(e,t,n){var r=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,u=t.selectedItem,c=t.highlightedIndex;return r.length===0?-1:i!==void 0&&c===i?i:o!==void 0?o:u?r.indexOf(u):n===0?-1:n<0?r.length-1:0}function R3(e,t,n,r){var i=M.useRef({isMouseDown:!1,isTouchMove:!1});return M.useEffect(function(){if(n){var o=function(){i.current.isMouseDown=!0},u=function(m){i.current.isMouseDown=!1,e&&!l_(m.target,t.map(function(g){return g.current}),n)&&r()},c=function(){i.current.isTouchMove=!1},f=function(){i.current.isTouchMove=!0},d=function(m){e&&!i.current.isTouchMove&&!l_(m.target,t.map(function(g){return g.current}),n,!1)&&r()};return n.addEventListener("mousedown",o),n.addEventListener("mouseup",u),n.addEventListener("touchstart",c),n.addEventListener("touchmove",f),n.addEventListener("touchend",d),function(){n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",u),n.removeEventListener("touchstart",c),n.removeEventListener("touchmove",f),n.removeEventListener("touchend",d)}}},[e,n]),i}var v_=function(){return om};function m_(e,t,n){var r=n.isInitialMount,i=n.highlightedIndex,o=n.items,u=n.environment,c=Qa(n,b3);M.useEffect(function(){r||!(u!=null&&u.document)||E3(function(){return e(ve({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length},c))},u.document)},t)}function M3(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,u=e.scrollIntoView,c=M.useRef(!0);return I3(function(){t<0||!n||!Object.keys(r.current).length||(c.current===!1?c.current=!0:u(i(t),o))},[t]),c}var g_=om;function y_(e,t,n){var r;n===void 0&&(n=!0);var i=((r=e.items)==null?void 0:r.length)&&t>=0;return ve({isOpen:!1,highlightedIndex:-1},i&&ve({selectedItem:e.items[t],isOpen:Cr(e,"isOpen"),highlightedIndex:Cr(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}var w_={environment:H.shape({addEventListener:H.func.isRequired,removeEventListener:H.func.isRequired,document:H.shape({createElement:H.func.isRequired,getElementById:H.func.isRequired,activeElement:H.any.isRequired,body:H.any.isRequired}).isRequired,Node:H.func.isRequired}),itemToString:H.func,stateReducer:H.func},x_=ve({},w_,{getA11yStatusMessage:H.func,highlightedIndex:H.number,defaultHighlightedIndex:H.number,initialHighlightedIndex:H.number,isOpen:H.bool,defaultIsOpen:H.bool,initialIsOpen:H.bool,selectedItem:H.any,initialSelectedItem:H.any,defaultSelectedItem:H.any,id:H.string,labelId:H.string,menuId:H.string,getItemId:H.func,toggleButtonId:H.string,onSelectedItemChange:H.func,onHighlightedIndexChange:H.func,onStateChange:H.func,onIsOpenChange:H.func,scrollIntoView:H.func});function N3(e,t,n){var r=t.type,i=t.props,o;switch(r){case n.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:o={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:ju(i,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:ju(i,e,0)};break;case n.FunctionCloseMenu:o={isOpen:!1};break;case n.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:o={inputValue:t.inputValue};break;case n.FunctionReset:o={highlightedIndex:Cr(i,"highlightedIndex"),isOpen:Cr(i,"isOpen"),selectedItem:Cr(i,"selectedItem"),inputValue:Cr(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ve({},e,o)}Zo(Zo({},x_),{items:H.array.isRequired,isItemDisabled:H.func,getA11ySelectionMessage:H.func});function D3(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}Zo(Zo({},Uu),{getA11yStatusMessage:D3,isItemDisabled:function(){return!1}});var cm=0,fm=1,dm=2,hm=3,pm=4,vm=5,mm=6,gm=7,ym=8,Ff=9,wm=10,b_=11,__=12,xm=13,k_=14,S_=15,C_=16,E_=17,I_=18,bm=19,O_=20,T_=21,_m=22,P_=Object.freeze({__proto__:null,InputKeyDownArrowDown:cm,InputKeyDownArrowUp:fm,InputKeyDownEscape:dm,InputKeyDownHome:hm,InputKeyDownEnd:pm,InputKeyDownPageUp:vm,InputKeyDownPageDown:mm,InputKeyDownEnter:gm,InputChange:ym,InputBlur:Ff,InputClick:wm,MenuMouseLeave:b_,ItemMouseMove:__,ItemClick:xm,ToggleButtonClick:k_,FunctionToggleMenu:S_,FunctionOpenMenu:C_,FunctionCloseMenu:E_,FunctionSetHighlightedIndex:I_,FunctionSelectItem:bm,FunctionSetInputValue:O_,FunctionReset:T_,ControlledPropUpdatedSelectedItem:_m});function L3(e){var t=A3(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),ve({},t,{inputValue:r})}ve({},x_,{items:H.array.isRequired,isItemDisabled:H.func,selectedItemChanged:H.func,getA11ySelectionMessage:H.func,inputValue:H.string,defaultInputValue:H.string,initialInputValue:H.string,inputId:H.string,onInputValueChange:H.func});function F3(e,t,n){var r=M.useRef(),i=p_(e,t,n),o=i[0],u=i[1];return M.useEffect(function(){u_(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&u({type:_m,inputValue:n.itemToString(n.selectedItem)}),r.current=o.selectedItem===r.current?n.selectedItem:o.selectedItem)},[o.selectedItem,n.selectedItem]),[Nf(o,n),u]}var $3=ve({},Uu,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:w3,isItemDisabled:function(){return!1}});function z3(e,t){var n,r=t.type,i=t.props,o=t.altKey,u;switch(r){case xm:u={isOpen:Cr(i,"isOpen"),highlightedIndex:Cr(i,"highlightedIndex"),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case cm:e.isOpen?u={highlightedIndex:Df(e.highlightedIndex,1,i.items,i.isItemDisabled,!0)}:u={highlightedIndex:o&&e.selectedItem==null?-1:ju(i,e,1),isOpen:i.items.length>=0};break;case fm:e.isOpen?o?u=y_(i,e.highlightedIndex):u={highlightedIndex:Df(e.highlightedIndex,-1,i.items,i.isItemDisabled,!0)}:u={highlightedIndex:ju(i,e,-1),isOpen:i.items.length>=0};break;case gm:u=y_(i,e.highlightedIndex);break;case dm:u=ve({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case vm:u={highlightedIndex:Df(e.highlightedIndex,-10,i.items,i.isItemDisabled,!0)};break;case mm:u={highlightedIndex:Df(e.highlightedIndex,10,i.items,i.isItemDisabled,!0)};break;case hm:u={highlightedIndex:Lf(0,!1,i.items,i.isItemDisabled)};break;case pm:u={highlightedIndex:Lf(i.items.length-1,!0,i.items,i.isItemDisabled)};break;case Ff:u=ve({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case ym:u={isOpen:!0,highlightedIndex:Cr(i,"highlightedIndex"),inputValue:t.inputValue};break;case wm:u={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:ju(i,e,0)};break;case bm:u={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case _m:u={inputValue:t.inputValue};break;default:return N3(e,t,P_)}return ve({},e,u)}var U3=["onMouseLeave","refKey","ref"],j3=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],W3=["onClick","onPress","refKey","ref"],H3=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];ci.stateChangeTypes=P_;function ci(e){e===void 0&&(e={});var t=ve({},$3,e),n=t.items,r=t.scrollIntoView,i=t.environment,o=t.getA11yStatusMessage,u=t.getA11ySelectionMessage,c=t.itemToString,f=L3(t),d=F3(z3,f,t),p=d[0],m=d[1],g=p.isOpen,_=p.highlightedIndex,C=p.selectedItem,E=p.inputValue,T=M.useRef(null),k=M.useRef({}),x=M.useRef(null),b=M.useRef(null),P=M.useRef(!0),R=O3(t),D=M.useRef(),F=lm({state:p,props:t}),Q=M.useCallback(function(ge){return k.current[R.getItemId(ge)]},[R]);m_(o,[g,_,E,n],ve({isInitialMount:P.current,previousResultCount:D.current,items:n,environment:i,itemToString:c},p)),m_(u,[C],ve({isInitialMount:P.current,previousResultCount:D.current,items:n,environment:i,itemToString:c},p));var te=M3({menuElement:T.current,highlightedIndex:_,isOpen:g,itemRefs:k,scrollIntoView:r,getItemNodeFromIndex:Q});g_({isInitialMount:P.current,props:t,state:p}),M.useEffect(function(){var ge=Xo(t,"isOpen");ge&&x.current&&x.current.focus()},[]),M.useEffect(function(){P.current||(D.current=n.length)});var q=R3(g,[x,T,b],i,function(){m({type:Ff,selectItem:!1})}),G=v_();M.useEffect(function(){return P.current=!1,function(){P.current=!0}},[]),M.useEffect(function(){g||(k.current={})},[g]),M.useEffect(function(){var ge;!g||!(i!=null&&i.document)||!(x!=null&&(ge=x.current)!=null&&ge.focus)||i.document.activeElement!==x.current&&x.current.focus()},[g,i]);var j=M.useMemo(function(){return{ArrowDown:function(ie){ie.preventDefault(),m({type:cm,altKey:ie.altKey})},ArrowUp:function(ie){ie.preventDefault(),m({type:fm,altKey:ie.altKey})},Home:function(ie){F.current.state.isOpen&&(ie.preventDefault(),m({type:hm}))},End:function(ie){F.current.state.isOpen&&(ie.preventDefault(),m({type:pm}))},Escape:function(ie){var xe=F.current.state;(xe.isOpen||xe.inputValue||xe.selectedItem||xe.highlightedIndex>-1)&&(ie.preventDefault(),m({type:dm}))},Enter:function(ie){var xe=F.current.state;!xe.isOpen||ie.which===229||(ie.preventDefault(),m({type:gm}))},PageUp:function(ie){F.current.state.isOpen&&(ie.preventDefault(),m({type:vm}))},PageDown:function(ie){F.current.state.isOpen&&(ie.preventDefault(),m({type:mm}))}}},[m,F]),Y=M.useCallback(function(ge){return ve({id:R.labelId,htmlFor:R.inputId},ge)},[R]),se=M.useCallback(function(ge,ie){var xe,Ee=ge===void 0?{}:ge,St=Ee.onMouseLeave,Lt=Ee.refKey,Ft=Lt===void 0?"ref":Lt,Wt=Ee.ref,pn=Qa(Ee,U3),Ct=ie===void 0?{}:ie;return Ct.suppressRefError,ve((xe={},xe[Ft]=Go(Wt,function(on){T.current=on}),xe.id=R.menuId,xe.role="listbox",xe["aria-labelledby"]=pn&&pn["aria-label"]?void 0:""+R.labelId,xe.onMouseLeave=zn(St,function(){m({type:b_})}),xe),pn)},[m,G,R]),fe=M.useCallback(function(ge){var ie,xe,Ee=ge===void 0?{}:ge,St=Ee.item,Lt=Ee.index,Ft=Ee.refKey,Wt=Ft===void 0?"ref":Ft,pn=Ee.ref,Ct=Ee.onMouseMove,on=Ee.onMouseDown,fi=Ee.onClick;Ee.onPress;var Ht=Ee.disabled,sa=Qa(Ee,j3);Ht!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var Un=F.current,rr=Un.props,Bt=Un.state,Sn=h_(St,Lt,rr.items,"Pass either item or index to getItemProps!"),jr=Sn[0],jn=Sn[1],vn=rr.isItemDisabled(jr,jn),W="onClick",ee=fi,ue=function(){jn!==Bt.highlightedIndex&&(te.current=!1,m({type:__,index:jn,disabled:vn}))},Ae=function(){m({type:xm,index:jn})},Wn=function(di){return di.preventDefault()};return ve((ie={},ie[Wt]=Go(pn,function(Hn){Hn&&(k.current[R.getItemId(jn)]=Hn)}),ie["aria-disabled"]=vn,ie["aria-selected"]=""+(jn===Bt.highlightedIndex),ie.id=R.getItemId(jn),ie.role="option",ie),!vn&&(xe={},xe[W]=zn(ee,Ae),xe),{onMouseMove:zn(Ct,ue),onMouseDown:zn(on,Wn)},sa)},[m,F,te,R]),_e=M.useCallback(function(ge){var ie,xe=ge===void 0?{}:ge,Ee=xe.onClick;xe.onPress;var St=xe.refKey,Lt=St===void 0?"ref":St,Ft=xe.ref,Wt=Qa(xe,W3),pn=F.current.state,Ct=function(){m({type:k_})};return ve((ie={},ie[Lt]=Go(Ft,function(on){b.current=on}),ie["aria-controls"]=R.menuId,ie["aria-expanded"]=pn.isOpen,ie.id=R.toggleButtonId,ie.tabIndex=-1,ie),!Wt.disabled&&ve({},{onClick:zn(Ee,Ct)}),Wt)},[m,F,R]),Pe=M.useCallback(function(ge,ie){var xe,Ee=ge===void 0?{}:ge,St=Ee.onKeyDown,Lt=Ee.onChange,Ft=Ee.onInput,Wt=Ee.onBlur;Ee.onChangeText;var pn=Ee.onClick,Ct=Ee.refKey,on=Ct===void 0?"ref":Ct,fi=Ee.ref,Ht=Qa(Ee,H3),sa=ie===void 0?{}:ie;sa.suppressRefError;var Un=F.current.state,rr=function(ue){var Ae=sm(ue);Ae&&j[Ae]&&j[Ae](ue)},Bt=function(ue){m({type:ym,inputValue:ue.target.value})},Sn=function(ue){if(i!=null&&i.document&&Un.isOpen&&!q.current.isMouseDown){var Ae=ue.relatedTarget===null&&i.document.activeElement!==i.document.body;m({type:Ff,selectItem:!Ae})}},jr=function(){m({type:wm})},jn="onChange",vn={};if(!Ht.disabled){var W;vn=(W={},W[jn]=zn(Lt,Ft,Bt),W.onKeyDown=zn(St,rr),W.onBlur=zn(Wt,Sn),W.onClick=zn(pn,jr),W)}return ve((xe={},xe[on]=Go(fi,function(ee){x.current=ee}),xe["aria-activedescendant"]=Un.isOpen&&Un.highlightedIndex>-1?R.getItemId(Un.highlightedIndex):"",xe["aria-autocomplete"]="list",xe["aria-controls"]=R.menuId,xe["aria-expanded"]=Un.isOpen,xe["aria-labelledby"]=Ht&&Ht["aria-label"]?void 0:R.labelId,xe.autoComplete="off",xe.id=R.inputId,xe.role="combobox",xe.value=Un.inputValue,xe),vn,Ht)},[G,F,R,j,m,q,i]),V=M.useCallback(function(){m({type:S_})},[m]),re=M.useCallback(function(){m({type:E_})},[m]),de=M.useCallback(function(){m({type:C_})},[m]),we=M.useCallback(function(ge){m({type:I_,highlightedIndex:ge})},[m]),ze=M.useCallback(function(ge){m({type:bm,selectedItem:ge})},[m]),Ke=M.useCallback(function(ge){m({type:O_,inputValue:ge})},[m]),Be=M.useCallback(function(){m({type:T_})},[m]);return{getItemProps:fe,getLabelProps:Y,getMenuProps:se,getInputProps:Pe,getToggleButtonProps:_e,toggleMenu:V,openMenu:de,closeMenu:re,setHighlightedIndex:we,setInputValue:Ke,selectItem:ze,reset:Be,highlightedIndex:_,isOpen:g,selectedItem:C,inputValue:E}}var A_={activeIndex:-1,selectedItems:[]};function R_(e,t){return Xo(e,t,A_)}function M_(e,t){return Cr(e,t,A_)}function B3(e){var t=R_(e,"activeIndex"),n=R_(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function N_(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function V3(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}ve({},w_,{selectedItems:H.array,initialSelectedItems:H.array,defaultSelectedItems:H.array,getA11yRemovalMessage:H.func,activeIndex:H.number,initialActiveIndex:H.number,defaultActiveIndex:H.number,onActiveIndexChange:H.func,onSelectedItemsChange:H.func,keyNavigationNext:H.string,keyNavigationPrevious:H.string});var Q3={itemToString:Uu.itemToString,stateReducer:Uu.stateReducer,environment:Uu.environment,getA11yRemovalMessage:V3,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},K3=om,km=0,Sm=1,Cm=2,Em=3,Im=4,Om=5,Tm=6,Pm=7,Am=8,Rm=9,Mm=10,Nm=11,Dm=12,Y3=Object.freeze({__proto__:null,SelectedItemClick:km,SelectedItemKeyDownDelete:Sm,SelectedItemKeyDownBackspace:Cm,SelectedItemKeyDownNavigationNext:Em,SelectedItemKeyDownNavigationPrevious:Im,DropdownKeyDownNavigationPrevious:Om,DropdownKeyDownBackspace:Tm,DropdownClick:Pm,FunctionAddSelectedItem:Am,FunctionRemoveSelectedItem:Rm,FunctionSetSelectedItems:Mm,FunctionSetActiveIndex:Nm,FunctionReset:Dm});function q3(e,t){var n=t.type,r=t.index,i=t.props,o=t.selectedItem,u=e.activeIndex,c=e.selectedItems,f;switch(n){case km:f={activeIndex:r};break;case Im:f={activeIndex:u-1<0?0:u-1};break;case Em:f={activeIndex:u+1>=c.length?-1:u+1};break;case Cm:case Sm:{if(u<0)break;var d=u;c.length===1?d=-1:u===c.length-1&&(d=c.length-2),f=ve({selectedItems:[].concat(c.slice(0,u),c.slice(u+1))},{activeIndex:d});break}case Om:f={activeIndex:c.length-1};break;case Tm:f={selectedItems:c.slice(0,c.length-1)};break;case Am:f={selectedItems:[].concat(c,[o])};break;case Pm:f={activeIndex:-1};break;case Rm:{var p=u,m=c.indexOf(o);if(m<0)break;c.length===1?p=-1:m===c.length-1&&(p=c.length-2),f={selectedItems:[].concat(c.slice(0,m),c.slice(m+1)),activeIndex:p};break}case Mm:{var g=t.selectedItems;f={selectedItems:g};break}case Nm:{var _=t.activeIndex;f={activeIndex:_};break}case Dm:f={activeIndex:M_(i,"activeIndex"),selectedItems:M_(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ve({},e,f)}var Z3=["refKey","ref","onClick","onKeyDown","selectedItem","index"],G3=["refKey","ref","onKeyDown","onClick","preventKeyAction"];Lm.stateChangeTypes=Y3;function Lm(e){e===void 0&&(e={}),K3();var t=ve({},Q3,e),n=t.getA11yRemovalMessage,r=t.itemToString,i=t.environment,o=t.keyNavigationNext,u=t.keyNavigationPrevious,c=P3(q3,B3(t),t),f=c[0],d=c[1],p=f.activeIndex,m=f.selectedItems,g=M.useRef(!0),_=M.useRef(null),C=M.useRef(m),E=M.useRef();E.current=[];var T=lm({state:f,props:t});M.useEffect(function(){if(!(g.current||!(i!=null&&i.document))){if(m.length<C.current.length){var G=C.current.find(function(j){return m.indexOf(j)<0});f_(n({itemToString:r,resultCount:m.length,removedSelectedItem:G,activeIndex:p,activeSelectedItem:m[p]}),i.document)}C.current=m}},[m.length]),M.useEffect(function(){g.current||(p===-1&&_.current?_.current.focus():E.current[p]&&E.current[p].focus())},[p]),g_({isInitialMount:g.current,props:t,state:f});var k=v_();M.useEffect(function(){return g.current=!1,function(){g.current=!0}},[]);var x=M.useMemo(function(){var G;return G={},G[u]=function(){d({type:Im})},G[o]=function(){d({type:Em})},G.Delete=function(){d({type:Sm})},G.Backspace=function(){d({type:Cm})},G},[d,o,u]),b=M.useMemo(function(){var G;return G={},G[u]=function(j){N_(j)&&d({type:Om})},G.Backspace=function(Y){N_(Y)&&d({type:Tm})},G},[d,u]),P=M.useCallback(function(G){var j,Y=G===void 0?{}:G,se=Y.refKey,fe=se===void 0?"ref":se,_e=Y.ref,Pe=Y.onClick,V=Y.onKeyDown,re=Y.selectedItem,de=Y.index,we=Qa(Y,Z3),ze=T.current.state,Ke=h_(re,de,ze.selectedItems,"Pass either item or index to getSelectedItemProps!"),Be=Ke[1],ge=Be>-1&&Be===ze.activeIndex,ie=function(){d({type:km,index:Be})},xe=function(St){var Lt=sm(St);Lt&&x[Lt]&&x[Lt](St)};return ve((j={},j[fe]=Go(_e,function(Ee){Ee&&E.current.push(Ee)}),j.tabIndex=ge?0:-1,j.onClick=zn(Pe,ie),j.onKeyDown=zn(V,xe),j),we)},[d,T,x]),R=M.useCallback(function(G,j){var Y,se=G===void 0?{}:G,fe=se.refKey,_e=fe===void 0?"ref":fe,Pe=se.ref,V=se.onKeyDown,re=se.onClick,de=se.preventKeyAction,we=de===void 0?!1:de,ze=Qa(se,G3),Ke=j===void 0?{}:j;Ke.suppressRefError;var Be=function(xe){var Ee=sm(xe);Ee&&b[Ee]&&b[Ee](xe)},ge=function(){d({type:Pm})};return ve((Y={},Y[_e]=Go(Pe,function(ie){ie&&(_.current=ie)}),Y),!we&&{onKeyDown:zn(V,Be),onClick:zn(re,ge)},ze)},[d,b,k]),D=M.useCallback(function(G){d({type:Am,selectedItem:G})},[d]),F=M.useCallback(function(G){d({type:Rm,selectedItem:G})},[d]),Q=M.useCallback(function(G){d({type:Mm,selectedItems:G})},[d]),te=M.useCallback(function(G){d({type:Nm,activeIndex:G})},[d]),q=M.useCallback(function(){d({type:Dm})},[d]);return{getSelectedItemProps:P,getDropdownProps:R,addSelectedItem:D,removeSelectedItem:F,setSelectedItems:Q,setActiveIndex:te,reset:q,selectedItems:m,activeIndex:p}}function D_({items:e,selectedItems:t,onInputChange:n,onSelectedItemsChange:r,placeholder:i,icon:o,disabled:u,shadowRoot:c}){const[f,d]=M.useState(""),[p,m]=M.useState(!1),g=M.useRef(null),_=M.useMemo(()=>{let j=0;const Y=6;return e.reduce((se,fe)=>fe.type==="airport"&&fe.iata_code.toLowerCase()===f.toLowerCase()?[X(N({},fe),{sectionIndex:-1}),...se,...fe.sectionIndex>-1?[fe]:[]]:[...se,fe],[]).filter(se=>(se.type==="airport"&&(j+=1),se.type==="place"?j<Y:j<=Y))},[e]);function C(j){if(j.type==="airport"){const Y=j;return(t==null?void 0:t.length)>1?Y.iata_code:Y.country_code==="US"?`${Y.city} (${Y.iata_code})`:`${Y.city}, ${Y.country_code} (${Y.iata_code})`}else if(j.type==="place")return`${j.formatted_address}`}M.useEffect(()=>{u&&d("")},[u]);const{getSelectedItemProps:E,getDropdownProps:T,removeSelectedItem:k,addSelectedItem:x}=Lm({selectedItems:t,onStateChange({selectedItems:j,type:Y}){switch(Y){case Lm.stateChangeTypes.FunctionRemoveSelectedItem:r(j);break}}}),b=typeof Proxy=="function"&&!Object.isSealed(new Proxy({},{}));function P(j){const Y=j.ownerDocument,se={document:Y,addEventListener:Y.addEventListener.bind(j),removeEventListener:Y.removeEventListener.bind(j)};return b?new Proxy(j,{get:(fe,_e)=>se[_e]}):Object.create(j,Object.keys(se).reduce((fe,_e)=>(fe[_e]={get:()=>se[_e]},fe),{}))}const{isOpen:R,getMenuProps:D,getInputProps:F,highlightedIndex:Q,getItemProps:te,selectedItem:q}=ci({environment:c?P(c):void 0,items:_,itemToString(j){return(j==null?void 0:j.type)==="airport"?C(j):j==null?void 0:j.name},defaultHighlightedIndex:0,selectedItem:null,inputValue:f,stateReducer(j,Y){const{changes:se,type:fe}=Y;switch(fe){case ci.stateChangeTypes.InputKeyDownEnter:case ci.stateChangeTypes.ItemClick:return se;default:return se}},onStateChange({inputValue:j,type:Y,selectedItem:se}){switch(Y){case ci.stateChangeTypes.InputBlur:case ci.stateChangeTypes.InputKeyDownEnter:se&&(r([se]),d(""),n(""));break;case ci.stateChangeTypes.ItemClick:se&&(r([se]),d(""));break;case ci.stateChangeTypes.InputChange:d(j),n(j);break}switch(Y){case ci.stateChangeTypes.InputBlur:m(!1);break}}}),G=u||t.length>0;return Ve("div",{className:"a1-w-full a1-h-full a1-relative a1-z-10",children:[Ve("div",{className:Yi({"a1-bg-white a1-rounded-lg a1-gap-2 a1-items-center a1-py-2 a1-px-3 a1-h-full a1-w-full a1-overflow-hidden":!0,"a1-grid":!0,"a1-grid-cols-[24px_1fr]":t.length===0,"a1-grid-cols-[24px_auto_1fr]":t.length===1,"a1-grid-cols-[24px_auto_auto_1fr]":t.length===2,"a1-grid-cols-[24px_auto_auto_auto_1fr]":t.length===3,"a1-ring-2 a1-ring-primary":p,"a1-ring-2 a1-ring-gray-200":!p}),children:[o,t.map((j,Y)=>Ve("span",X(N({className:Yi({"a1-bg-gray-200 a1-rounded a1-px-1 focus:a1-bg-gray-400 a1-whitespace-nowrap a1-text-ellipsis a1-shrink-0":!0,"a1-text-xs":t.length>0,"a1-flex a1-items-center":!0})},E({selectedItem:j,index:Y})),{children:[J("span",{className:"a1-overflow-hidden a1-grow",children:C(j)}),!j.disabled&&J("span",{className:"a1-pl-1 a1-cursor-pointer",onClick:se=>{se.stopPropagation(),k(j)},children:"✕"})]}),Y)),J("input",X(N({className:"a1-outline-none disabled:a1-bg-transparent a1-text-base",placeholder:(p||t.length===0)&&!G?i:""},F(T({preventKeyAction:R}))),{onFocus:j=>m(!0),disabled:G}))]}),J("div",{className:"a1-absolute a1-w-inherit a1-bg-white a1-mt-2 a1-rounded-lg a1-overflow-hidden a1-shadow-md a1-p-0 a1-z-10",children:J("ul",X(N({ref:g,className:Yi({"a1-overflow-y-auto":!0,"a1-overflow-x-hidden":!0})},D()),{children:R&&(_==null?void 0:_.map((j,Y)=>{if(j.type==="airport"){const se=j,fe=se.distance||0*.621371;return Ve("li",X(N({className:Yi({"hover:a1-bg-blue-100":!0,"a1-font-bold":q===j,"a1-shadow-sm a1-py-2 a1-pl-3 a1-pr-2 a1-cursor-pointer":!0,"a1-pl-5 a1-border-l-4 a1-border-gray-500":j.sectionIndex>-1,"a1-grid a1-grid-cols-[26px_1fr_40px] a1-gap-2 a1-justify-start a1-items-center":!0})},te({item:j,index:Y})),{children:[J(oa,{className:"a1-w-6 a1-h-6 -a1-rotate-45",icon:w4}),Ve("div",{className:"a1-flex a1-flex-col a1-grow a1-gap-1 a1-overflow-hidden",children:[Ve("div",{className:"a1-gap-2 a1-flex a1-items-end",children:[J("span",{className:"a1-font-medium a1-text-base a1-whitespace-nowrap a1-overflow-hidden a1-text-ellipsis a1-shrink",children:se.name}),J("span",{className:"a1-text-sm a1-uppercase a1-shrink-0 a1-text-gray-500",children:se.iata_code})]}),Ve("span",{className:"a1-text-sm a1-text-gray-500",children:[se.city,", ",se.country_code,j.sectionIndex>-1&&Ve(LS,{children:[" • ",fe.toFixed(fe<1?1:0),"mi"]})]})]}),J("div",{className:"a1-flex a1-justify-end a1-pl-4",children:J("input",{type:"checkbox",checked:!!t.find(_e=>_e.key===j.key)})})]}),j.key)}if((j==null?void 0:j.type)==="place"){const se=j,fe=te({item:j,index:Y});return Ve("li",X(N({className:Yi({"hover:a1-bg-blue-100":!0,"a1-font-bold":q===j,"a1-shadow-sm a1-py-2 a1-pl-3 a1-pr-2 a1-cursor-pointer":!0,"a1-grid a1-grid-cols-[26px_1fr_40px] a1-gap-2 a1-justify-start a1-items-center":!0})},fe),{children:[J(oa,{className:"a1-w-6 a1-h-6",icon:y4}),Ve("div",{className:"a1-flex a1-flex-col a1-grow a1-gap-1 a1-overflow-hidden",children:[J("div",{className:"a1-gap-2 a1-flex a1-items-end",children:J("span",{className:"a1-font-medium a1-text-base a1-whitespace-nowrap a1-overflow-hidden a1-text-ellipsis a1-shrink",children:se.name})}),J("span",{className:"a1-text-sm a1-shrink-0 a1-text-gray-500",children:se.formatted_address})]}),J("div",{className:"a1-flex a1-justify-end a1-pl-4",children:J("input",{type:"checkbox",checked:!!t.find(_e=>_e.key===j.key)})})]}),j.key)}return null}))}))})]})}function L_(){return J("div",{"aria-label":"Loading...",role:"status",children:Ve("svg",{className:"a1-h-6 a1-w-6 a1-animate-spin",viewBox:"3 3 18 18",children:[J("path",{className:"a1-fill-indigo-200",d:"M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z"}),J("path",{className:"a1-fill-indigo-800",d:"M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z"})]})})}const F_={apiDomain:H.string.isRequired,locationId:H.string,origin:H.string,destination:H.string,destinations:H.string,primaryColor:H.string,secondaryColor:H.string,airlines:H.string,providers:H.string,workerUrl:H.string,theme:H.string,shadowRoot:H.any},X3=new Ax,Wu={XP:{code:"XP",name:"Avelo",website:"https://www.aveloair.com/"},B6:{code:"B6",name:"JetBlue",website:"https://www.jetblue.com/"},WS:{code:"WS",name:"WestJet",website:"https://www.westjet.com/en-us"}};function $_(e){let t="";for(let n=0;n<e.length;++n){const r=e[n];r.type==="place"&&(t+=r.nearbyAirports[0].iata_code+",nearby"),r.type==="airport"&&(t+=r.iata_code),n<e.length-1&&e.length>1&&(t+=",")}return t}function z_({apiDomain:e,origin:t,destination:n,airlines:r,providers:i,destinations:o,primaryColor:u,secondaryColor:c,locationId:f,experimentId:d,clickId:p,departureDateLabel:m="Departure Date",returnDateLabel:g="Return Date",workerUrl:_="https://worker.flymyairport.com",theme:C="light",channel:E}){const[T,k]=M.useState({origins:[],destinations:[],startDate:null,endDate:null}),x=M.useMemo(()=>$_(T.origins),[T.origins]),b=M.useMemo(()=>$_(T.destinations),[T.destinations]),[P,R]=M.useState(!1);if(M.useEffect(()=>{R(!!window.location.search.includes("unsupportedAirlines"))},[]),!Xx.safeParse(f).success)throw new Error("Unable to parse location id");if(d&&d!=="0"&&d!=="1")throw new Error("experimentId must be 0 or 1");if(p&&!/^[a-zA-Z0-9_]{1,50}$/.test(p))throw new Error("clickId must be 1-50 characters and can only use letters, numbers and _");t=t==null?void 0:t.toLocaleUpperCase(),n=n==null?void 0:n.toLocaleUpperCase();const D=r==null?void 0:r.split(",").map(W=>W.toLocaleUpperCase().trim()).filter(W=>W!==""),F=i==null?void 0:i.split(",").map(W=>W.toLocaleUpperCase().trim()).filter(W=>W!==""),Q=o==null?void 0:o.split(",").map(W=>W.toLocaleUpperCase().trim()).filter(W=>W!==""),[te,q]=M.useState(!1),[G,j]=M.useState(!!t),[Y,se]=M.useState(!!n),[fe,_e]=M.useState(null),[Pe,V]=M.useState(null),{data:re,status:de,setQuery:we}=n_({key:"origin-suggest",apiDomain:e}),ze=M.useMemo(()=>Zi.uniqBy(re==null?void 0:re.filter(W=>{var ee;return(ee=W.nearbyAirports)==null?void 0:ee.length}).map(W=>{const ee=W.types.includes("airport");return[X(N({},W),{sectionIndex:0,type:ee?"airport-place":"place",key:W.formatted_address}),...W.nearbyAirports.map((ue,Ae)=>X(N({},ue),{sectionIndex:ee?-1:Ae,type:"airport",key:`${ue.iata_code}`}))]}).flat(),W=>W.key).filter((W,ee,ue)=>{if(W.type==="place"){const Ae=ue.at(ee+1);if(Ae){if(Ae.type!=="airport")return!1}else return!1}return!0}),[re]),{data:Ke,status:Be,setQuery:ge}=n_({key:"destination-suggest",apiDomain:e}),ie=M.useMemo(()=>Zi.uniqBy(Ke==null?void 0:Ke.filter(W=>{var ee;return(ee=W.nearbyAirports)==null?void 0:ee.length}).map(W=>{const ee=W.types.includes("airport");return[X(N({},W),{sectionIndex:0,type:ee?"airport-place":"place",key:W.formatted_address}),...W.nearbyAirports.map((ue,Ae)=>X(N({},ue),{sectionIndex:ee?-1:Ae,type:"airport",key:`${ue.iata_code}`}))]}).flat(),W=>W.key).filter((W,ee,ue)=>{if(W.type==="place"){const Ae=ue.at(ee+1);if(Ae){if(Ae.type!=="airport")return!1}else return!1}return!0}),[Ke]),[xe,Ee]=M.useState(null),[St,Lt]=M.useState(null),[Ft,Wt]=M.useState(!1);M.useEffect(()=>{console.log("airport results changed",{originAirports:re,destinationAirports:Ke})},[re,Ke]),M.useEffect(()=>{Ee(fe?gI([fe,new Date]):null)},[fe]),M.useEffect(()=>{if(Lt(T.startDate?Ra(T.startDate,1):null),T.startDate){const W=Vi(T.startDate,"yyyy-MM-dd"),ee=pn[W];fi(ue=>(ue[W]=ee,ue))}},[T.startDate]);const{priceCalendar:pn,setPriceCalendar:Ct}=zx({key:"price-calendar-depart",apiDomain:e,destination:b,origin:x,startDate:xe,endDate:Pe,enabled:Ft,transformData(W){return W?Zi.transform(W,(ee,ue,Ae)=>{ee[Ae]=X(N({},ue),{transformedPrice:ue.price!==void 0&&ue.price>0?ue.price+10:ue.price})}):{}}}),{priceCalendar:on,setPriceCalendar:fi}=zx({key:"price-calendar-return",apiDomain:e,destination:x,origin:b,startDate:St,endDate:Pe,enabled:Ft,transformData(W){return W?Zi.transform(W,(ee,ue,Ae)=>{ee[Ae]=X(N({},ue),{transformedPrice:ue.price!==void 0&&ue.price>0?ue.price+10:ue.price})}):{}}}),Ht=()=>{const{origins:W,destinations:ee,startDate:ue,endDate:Ae}=T;W!=null&&W.length&&(ee!=null&&ee.length)&&ue&&Ae?q(!0):q(!1)};M.useEffect(()=>{t&&nm(e,t,["airport"]).then(W=>{const ee=W==null?void 0:W.map(ue=>ue.nearbyAirports).flat().find(ue=>ue.iata_code.toLowerCase()===(t==null?void 0:t.toLowerCase()));ee&&k(ue=>X(N({},ue),{origins:[X(N({},ee),{type:"airport",key:ee.iata_code,sectionIndex:-1,disabled:!0})]}))}),n&&nm(e,n,["airport"]).then(W=>{const ee=W==null?void 0:W.map(ue=>ue.nearbyAirports).flat().find(ue=>ue.iata_code.toLowerCase()===(n==null?void 0:n.toLowerCase()));ee&&k(ue=>X(N({},ue),{destinations:[X(N({},ee),{type:"airport",key:ee.iata_code,sectionIndex:-1,disabled:!0})]}))}),j(!!t),se(!!n)},[t,n]),M.useEffect(()=>{Ct({}),fi({})},[T.origins,T.destinations]),M.useEffect(()=>{Ht()},[T.origins,T.destinations,T.startDate,T.endDate]);const sa=(W,ee)=>{var ue;T.startDate!==W&&fi({}),k(X(N({},T),{startDate:W,endDate:ee})),(ue=window==null?void 0:window.dataLayer)==null||ue.push({event:"fma.flightSearch.dateRangeChange","fma.flightSearch.dateRange":{startDate:W==null?void 0:W.toISOString(),endDate:ee==null?void 0:ee.toISOString()}})},Un=(W,ee)=>{_e(W),V(ee)};M.useEffect(()=>{Wt(!!window.location.search.includes("priceCalendar"))},[]),Q!=null&&Q.length&&(Ke!=null&&Ke.length)&&Ke.map(W=>X(N({},W),{nearbyAirports:W.nearbyAirports.filter(ee=>Q==null?void 0:Q.find(ue=>ue===ee.iata_code))}));const rr=()=>{const{origins:W,destinations:ee}=T;j(Y),se(G),k(X(N({},T),{origins:ee,destinations:W}))},Bt=W=>{var Hf;W.preventDefault();const ee=new FormData(W.currentTarget),ue=Object.fromEntries(ee.entries()),Ae=x,Wn=b,Hn=T.startDate,di=T.endDate;if(!Ae||!Wn||!Hn||!di)throw new Error("All fields must be filled out");let Jo=Hn.toISOString().split("T")[0],es=di.toISOString().split("T")[0],ir={},Wr={};if(ue["flexible-dates"]){const Cn="-flexible-3days";Jo+=Cn,es+=Cn}const Hu=ue.cabin||"economy",Fm=ue.pax||"1adult";let zf="";if(n){const Cn=T.destinations[0];if(Cn.type==="airport"){const Bu=c5(Cn.iata_code);T.destinations.length===1&&Bu&&(zf=",nearby")}}let $m=`/fma/${t||Ae}/${Ae}-${Wn}${zf}/${Jo}/${es}/${Hu}/${Fm}/`;ir=X(N({},ir),{enc_lid:h4({airport:t||Ae,channel:E||"EMB",action:"SEARCH",userDefinedPage:f||"UNDEF",originIATA:Ae,destinationIATA:Wn}),enc_cid:p||v5()}),d&&(ir=X(N({},ir),{enc_eid:d})),D!=null&&D.length&&(Wr=X(N({},Wr),{airlines:D.join(",")})),F!=null&&F.length&&(Wr=X(N({},Wr),{providers:F.join(",")}));const Uf=_;let jf=Object.entries(Wr).filter(([Cn,qt])=>!!qt&&qt!=="").map(([Cn,qt])=>`${Cn}=${qt}`).join(";");ir=X(N({},ir),{fs:jf});let Ka=Object.entries(ir).filter(([Cn,qt])=>!!qt&&qt!=="").map(([Cn,qt])=>`${Cn}=${qt}`).join("&");Ka&&Ka!==""&&(Ka="?"+Ka);const Wf=`${Uf}${$m}${Ka}`;(Hf=window==null?void 0:window.dataLayer)==null||Hf.push({event:"fma.flightSearch.searchClicked","fma.flightSearch.link":Wf,"fma.flightSearch.query":ir,"fma.flightSearch.filterState":Wr,"fma.flightSearch.formState":{origin:Ae,destination:Wn,startDate:Hn,endDate:di}}),window.open(Wf,"_blank"),P&&(qt=>{qt==null||qt.forEach(Bu=>{const Bf=Wu[Bu];Bf&&window.open(Bf.website,"_blank")})})(F)},Sn={};u&&u!=""&&u!=null&&(Sn["--color-primary"]=u),c&&c!=""&&c!=null&&(Sn["--color-secondary"]=c);const jr=[{display:"Economy",value:"economy"},{display:"Premium Economy",value:"premium"},{display:"Business",value:"business"},{display:"First",value:"first"}],jn=new Array(9).fill(0).map((W,ee)=>{const ue=ee+1,Ae=ue>1;return{value:`${ue}adult${Ae?"s":""}`,display:`${ue} Traveler${Ae?"s":""}`}});let vn=()=>null;return P&&(vn=W=>{const ee=Array.isArray(W)?W.filter(Ae=>Object.keys(Wu).includes(Ae)):typeof W=="string"&&Object.keys(Wu).includes(W)?[W]:[];return ee.length===0?null:Ve("span",{children:["Some airlines choose not to participate in this search tool. Visit"," ",ee.map((Ae,Wn)=>Ve(Ye.Fragment,{children:[J("u",{children:J("a",{href:Wu[Ae].website,target:"_blank",rel:"noopener noreferrer",children:Wu[Ae].name})}),Wn<ee.length-2&&", ",Wn===ee.length-2&&" or "]},Ae))," to search for their destinations."]})}),J(Fx,{client:X3,contextSharing:!0,children:Ve("div",{"data-mode":C,style:Sn,className:"a1-w-full a1-@container a1-relative",children:[Ve("form",{className:"a1-flex a1-flex-col a1-gap-2",onSubmit:Bt,children:[Ve("div",{className:"a1-flex a1-flex-wrap a1-justify-between a1-gap-4 a1-max-w-full a1-w-full",children:[Ve("div",{className:"a1-flex a1-gap-4",children:[J("select",{name:"pax",className:"a1-text-black dark:a1-text-white a1-text-base a1-bg-transparent a1-grow-0",children:jn.map((W,ee)=>J("option",{className:"dark:a1-bg-black dark:a1-text-white a1-text-base",value:W.value,selected:ee===0,children:W.display},`${W.value}-${ee}`))}),J("select",{name:"cabin",className:"a1-text-black dark:a1-text-white a1-text-base a1-bg-transparent a1-max-w-[125px] md:a1-max-w-[185px] lg:a1-max-w-[185px]",children:jr.map((W,ee)=>J("option",{className:"dark:a1-bg-black dark:a1-text-white a1-text-base",value:W.value,selected:ee===0,children:W.display},`${W.value}-${ee}`))})]}),Ve("label",{className:"a1-hidden @5xl:a1-block a1-text-black dark:a1-text-white a1-flex a1-items-center a1-text-base",children:[J("input",{type:"checkbox",name:"flexible-dates"})," Show nearby dates for lower fares"]})]}),Ve("div",{className:"a1-flex a1-flex-col a1-gap-6 @5xl:a1-grid @5xl:a1-grid-cols-2",children:[Ve("div",{className:"a1-flex a1-flex-col a1-items-center @xl:a1-grid @xl:a1-grid-cols-[calc(50%-20px)_24px_calc(50%-20px)] a1-w-full a1-gap-2",children:[J("div",{className:"a1-flex a1-items-center a1-w-full",children:J(D_,{icon:de!=="loading"?J(oa,{className:"a1-w-6 a1-h-6",icon:m4}):J(L_,{}),placeholder:"From?",disabled:G,items:ze||[],selectedItems:T.origins,onInputChange:W=>we(W),onSelectedItemsChange:W=>{k(ee=>X(N({},ee),{origins:(W==null?void 0:W.slice(0,1))||[]}))}})}),J("button",{type:"button",className:"a1-w-6 a1-text-gray-500 a1-rotate-90 @2xl:a1-rotate-0",onClick:rr,children:J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,className:"a1-w-6 a1-h-6 a1-stroke-gray-500 dark:a1-stroke-gray-100",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"})})}),J("div",{className:"a1-flex a1-items-center a1-w-full",children:J(D_,{icon:Be!=="loading"?J(oa,{className:"a1-w-6 a1-h-6",icon:g4}):J(L_,{}),placeholder:"To?",disabled:Y,items:ie||[],selectedItems:T.destinations,onInputChange:W=>ge(W),onSelectedItemsChange:W=>{k(ee=>X(N({},ee),{destinations:(W==null?void 0:W.slice(0,1))||[]}))}})})]}),Ve("div",{className:"a1-flex a1-flex-col a1-items-center a1-gap-4 a1-grow @5xl:a1-grid @5xl:a1-grid-cols-[1fr_56px]",children:[J("div",{className:"a1-w-full",children:J(TT,{origin:x,destination:b,startDateLabel:m,endDateLabel:g,onChange:sa,onMonthViewChange:Un,priceCalendar:T.startDate?on:pn})}),Ve("div",{className:"a1-flex a1-flex-col a1-gap-6 a1-items-center a1-justify-center",children:[Ve("label",{className:"a1-text-black a1-text-base dark:a1-text-white a1-flex a1-items-center @5xl:a1-hidden a1-gap-3",children:[J("input",{type:"checkbox",name:"flexible-dates"}),J("span",{children:"Show nearby dates for lower fares"})]}),Ve("button",{disabled:!te,type:"submit",className:"a1-h-[44px] a1-grow-0 a1-rounded-lg a1-flex a1-align-center a1-items-center a1-gap-1 a1-bg-primary a1-text-white a1-px-4 hover:a1-bg-secondary disabled:a1-bg-gray-400",children:[J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"white",className:"a1-w-6 a1-h-6",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})}),J("span",{className:"@5xl:a1-hidden a1-text-base",children:"Search"})]})]})]})]})]}),J("div",{className:"a1-text-white",children:!!P&&vn(F)})]})})}z_.propTypes=F_;const J3=`/*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}flight-search-form{--color-primary:#1d4ed8;--color-secondary:#bfdbfe}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.a1-absolute{position:absolute}.a1-relative{position:relative}.a1-left-1\\/2{left:50%}.a1-left-2{left:.5rem}.a1-right-2{right:.5rem}.a1-top-1\\/2{top:50%}.a1-top-full{top:100%}.a1-z-10{z-index:10}.a1-z-20{z-index:20}.a1-col-span-1{grid-column:span 1/span 1}.a1-mr-2{margin-right:8px}.a1-mt-2{margin-top:8px}.a1-mt-4{margin-top:16px}.a1-block{display:block}.a1-flex{display:flex}.a1-grid{display:grid}.a1-hidden{display:none}.a1-h-10{height:40px}.a1-h-11{height:44px}.a1-h-6{height:24px}.a1-h-8{height:32px}.a1-h-\\[2px\\]{height:2px}.a1-h-\\[44px\\]{height:44px}.a1-h-full{height:100%}.a1-max-h-56{max-height:224px}.a1-max-h-\\[400px\\]{max-height:400px}.a1-max-h-\\[600px\\]{max-height:600px}.a1-w-10{width:40px}.a1-w-11{width:44px}.a1-w-6{width:24px}.a1-w-8{width:32px}.a1-w-\\[250px\\]{width:250px}.a1-w-full{width:100%}.a1-w-max{width:-moz-max-content;width:max-content}.a1-max-w-\\[125px\\]{max-width:125px}.a1-max-w-full{max-width:100%}.a1-shrink{flex-shrink:1}.a1-shrink-0{flex-shrink:0}.a1-flex-grow,.a1-grow{flex-grow:1}.a1-grow-0{flex-grow:0}.a1-grow-\\[4\\]{flex-grow:4}.-a1-translate-x-1\\/2{--tw-translate-x:-50%}.-a1-translate-x-1\\/2,.-a1-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-a1-translate-y-1\\/2{--tw-translate-y:-50%}.a1--translate-x-1\\/2{--tw-translate-x:-50%}.a1--translate-x-1\\/2,.a1-translate-y-\\[10px\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.a1-translate-y-\\[10px\\]{--tw-translate-y:10px}.-a1-rotate-45{--tw-rotate:-45deg}.-a1-rotate-45,.a1-rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.a1-rotate-180{--tw-rotate:180deg}.a1-rotate-90{--tw-rotate:90deg}.a1-rotate-90,.a1-scale-100{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.a1-scale-100{--tw-scale-x:1;--tw-scale-y:1}.a1-scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.a1-scale-95,.a1-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes a1-spin{to{transform:rotate(1turn)}}.a1-animate-spin{animation:a1-spin 1s linear infinite}.a1-cursor-not-allowed{cursor:not-allowed}.a1-cursor-pointer{cursor:pointer}.a1-appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.a1-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.a1-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.a1-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.a1-grid-cols-\\[24px_1fr\\]{grid-template-columns:24px 1fr}.a1-grid-cols-\\[24px_auto_1fr\\]{grid-template-columns:24px auto 1fr}.a1-grid-cols-\\[24px_auto_auto_1fr\\]{grid-template-columns:24px auto auto 1fr}.a1-grid-cols-\\[24px_auto_auto_auto_1fr\\]{grid-template-columns:24px auto auto auto 1fr}.a1-grid-cols-\\[26px_1fr_40px\\]{grid-template-columns:26px 1fr 40px}.a1-grid-rows-6{grid-template-rows:repeat(6,minmax(0,1fr))}.a1-flex-row{flex-direction:row}.a1-flex-col{flex-direction:column}.a1-flex-wrap{flex-wrap:wrap}.a1-items-end{align-items:flex-end}.a1-items-center{align-items:center}.a1-justify-start{justify-content:flex-start}.a1-justify-end{justify-content:flex-end}.a1-justify-center{justify-content:center}.a1-justify-between{justify-content:space-between}.a1-gap-1{gap:4px}.a1-gap-2{gap:8px}.a1-gap-3{gap:12px}.a1-gap-4{gap:16px}.a1-gap-6{gap:24px}.a1-overflow-hidden{overflow:hidden}.a1-overflow-y-auto{overflow-y:auto}.a1-overflow-x-hidden{overflow-x:hidden}.a1-truncate{overflow:hidden;white-space:nowrap}.a1-text-ellipsis,.a1-truncate{text-overflow:ellipsis}.a1-whitespace-nowrap{white-space:nowrap}.a1-rounded{border-radius:.25rem}.a1-rounded-full{border-radius:9999px}.a1-rounded-lg{border-radius:8px}.a1-rounded-none{border-radius:0}.a1-border{border-width:1px}.a1-border-2{border-width:2px}.a1-border-b{border-bottom-width:1px}.a1-border-l-0{border-left-width:0}.a1-border-l-4{border-left-width:4px}.a1-border-r-0{border-right-width:0}.a1-border-none{border-style:none}.a1-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.a1-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.a1-border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.a1-border-primary{border-color:var(--color-primary)}.a1-bg-\\[\\#D2490E\\]{--tw-bg-opacity:1;background-color:rgb(210 73 14/var(--tw-bg-opacity))}.a1-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.a1-bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.a1-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.a1-bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.a1-bg-primary{background-color:var(--color-primary)}.a1-bg-stone-200{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity))}.a1-bg-transparent{background-color:transparent}.a1-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.a1-fill-\\[\\#D2490E\\]{fill:#d2490e}.a1-fill-indigo-200{fill:#c7d2fe}.a1-fill-indigo-800{fill:#3730a3}.a1-stroke-black{stroke:#000}.a1-stroke-gray-500{stroke:#6b7280}.a1-p-0{padding:0}.a1-px-1{padding-left:4px;padding-right:4px}.a1-px-2{padding-left:8px;padding-right:8px}.a1-px-3{padding-left:12px;padding-right:12px}.a1-px-4{padding-left:16px;padding-right:16px}.a1-py-0{padding-bottom:0;padding-top:0}.a1-py-0\\.5{padding-bottom:2px;padding-top:2px}.a1-py-1{padding-bottom:4px;padding-top:4px}.a1-py-2{padding-bottom:8px;padding-top:8px}.a1-pb-\\[10px\\]{padding-bottom:10px}.a1-pl-1{padding-left:4px}.a1-pl-3{padding-left:12px}.a1-pl-4{padding-left:16px}.a1-pl-5{padding-left:20px}.a1-pr-2{padding-right:8px}.a1-text-left{text-align:left}.a1-text-center{text-align:center}.a1-text-\\[11px\\]{font-size:11px}.a1-text-base{font-size:16px}.a1-text-sm{font-size:14px}.a1-text-xs{font-size:12px}.a1-font-bold{font-weight:700}.a1-font-medium{font-weight:500}.a1-font-semibold{font-weight:600}.a1-uppercase{text-transform:uppercase}.a1-capitalize{text-transform:capitalize}.a1-leading-\\[12px\\]{line-height:12px}.a1-leading-\\[16px\\]{line-height:16px}.a1-tracking-wide{letter-spacing:.025em}.a1-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.a1-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.a1-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.a1-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.a1-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.a1-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.a1-opacity-0{opacity:0}.a1-opacity-100{opacity:1}.a1-opacity-50{opacity:.5}.a1-opacity-60{opacity:.6}.a1-opacity-70{opacity:.7}.a1-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.a1-shadow-lg,.a1-shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.a1-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.a1-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.a1-outline-none{outline:2px solid transparent;outline-offset:2px}.a1-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.a1-ring-gray-200{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity))}.a1-ring-primary{--tw-ring-color:var(--color-primary)}.a1-blur-\\[3px\\]{--tw-blur:blur(3px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.a1-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.a1-duration-100{transition-duration:.1s}.a1-duration-75{transition-duration:75ms}.a1-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.a1-\\@container{container-type:inline-size}.before\\:a1-absolute:before{content:var(--tw-content);position:absolute}.before\\:a1-bottom-0:before{bottom:0;content:var(--tw-content)}.before\\:a1-left-0:before{content:var(--tw-content);left:0}.before\\:a1-left-1\\/2:before{content:var(--tw-content);left:50%}.before\\:a1-right-0:before{content:var(--tw-content);right:0}.before\\:a1-right-1\\/2:before{content:var(--tw-content);right:50%}.before\\:a1-top-0:before{content:var(--tw-content);top:0}.before\\:a1-bg-gray-200:before{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity));content:var(--tw-content)}.after\\:a1-absolute:after{content:var(--tw-content);position:absolute}.after\\:a1-bottom-0:after{bottom:0;content:var(--tw-content)}.after\\:a1-left-0:after{content:var(--tw-content);left:0}.after\\:a1-right-0:after{content:var(--tw-content);right:0}.after\\:a1-top-0:after{content:var(--tw-content);top:0}.after\\:a1-rounded-full:after{border-radius:9999px;content:var(--tw-content)}.after\\:a1-bg-gray-600:after{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity));content:var(--tw-content)}.hover\\:a1-bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.hover\\:a1-bg-secondary:hover{background-color:var(--color-secondary)}.hover\\:before\\:a1-ring-primary:hover:before{--tw-ring-color:var(--color-primary);content:var(--tw-content)}.hover\\:after\\:a1-absolute:hover:after{content:var(--tw-content);position:absolute}.hover\\:after\\:a1-left-0:hover:after{content:var(--tw-content);left:0}.hover\\:after\\:a1-right-0:hover:after{content:var(--tw-content);right:0}.hover\\:after\\:a1-z-10:hover:after{content:var(--tw-content);z-index:10}.hover\\:after\\:a1-h-full:hover:after{content:var(--tw-content);height:100%}.hover\\:after\\:a1-w-full:hover:after{content:var(--tw-content);width:100%}.hover\\:after\\:a1-rounded-full:hover:after{border-radius:9999px;content:var(--tw-content)}.hover\\:after\\:a1-ring-2:hover:after{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);content:var(--tw-content)}.focus\\:a1-border-primary:focus{border-color:var(--color-primary)}.focus\\:a1-bg-gray-400:focus{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.focus\\:a1-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\\:a1-bg-gray-400:disabled{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.disabled\\:a1-bg-transparent:disabled{background-color:transparent}.disabled\\:a1-bg-white:disabled{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}@container (min-width: 576px){.\\@xl\\:a1-grid{display:grid}.\\@xl\\:a1-grid-cols-\\[calc\\(50\\%-20px\\)_24px_calc\\(50\\%-20px\\)\\]{grid-template-columns:calc(50% - 20px) 24px calc(50% - 20px)}}@container (min-width: 672px){.\\@2xl\\:a1-bottom-2{bottom:.5rem}.\\@2xl\\:a1-left-1\\/2{left:50%}.\\@2xl\\:a1-top-2{top:.5rem}.\\@2xl\\:a1-hidden{display:none}.\\@2xl\\:a1-h-\\[initial\\]{height:auto}.\\@2xl\\:a1-w-\\[2px\\]{width:2px}.\\@2xl\\:a1-rotate-0{--tw-rotate:0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\@2xl\\:a1-flex-row{flex-direction:row}.\\@2xl\\:a1-items-center{align-items:center}}@container (min-width: 1024px){.\\@5xl\\:a1-block{display:block}.\\@5xl\\:a1-grid{display:grid}.\\@5xl\\:a1-hidden{display:none}.\\@5xl\\:a1-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.\\@5xl\\:a1-grid-cols-\\[1fr_56px\\]{grid-template-columns:1fr 56px}}:is([data-mode=dark] .dark\\:a1-bg-black){--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}:is([data-mode=dark] .dark\\:a1-bg-white){--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}:is([data-mode=dark] .dark\\:a1-stroke-gray-100){stroke:#f3f4f6}:is([data-mode=dark] .dark\\:a1-text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is([data-mode=dark] .dark\\:a1-opacity-60){opacity:.6}@media (min-width:768px){.md\\:a1-max-w-\\[185px\\]{max-width:185px}}@media (min-width:1024px){.lg\\:a1-block{display:block}.lg\\:a1-hidden{display:none}.lg\\:a1-max-w-\\[185px\\]{max-width:185px}.lg\\:a1-max-w-\\[none\\]{max-width:none}.lg\\:a1-rotate-0{--tw-rotate:0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:a1-flex-row{flex-direction:row}.lg\\:a1-text-left{text-align:left}}
|
|
845
845
|
`,eA=new Ax;function $f(e){return Ve(Fx,{client:eA,contextSharing:!0,children:[J("style",{children:J3}),J(z_,N({},e))]})}$f.propTypes=F_;class U_ extends HTMLElement{connectedCallback(){this.style.position="relative",this.style.zIndex="10";const t=document.createElement("span"),n=this.attachShadow({mode:"closed"});n.appendChild(t);const r=Object.keys($f.propTypes).reduce((o,u)=>{const c=this.getAttribute(u.toLocaleLowerCase());return c!=null&&(o[u]=c),o},{});Ud.createRoot(t).render(J($f,N({apiDomain:"https://flymyairport.vercel.app",shadowRoot:n},r)))}}return customElements.define("flight-search-form",U_),ht.FlightSearchForm=U_,ht.default=$f,Object.defineProperties(ht,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),ht}({});
|