vendor: 6,226 bytes, lines 1-9
1var G2=e=>{throw TypeError(e)};var Oy=(e,t,n)=>t.has(e)||G2("Cannot "+n);var J=(e,t,n)=>(Oy(e,t,"read from private field"),n?n.call(e):t.get(e)),tt=(e,t,n)=>t.has(e)?G2("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Le=(e,t,n,s)=>(Oy(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),jt=(e,t,n)=>(Oy(e,t,"access private method"),n);var fg=(e,t,n,s)=>({set _(i){Le(e,t,i,n)},get _(){return J(e,t,s)}});function BI(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(s,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function Ll(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dy={exports:{}},cf={},Iy={exports:{}},kt={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Y2;function zI(){if(Y2)return kt;Y2=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.iterator;function v(O){return O===null||typeof O!="object"?null:(O=x&&O[x]||O["@@iterator"],typeof O=="function"?O:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,S={};function j(O,U,ie){this.props=O,this.context=U,this.refs=S,this.updater=ie||_}j.prototype.isReactComponent={},j.prototype.setState=function(O,U){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,U,"setState")},j.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function P(){}P.prototype=j.prototype;function E(O,U,ie){this.props=O,this.context=U,this.refs=S,this.updater=ie||_}var R=E.prototype=new P;R.constructor=E,N(R,j.prototype),R.isPureReactComponent=!0;var A=Array.isArray,B=Object.prototype.hasOwnProperty,I={current:null},z={key:!0,ref:!0,__self:!0,__source:!0};function V(O,U,ie){var le,fe={},me=null,oe=null;if(U!=null)for(le in U.ref!==void 0&&(oe=U.ref),U.key!==void 0&&(me=""+U.key),U)B.call(U,le)&&!z.hasOwnProperty(le)&&(fe[le]=U[le]);var Q=arguments.length-2;if(Q===1)fe.children=ie;else if(1<Q){for(var Ne=Array(Q),Ce=0;Ce<Q;Ce++)Ne[Ce]=arguments[Ce+2];fe.children=Ne}if(O&&O.defaultProps)for(le in Q=O.defaultProps,Q)fe[le]===void 0&&(fe[le]=Q[le]);return{$$typeof:e,type:O,key:me,ref:oe,props:fe,_owner:I.current}}function te(O,U){return{$$typeof:e,type:O.type,key:U,ref:O.ref,props:O.props,_owner:O._owner}}function H(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function Y(O){var U={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(ie){return U[ie]})}var ce=/\/+/g;function K(O,U){return typeof O=="object"&&O!==null&&O.key!=null?Y(""+O.key):U.toString(36)}function q(O,U,ie,le,fe){var me=typeof O;(me==="undefined"||me==="boolean")&&(O=null);var oe=!1;if(O===null)oe=!0;else switch(me){case"string":case"number":oe=!0;break;case"object":switch(O.$$typeof){case e:case t:oe=!0}}if(oe)return oe=O,fe=fe(oe),O=le===""?"."+K(oe,0):le,A(fe)?(ie="",O!=null&&(ie=O.replace(ce,"$&/")+"/"),q(fe,U,ie,"",function(Ce){return Ce})):fe!=null&&(H(fe)&&(fe=te(fe,ie+(!fe.key||oe&&oe.key===fe.key?"":(""+fe.key).replace(ce,"$&/")+"/")+O)),U.push(fe)),1;if(oe=0,le=le===""?".":le+":",A(O))for(var Q=0;Q<O.length;Q++){me=O[Q];var Ne=le+K(me,Q);oe+=q(me,U,ie,Ne,fe)}else if(Ne=v(O),typeof Ne=="function")for(O=Ne.call(O),Q=0;!(me=O.next()).done;)me=me.value,Ne=le+K(me,Q++),oe+=q(me,U,ie,Ne,fe);else if(me==="object")throw U=String(O),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return oe}function ge(O,U,ie){if(O==null)return O;var le=[],fe=0;return q(O,le,"","",function(me){return U.call(ie,me,fe++)}),le}function he(O){if(O._status===-1){var U=O._result;U=U(),U.then(function(ie){(O._status===0||O._status===-1)&&(O._status=1,O._result=ie)},function(ie){(O._status===0||O._status===-1)&&(O._status=2,O._result=ie)}),O._status===-1&&(O._status=0,O._result=U)}if(O._status===1)return O._result.default;throw O._result}var be={current:null},W={transition:null},Z={ReactCurrentDispatcher:be,ReactCurrentBatchConfig:W,ReactCurrentOwner:I};function D(){throw Error("act(...) is not supported in production builds of React.")}return kt.Children={map:ge,forEach:function(O,U,ie){ge(O,function(){U.apply(this,arguments)},ie)},count:function(O){var U=0;return ge(O,function(){U++}),U},toArray:function(O){return ge(O,function(U){return U})||[]},only:function(O){if(!H(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},kt.Component=j,kt.Fragment=n,kt.Profiler=i,kt.PureComponent=E,kt.StrictMode=s,kt.Suspense=h,kt.__SECRET_INT
vendor: 5,617 bytes, lines 9-25
9ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,kt.act=D,kt.cloneElement=function(O,U,ie){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var le=N({},O.props),fe=O.key,me=O.ref,oe=O._owner;if(U!=null){if(U.ref!==void 0&&(me=U.ref,oe=I.current),U.key!==void 0&&(fe=""+U.key),O.type&&O.type.defaultProps)var Q=O.type.defaultProps;for(Ne in U)B.call(U,Ne)&&!z.hasOwnProperty(Ne)&&(le[Ne]=U[Ne]===void 0&&Q!==void 0?Q[Ne]:U[Ne])}var Ne=arguments.length-2;if(Ne===1)le.children=ie;else if(1<Ne){Q=Array(Ne);for(var Ce=0;Ce<Ne;Ce++)Q[Ce]=arguments[Ce+2];le.children=Q}return{$$typeof:e,type:O.type,key:fe,ref:me,props:le,_owner:oe}},kt.createContext=function(O){return O={$$typeof:l,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:a,_context:O},O.Consumer=O},kt.createElement=V,kt.createFactory=function(O){var U=V.bind(null,O);return U.type=O,U},kt.createRef=function(){return{current:null}},kt.forwardRef=function(O){return{$$typeof:u,render:O}},kt.isValidElement=H,kt.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:he}},kt.memo=function(O,U){return{$$typeof:m,type:O,compare:U===void 0?null:U}},kt.startTransition=function(O){var U=W.transition;W.transition={};try{O()}finally{W.transition=U}},kt.unstable_act=D,kt.useCallback=function(O,U){return be.current.useCallback(O,U)},kt.useContext=function(O){return be.current.useContext(O)},kt.useDebugValue=function(){},kt.useDeferredValue=function(O){return be.current.useDeferredValue(O)},kt.useEffect=function(O,U){return be.current.useEffect(O,U)},kt.useId=function(){return be.current.useId()},kt.useImperativeHandle=function(O,U,ie){return be.current.useImperativeHandle(O,U,ie)},kt.useInsertionEffect=function(O,U){return be.current.useInsertionEffect(O,U)},kt.useLayoutEffect=function(O,U){return be.current.useLayoutEffect(O,U)},kt.useMemo=function(O,U){return be.current.useMemo(O,U)},kt.useReducer=function(O,U,ie){return be.current.useReducer(O,U,ie)},kt.useRef=function(O){return be.current.useRef(O)},kt.useState=function(O){return be.current.useState(O)},kt.useSyncExternalStore=function(O,U,ie){return be.current.useSyncExternalStore(O,U,ie)},kt.useTransition=function(){return be.current.useTransition()},kt.version="18.3.1",kt}var K2;function km(){return K2||(K2=1,Iy.exports=zI()),Iy.exports}/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var Z2;function $I(){if(Z2)return cf;Z2=1;var e=km(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(u,h,m){var g,x={},v=null,_=null;m!==void 0&&(v=""+m),h.key!==void 0&&(v=""+h.key),h.ref!==void 0&&(_=h.ref);for(g in h)s.call(h,g)&&!a.hasOwnProperty(g)&&(x[g]=h[g]);if(u&&u.defaultProps)for(g in h=u.defaultProps,h)x[g]===void 0&&(x[g]=h[g]);return{$$typeof:t,type:u,key:v,ref:_,props:x,_owner:i.current}}return cf.Fragment=n,cf.jsx=l,cf.jsxs=l,cf}var Q2;function UI(){return Q2||(Q2=1,Dy.exports=$I()),Dy.exports}var r=UI(),w=km();const dt=Ll(w),J0=BI({__proto__:null,default:dt},[w]);var mg={},Ly={exports:{}},cr={},Fy={exports:{}},By={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var X2;function VI(){return X2||(X2=1,(function(e){function t(W,Z){var D=W.length;W.push(Z);e:for(;0<D;){var O=D-1>>>1,U=W[O];if(0<i(U,Z))W[O]=Z,W[D]=U,D=O;else break e}}function n(W){return W.length===0?null:W[0]}function s(W){if(W.length===0)return null;var Z=W[0],D=W.pop();if(D!==Z){W[0]=D;e:for(var O=0,U=W.length,ie=U>>>1;O<ie;){var le=2*(O+1)-1,fe=W[le],me=le+1,oe=W[me];if(0>i(fe,D))me<U&&0>i(oe,fe)?(W[O]=oe,W[me]=D,O=me):(W[O]=fe,W[le]=D,O=le);else if(me<U&&0>i(oe,D))W[O]=oe,W[me]=D,O=me;else break e}}return Z}function i(W,Z){var D=W.sortIndex-Z.sortIndex;return D!==0?D:W.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var h=[],m=[],g=1,x=null,v=3,_=!1,N=!1,S=!1,j=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(W){for(var Z=n(m);Z!==null;){if(Z.callback===null)s(m);else if(Z.startTime<=W)s(m),Z.sortIndex=Z.expirationTime,t(h,Z);else break;Z=n(m)}}function A(W){if(S=!1,R(W),!N)if(n(h)!==null)N=!0,he(B);else{var Z=n(m);Z!==null&&be(A,Z.startTime-W)}}function B(W,Z){N=!1,S&&(S=!1,P(V),V=-1),_=!0;var D=v;try{for(R(Z),x=n(h);x!==null&&(!(x.expirationTime>Z)||W&&!Y());){var O=x.callback;if(typeof O=="function"){x.callback=null,v=x.priorityLevel;var U=O(x.expirationTime<=Z);Z=e.unstable_now(),typeof U=="function"?x.callback=U:x===n(h)&&s(h),R(Z)}else s(h);x=n(h)}if(x!==null)var ie=!0;else{var le=n(m);le!==null&&be(A,le.startTime-Z),ie=!1}return ie}finally{x=null,v=D,_=!1}}var I=!1,z=null,V=-1,te=5,H=-1;function Y(){return!(e.unstable_now()-H<te)}
vendor: 50,901 bytes, lines 25-38
25function ce(){if(z!==null){var W=e.unstable_now();H=W;var Z=!0;try{Z=z(!0,W)}finally{Z?K():(I=!1,z=null)}}else I=!1}var K;if(typeof E=="function")K=function(){E(ce)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,ge=q.port2;q.port1.onmessage=ce,K=function(){ge.postMessage(null)}}else K=function(){j(ce,0)};function he(W){z=W,I||(I=!0,K())}function be(W,Z){V=j(function(){W(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){N||_||(N=!0,he(B))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(h)},e.unstable_next=function(W){switch(v){case 1:case 2:case 3:var Z=3;break;default:Z=v}var D=v;v=Z;try{return W()}finally{v=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,Z){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var D=v;v=W;try{return Z()}finally{v=D}},e.unstable_scheduleCallback=function(W,Z,D){var O=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?O+D:O):D=O,W){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=D+U,W={id:g++,callback:Z,priorityLevel:W,startTime:D,expirationTime:U,sortIndex:-1},D>O?(W.sortIndex=D,t(m,W),n(h)===null&&W===n(m)&&(S?(P(V),V=-1):S=!0,be(A,D-O))):(W.sortIndex=U,t(h,W),N||_||(N=!0,he(B))),W},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(W){var Z=v;return function(){var D=v;v=Z;try{return W.apply(this,arguments)}finally{v=D}}}})(By)),By}var J2;function WI(){return J2||(J2=1,Fy.exports=VI()),Fy.exports}/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var eS;function HI(){if(eS)return cr;eS=1;var e=km(),t=WI();function n(o){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+o,p=1;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p]);return"Minified React error #"+o+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,i={};function a(o,d){l(o,d),l(o+"Capture",d)}function l(o,d){for(i[o]=d,o=0;o<d.length;o++)s.add(d[o])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},x={};function v(o){return h.call(x,o)?!0:h.call(g,o)?!1:m.test(o)?x[o]=!0:(g[o]=!0,!1)}function _(o,d,p,b){if(p!==null&&p.type===0)return!1;switch(typeof d){case"function":case"symbol":return!0;case"boolean":return b?!1:p!==null?!p.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function N(o,d,p,b){if(d===null||typeof d>"u"||_(o,d,p,b))return!0;if(b)return!1;if(p!==null)switch(p.type){case 3:return!d;case 4:return d===!1;case 5:return isNaN(d);case 6:return isNaN(d)||1>d}return!1}function S(o,d,p,b,C,T,F){this.acceptsBooleans=d===2||d===3||d===4,this.attributeName=b,this.attributeNamespace=C,this.mustUseProperty=p,this.propertyName=o,this.type=d,this.sanitizeURL=T,this.removeEmptyString=F}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){j[o]=new S(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var d=o[0];j[d]=new S(d,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){j[o]=new S(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){j[o]=new S(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){j[o]=new S(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){j[o]=new S(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){j[o]=new S(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){j[o]=new S(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){j[o]=new S(o,5,!1,o.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function E(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var d=o.replace(P,E);j[d]=new S(d,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var d=o.replace(P,E);j[d]=new S(d,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var d=o.replace(P,E);j[d]=new S(d,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){j[o]=new S(o,1,!1,o.toLowerCase(),null,!1,!1)}),j.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){j[o]=new S(o,1,!1,o.toLowerCase(),null,!0,!0)});function R(o,d,p,b){var C=j.hasOwnProperty(d)?j[d]:null;(C!==null?C.type!==0:b||!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(N(d,p,C,b)&&(p=null),b||C===null?v(d)&&(p===null?o.removeAttribute(d):o.setAttribute(d,""+p)):C.mustUseProperty?o[C.propertyName]=p===null?C.type===3?!1:"":p:(d=C.attributeName,b=C.attributeNamespace,p===null?o.removeAttribute(d):(C=C.type,p=C===3||C===4&&p===!0?"":""+p,b?o.setAttributeNS(b,d,p):o.setAttribute(d,p))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),I=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),Y=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),ge=Symbol.for("react.memo"),he=Symbol.for("react.lazy"),be=Symbol.for("react.offscreen"),W=Symbol.iterator;function Z(o){return o===null||typeof o!="object"?null:(o=W&&o[W]||o["@@iterator"],typeof o=="function"?o:null)}var D=Object.assign,O;function U(o){if(O===void 0)try{throw Error()}catch(p){var d=p.stack.trim().match(/\n( *(at )?)/);O=d&&d[1]||""}return` 34`+O+o}var ie=!1;function le(o,d){if(!o||ie)return"";ie=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(d)if(d=function(){throw Error()},Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(ve){var b=ve}Reflect.construct(o,[],d)}else{try{d.call()}catch(ve){b=ve}o.call(d.prototype)}else{try{throw Error()}catch(ve){b=ve}o()}}catch(ve){if(ve&&b&&typeof ve.stack=="string"){for(var C=ve.stack.split(` 35`),T=b.stack.split(` 36`),F=C.length-1,G=T.length-1;1<=F&&0<=G&&C[F]!==T[G];)G--;for(;1<=F&&0<=G;F--,G--)if(C[F]!==T[G]){if(F!==1||G!==1)do if(F--,G--,0>G||C[F]!==T[G]){var ee=` 37`+C[F].replace(" at new "," at ");return o.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",o.displayName)),ee}while(1<=F&&0<=G);break}}}finally{ie=!1,Error.prepareStackTrace=p}return(o=o?o.displayName||o.name:"")?U(o):""}function fe(o){switch(o.tag){case 5:return U(o.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return o=le(o.type,!1),o;case 11:return o=le(o.type.render,!1),o;case 1:return o=le(o.type,!0),o;default:return""}}function me(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case z:return"Fragment";case I:return"Portal";case te:return"Profiler";case V:return"StrictMode";case K:return"Suspense";case q:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case Y:return(o.displayName||"Context")+".Consumer";case H:return(o._context.displayName||"Context")+".Provider";case ce:var d=o.render;return o=o.displayName,o||(o=d.displayName||d.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case ge:return d=o.displayName||null,d!==null?d:me(o.type)||"Memo";case he:d=o._payload,o=o._init;try{return me(o(d))}catch{}}return null}function oe(o){var d=o.type;switch(o.tag){case 24:return"Cache";case 9:return(d.displayName||"Context")+".Consumer";case 10:return(d._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=d.render,o=o.displayName||o.name||"",d.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(d);case 8:return d===V?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d}return null}function Q(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Ne(o){var d=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function Ce(o){var d=Ne(o)?"checked":"value",p=Object.getOwnPropertyDescriptor(o.constructor.prototype,d),b=""+o[d];if(!o.hasOwnProperty(d)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var C=p.get,T=p.set;return Object.defineProperty(o,d,{configurable:!0,get:function(){return C.call(this)},set:function(F){b=""+F,T.call(this,F)}}),Object.defineProperty(o,d,{enumerable:p.enumerable}),{getValue:function(){return b},setValue:function(F){b=""+F},stopTracking:function(){o._valueTracker=null,delete o[d]}}}}function De(o){o._valueTracker||(o._valueTracker=Ce(o))}function Te(o){if(!o)return!1;var d=o._valueTracker;if(!d)return!0;var p=d.getValue(),b="";return o&&(b=Ne(o)?o.checked?"true":"false":o.value),o=b,o!==p?(d.setValue(o),!0):!1}function We(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function $e(o,d){var p=d.checked;return D({},d,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:p??o._wrapperState.initialChecked})}function Et(o,d){var p=d.defaultValue==null?"":d.defaultValue,b=d.checked!=null?d.checked:d.defaultChecked;p=Q(d.value!=null?d.value:p),o._wrapperState={initialChecked:b,initialValue:p,controlled:d.type==="checkbox"||d.type==="radio"?d.checked!=null:d.value!=null}}function Xt(o,d){d=d.checked,d!=null&&R(o,"checked",d,!1)}function Zt(o,d){Xt(o,d);var p=Q(d.value),b=d.type;if(p!=null)b==="number"?(p===0&&o.value===""||o.value!=p)&&(o.value=""+p):o.value!==""+p&&(o.value=""+p);else if(b==="submit"||b==="reset"){o.removeAttribute("value");return}d.hasOwnProperty("value")?In(o,d.type,p):d.hasOwnProperty("defaultValue")&&In(o,d.type,Q(d.defaultValue)),d.checked==null&&d.defaultChecked!=null&&(o.defaultChecked=!!d.defaultChecked)}function Pn(o,d,p){if(d.hasOwnProperty("value")||d.hasOwnProperty("defaultValue")){var b=d.type;if(!(b!=="submit"&&b!=="reset"||d.value!==void 0&&d.value!==null))return;d=""+o._wrapperState.initialValue,p||d===o.value||(o.value=d),o.defaultValue=d}p=o.name,p!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,p!==""&&(o.name=p)}function In(o,d,p){(d!=="number"||We(o.ownerDocument)!==o)&&(p==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+p&&(o.defaultValue=""+p))}var pn=Array.isArray;function Tn(o,d,p,b){if(o=o.options,d){d={};for(var C=0;C<p.length;C++)d["$"+p[C]]=!0;for(p=0;p<o.length;p++)C=d.hasOwnProperty("$"+o[p].value),o[p].selected!==C&&(o[p].selected=C),C&&b&&(o[p].defaultSelected=!0)}else{for(p=""+Q(p),d=null,C=0;C<o.length;C++){if(o[C].value===p){o[C].selected=!0,b&&(o[C].defaultSelected=!0);return}d!==null||o[C].disabled||(d=o[C])}d!==null&&(d.selected=!0)}}function ms(o,d){if(d.dangerouslySetInnerHTML!=null)throw Error(n(91));return D({},d,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function ae(o,d){var p=d.value;if(p==null){if(p=d.children,d=d.defaultValue,p!=null){if(d!=null)throw Error(n(92));if(pn(p)){if(1<p.length)throw Error(n(93));p=p[0]}d=p}d==null&&(d=""),p=d}o._wrapperState={initialValue:Q(p)}}function Se(o,d){var p=Q(d.value),b=Q(d.defaultValue);p!=null&&(p=""+p,p!==o.value&&(o.value=p),d.defaultValue==null&&o.defaultValue!==p&&(o.defaultValue=p)),b!=null&&(o.defaultValue=""+b)}function Ve(o){var d=o.textContent;d===o._wrapperState.initialValue&&d!==""&&d!==null&&(o.value=d)}function Nt(o){switch(o){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function gn(o,d){return o==null||o==="http://www.w3.org/1999/xhtml"?Nt(d):o==="http://www.w3.org/2000/svg"&&d==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var Mt,En=(function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(d,p,b,C){MSApp.execUnsafeLocalFunction(function(){return o(d,p,b,C)})}:o})(function(o,d){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=d;else{for(Mt=Mt||document.createElement("div"),Mt.innerHTML="<svg>"+d.valueOf().toString()+"</svg>",d=Mt.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;d.firstChild;)o.appendChild(d.firstChild)}});function Rt(o,d){if(d){var p=o.firstChild;if(p&&p===o.lastChild&&p.nodeType===3){p.nodeValue=d;return}}o.textContent=d}var xn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Vn=["Webkit","ms","Moz","O"];Object.keys(xn).forEach(function(o){Vn.forEach(function(d){d=d+o.charAt(0).toUpperCase()+o.substring(1),xn[d]=xn[o]})});function Ir(o,d,p){return d==null||typeof d=="boolean"||d===""?"":p||typeof d!="number"||d===0||xn.hasOwnProperty(o)&&xn[o]?(""+d).trim():d+"px"}function mi(o,d){o=o.style;for(var p in d)if(d.hasOwnProperty(p)){var b=p.indexOf("--")===0,C=Ir(p,d[p],b);p==="float"&&(p="cssFloat"),b?o.setProperty(p,C):o[p]=C}}var Ma=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function we(o,d){if(d){if(Ma[o]&&(d.children!=null||d.dangerouslySetInnerHTML!=null))throw Error(n(137,o));if(d.dangerouslySetInnerHTML!=null){if(d.children!=null)throw Error(n(60));if(typeof d.dangerouslySetInnerHTML!="object"||!("__html"in d.dangerouslySetInnerHTML))throw Error(n(61))}if(d.style!=null&&typeof d.style!="object")throw Error(n(62))}}function st(o,d){if(o.indexOf("-")===-1)return typeof d.is=="string";switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Wt=null;function ss(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Je=null,Wn=null,cn=null;function ps(o){if(o=Wa(o)){if(typeof Je!="function")throw Error(n(280));var d=o.stateNode;d&&(d=Ld(d),Je(o.stateNode,o.type,d))}}function tr(o){Wn?cn?cn.push(o):cn=[o]:Wn=o}function xh(){if(Wn){var o=Wn,d=cn;if(cn=Wn=null,ps(o),d)for(o=0;o<d.length;o++)ps(d[o])}}function ko(o,d){return o(d)}function pi(){}var Bs=!1;function Gi(o,d,p){if(Bs)return o(d,p);Bs=!0;try{return ko(o,d,p)}finally{Bs=!1,(Wn!==null||cn!==null)&&(pi(),xh())}}function Yi(o,d){var p=o.stateNode;if(p===null)return null;var b=Ld(p);if(b===null)return null;p=b[d];e:switch(d){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(b=!b.disabled)||(o=o.type,b=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!b;break e;default:o=!1}if(o)return null;if(p&&typeof p!="function")throw Error(n(231,d,typeof p));return p}var vh=!1;if(u)try{var Wl={};Object.defineProperty(Wl,"passive",{get:function(){vh=!0}}),window.addEventListener("test",Wl,Wl),window.removeEventListener("test",Wl,Wl)}catch{vh=!1}function uv(o,d,p,b,C,T,F,G,ee){var ve=Array.prototype.slice.call(arguments,3);try{d.apply(p,ve)}catch(Pe){this.onError(Pe)}}var Ns=!1,Ze=null,Hl=!1,hd=null,ep={onError:function(o){Ns=!0,Ze=o}};function tp(o,d,p,b,C,T,F,G,ee){Ns=!1,Ze=null,uv.apply(ep,arguments)}function yh(o,d,p,b,C,T,F,G,ee){if(tp.apply(this,arguments),Ns){if(Ns){var ve=Ze;Ns=!1,Ze=null}else throw Error(n(198));Hl||(Hl=!0,hd=ve)}}function Ki(o){var d=o,p=o;if(o.alternate)for(;d.return;)d=d.return;else{o=d;do d=o,(d.flags&4098)!==0&&(p=d.return),o=d.return;while(o)}return d.tag===3?p:null}function Ra(o){if(o.tag===13){var d=o.memoizedState;if(d===null&&(o=o.alternate,o!==null&&(d=o.memoizedState)),d!==null)return d.dehydrated}return null}function bh(o){if(Ki(o)!==o)throw Error(n(188))}function hv(o){var d=o.alternate;if(!d){if(d=Ki(o),d===null)throw Error(n(188));return d!==o?null:o}for(var p=o,b=d;;){var C=p.return;if(C===null)break;var T=C.alternate;if(T===null){if(b=C.return,b!==null){p=b;continue}break}if(C.child===T.child){for(T=C.child;T;){if(T===p)return bh(C),o;if(T===b)return bh(C),d;T=T.sibling}throw Error(n(188))}if(p.return!==b.return)p=C,b=T;else{for(var F=!1,G=C.child;G;){if(G===p){F=!0,p=C,b=T;break}if(G===b){F=!0,b=C,p=T;break}G=G.sibling}if(!F){for(G=T.child;G;){if(G===p){F=!0,p=T,b=C;break}if(G===b){F=!0,b=T,p=C;break}G=G.sibling}if(!F)throw Error(n(189))}}if(p.alternate!==b)throw Error(n(190))}if(p.tag!==3)throw Error(n(188));return p.stateNode.current===p?o:d}function np(o){return o=hv(o),o!==null?sp(o):null}function sp(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var d=sp(o);if(d!==null)return d;o=o.sibling}return null}var rp=t.unstable_scheduleCallback,wh=t.unstable_cancelCallback,fv=t.unstable_shouldYield,fd=t.unstable_requestPaint,_n=t.unstable_now,mv=t.unstable_getCurrentPriorityLevel,_h=t.unstable_ImmediatePriority,ip=t.unstable_UserBlockingPriority,md=t.unstable_NormalPriority,Nh=t.unstable_LowPriority,Co=t.unstable_IdlePriority,ql=null,xr=null;function Gl(o){if(xr&&typeof xr.onCommitFiberRoot=="function")try{xr.onCommitFiberRoot(ql,o,void 0,(o.current.flags&128)===128)}catch{}}var xt=Math.clz32?Math.clz32:Po,dn=Math.log,pd=Math.LN2;function Po(o){return o>>>=0,o===0?32:31-(dn(o)/pd|0)|0}var gi=64,To=4194304;function ft(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function an(o,d){var p=o.pendingLanes;if(p===0)return 0;var b=0,C=o.suspendedLanes,T=o.pingedLanes,F=p&268435455;if(F!==0){var G=F&~C;G!==0?b=ft(G):(T&=F,T!==0&&(b=ft(T)))}else F=p&~C,F!==0?b=ft(F):T!==0&&(b=ft(T));if(b===0)return 0;if(d!==0&&d!==b&&(d&C)===0&&(C=b&-b,T=d&-d,C>=T||C===16&&(T&4194240)!==0))return d;if((b&4)!==0&&(b|=p&16),d=o.entangledLanes,d!==0)for(o=o.entanglements,d&=b;0<d;)p=31-xt(d),C=1<<p,b|=o[p],d&=~C;return b}function jh(o,d){switch(o){case 1:case 2:case 4:return d+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gd(o,d){for(var p=o.suspendedLanes,b=o.pingedLanes,C=o.expirationTimes,T=o.pendingLanes;0<T;){var F=31-xt(T),G=1<<F,ee=C[F];ee===-1?((G&p)===0||(G&b)!==0)&&(C[F]=jh(G,d)):ee<=d&&(o.expiredLanes|=G),T&=~G}}function js(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function ap(){var o=gi;return gi<<=1,(gi&4194240)===0&&(gi=64),o}function Eo(o){for(var d=[],p=0;31>p;p++)d.push(o);return d}function vr(o,d,p){o.pendingLanes|=d,d!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,d=31-xt(d),o[d]=p}function An(o,d){var p=o.pendingLanes&~d;o.pendingLanes=d,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=d,o.mutableReadLanes&=d,o.entangledLanes&=d,d=o.entanglements;var b=o.eventTimes;for(o=o.expirationTimes;0<p;){var C=31-xt(p),T=1<<C;d[C]=0,b[C]=-1,o[C]=-1,p&=~T}}function xi(o,d){var p=o.entangledLanes|=d;for(o=o.entanglements;p;){var b=31-xt(p),C=1<<b;C&d|o[b]&d&&(o[b]|=d),p&=~C}}var Ot=0;function Ao(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var xd,Oa,vd,yd,Yl,Kl=!1,Mo=[],yr=null,vi=null,Lr=null,Zl=new Map,lt=new Map,Zn=[],Jt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Sh(o,d){switch(o){case"focusin":case"focusout":yr=null;break;case"dragenter":case"dragleave":vi=null;break;case"mouseover":case"mouseout":Lr=null;break;case"pointerover":case"pointerout":Zl.delete(d.pointerId);break;case"gotpointercapture":case"lostpointercapture":lt.delete(d.pointerId)}}function Da(o,d,p,b,C,T){return o===null||o.nativeEvent!==T?(o={blockedOn:d,domEventName:p,eventSystemFlags:b,nativeEvent:T,targetContainers:[C]},d!==null&&(d=Wa(d),d!==null&&Oa(d)),o):(o.eventSystemFlags|=b,d=o.targetContainers,C!==null&&d.indexOf(C)===-1&&d.push(C),o)}function kh(o,d,p,b,C){switch(d){case"focusin":return yr=Da(yr,o,d,p,b,C),!0;case"dragenter":return vi=Da(vi,o,d,p,b,C),!0;case"mouseover":return Lr=Da(Lr,o,d,p,b,C),!0;case"pointerover":var T=C.pointerId;return Zl.set(T,Da(Zl.get(T)||null,o,d,p,b,C)),!0;case"gotpointercapture":return T=C.pointerId,lt.set(T,Da(lt.get(T)||null,o,d,p,b,C)),!0}return!1}function bd(o){var d=Va(o.target);if(d!==null){var p=Ki(d);if(p!==null){if(d=p.tag,d===13){if(d=Ra(p),d!==null){o.blockedOn=d,Yl(o.priority,function(){vd(p)});return}}else if(d===3&&p.stateNode.current.memoizedState.isDehydrated){o.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Fr(o){if(o.blockedOn!==null)return!1;for(var d=o.targetContainers;0<d.length;){var p=Nd(o.domEventName,o.eventSystemFlags,d[0],o.nativeEvent);if(p===null){p=o.nativeEvent;var b=new p.constructor(p.type,p);Wt=b,p.target.dispatchEvent(b),Wt=null}else return d=Wa(p),d!==null&&Oa(d),o.blockedOn=p,!1;d.shift()}return!0}function wd(o,d,p){Fr(o)&&p.delete(d)}function Ql(){Kl=!1,yr!==null&&Fr(yr)&&(yr=null),vi!==null&&Fr(vi)&&(vi=null),Lr!==null&&Fr(Lr)&&(Lr=null),Zl.forEach(wd),lt.forEach(wd)}function Nn(o,d){o.blockedOn===d&&(o.blockedOn=null,Kl||(Kl=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ql)))}function br(o){function d(C){return Nn(C,o)}if(0<Mo.length){Nn(Mo[0],o);for(var p=1;p<Mo.length;p++){var b=Mo[p];b.blockedOn===o&&(b.blockedOn=null)}}for(yr!==null&&Nn(yr,o),vi!==null&&Nn(vi,o),Lr!==null&&Nn(Lr,o),Zl.forEach(d),lt.forEach(d),p=0;p<Zn.length;p++)b=Zn[p],b.blockedOn===o&&(b.blockedOn=null);for(;0<Zn.length&&(p=Zn[0],p.blockedOn===null);)bd(p),p.blockedOn===null&&Zn.shift()}var Ia=A.ReactCurrentBatchConfig,Xl=!0;function pv(o,d,p,b){var C=Ot,T=Ia.transition;Ia.transition=null;try{Ot=1,Jl(o,d,p,b)}finally{Ot=C,Ia.transition=T}}function op(o,d,p,b){var C=Ot,T=Ia.transition;Ia.transition=null;try{Ot=4,Jl(o,d,p,b)}finally{Ot=C,Ia.transition=T}}function Jl(o,d,p,b){if(Xl){var C=Nd(o,d,p,b);if(C===null)c(o,d,b,_d,p),Sh(o,b);else if(kh(C,o,d,p,b))b.stopPropagation();else if(Sh(o,b),d&4&&-1<Jt.indexOf(o)){for(;C!==null;){var T=Wa(C);if(T!==null&&xd(T),T=Nd(o,d,p,b),T===null&&c(o,d,b,_d,p),T===C)break;C=T}C!==null&&b.stopPropagation()}else c(o,d,b,null,p)}}var _d=null;function Nd(o,d,p,b){if(_d=null,o=ss(b),o=Va(o),o!==null)if(d=Ki(o),d===null)o=null;else if(p=d.tag,p===13){if(o=Ra(d),o!==null)return o;o=null}else if(p===3){if(d.stateNode.current.memoizedState.isDehydrated)return d.tag===3?d.stateNode.containerInfo:null;o=null}else d!==o&&(o=null);return _d=o,null}function Tt(o){switch(o){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(mv()){case _h:return 1;case ip:return 4;case md:case Nh:return 16;case Co:return 536870912;default:return 16}default:return 16}}var Zi=null,zs=null,Qi=null;function Ch(){if(Qi)return Qi;var o,d=zs,p=d.length,b,C="value"in Zi?Zi.value:Zi.textContent,T=C.length;for(o=0;o<p&&d[o]===C[o];o++);var F=p-o;for(b=1;b<=F&&d[p-b]===C[T-b];b++);return Qi=C.slice(o,1<b?1-b:void 0)}function jd(o){var d=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&d===13&&(o=13)):o=d,o===10&&(o=13),32<=o||o===13?o:0}function Ro(){return!0}function lp(){return!1}function Ss(o){function d(p,b,C,T,F){this._reactName=p,this._targetInst=C,this.type=b,this.nativeEvent=T,this.target=F,this.currentTarget=null;for(var G in o)o.hasOwnProperty(G)&&(p=o[G],this[G]=p?p(T):T[G]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Ro:lp,this.isPropagationStopped=lp,this}return D(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=Ro)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=Ro)},persist:function(){},isPersistent:Ro}),d}var Oo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ph=Ss(Oo),La=D({},Oo,{view:0,detail:0}),gv=Ss(La),nr,Th,Do,wr=D({},La,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ba,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Do&&(Do&&o.type==="mousemove"?(nr=o.screenX-Do.screenX,Th=o.screenY-Do.screenY):Th=nr=0,Do=o),nr)},movementY:function(o){return"movementY"in o?o.movementY:Th}}),Eh=Ss(wr),cp=D({},wr,{dataTransfer:0}),Ah=Ss(cp),xv=D({},La,{relatedTarget:0}),Sd=Ss(xv),dp=D({},Oo,{animationName:0,elapsedTime:0,pseudoElement:0}),vv=Ss(dp),yv=D({},Oo,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),Mh=Ss(yv),bv=D({},Oo,{data:0}),Rh=Ss(bv),up={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Fa={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wv(o){var d=this.nativeEvent;return d.getModifierState?d.getModifierState(o):(o=Fa[o])?!!d[o]:!1}function Ba(){return wv}var sr=D({},La,{key:function(o){if(o.key){var d=up[o.key]||o.key;if(d!=="Unidentified")return d}return o.type==="keypress"?(o=jd(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?kd[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ba,charCode:function(o){return o.type==="keypress"?jd(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?jd(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),hp=Ss(sr),fp=D({},wr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mp=Ss(fp),Oh=D({},La,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ba}),Dh=Ss(Oh),_v=D({},Oo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Nv=Ss(_v),pp=D({},wr,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),jv=Ss(pp),_r=[9,13,27,32],Xi=u&&"CompositionEvent"in window,ec=null;u&&"documentMode"in document&&(ec=document.documentMode);var yi=u&&"TextEvent"in window&&!ec,gp=u&&(!Xi||ec&&8<ec&&11>=ec),za=" ",xp=!1;function Io(o,d){switch(o){case"keyup":return _r.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ih(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var bi=!1;function Sv(o,d){switch(o){case"compositionend":return Ih(d);case"keypress":return d.which!==32?null:(xp=!0,za);case"textInput":return o=d.data,o===za&&xp?null:o;default:return null}}function Ji(o,d){if(bi)return o==="compositionend"||!Xi&&Io(o,d)?(o=Ch(),Qi=zs=Zi=null,bi=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1<d.char.length)return d.char;if(d.which)return String.fromCharCode(d.which)}return null;case"compositionend":return gp&&d.locale!=="ko"?null:d.data;default:return null}}var Cd={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function vp(o){var d=o&&o.nodeName&&o.nodeName.toLowerCase();return d==="input"?!!Cd[o.type]:d==="textarea"}function Pd(o,d,p,b){tr(b),d=y(d,"onChange"),0<d.length&&(p=new Ph("onChange","change",null,p,b),o.push({event:p,listeners:d}))}var tc=null,$s=null;function kv(o){Hh(o,0)}function wi(o){var d=Ha(o);if(Te(d))return o}function Cv(o,d){if(o==="change")return d}var Br=!1;if(u){var Lo;if(u){var Td="oninput"in document;if(!Td){var Ed=document.createElement("div");Ed.setAttribute("oninput","return;"),Td=typeof Ed.oninput=="function"}Lo=Td}else Lo=!1;Br=Lo&&(!document.documentMode||9<document.documentMode)}function nc(){tc&&(tc.detachEvent("onpropertychange",Ad),$s=tc=null)}function Ad(o){if(o.propertyName==="value"&&wi($s)){var d=[];Pd(d,$s,o,ss(o)),Gi(kv,d)}}function Md(o,d,p){o==="focusin"?(nc(),tc=d,$s=p,tc.attachEvent("onpropertychange",Ad)):o==="focusout"&&nc()}function Fo(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return wi($s)}function Rd(o,d){if(o==="click")return wi(d)}function Lh(o,d){if(o==="input"||o==="change")return wi(d)}function yp(o,d){return o===d&&(o!==0||1/o===1/d)||o!==o&&d!==d}var Nr=typeof Object.is=="function"?Object.is:yp;function ea(o,d){if(Nr(o,d))return!0;if(typeof o!="object"||o===null||typeof d!="object"||d===null)return!1;var p=Object.keys(o),b=Object.keys(d);if(p.length!==b.length)return!1;for(b=0;b<p.length;b++){var C=p[b];if(!h.call(d,C)||!Nr(o[C],d[C]))return!1}return!0}function bp(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Fh(o,d){var p=bp(o);o=0;for(var b;p;){if(p.nodeType===3){if(b=o+p.textContent.length,o<=d&&b>=d)return{node:p,offset:d-o};o=b}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=bp(p)}}function wp(o,d){return o&&d?o===d?!0:o&&o.nodeType===3?!1:d&&d.nodeType===3?wp(o,d.parentNode):"contains"in o?o.contains(d):o.compareDocumentPosition?!!(o.compareDocumentPosition(d)&16):!1:!1}function Bh(){for(var o=window,d=We();d instanceof o.HTMLIFrameElement;){try{var p=typeof d.contentWindow.location.href=="string"}catch{p=!1}if(p)o=d.contentWindow;else break;d=We(o.document)}return d}function zh(o){var d=o&&o.nodeName&&o.nodeName.toLowerCase();return d&&(d==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||d==="textarea"||o.contentEditable==="true")}function zr(o){var d=Bh(),p=o.focusedElem,b=o.selectionRange;if(d!==p&&p&&p.ownerDocument&&wp(p.ownerDocument.documentElement,p)){if(b!==null&&zh(p)){if(d=b.start,o=b.end,o===void 0&&(o=d),"selectionStart"in p)p.selectionStart=d,p.selectionEnd=Math.min(o,p.value.length);else if(o=(d=p.ownerDocument||document)&&d.defaultView||window,o.getSelection){o=o.getSelection();var C=p.textContent.length,T=Math.min(b.start,C);b=b.end===void 0?T:Math.min(b.end,C),!o.extend&&T>b&&(C=b,b=T,T=C),C=Fh(p,T);var F=Fh(p,b);C&&F&&(o.rangeCount!==1||o.anchorNode!==C.node||o.anchorOffset!==C.offset||o.focusNode!==F.node||o.focusOffset!==F.offset)&&(d=d.createRange(),d.setStart(C.node,C.offset),o.removeAllRanges(),T>b?(o.addRange(d),o.extend(F.node,F.offset)):(d.setEnd(F.node,F.offset),o.addRange(d)))}}for(d=[],o=p;o=o.parentNode;)o.nodeType===1&&d.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<d.length;p++)o=d[p],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var Od=u&&"documentMode"in document&&11>=document.documentMode,Bo=null,zo=null,sc=null,Dd=!1;function _p(o,d,p){var b=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Dd||Bo==null||Bo!==We(b)||(b=Bo,"selectionStart"in b&&zh(b)?b={start:b.selectionStart,end:b.selectionEnd}:(b=(b.ownerDocument&&b.ownerDocument.defaultView||window).getSelection(),b={anchorNode:b.anchorNode,anchorOffset:b.anchorOffset,focusNode:b.focusNode,focusOffset:b.focusOffset}),sc&&ea(sc,b)||(sc=b,b=y(zo,"onSelect"),0<b.length&&(d=new Ph("onSelect","select",null,d,p),o.push({event:d,listeners:b}),d.target=Bo)))}function ta(o,d){var p={};return p[o.toLowerCase()]=d.toLowerCase(),p["Webkit"+o]="webkit"+d,p["Moz"+o]="moz"+d,p}var $o={animationend:ta("Animation","AnimationEnd"),animationiteration:ta("Animation","AnimationIteration"),animationstart:ta("Animation","AnimationStart"),transitionend:ta("Transition","TransitionEnd")},na={},$h={};u&&($h=document.createElement("div").style,"AnimationEvent"in window||(delete $o.animationend.animation,delete $o.animationiteration.animation,delete $o.animationstart.animation),"TransitionEvent"in window||delete $o.transitionend.transition);function rc(o){if(na[o])return na[o];if(!$o[o])return o;var d=$o[o],p;for(p in d)if(d.hasOwnProperty(p)&&p in $h)return na[o]=d[p];return o}var Np=rc("animationend"),$r=rc("animationiteration"),Uh=rc("animationstart"),Vh=rc("transitionend"),Uo=new Map,jp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function jr(o,d){Uo.set(o,d),a(d,[o])}for(var $a=0;$a<jp.length;$a++){var Id=jp[$a],Sp=Id.toLowerCase(),Pv=Id[0].toUpperCase()+Id.slice(1);jr(Sp,"on"+Pv)}jr(Np,"onAnimationEnd"),jr($r,"onAnimationIteration"),jr(Uh,"onAnimationStart"),jr("dblclick","onDoubleClick"),jr("focusin","onFocus"),jr("focusout","onBlur"),jr(Vh,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),kp=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vo));function Wh(o,d,p){var b=o.type||"unknown-event";o.currentTarget=p,yh(b,d,void 0,o),o.currentTarget=null}function Hh(o,d){d=(d&4)!==0;for(var p=0;p<o.length;p++){var b=o[p],C=b.event;b=b.listeners;e:{var T=void 0;if(d)for(var F=b.length-1;0<=F;F--){var G=b[F],ee=G.instance,ve=G.currentTarget;if(G=G.listener,ee!==T&&C.isPropagationStopped())break e;Wh(C,G,ve),T=ee}else for(F=0;F<b.length;F++){if(G=b[F],ee=G.instance,ve=G.currentTarget,G=G.listener,ee!==T&&C.isPropagationStopped())break e;Wh(C,G,ve),T=ee}}}if(Hl)throw o=hd,Hl=!1,hd=null,o}function en(o,d){var p=d[Go];p===void 0&&(p=d[Go]=new Set);var b=o+"__bubble";p.has(b)||(Cp(d,o,2,!1),p.add(b))}function qh(o,d,p){var b=0;d&&(b|=4),Cp(p,o,b,d)}var ic="_reactListening"+Math.random().toString(36).slice(2);function Wo(o){if(!o[ic]){o[ic]=!0,s.forEach(function(p){p!=="selectionchange"&&(kp.has(p)||qh(p,!1,o),qh(p,!0,o))});var d=o.nodeType===9?o:o.ownerDocument;d===null||d[ic]||(d[ic]=!0,qh("selectionchange",!1,d))}}function Cp(o,d,p,b){switch(Tt(d)){case 1:var C=pv;break;case 4:C=op;break;default:C=Jl}p=C.bind(null,d,p,o),C=void 0,!vh||d!=="touchstart"&&d!=="touchmove"&&d!=="wheel"||(C=!0),b?C!==void 0?o.addEventListener(d,p,{capture:!0,passive:C}):o.addEventListener(d,p,!0):C!==void 0?o.addEventListener(d,p,{passive:C}):o.addEventListener(d,p,!1)}function c(o,d,p,b,C){var T=b;if((d&1)===0&&(d&2)===0&&b!==null)e:for(;;){if(b===null)return;var F=b.tag;if(F===3||F===4){var G=b.stateNode.containerInfo;if(G===C||G.nodeType===8&&G.parentNode===C)break;if(F===4)for(F=b.return;F!==null;){var ee=F.tag;if((ee===3||ee===4)&&(ee=F.stateNode.containerInfo,ee===C||ee.nodeType===8&&ee.parentNode===C))return;F=F.return}for(;G!==null;){if(F=Va(G),F===null)return;if(ee=F.tag,ee===5||ee===6){b=T=F;continue e}G=G.parentNode}}b=b.return}Gi(function(){var ve=T,Pe=ss(p),Ee=[];e:{var ke=Uo.get(o);if(ke!==void 0){var Be=Ph,He=o;switch(o){case"keypress":if(jd(p)===0)break e;case"keydown":case"keyup":Be=hp;break;case"focusin":He="focus",Be=Sd;break;case"focusout":He="blur",Be=Sd;break;case"beforeblur":case"afterblur":Be=Sd;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Be=Eh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Be=Ah;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Be=Dh;break;case Np:case $r:case Uh:Be=vv;break;case Vh:Be=Nv;break;case"scroll":Be=gv;break;case"wheel":Be=jv;break;case"copy":case"cut":case"paste":Be=Mh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Be=mp}var Ye=(d&4)!==0,Ln=!Ye&&o==="scroll",ue=Ye?ke!==null?ke+"Capture":null:ke;Ye=[];for(var se=ve,pe;se!==null;){pe=se;var Me=pe.stateNode;if(pe.tag===5&&Me!==null&&(pe=Me,ue!==null&&(Me=Yi(se,ue),Me!=null&&Ye.push(f(se,Me,pe)))),Ln)break;se=se.return}0<Ye.length&&(ke=new Be(ke,He,null,p,Pe),Ee.push({event:ke,listeners:Ye}))}}if((d&7)===0){e:{if(ke=o==="mouseover"||o==="pointerover",Be=o==="mouseout"||o==="pointerout",ke&&p!==Wt&&(He=p.relatedTarget||p.fromElement)&&(Va(He)||He[Gt]))break e;if((Be||ke)&&(ke=Pe.window===Pe?Pe:(ke=Pe.ownerDocument)?ke.defaultView||ke.parentWindow:window,Be?(He=p.relatedTarget||p.toElement,Be=ve,He=He?Va(He):null,He!==null&&(Ln=Ki(He),He!==Ln||He.tag!==5&&He.tag!==6)&&(He=null)):(Be=null,He=ve),Be!==He)){if(Ye=Eh,Me="onMouseLeave",ue="onMouseEnter",se="mouse",(o==="pointerout"||o==="pointerover")&&(Ye=mp,Me="onPointerLeave",ue="onPointerEnter",se="pointer"),Ln=Be==null?ke:Ha(Be),pe=He==null?ke:Ha(He),ke=new Ye(Me,se+"leave",Be,p,Pe),ke.target=Ln,ke.relatedTarget=pe,Me=null,Va(Pe)===ve&&(Ye=new Ye(ue,se+"enter",He,p,Pe),Ye.target=pe,Ye.relatedTarget=Ln,Me=Ye),Ln=Me,Be&&He)t:{for(Ye=Be,ue=He,se=0,pe=Ye;pe;pe=k(pe))se++;for(pe=0,Me=ue;Me;Me=k(Me))pe++;for(;0<se-pe;)Ye=k(Ye),se--;for(;0<pe-se;)ue=k(ue),pe--;for(;se--;){if(Ye===ue||ue!==null&&Ye===ue.alternate)break t;Ye=k(Ye),ue=k(ue)}Ye=null}else Ye=null;Be!==null&&M(Ee,ke,Be,Ye,!1),He!==null&&Ln!==null&&M(Ee,Ln,He,Ye,!0)}}e:{if(ke=ve?Ha(ve):window,Be=ke.nodeName&&ke.nodeName.toLowerCase(),Be==="select"||Be==="input"&&ke.type==="file")var Qe=Cv;else if(vp(ke))if(Br)Qe=Lh;else{Qe=Fo;var it=Md}else(Be=ke.nodeName)&&Be.toLowerCase()==="input"&&(ke.type==="checkbox"||ke.type==="radio")&&(Qe=Rd);if(Qe&&(Qe=Qe(o,ve))){Pd(Ee,Qe,p,Pe);break e}it&&it(o,ke,ve),o==="focusout"&&(it=ke._wrapperState)&&it.controlled&&ke.type==="number"&&In(ke,"number",ke.value)}switch(it=ve?Ha(ve):window,o){case"focusin":(vp(it)||it.contentEditable==="true")&&(Bo=it,zo=ve,sc=null);break;case"focusout":sc=zo=Bo=null;break;case"mousedown":Dd=!0;break;case"contextmenu":case"mouseup":case"dragend":Dd=!1,_p(Ee,p,Pe);break;case"selectionchange":if(Od)break;case"keydown":case"keyup":_p(Ee,p,Pe)}var at;if(Xi)e:{switch(o){case"compositionstart":var ut="onCompositionStart";break e;case"compositionend":ut="onCompositionEnd";break e;case"compositionupdate":ut="onCompositionUpdate";break e}ut=void 0}else bi?Io(o,p)&&(ut="onCompositionEnd"):o==="keydown"&&p.keyCode===229&&(ut="onCompositionStart");ut&&(gp&&p.locale!=="ko"&&(bi||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&bi&&(at=Ch()):(Zi=Pe,zs="value"in Zi?Zi.value:Zi.textContent,bi=!0)),it=y(ve,ut),0<it.length&&(ut=new Rh(ut,o,null,p,Pe),Ee.push({event:ut,listeners:it}),at?ut.data=at:(at=Ih(p),at!==null&&(ut.data=at)))),(at=yi?Sv(o,p):Ji(o,p))&&(ve=y(ve,"onBeforeInput"),0<ve.length&&(Pe=new Rh("onBeforeInput","beforeinput",null,p,Pe),Ee.push({event:Pe,listeners:ve}),Pe.data=at))}Hh(Ee,d)})}function f(o,d,p){return{instance:o,listener:d,currentTarget:p}}function y(o,d){for(var p=d+"Capture",b=[];o!==null;){var C=o,T=C.stateNode;C.tag===5&&T!==null&&(C=T,T=Yi(o,p),T!=null&&b.unshift(f(o,T,C)),T=Yi(o,d),T!=null&&b.push(f(o,T,C))),o=o.return}return b}function k(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function M(o,d,p,b,C){for(var T=d._reactName,F=[];p!==null&&p!==b;){var G=p,ee=G.alternate,ve=G.stateNode;if(ee!==null&&ee===b)break;G.tag===5&&ve!==null&&(G=ve,C?(ee=Yi(p,T),ee!=null&&F.unshift(f(p,ee,G))):C||(ee=Yi(p,T),ee!=null&&F.push(f(p,ee,G)))),p=p.return}F.length!==0&&o.push({event:d,listeners:F})}var $=/\r\n?/g,X=/\u0000|\uFFFD/g;function de(o){return(typeof o=="string"?o:""+o).replace($,` 38`).replace(X,"")}function xe(o,d,p){if(d=de(d),de(o)!==d&&p)throw Error(n(425))}function je(){}var Ie=null,rt=null;function yt(o,d){return o==="textarea"||o==="noscript"||typeof d.children=="string"||typeof d.children=="number"||typeof d.dangerouslySetInnerHTML=="object"&&d.dangerouslySetInnerHTML!==null&&d.dangerouslySetInnerHTML.__html!=null}var Qn=typeof setTimeout=="function"?setTimeout:void 0,Hn=typeof clearTimeout=="function"?clearTimeout:void 0,Us=typeof Promise=="function"?Promise:void 0,ks=typeof queueMicrotask=="function"?queueMicrotask:typeof Us<"u"?function(o){return Us.resolve(null).then(o).catch(Ho)}:Qn;function Ho(o){setTimeout(function(){throw o})}function Gh(o,d){var p=d,b=0;do{var C=p.nextSibling;if(o.removeChild(p),C&&C.nodeType===8)if(p=C.data,p==="/$"){if(b===0){o.removeChild(C),br(d);return}b--}else p!=="$"&&p!=="$?"&&p!=="$!"||b++;p=C}while(p);br(d)}function sa(o){for(;o!=null;o=o.nextSibling){var d=o.nodeType;if(d===1||d===3)break;if(d===8){if(d=o.data,d==="$"||d==="$!"||d==="$?")break;if(d==="/$")return null}}return o}function Pp(o){o=o.previousSibling;for(var d=0;o;){if(o.nodeType===8){var p=o.data;if(p==="$"||p==="$!"||p==="$?"){if(d===0)return o;d--}else p==="/$"&&d++}o=o.previousSibling}return null}var Ua=Math.random().toString(36).slice(2),Ur="__reactFiber$"+Ua,qo="__reactProps$"+Ua,Gt="__reactContainer$"+Ua,Go="__reactEvents$"+Ua,Tv="__reactListeners$"+Ua,Ev="__reactHandles$"+Ua;function Va(o){var d=o[Ur];if(d)return d;for(var p=o.parentNode;p;){if(d=p[Gt]||p[Ur]){if(p=d.alternate,d.child!==null||p!==null&&p.child!==null)for(o=Pp(o);o!==null;){if(p=o[Ur])return p;o=Pp(o)}return d}o=p,p=o.parentNode}return null}function Wa(o){return o=o[Ur]||o[Gt],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function Ha(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(n(33))}function Ld(o){return o[qo]||null}var Av=[],Fd=-1;function Yo(o){return{current:o}}function un(o){0>Fd||(o.current=Av[Fd],Av[Fd]=null,Fd--)}function on(o,d){Fd++,Av[Fd]=o.current,o.current=d}var Ko={},Cs=Yo(Ko),rr=Yo(!1),ac=Ko;function Bd(o,d){var p=o.type.contextTypes;if(!p)return Ko;var b=o.stateNode;if(b&&b.__reactInternalMemoizedUnmaskedChildContext===d)return b.__reactInternalMemoizedMaskedChildContext;var C={},T;for(T in p)C[T]=d[T];return b&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=d,o.__reactInternalMemoizedMaskedChildContext=C),C}function ir(o){return o=o.childContextTypes,o!=null}function Tp(){un(rr),un(Cs)}function pj(o,d,p){if(Cs.current!==Ko)throw Error(n(168));on(Cs,d),on(rr,p)}function gj(o,d,p){var b=o.stateNode;if(d=d.childContextTypes,typeof b.getChildContext!="function")return p;b=b.getChildContext();for(var C in b)if(!(C in d))throw Error(n(108,oe(o)||"Unknown",C));return D({},p,b)}function Ep(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Ko,ac=Cs.current,on(Cs,o),on(rr,rr.current),!0}function xj(o,d,p){var b=o.stateNode;if(!b)throw Error(n(169));p?(o=gj(o,d,ac),b.__reactInternalMemoizedMergedChildContext=o,un(rr),un(Cs),on(Cs,o)):un(rr),on(rr,p)}var qa=null,Ap=!1,Mv=!1;function vj(o){qa===null?qa=[o]:qa.push(o)}function rI(o){Ap=!0,vj(o)}function Zo(){if(!Mv&&qa!==null){Mv=!0;var o=0,d=Ot;try{var p=qa;for(Ot=1;o<p.length;o++){var b=p[o];do b=b(!0);while(b!==null)}qa=null,Ap=!1}catch(C){throw qa!==null&&(qa=qa.slice(o+1)),rp(_h,Zo),C}finally{Ot=d,Mv=!1}}return null}var zd=[],$d=0,Mp=null,Rp=0,Vr=[],Wr=0,oc=null,Ga=1,Ya="";function lc(o,d){zd[$d++]=Rp,zd[$d++]=Mp,Mp=o,Rp=d}function yj(o,d,p){Vr[Wr++]=Ga,Vr[Wr++]=Ya,Vr[Wr++]=oc,oc=o;var b=Ga;o=Ya;var C=32-xt(b)-1;b&=~(1<<C),p+=1;var T=32-xt(d)+C;if(30<T){var F=C-C%5;T=(b&(1<<F)-1).toString(32),b>>=F,C-=F,Ga=1<<32-xt(d)+C|p<<C|b,Ya=T+o}else Ga=1<<T|p<<C|b,Ya=o}function Rv(o){o.return!==null&&(lc(o,1),yj(o,1,0))}function Ov(o){for(;o===Mp;)Mp=zd[--$d],zd[$d]=null,Rp=zd[--$d],zd[$d]=null;for(;o===oc;)oc=Vr[--Wr],Vr[Wr]=null,Ya=Vr[--Wr],Vr[Wr]=null,Ga=Vr[--Wr],Vr[Wr]=null}var Sr=null,kr=null,vn=!1,_i=null;function bj(o,d){var p=Yr(5,null,null,0);
vendor: 4,361 bytes, line 38
38p.elementType="DELETED",p.stateNode=d,p.return=o,d=o.deletions,d===null?(o.deletions=[p],o.flags|=16):d.push(p)}function wj(o,d){switch(o.tag){case 5:var p=o.type;return d=d.nodeType!==1||p.toLowerCase()!==d.nodeName.toLowerCase()?null:d,d!==null?(o.stateNode=d,Sr=o,kr=sa(d.firstChild),!0):!1;case 6:return d=o.pendingProps===""||d.nodeType!==3?null:d,d!==null?(o.stateNode=d,Sr=o,kr=null,!0):!1;case 13:return d=d.nodeType!==8?null:d,d!==null?(p=oc!==null?{id:Ga,overflow:Ya}:null,o.memoizedState={dehydrated:d,treeContext:p,retryLane:1073741824},p=Yr(18,null,null,0),p.stateNode=d,p.return=o,o.child=p,Sr=o,kr=null,!0):!1;default:return!1}}function Dv(o){return(o.mode&1)!==0&&(o.flags&128)===0}function Iv(o){if(vn){var d=kr;if(d){var p=d;if(!wj(o,d)){if(Dv(o))throw Error(n(418));d=sa(p.nextSibling);var b=Sr;d&&wj(o,d)?bj(b,p):(o.flags=o.flags&-4097|2,vn=!1,Sr=o)}}else{if(Dv(o))throw Error(n(418));o.flags=o.flags&-4097|2,vn=!1,Sr=o}}}function _j(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;Sr=o}function Op(o){if(o!==Sr)return!1;if(!vn)return _j(o),vn=!0,!1;var d;if((d=o.tag!==3)&&!(d=o.tag!==5)&&(d=o.type,d=d!=="head"&&d!=="body"&&!yt(o.type,o.memoizedProps)),d&&(d=kr)){if(Dv(o))throw Nj(),Error(n(418));for(;d;)bj(o,d),d=sa(d.nextSibling)}if(_j(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(317));e:{for(o=o.nextSibling,d=0;o;){if(o.nodeType===8){var p=o.data;if(p==="/$"){if(d===0){kr=sa(o.nextSibling);break e}d--}else p!=="$"&&p!=="$!"&&p!=="$?"||d++}o=o.nextSibling}kr=null}}else kr=Sr?sa(o.stateNode.nextSibling):null;return!0}function Nj(){for(var o=kr;o;)o=sa(o.nextSibling)}function Ud(){kr=Sr=null,vn=!1}function Lv(o){_i===null?_i=[o]:_i.push(o)}var iI=A.ReactCurrentBatchConfig;function Yh(o,d,p){if(o=p.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(p._owner){if(p=p._owner,p){if(p.tag!==1)throw Error(n(309));var b=p.stateNode}if(!b)throw Error(n(147,o));var C=b,T=""+o;return d!==null&&d.ref!==null&&typeof d.ref=="function"&&d.ref._stringRef===T?d.ref:(d=function(F){var G=C.refs;F===null?delete G[T]:G[T]=F},d._stringRef=T,d)}if(typeof o!="string")throw Error(n(284));if(!p._owner)throw Error(n(290,o))}return o}function Dp(o,d){throw o=Object.prototype.toString.call(d),Error(n(31,o==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":o))}function jj(o){var d=o._init;return d(o._payload)}function Sj(o){function d(ue,se){if(o){var pe=ue.deletions;pe===null?(ue.deletions=[se],ue.flags|=16):pe.push(se)}}function p(ue,se){if(!o)return null;for(;se!==null;)d(ue,se),se=se.sibling;return null}function b(ue,se){for(ue=new Map;se!==null;)se.key!==null?ue.set(se.key,se):ue.set(se.index,se),se=se.sibling;return ue}function C(ue,se){return ue=rl(ue,se),ue.index=0,ue.sibling=null,ue}function T(ue,se,pe){return ue.index=pe,o?(pe=ue.alternate,pe!==null?(pe=pe.index,pe<se?(ue.flags|=2,se):pe):(ue.flags|=2,se)):(ue.flags|=1048576,se)}function F(ue){return o&&ue.alternate===null&&(ue.flags|=2),ue}function G(ue,se,pe,Me){return se===null||se.tag!==6?(se=Py(pe,ue.mode,Me),se.return=ue,se):(se=C(se,pe),se.return=ue,se)}function ee(ue,se,pe,Me){var Qe=pe.type;return Qe===z?Pe(ue,se,pe.props.children,Me,pe.key):se!==null&&(se.elementType===Qe||typeof Qe=="object"&&Qe!==null&&Qe.$$typeof===he&&jj(Qe)===se.type)?(Me=C(se,pe.props),Me.ref=Yh(ue,se,pe),Me.return=ue,Me):(Me=ig(pe.type,pe.key,pe.props,null,ue.mode,Me),Me.ref=Yh(ue,se,pe),Me.return=ue,Me)}function ve(ue,se,pe,Me){return se===null||se.tag!==4||se.stateNode.containerInfo!==pe.containerInfo||se.stateNode.implementation!==pe.implementation?(se=Ty(pe,ue.mode,Me),se.return=ue,se):(se=C(se,pe.children||[]),se.return=ue,se)}function Pe(ue,se,pe,Me,Qe){return se===null||se.tag!==7?(se=gc(pe,ue.mode,Me,Qe),se.return=ue,se):(se=C(se,pe),se.return=ue,se)}function Ee(ue,se,pe){if(typeof se=="string"&&se!==""||typeof se=="number")return se=Py(""+se,ue.mode,pe),se.return=ue,se;if(typeof se=="object"&&se!==null){switch(se.$$typeof){case B:return pe=ig(se.type,se.key,se.props,null,ue.mode,pe),pe.ref=Yh(ue,null,se),pe.return=ue,pe;case I:return se=Ty(se,ue.mode,pe),se.return=ue,se;case he:var Me=se._init;return Ee(ue,Me(se._payload),pe)}if(pn(se)||Z(se))return se=gc(se,ue.mode,pe,null),se.return=ue,se;Dp(ue,se)}return null}function ke(ue,se,pe,Me){var Qe=se!==null?se.key:null;
vendor: 3,690 bytes, line 38
38if(typeof pe=="string"&&pe!==""||typeof pe=="number")return Qe!==null?null:G(ue,se,""+pe,Me);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case B:return pe.key===Qe?ee(ue,se,pe,Me):null;case I:return pe.key===Qe?ve(ue,se,pe,Me):null;case he:return Qe=pe._init,ke(ue,se,Qe(pe._payload),Me)}if(pn(pe)||Z(pe))return Qe!==null?null:Pe(ue,se,pe,Me,null);Dp(ue,pe)}return null}function Be(ue,se,pe,Me,Qe){if(typeof Me=="string"&&Me!==""||typeof Me=="number")return ue=ue.get(pe)||null,G(se,ue,""+Me,Qe);if(typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case B:return ue=ue.get(Me.key===null?pe:Me.key)||null,ee(se,ue,Me,Qe);case I:return ue=ue.get(Me.key===null?pe:Me.key)||null,ve(se,ue,Me,Qe);case he:var it=Me._init;return Be(ue,se,pe,it(Me._payload),Qe)}if(pn(Me)||Z(Me))return ue=ue.get(pe)||null,Pe(se,ue,Me,Qe,null);Dp(se,Me)}return null}function He(ue,se,pe,Me){for(var Qe=null,it=null,at=se,ut=se=0,as=null;at!==null&&ut<pe.length;ut++){at.index>ut?(as=at,at=null):as=at.sibling;var $t=ke(ue,at,pe[ut],Me);if($t===null){at===null&&(at=as);break}o&&at&&$t.alternate===null&&d(ue,at),se=T($t,se,ut),it===null?Qe=$t:it.sibling=$t,it=$t,at=as}if(ut===pe.length)return p(ue,at),vn&&lc(ue,ut),Qe;if(at===null){for(;ut<pe.length;ut++)at=Ee(ue,pe[ut],Me),at!==null&&(se=T(at,se,ut),it===null?Qe=at:it.sibling=at,it=at);return vn&&lc(ue,ut),Qe}for(at=b(ue,at);ut<pe.length;ut++)as=Be(at,ue,ut,pe[ut],Me),as!==null&&(o&&as.alternate!==null&&at.delete(as.key===null?ut:as.key),se=T(as,se,ut),it===null?Qe=as:it.sibling=as,it=as);return o&&at.forEach(function(il){return d(ue,il)}),vn&&lc(ue,ut),Qe}function Ye(ue,se,pe,Me){var Qe=Z(pe);if(typeof Qe!="function")throw Error(n(150));if(pe=Qe.call(pe),pe==null)throw Error(n(151));for(var it=Qe=null,at=se,ut=se=0,as=null,$t=pe.next();at!==null&&!$t.done;ut++,$t=pe.next()){at.index>ut?(as=at,at=null):as=at.sibling;var il=ke(ue,at,$t.value,Me);if(il===null){at===null&&(at=as);break}o&&at&&il.alternate===null&&d(ue,at),se=T(il,se,ut),it===null?Qe=il:it.sibling=il,it=il,at=as}if($t.done)return p(ue,at),vn&&lc(ue,ut),Qe;if(at===null){for(;!$t.done;ut++,$t=pe.next())$t=Ee(ue,$t.value,Me),$t!==null&&(se=T($t,se,ut),it===null?Qe=$t:it.sibling=$t,it=$t);return vn&&lc(ue,ut),Qe}for(at=b(ue,at);!$t.done;ut++,$t=pe.next())$t=Be(at,ue,ut,$t.value,Me),$t!==null&&(o&&$t.alternate!==null&&at.delete($t.key===null?ut:$t.key),se=T($t,se,ut),it===null?Qe=$t:it.sibling=$t,it=$t);return o&&at.forEach(function(FI){return d(ue,FI)}),vn&&lc(ue,ut),Qe}function Ln(ue,se,pe,Me){if(typeof pe=="object"&&pe!==null&&pe.type===z&&pe.key===null&&(pe=pe.props.children),typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case B:e:{for(var Qe=pe.key,it=se;it!==null;){if(it.key===Qe){if(Qe=pe.type,Qe===z){if(it.tag===7){p(ue,it.sibling),se=C(it,pe.props.children),se.return=ue,ue=se;break e}}else if(it.elementType===Qe||typeof Qe=="object"&&Qe!==null&&Qe.$$typeof===he&&jj(Qe)===it.type){p(ue,it.sibling),se=C(it,pe.props),se.ref=Yh(ue,it,pe),se.return=ue,ue=se;break e}p(ue,it);break}else d(ue,it);it=it.sibling}pe.type===z?(se=gc(pe.props.children,ue.mode,Me,pe.key),se.return=ue,ue=se):(Me=ig(pe.type,pe.key,pe.props,null,ue.mode,Me),Me.ref=Yh(ue,se,pe),Me.return=ue,ue=Me)}return F(ue);case I:e:{for(it=pe.key;se!==null;){if(se.key===it)if(se.tag===4&&se.stateNode.containerInfo===pe.containerInfo&&se.stateNode.implementation===pe.implementation){p(ue,se.sibling),se=C(se,pe.children||[]),se.return=ue,ue=se;break e}else{p(ue,se);break}else d(ue,se);se=se.sibling}se=Ty(pe,ue.mode,Me),se.return=ue,ue=se}return F(ue);case he:return it=pe._init,Ln(ue,se,it(pe._payload),Me)}if(pn(pe))return He(ue,se,pe,Me);if(Z(pe))return Ye(ue,se,pe,Me);Dp(ue,pe)}
vendor: 4,328 bytes, line 38
38return typeof pe=="string"&&pe!==""||typeof pe=="number"?(pe=""+pe,se!==null&&se.tag===6?(p(ue,se.sibling),se=C(se,pe),se.return=ue,ue=se):(p(ue,se),se=Py(pe,ue.mode,Me),se.return=ue,ue=se),F(ue)):p(ue,se)}return Ln}var Vd=Sj(!0),kj=Sj(!1),Ip=Yo(null),Lp=null,Wd=null,Fv=null;function Bv(){Fv=Wd=Lp=null}function zv(o){var d=Ip.current;un(Ip),o._currentValue=d}function $v(o,d,p){for(;o!==null;){var b=o.alternate;if((o.childLanes&d)!==d?(o.childLanes|=d,b!==null&&(b.childLanes|=d)):b!==null&&(b.childLanes&d)!==d&&(b.childLanes|=d),o===p)break;o=o.return}}function Hd(o,d){Lp=o,Fv=Wd=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&d)!==0&&(ar=!0),o.firstContext=null)}function Hr(o){var d=o._currentValue;if(Fv!==o)if(o={context:o,memoizedValue:d,next:null},Wd===null){if(Lp===null)throw Error(n(308));Wd=o,Lp.dependencies={lanes:0,firstContext:o}}else Wd=Wd.next=o;return d}var cc=null;function Uv(o){cc===null?cc=[o]:cc.push(o)}function Cj(o,d,p,b){var C=d.interleaved;return C===null?(p.next=p,Uv(d)):(p.next=C.next,C.next=p),d.interleaved=p,Ka(o,b)}function Ka(o,d){o.lanes|=d;var p=o.alternate;for(p!==null&&(p.lanes|=d),p=o,o=o.return;o!==null;)o.childLanes|=d,p=o.alternate,p!==null&&(p.childLanes|=d),p=o,o=o.return;return p.tag===3?p.stateNode:null}var Qo=!1;function Vv(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Pj(o,d){o=o.updateQueue,d.updateQueue===o&&(d.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Za(o,d){return{eventTime:o,lane:d,tag:0,payload:null,callback:null,next:null}}function Xo(o,d,p){var b=o.updateQueue;if(b===null)return null;if(b=b.shared,(Bt&2)!==0){var C=b.pending;return C===null?d.next=d:(d.next=C.next,C.next=d),b.pending=d,Ka(o,p)}return C=b.interleaved,C===null?(d.next=d,Uv(b)):(d.next=C.next,C.next=d),b.interleaved=d,Ka(o,p)}function Fp(o,d,p){if(d=d.updateQueue,d!==null&&(d=d.shared,(p&4194240)!==0)){var b=d.lanes;b&=o.pendingLanes,p|=b,d.lanes=p,xi(o,p)}}function Tj(o,d){var p=o.updateQueue,b=o.alternate;if(b!==null&&(b=b.updateQueue,p===b)){var C=null,T=null;if(p=p.firstBaseUpdate,p!==null){do{var F={eventTime:p.eventTime,lane:p.lane,tag:p.tag,payload:p.payload,callback:p.callback,next:null};T===null?C=T=F:T=T.next=F,p=p.next}while(p!==null);T===null?C=T=d:T=T.next=d}else C=T=d;p={baseState:b.baseState,firstBaseUpdate:C,lastBaseUpdate:T,shared:b.shared,effects:b.effects},o.updateQueue=p;return}o=p.lastBaseUpdate,o===null?p.firstBaseUpdate=d:o.next=d,p.lastBaseUpdate=d}function Bp(o,d,p,b){var C=o.updateQueue;Qo=!1;var T=C.firstBaseUpdate,F=C.lastBaseUpdate,G=C.shared.pending;if(G!==null){C.shared.pending=null;var ee=G,ve=ee.next;ee.next=null,F===null?T=ve:F.next=ve,F=ee;var Pe=o.alternate;Pe!==null&&(Pe=Pe.updateQueue,G=Pe.lastBaseUpdate,G!==F&&(G===null?Pe.firstBaseUpdate=ve:G.next=ve,Pe.lastBaseUpdate=ee))}if(T!==null){var Ee=C.baseState;F=0,Pe=ve=ee=null,G=T;do{var ke=G.lane,Be=G.eventTime;if((b&ke)===ke){Pe!==null&&(Pe=Pe.next={eventTime:Be,lane:0,tag:G.tag,payload:G.payload,callback:G.callback,next:null});e:{var He=o,Ye=G;switch(ke=d,Be=p,Ye.tag){case 1:if(He=Ye.payload,typeof He=="function"){Ee=He.call(Be,Ee,ke);break e}Ee=He;break e;case 3:He.flags=He.flags&-65537|128;case 0:if(He=Ye.payload,ke=typeof He=="function"?He.call(Be,Ee,ke):He,ke==null)break e;Ee=D({},Ee,ke);break e;case 2:Qo=!0}}G.callback!==null&&G.lane!==0&&(o.flags|=64,ke=C.effects,ke===null?C.effects=[G]:ke.push(G))}else Be={eventTime:Be,lane:ke,tag:G.tag,payload:G.payload,callback:G.callback,next:null},Pe===null?(ve=Pe=Be,ee=Ee):Pe=Pe.next=Be,F|=ke;if(G=G.next,G===null){if(G=C.shared.pending,G===null)break;ke=G,G=ke.next,ke.next=null,C.lastBaseUpdate=ke,C.shared.pending=null}}while(!0);if(Pe===null&&(ee=Ee),C.baseState=ee,C.firstBaseUpdate=ve,C.lastBaseUpdate=Pe,d=C.shared.interleaved,d!==null){C=d;do F|=C.lane,C=C.next;while(C!==d)}else T===null&&(C.shared.lanes=0);hc|=F,o.lanes=F,o.memoizedState=Ee}}function Ej(o,d,p){if(o=d.effects,d.effects=null,o!==null)for(d=0;d<o.length;d++){var b=o[d],C=b.callback;if(C!==null){if(b.callback=null,b=p,typeof C!="function")throw Error(n(191,C));C.call(b)}}}var Kh={},ra=Yo(Kh),Zh=Yo(Kh),Qh=Yo(Kh);
vendor: 7,250 bytes, line 38
38function dc(o){if(o===Kh)throw Error(n(174));return o}function Wv(o,d){switch(on(Qh,d),on(Zh,o),on(ra,Kh),o=d.nodeType,o){case 9:case 11:d=(d=d.documentElement)?d.namespaceURI:gn(null,"");break;default:o=o===8?d.parentNode:d,d=o.namespaceURI||null,o=o.tagName,d=gn(d,o)}un(ra),on(ra,d)}function qd(){un(ra),un(Zh),un(Qh)}function Aj(o){dc(Qh.current);var d=dc(ra.current),p=gn(d,o.type);d!==p&&(on(Zh,o),on(ra,p))}function Hv(o){Zh.current===o&&(un(ra),un(Zh))}var jn=Yo(0);function zp(o){for(var d=o;d!==null;){if(d.tag===13){var p=d.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||p.data==="$?"||p.data==="$!"))return d}else if(d.tag===19&&d.memoizedProps.revealOrder!==void 0){if((d.flags&128)!==0)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===o)break;for(;d.sibling===null;){if(d.return===null||d.return===o)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var qv=[];function Gv(){for(var o=0;o<qv.length;o++)qv[o]._workInProgressVersionPrimary=null;qv.length=0}var $p=A.ReactCurrentDispatcher,Yv=A.ReactCurrentBatchConfig,uc=0,Sn=null,Xn=null,rs=null,Up=!1,Xh=!1,Jh=0,aI=0;function Ps(){throw Error(n(321))}function Kv(o,d){if(d===null)return!1;for(var p=0;p<d.length&&p<o.length;p++)if(!Nr(o[p],d[p]))return!1;return!0}function Zv(o,d,p,b,C,T){if(uc=T,Sn=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,$p.current=o===null||o.memoizedState===null?dI:uI,o=p(b,C),Xh){T=0;do{if(Xh=!1,Jh=0,25<=T)throw Error(n(301));T+=1,rs=Xn=null,d.updateQueue=null,$p.current=hI,o=p(b,C)}while(Xh)}if($p.current=Hp,d=Xn!==null&&Xn.next!==null,uc=0,rs=Xn=Sn=null,Up=!1,d)throw Error(n(300));return o}function Qv(){var o=Jh!==0;return Jh=0,o}function ia(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rs===null?Sn.memoizedState=rs=o:rs=rs.next=o,rs}function qr(){if(Xn===null){var o=Sn.alternate;o=o!==null?o.memoizedState:null}else o=Xn.next;var d=rs===null?Sn.memoizedState:rs.next;if(d!==null)rs=d,Xn=o;else{if(o===null)throw Error(n(310));Xn=o,o={memoizedState:Xn.memoizedState,baseState:Xn.baseState,baseQueue:Xn.baseQueue,queue:Xn.queue,next:null},rs===null?Sn.memoizedState=rs=o:rs=rs.next=o}return rs}function ef(o,d){return typeof d=="function"?d(o):d}function Xv(o){var d=qr(),p=d.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=o;var b=Xn,C=b.baseQueue,T=p.pending;if(T!==null){if(C!==null){var F=C.next;C.next=T.next,T.next=F}b.baseQueue=C=T,p.pending=null}if(C!==null){T=C.next,b=b.baseState;var G=F=null,ee=null,ve=T;do{var Pe=ve.lane;if((uc&Pe)===Pe)ee!==null&&(ee=ee.next={lane:0,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null}),b=ve.hasEagerState?ve.eagerState:o(b,ve.action);else{var Ee={lane:Pe,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null};ee===null?(G=ee=Ee,F=b):ee=ee.next=Ee,Sn.lanes|=Pe,hc|=Pe}ve=ve.next}while(ve!==null&&ve!==T);ee===null?F=b:ee.next=G,Nr(b,d.memoizedState)||(ar=!0),d.memoizedState=b,d.baseState=F,d.baseQueue=ee,p.lastRenderedState=b}if(o=p.interleaved,o!==null){C=o;do T=C.lane,Sn.lanes|=T,hc|=T,C=C.next;while(C!==o)}else C===null&&(p.lanes=0);return[d.memoizedState,p.dispatch]}function Jv(o){var d=qr(),p=d.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=o;var b=p.dispatch,C=p.pending,T=d.memoizedState;if(C!==null){p.pending=null;var F=C=C.next;do T=o(T,F.action),F=F.next;while(F!==C);Nr(T,d.memoizedState)||(ar=!0),d.memoizedState=T,d.baseQueue===null&&(d.baseState=T),p.lastRenderedState=T}return[T,b]}function Mj(){}function Rj(o,d){var p=Sn,b=qr(),C=d(),T=!Nr(b.memoizedState,C);if(T&&(b.memoizedState=C,ar=!0),b=b.queue,ey(Ij.bind(null,p,b,o),[o]),b.getSnapshot!==d||T||rs!==null&&rs.memoizedState.tag&1){if(p.flags|=2048,tf(9,Dj.bind(null,p,b,C,d),void 0,null),is===null)throw Error(n(349));(uc&30)!==0||Oj(p,d,C)}return C}function Oj(o,d,p){o.flags|=16384,o={getSnapshot:d,value:p},d=Sn.updateQueue,d===null?(d={lastEffect:null,stores:null},Sn.updateQueue=d,d.stores=[o]):(p=d.stores,p===null?d.stores=[o]:p.push(o))}function Dj(o,d,p,b){d.value=p,d.getSnapshot=b,Lj(d)&&Fj(o)}function Ij(o,d,p){return p(function(){Lj(d)&&Fj(o)})}function Lj(o){var d=o.getSnapshot;o=o.value;try{var p=d();return!Nr(o,p)}catch{return!0}}function Fj(o){var d=Ka(o,1);d!==null&&ki(d,o,1,-1)}function Bj(o){var d=ia();return typeof o=="function"&&(o=o()),d.memoizedState=d.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ef,lastRenderedState:o},d.queue=o,o=o.dispatch=cI.bind(null,Sn,o),[d.memoizedState,o]}function tf(o,d,p,b){return o={tag:o,create:d,destroy:p,deps:b,next:null},d=Sn.updateQueue,d===null?(d={lastEffect:null,stores:null},Sn.updateQueue=d,d.lastEffect=o.next=o):(p=d.lastEffect,p===null?d.lastEffect=o.next=o:(b=p.next,p.next=o,o.next=b,d.lastEffect=o)),o}function zj(){return qr().memoizedState}function Vp(o,d,p,b){var C=ia();Sn.flags|=o,C.memoizedState=tf(1|d,p,void 0,b===void 0?null:b)}function Wp(o,d,p,b){var C=qr();b=b===void 0?null:b;var T=void 0;if(Xn!==null){var F=Xn.memoizedState;if(T=F.destroy,b!==null&&Kv(b,F.deps)){C.memoizedState=tf(d,p,T,b);return}}Sn.flags|=o,C.memoizedState=tf(1|d,p,T,b)}function $j(o,d){return Vp(8390656,8,o,d)}function ey(o,d){return Wp(2048,8,o,d)}function Uj(o,d){return Wp(4,2,o,d)}function Vj(o,d){return Wp(4,4,o,d)}function Wj(o,d){if(typeof d=="function")return o=o(),d(o),function(){d(null)};if(d!=null)return o=o(),d.current=o,function(){d.current=null}}function Hj(o,d,p){return p=p!=null?p.concat([o]):null,Wp(4,4,Wj.bind(null,d,o),p)}function ty(){}function qj(o,d){var p=qr();d=d===void 0?null:d;var b=p.memoizedState;return b!==null&&d!==null&&Kv(d,b[1])?b[0]:(p.memoizedState=[o,d],o)}function Gj(o,d){var p=qr();d=d===void 0?null:d;var b=p.memoizedState;return b!==null&&d!==null&&Kv(d,b[1])?b[0]:(o=o(),p.memoizedState=[o,d],o)}function Yj(o,d,p){return(uc&21)===0?(o.baseState&&(o.baseState=!1,ar=!0),o.memoizedState=p):(Nr(p,d)||(p=ap(),Sn.lanes|=p,hc|=p,o.baseState=!0),d)}function oI(o,d){var p=Ot;Ot=p!==0&&4>p?p:4,o(!0);var b=Yv.transition;Yv.transition={};try{o(!1),d()}finally{Ot=p,Yv.transition=b}}function Kj(){return qr().memoizedState}function lI(o,d,p){var b=nl(o);if(p={lane:b,action:p,hasEagerState:!1,eagerState:null,next:null},Zj(o))Qj(d,p);else if(p=Cj(o,d,p,b),p!==null){var C=Ws();ki(p,o,b,C),Xj(p,d,b)}}function cI(o,d,p){var b=nl(o),C={lane:b,action:p,hasEagerState:!1,eagerState:null,next:null};if(Zj(o))Qj(d,C);else{var T=o.alternate;if(o.lanes===0&&(T===null||T.lanes===0)&&(T=d.lastRenderedReducer,T!==null))try{var F=d.lastRenderedState,G=T(F,p);if(C.hasEagerState=!0,C.eagerState=G,Nr(G,F)){var ee=d.interleaved;ee===null?(C.next=C,Uv(d)):(C.next=ee.next,ee.next=C),d.interleaved=C;return}}catch{}finally{}p=Cj(o,d,C,b),p!==null&&(C=Ws(),ki(p,o,b,C),Xj(p,d,b))}}function Zj(o){var d=o.alternate;return o===Sn||d!==null&&d===Sn}function Qj(o,d){Xh=Up=!0;var p=o.pending;p===null?d.next=d:(d.next=p.next,p.next=d),o.pending=d}function Xj(o,d,p){if((p&4194240)!==0){var b=d.lanes;b&=o.pendingLanes,p|=b,d.lanes=p,xi(o,p)}}var Hp={readContext:Hr,useCallback:Ps,useContext:Ps,useEffect:Ps,useImperativeHandle:Ps,useInsertionEffect:Ps,useLayoutEffect:Ps,useMemo:Ps,useReducer:Ps,useRef
vendor: 5,385 bytes, lines 38-40
38:Ps,useState:Ps,useDebugValue:Ps,useDeferredValue:Ps,useTransition:Ps,useMutableSource:Ps,useSyncExternalStore:Ps,useId:Ps,unstable_isNewReconciler:!1},dI={readContext:Hr,useCallback:function(o,d){return ia().memoizedState=[o,d===void 0?null:d],o},useContext:Hr,useEffect:$j,useImperativeHandle:function(o,d,p){return p=p!=null?p.concat([o]):null,Vp(4194308,4,Wj.bind(null,d,o),p)},useLayoutEffect:function(o,d){return Vp(4194308,4,o,d)},useInsertionEffect:function(o,d){return Vp(4,2,o,d)},useMemo:function(o,d){var p=ia();return d=d===void 0?null:d,o=o(),p.memoizedState=[o,d],o},useReducer:function(o,d,p){var b=ia();return d=p!==void 0?p(d):d,b.memoizedState=b.baseState=d,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:d},b.queue=o,o=o.dispatch=lI.bind(null,Sn,o),[b.memoizedState,o]},useRef:function(o){var d=ia();return o={current:o},d.memoizedState=o},useState:Bj,useDebugValue:ty,useDeferredValue:function(o){return ia().memoizedState=o},useTransition:function(){var o=Bj(!1),d=o[0];return o=oI.bind(null,o[1]),ia().memoizedState=o,[d,o]},useMutableSource:function(){},useSyncExternalStore:function(o,d,p){var b=Sn,C=ia();if(vn){if(p===void 0)throw Error(n(407));p=p()}else{if(p=d(),is===null)throw Error(n(349));(uc&30)!==0||Oj(b,d,p)}C.memoizedState=p;var T={value:p,getSnapshot:d};return C.queue=T,$j(Ij.bind(null,b,T,o),[o]),b.flags|=2048,tf(9,Dj.bind(null,b,T,p,d),void 0,null),p},useId:function(){var o=ia(),d=is.identifierPrefix;if(vn){var p=Ya,b=Ga;p=(b&~(1<<32-xt(b)-1)).toString(32)+p,d=":"+d+"R"+p,p=Jh++,0<p&&(d+="H"+p.toString(32)),d+=":"}else p=aI++,d=":"+d+"r"+p.toString(32)+":";return o.memoizedState=d},unstable_isNewReconciler:!1},uI={readContext:Hr,useCallback:qj,useContext:Hr,useEffect:ey,useImperativeHandle:Hj,useInsertionEffect:Uj,useLayoutEffect:Vj,useMemo:Gj,useReducer:Xv,useRef:zj,useState:function(){return Xv(ef)},useDebugValue:ty,useDeferredValue:function(o){var d=qr();return Yj(d,Xn.memoizedState,o)},useTransition:function(){var o=Xv(ef)[0],d=qr().memoizedState;return[o,d]},useMutableSource:Mj,useSyncExternalStore:Rj,useId:Kj,unstable_isNewReconciler:!1},hI={readContext:Hr,useCallback:qj,useContext:Hr,useEffect:ey,useImperativeHandle:Hj,useInsertionEffect:Uj,useLayoutEffect:Vj,useMemo:Gj,useReducer:Jv,useRef:zj,useState:function(){return Jv(ef)},useDebugValue:ty,useDeferredValue:function(o){var d=qr();return Xn===null?d.memoizedState=o:Yj(d,Xn.memoizedState,o)},useTransition:function(){var o=Jv(ef)[0],d=qr().memoizedState;return[o,d]},useMutableSource:Mj,useSyncExternalStore:Rj,useId:Kj,unstable_isNewReconciler:!1};function Ni(o,d){if(o&&o.defaultProps){d=D({},d),o=o.defaultProps;for(var p in o)d[p]===void 0&&(d[p]=o[p]);return d}return d}function ny(o,d,p,b){d=o.memoizedState,p=p(b,d),p=p==null?d:D({},d,p),o.memoizedState=p,o.lanes===0&&(o.updateQueue.baseState=p)}var qp={isMounted:function(o){return(o=o._reactInternals)?Ki(o)===o:!1},enqueueSetState:function(o,d,p){o=o._reactInternals;var b=Ws(),C=nl(o),T=Za(b,C);T.payload=d,p!=null&&(T.callback=p),d=Xo(o,T,C),d!==null&&(ki(d,o,C,b),Fp(d,o,C))},enqueueReplaceState:function(o,d,p){o=o._reactInternals;var b=Ws(),C=nl(o),T=Za(b,C);T.tag=1,T.payload=d,p!=null&&(T.callback=p),d=Xo(o,T,C),d!==null&&(ki(d,o,C,b),Fp(d,o,C))},enqueueForceUpdate:function(o,d){o=o._reactInternals;var p=Ws(),b=nl(o),C=Za(p,b);C.tag=2,d!=null&&(C.callback=d),d=Xo(o,C,b),d!==null&&(ki(d,o,b,p),Fp(d,o,b))}};function Jj(o,d,p,b,C,T,F){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(b,T,F):d.prototype&&d.prototype.isPureReactComponent?!ea(p,b)||!ea(C,T):!0}function e2(o,d,p){var b=!1,C=Ko,T=d.contextType;return typeof T=="object"&&T!==null?T=Hr(T):(C=ir(d)?ac:Cs.current,b=d.contextTypes,T=(b=b!=null)?Bd(o,C):Ko),d=new d(p,T),o.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=qp,o.stateNode=d,d._reactInternals=o,b&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=C,o.__reactInternalMemoizedMaskedChildContext=T),d}function t2(o,d,p,b){o=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(p,b),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(p,b),d.state!==o&&qp.enqueueReplaceState(d,d.state,null)}function sy(o,d,p,b){var C=o.stateNode;C.props=p,C.state=o.memoizedState,C.refs={},Vv(o);var T=d.contextType;typeof T=="object"&&T!==null?C.context=Hr(T):(T=ir(d)?ac:Cs.current,C.context=Bd(o,T)),C.state=o.memoizedState,T=d.getDerivedStateFromProps,typeof T=="function"&&(ny(o,d,T,p),C.state=o.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(d=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),d!==C.state&&qp.enqueueReplaceState(C,C.state,null),Bp(o,p,C,b),C.state=o.memoizedState),typeof C.componentDidMount=="function"&&(o.flags|=4194308)}function Gd(o,d){try{var p="",b=d;do p+=fe(b),b=b.return;while(b);var C=p}catch(T){C=` 39Error generating stack: `+T.message+` 40`+T.stack}return{value:o,source:d,stack:C,digest:null}}function ry(o,d,p){return{value:o,source:null,stack:p??null,digest:d??null}}function iy(o,d){try{console.error(d.value)}
vendor: 41,110 bytes, line 40
40catch(p){setTimeout(function(){throw p})}}var fI=typeof WeakMap=="function"?WeakMap:Map;function n2(o,d,p){p=Za(-1,p),p.tag=3,p.payload={element:null};var b=d.value;return p.callback=function(){Jp||(Jp=!0,by=b),iy(o,d)},p}function s2(o,d,p){p=Za(-1,p),p.tag=3;var b=o.type.getDerivedStateFromError;if(typeof b=="function"){var C=d.value;p.payload=function(){return b(C)},p.callback=function(){iy(o,d)}}var T=o.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(p.callback=function(){iy(o,d),typeof b!="function"&&(el===null?el=new Set([this]):el.add(this));var F=d.stack;this.componentDidCatch(d.value,{componentStack:F!==null?F:""})}),p}function r2(o,d,p){var b=o.pingCache;if(b===null){b=o.pingCache=new fI;var C=new Set;b.set(d,C)}else C=b.get(d),C===void 0&&(C=new Set,b.set(d,C));C.has(p)||(C.add(p),o=CI.bind(null,o,d,p),d.then(o,o))}function i2(o){do{var d;if((d=o.tag===13)&&(d=o.memoizedState,d=d!==null?d.dehydrated!==null:!0),d)return o;o=o.return}while(o!==null);return null}function a2(o,d,p,b,C){return(o.mode&1)===0?(o===d?o.flags|=65536:(o.flags|=128,p.flags|=131072,p.flags&=-52805,p.tag===1&&(p.alternate===null?p.tag=17:(d=Za(-1,1),d.tag=2,Xo(p,d,1))),p.lanes|=1),o):(o.flags|=65536,o.lanes=C,o)}var mI=A.ReactCurrentOwner,ar=!1;function Vs(o,d,p,b){d.child=o===null?kj(d,null,p,b):Vd(d,o.child,p,b)}function o2(o,d,p,b,C){p=p.render;var T=d.ref;return Hd(d,C),b=Zv(o,d,p,b,T,C),p=Qv(),o!==null&&!ar?(d.updateQueue=o.updateQueue,d.flags&=-2053,o.lanes&=~C,Qa(o,d,C)):(vn&&p&&Rv(d),d.flags|=1,Vs(o,d,b,C),d.child)}function l2(o,d,p,b,C){if(o===null){var T=p.type;return typeof T=="function"&&!Cy(T)&&T.defaultProps===void 0&&p.compare===null&&p.defaultProps===void 0?(d.tag=15,d.type=T,c2(o,d,T,b,C)):(o=ig(p.type,null,b,d,d.mode,C),o.ref=d.ref,o.return=d,d.child=o)}if(T=o.child,(o.lanes&C)===0){var F=T.memoizedProps;if(p=p.compare,p=p!==null?p:ea,p(F,b)&&o.ref===d.ref)return Qa(o,d,C)}return d.flags|=1,o=rl(T,b),o.ref=d.ref,o.return=d,d.child=o}function c2(o,d,p,b,C){if(o!==null){var T=o.memoizedProps;if(ea(T,b)&&o.ref===d.ref)if(ar=!1,d.pendingProps=b=T,(o.lanes&C)!==0)(o.flags&131072)!==0&&(ar=!0);else return d.lanes=o.lanes,Qa(o,d,C)}return ay(o,d,p,b,C)}function d2(o,d,p){var b=d.pendingProps,C=b.children,T=o!==null?o.memoizedState:null;if(b.mode==="hidden")if((d.mode&1)===0)d.memoizedState={baseLanes:0,cachePool:null,transitions:null},on(Kd,Cr),Cr|=p;else{if((p&1073741824)===0)return o=T!==null?T.baseLanes|p:p,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:o,cachePool:null,transitions:null},d.updateQueue=null,on(Kd,Cr),Cr|=o,null;d.memoizedState={baseLanes:0,cachePool:null,transitions:null},b=T!==null?T.baseLanes:p,on(Kd,Cr),Cr|=b}else T!==null?(b=T.baseLanes|p,d.memoizedState=null):b=p,on(Kd,Cr),Cr|=b;return Vs(o,d,C,p),d.child}function u2(o,d){var p=d.ref;(o===null&&p!==null||o!==null&&o.ref!==p)&&(d.flags|=512,d.flags|=2097152)}function ay(o,d,p,b,C){var T=ir(p)?ac:Cs.current;return T=Bd(d,T),Hd(d,C),p=Zv(o,d,p,b,T,C),b=Qv(),o!==null&&!ar?(d.updateQueue=o.updateQueue,d.flags&=-2053,o.lanes&=~C,Qa(o,d,C)):(vn&&b&&Rv(d),d.flags|=1,Vs(o,d,p,C),d.child)}function h2(o,d,p,b,C){if(ir(p)){var T=!0;Ep(d)}else T=!1;if(Hd(d,C),d.stateNode===null)Yp(o,d),e2(d,p,b),sy(d,p,b,C),b=!0;else if(o===null){var F=d.stateNode,G=d.memoizedProps;F.props=G;var ee=F.context,ve=p.contextType;typeof ve=="object"&&ve!==null?ve=Hr(ve):(ve=ir(p)?ac:Cs.current,ve=Bd(d,ve));var Pe=p.getDerivedStateFromProps,Ee=typeof Pe=="function"||typeof F.getSnapshotBeforeUpdate=="function";Ee||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(G!==b||ee!==ve)&&t2(d,F,b,ve),Qo=!1;var ke=d.memoizedState;F.state=ke,Bp(d,b,F,C),ee=d.memoizedState,G!==b||ke!==ee||rr.current||Qo?(typeof Pe=="function"&&(ny(d,p,Pe,b),ee=d.memoizedState),(G=Qo||Jj(d,p,G,b,ke,ee,ve))?(Ee||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(d.flags|=4194308)):(typeof F.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=b,d.memoizedState=ee),F.props=b,F.state=ee,F.context=ve,b=G):(typeof F.componentDidMount=="function"&&(d.flags|=4194308),b=!1)}else{F=d.stateNode,Pj(o,d),G=d.memoizedProps,ve=d.type===d.elementType?G:Ni(d.type,G),F.props=ve,Ee=d.pendingProps,ke=F.context,ee=p.contextType,typeof ee=="object"&&ee!==null?ee=Hr(ee):(ee=ir(p)?ac:Cs.current,ee=Bd(d,ee));var Be=p.getDerivedStateFromProps;(Pe=typeof Be=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(G!==Ee||ke!==ee)&&t2(d,F,b,ee),Qo=!1,ke=d.memoizedState,F.state=ke,Bp(d,b,F,C);var He=d.memoizedState;G!==Ee||ke!==He||rr.current||Qo?(typeof Be=="function"&&(ny(d,p,Be,b),He=d.memoizedState),(ve=Qo||Jj(d,p,ve,b,ke,He,ee)||!1)?(Pe||typeof F.UNSAFE_componentWillUpdate!="function"&&typeof F.componentWillUpdate!="function"||(typeof F.componentWillUpdate=="function"&&F.componentWillUpdate(b,He,ee),typeof F.UNSAFE_componentWillUpdate=="function"&&F.UNSAFE_componentWillUpdate(b,He,ee)),typeof F.componentDidUpdate=="function"&&(d.flags|=4),typeof F.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof F.componentDidUpdate!="function"||G===o.memoizedProps&&ke===o.memoizedState||(d.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||G===o.memoizedProps&&ke===o.memoizedState||(d.flags|=1024),d.memoizedProps=b,d.memoizedState=He),F.props=b,F.state=He,F.context=ee,b=ve):(typeof F.componentDidUpdate!="function"||G===o.memoizedProps&&ke===o.memoizedState||(d.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||G===o.memoizedProps&&ke===o.memoizedState||(d.flags|=1024),b=!1)}return oy(o,d,p,b,T,C)}function oy(o,d,p,b,C,T){u2(o,d);var F=(d.flags&128)!==0;if(!b&&!F)return C&&xj(d,p,!1),Qa(o,d,T);b=d.stateNode,mI.current=d;var G=F&&typeof p.getDerivedStateFromError!="function"?null:b.render();return d.flags|=1,o!==null&&F?(d.child=Vd(d,o.child,null,T),d.child=Vd(d,null,G,T)):Vs(o,d,G,T),d.memoizedState=b.state,C&&xj(d,p,!0),d.child}function f2(o){var d=o.stateNode;d.pendingContext?pj(o,d.pendingContext,d.pendingContext!==d.context):d.context&&pj(o,d.context,!1),Wv(o,d.containerInfo)}function m2(o,d,p,b,C){return Ud(),Lv(C),d.flags|=256,Vs(o,d,p,b),d.child}var ly={dehydrated:null,treeContext:null,retryLane:0};function cy(o){return{baseLanes:o,cachePool:null,transitions:null}}function p2(o,d,p){var b=d.pendingProps,C=jn.current,T=!1,F=(d.flags&128)!==0,G;if((G=F)||(G=o!==null&&o.memoizedState===null?!1:(C&2)!==0),G?(T=!0,d.flags&=-129):(o===null||o.memoizedState!==null)&&(C|=1),on(jn,C&1),o===null)return Iv(d),o=d.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((d.mode&1)===0?d.lanes=1:o.data==="$!"?d.lanes=8:d.lanes=1073741824,null):(F=b.children,o=b.fallback,T?(b=d.mode,T=d.child,F={mode:"hidden",children:F},(b&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=F):T=ag(F,b,0,null),o=gc(o,b,p,null),T.return=d,o.return=d,T.sibling=o,d.child=T,d.child.memoizedState=cy(p),d.memoizedState=ly,o):dy(d,F));if(C=o.memoizedState,C!==null&&(G=C.dehydrated,G!==null))return pI(o,d,F,b,G,C,p);if(T){T=b.fallback,F=d.mode,C=o.child,G=C.sibling;var ee={mode:"hidden",children:b.children};return(F&1)===0&&d.child!==C?(b=d.child,b.childLanes=0,b.pendingProps=ee,d.deletions=null):(b=rl(C,ee),b.subtreeFlags=C.subtreeFlags&14680064),G!==null?T=rl(G,T):(T=gc(T,F,p,null),T.flags|=2),T.return=d,b.return=d,b.sibling=T,d.child=b,b=T,T=d.child,F=o.child.memoizedState,F=F===null?cy(p):{baseLanes:F.baseLanes|p,cachePool:null,transitions:F.transitions},T.memoizedState=F,T.childLanes=o.childLanes&~p,d.memoizedState=ly,b}return T=o.child,o=T.sibling,b=rl(T,{mode:"visible",children:b.children}),(d.mode&1)===0&&(b.lanes=p),b.return=d,b.sibling=null,o!==null&&(p=d.deletions,p===null?(d.deletions=[o],d.flags|=16):p.push(o)),d.child=b,d.memoizedState=null,b}function dy(o,d){return d=ag({mode:"visible",children:d},o.mode,0,null),d.return=o,o.child=d}function Gp(o,d,p,b){return b!==null&&Lv(b),Vd(d,o.child,null,p),o=dy(d,d.pendingProps.children),o.flags|=2,d.memoizedState=null,o}function pI(o,d,p,b,C,T,F){if(p)return d.flags&256?(d.flags&=-257,b=ry(Error(n(422))),Gp(o,d,F,b)):d.memoizedState!==null?(d.child=o.child,d.flags|=128,null):(T=b.fallback,C=d.mode,b=ag({mode:"visible",children:b.children},C,0,null),T=gc(T,C,F,null),T.flags|=2,b.return=d,T.return=d,b.sibling=T,d.child=b,(d.mode&1)!==0&&Vd(d,o.child,null,F),d.child.memoizedState=cy(F),d.memoizedState=ly,T);if((d.mode&1)===0)return Gp(o,d,F,null);if(C.data==="$!"){if(b=C.nextSibling&&C.nextSibling.dataset,b)var G=b.dgst;return b=G,T=Error(n(419)),b=ry(T,b,void 0),Gp(o,d,F,b)}if(G=(F&o.childLanes)!==0,ar||G){if(b=is,b!==null){switch(F&-F){case 4:C=2;break;case 16:C=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:C=32;break;case 536870912:C=268435456;break;default:C=0}C=(C&(b.suspendedLanes|F))!==0?0:C,C!==0&&C!==T.retryLane&&(T.retryLane=C,Ka(o,C),ki(b,o,C,-1))}return ky(),b=ry(Error(n(421))),Gp(o,d,F,b)}return C.data==="$?"?(d.flags|=128,d.child=o.child,d=PI.bind(null,o),C._reactRetry=d,null):(o=T.treeContext,kr=sa(C.nextSibling),Sr=d,vn=!0,_i=null,o!==null&&(Vr[Wr++]=Ga,Vr[Wr++]=Ya,Vr[Wr++]=oc,Ga=o.id,Ya=o.overflow,oc=d),d=dy(d,b.children),d.flags|=4096,d)}function g2(o,d,p){o.lanes|=d;var b=o.alternate;b!==null&&(b.lanes|=d),$v(o.return,d,p)}function uy(o,d,p,b,C){var T=o.memoizedState;T===null?o.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:b,tail:p,tailMode:C}:(T.isBackwards=d,T.rendering=null,T.renderingStartTime=0,T.last=b,T.tail=p,T.tailMode=C)}function x2(o,d,p){var b=d.pendingProps,C=b.revealOrder,T=b.tail;if(Vs(o,d,b.children,p),b=jn.current,(b&2)!==0)b=b&1|2,d.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=d.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&g2(o,p,d);else if(o.tag===19)g2(o,p,d);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===d)break e;for(;o.sibling===null;){if(o.return===null||o.return===d)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}b&=1}if(on(jn,b),(d.mode&1)===0)d.memoizedState=null;else switch(C){case"forwards":for(p=d.child,C=null;p!==null;)o=p.alternate,o!==null&&zp(o)===null&&(C=p),p=p.sibling;p=C,p===null?(C=d.child,d.child=null):(C=p.sibling,p.sibling=null),uy(d,!1,C,p,T);break;case"backwards":for(p=null,C=d.child,d.child=null;C!==null;){if(o=C.alternate,o!==null&&zp(o)===null){d.child=C;break}o=C.sibling,C.sibling=p,p=C,C=o}uy(d,!0,p,null,T);break;case"together":uy(d,!1,null,null,void 0);break;default:d.memoizedState=null}return d.child}function Yp(o,d){(d.mode&1)===0&&o!==null&&(o.alternate=null,d.alternate=null,d.flags|=2)}function Qa(o,d,p){if(o!==null&&(d.dependencies=o.dependencies),hc|=d.lanes,(p&d.childLanes)===0)return null;if(o!==null&&d.child!==o.child)throw Error(n(153));if(d.child!==null){for(o=d.child,p=rl(o,o.pendingProps),d.child=p,p.return=d;o.sibling!==null;)o=o.sibling,p=p.sibling=rl(o,o.pendingProps),p.return=d;p.sibling=null}return d.child}function gI(o,d,p){switch(d.tag){case 3:f2(d),Ud();break;case 5:Aj(d);break;case 1:ir(d.type)&&Ep(d);break;case 4:Wv(d,d.stateNode.containerInfo);break;case 10:var b=d.type._context,C=d.memoizedProps.value;on(Ip,b._currentValue),b._currentValue=C;break;case 13:if(b=d.memoizedState,b!==null)return b.dehydrated!==null?(on(jn,jn.current&1),d.flags|=128,null):(p&d.child.childLanes)!==0?p2(o,d,p):(on(jn,jn.current&1),o=Qa(o,d,p),o!==null?o.sibling:null);on(jn,jn.current&1);break;case 19:if(b=(p&d.childLanes)!==0,(o.flags&128)!==0){if(b)return x2(o,d,p);d.flags|=128}if(C=d.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),on(jn,jn.current),b)break;return null;case 22:case 23:return d.lanes=0,d2(o,d,p)}return Qa(o,d,p)}var v2,hy,y2,b2;v2=function(o,d){for(var p=d.child;p!==null;){if(p.tag===5||p.tag===6)o.appendChild(p.stateNode);else if(p.tag!==4&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===d)break;for(;p.sibling===null;){if(p.return===null||p.return===d)return;p=p.return}p.sibling.return=p.return,p=p.sibling}},hy=function(){},y2=function(o,d,p,b){var C=o.memoizedProps;if(C!==b){o=d.stateNode,dc(ra.current);var T=null;switch(p){case"input":C=$e(o,C),b=$e(o,b),T=[];break;case"select":C=D({},C,{value:void 0}),b=D({},b,{value:void 0}),T=[];break;case"textarea":C=ms(o,C),b=ms(o,b),T=[];break;default:typeof C.onClick!="function"&&typeof b.onClick=="function"&&(o.onclick=je)}we(p,b);var F;p=null;for(ve in C)if(!b.hasOwnProperty(ve)&&C.hasOwnProperty(ve)&&C[ve]!=null)if(ve==="style"){var G=C[ve];for(F in G)G.hasOwnProperty(F)&&(p||(p={}),p[F]="")}else ve!=="dangerouslySetInnerHTML"&&ve!=="children"&&ve!=="suppressContentEditableWarning"&&ve!=="suppressHydrationWarning"&&ve!=="autoFocus"&&(i.hasOwnProperty(ve)?T||(T=[]):(T=T||[]).push(ve,null));for(ve in b){var ee=b[ve];if(G=C!=null?C[ve]:void 0,b.hasOwnProperty(ve)&&ee!==G&&(ee!=null||G!=null))if(ve==="style")if(G){for(F in G)!G.hasOwnProperty(F)||ee&&ee.hasOwnProperty(F)||(p||(p={}),p[F]="");for(F in ee)ee.hasOwnProperty(F)&&G[F]!==ee[F]&&(p||(p={}),p[F]=ee[F])}else p||(T||(T=[]),T.push(ve,p)),p=ee;else ve==="dangerouslySetInnerHTML"?(ee=ee?ee.__html:void 0,G=G?G.__html:void 0,ee!=null&&G!==ee&&(T=T||[]).push(ve,ee)):ve==="children"?typeof ee!="string"&&typeof ee!="number"||(T=T||[]).push(ve,""+ee):ve!=="suppressContentEditableWarning"&&ve!=="suppressHydrationWarning"&&(i.hasOwnProperty(ve)?(ee!=null&&ve==="onScroll"&&en("scroll",o),T||G===ee||(T=[])):(T=T||[]).push(ve,ee))}p&&(T=T||[]).push("style",p);var ve=T;(d.updateQueue=ve)&&(d.flags|=4)}},b2=function(o,d,p,b){p!==b&&(d.flags|=4)};function nf(o,d){if(!vn)switch(o.tailMode){case"hidden":d=o.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?o.tail=null:p.sibling=null;break;case"collapsed":p=o.tail;for(var b=null;p!==null;)p.alternate!==null&&(b=p),p=p.sibling;b===null?d||o.tail===null?o.tail=null:o.tail.sibling=null:b.sibling=null}}function Ts(o){var d=o.alternate!==null&&o.alternate.child===o.child,p=0,b=0;if(d)for(var C=o.child;C!==null;)p|=C.lanes|C.childLanes,b|=C.subtreeFlags&14680064,b|=C.flags&14680064,C.return=o,C=C.sibling;else for(C=o.child;C!==null;)p|=C.lanes|C.childLanes,b|=C.subtreeFlags,b|=C.flags,C.return=o,C=C.sibling;return o.subtreeFlags|=b,o.childLanes=p,d}function xI(o,d,p){var b=d.pendingProps;switch(Ov(d),d.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ts(d),null;case 1:return ir(d.type)&&Tp(),Ts(d),null;case 3:return b=d.stateNode,qd(),un(rr),un(Cs),Gv(),b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),(o===null||o.child===null)&&(Op(d)?d.flags|=4:o===null||o.memoizedState.isDehydrated&&(d.flags&256)===0||(d.flags|=1024,_i!==null&&(Ny(_i),_i=null))),hy(o,d),Ts(d),null;case 5:Hv(d);var C=dc(Qh.current);if(p=d.type,o!==null&&d.stateNode!=null)y2(o,d,p,b,C),o.ref!==d.ref&&(d.flags|=512,d.flags|=2097152);else{if(!b){if(d.stateNode===null)throw Error(n(166));return Ts(d),null}if(o=dc(ra.current),Op(d)){b=d.stateNode,p=d.type;var T=d.memoizedProps;switch(b[Ur]=d,b[qo]=T,o=(d.mode&1)!==0,p){case"dialog":en("cancel",b),en("close",b);break;case"iframe":case"object":case"embed":en("load",b);break;case"video":case"audio":for(C=0;C<Vo.length;C++)en(Vo[C],b);break;case"source":en("error",b);break;case"img":case"image":case"link":en("error",b),en("load",b);break;case"details":en("toggle",b);break;case"input":Et(b,T),en("invalid",b);break;case"select":b._wrapperState={wasMultiple:!!T.multiple},en("invalid",b);break;case"textarea":ae(b,T),en("invalid",b)}we(p,T),C=null;for(var F in T)if(T.hasOwnProperty(F)){var G=T[F];F==="children"?typeof G=="string"?b.textContent!==G&&(T.suppressHydrationWarning!==!0&&xe(b.textContent,G,o),C=["children",G]):typeof G=="number"&&b.textContent!==""+G&&(T.suppressHydrationWarning!==!0&&xe(b.textContent,G,o),C=["children",""+G]):i.hasOwnProperty(F)&&G!=null&&F==="onScroll"&&en("scroll",b)}switch(p){case"input":De(b),Pn(b,T,!0);break;case"textarea":De(b),Ve(b);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(b.onclick=je)}b=C,d.updateQueue=b,b!==null&&(d.flags|=4)}else{F=C.nodeType===9?C:C.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=Nt(p)),o==="http://www.w3.org/1999/xhtml"?p==="script"?(o=F.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof b.is=="string"?o=F.createElement(p,{is:b.is}):(o=F.createElement(p),p==="select"&&(F=o,b.multiple?F.multiple=!0:b.size&&(F.size=b.size))):o=F.createElementNS(o,p),o[Ur]=d,o[qo]=b,v2(o,d,!1,!1),d.stateNode=o;e:{switch(F=st(p,b),p){case"dialog":en("cancel",o),en("close",o),C=b;break;case"iframe":case"object":case"embed":en("load",o),C=b;break;case"video":case"audio":for(C=0;C<Vo.length;C++)en(Vo[C],o);C=b;break;case"source":en("error",o),C=b;break;case"img":case"image":case"link":en("error",o),en("load",o),C=b;break;case"details":en("toggle",o),C=b;break;case"input":Et(o,b),C=$e(o,b),en("invalid",o);break;case"option":C=b;break;case"select":o._wrapperState={wasMultiple:!!b.multiple},C=D({},b,{value:void 0}),en("invalid",o);break;case"textarea":ae(o,b),C=ms(o,b),en("invalid",o);break;default:C=b}we(p,C),G=C;for(T in G)if(G.hasOwnProperty(T)){var ee=G[T];T==="style"?mi(o,ee):T==="dangerouslySetInnerHTML"?(ee=ee?ee.__html:void 0,ee!=null&&En(o,ee)):T==="children"?typeof ee=="string"?(p!=="textarea"||ee!=="")&&Rt(o,ee):typeof ee=="number"&&Rt(o,""+ee):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(i.hasOwnProperty(T)?ee!=null&&T==="onScroll"&&en("scroll",o):ee!=null&&R(o,T,ee,F))}switch(p){case"input":De(o),Pn(o,b,!1);break;case"textarea":De(o),Ve(o);break;case"option":b.value!=null&&o.setAttribute("value",""+Q(b.value));break;case"select":o.multiple=!!b.multiple,T=b.value,T!=null?Tn(o,!!b.multiple,T,!1):b.defaultValue!=null&&Tn(o,!!b.multiple,b.defaultValue,!0);break;default:typeof C.onClick=="function"&&(o.onclick=je)}switch(p){case"button":case"input":case"select":case"textarea":b=!!b.autoFocus;break e;case"img":b=!0;break e;default:b=!1}}b&&(d.flags|=4)}d.ref!==null&&(d.flags|=512,d.flags|=2097152)}return Ts(d),null;case 6:if(o&&d.stateNode!=null)b2(o,d,o.memoizedProps,b);else{if(typeof b!="string"&&d.stateNode===null)throw Error(n(166));if(p=dc(Qh.current),dc(ra.current),Op(d)){if(b=d.stateNode,p=d.memoizedProps,b[Ur]=d,(T=b.nodeValue!==p)&&(o=Sr,o!==null))switch(o.tag){case 3:xe(b.nodeValue,p,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&xe(b.nodeValue,p,(o.mode&1)!==0)}T&&(d.flags|=4)}else b=(p.nodeType===9?p:p.ownerDocument).createTextNode(b),b[Ur]=d,d.stateNode=b}return Ts(d),null;case 13:if(un(jn),b=d.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(vn&&kr!==null&&(d.mode&1)!==0&&(d.flags&128)===0)Nj(),Ud(),d.flags|=98560,T=!1;else if(T=Op(d),b!==null&&b.dehydrated!==null){if(o===null){if(!T)throw Error(n(318));if(T=d.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Ur]=d}else Ud(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;Ts(d),T=!1}else _i!==null&&(Ny(_i),_i=null),T=!0;if(!T)return d.flags&65536?d:null}return(d.flags&128)!==0?(d.lanes=p,d):(b=b!==null,b!==(o!==null&&o.memoizedState!==null)&&b&&(d.child.flags|=8192,(d.mode&1)!==0&&(o===null||(jn.current&1)!==0?Jn===0&&(Jn=3):ky())),d.updateQueue!==null&&(d.flags|=4),Ts(d),null);case 4:return qd(),hy(o,d),o===null&&Wo(d.stateNode.containerInfo),Ts(d),null;case 10:return zv(d.type._context),Ts(d),null;case 17:return ir(d.type)&&Tp(),Ts(d),null;case 19:if(un(jn),T=d.memoizedState,T===null)return Ts(d),null;if(b=(d.flags&128)!==0,F=T.rendering,F===null)if(b)nf(T,!1);else{if(Jn!==0||o!==null&&(o.flags&128)!==0)for(o=d.child;o!==null;){if(F=zp(o),F!==null){for(d.flags|=128,nf(T,!1),b=F.updateQueue,b!==null&&(d.updateQueue=b,d.flags|=4),d.subtreeFlags=0,b=p,p=d.child;p!==null;)T=p,o=b,T.flags&=14680066,F=T.alternate,F===null?(T.childLanes=0,T.lanes=o,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=F.childLanes,T.lanes=F.lanes,T.child=F.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=F.memoizedProps,T.memoizedState=F.memoizedState,T.updateQueue=F.updateQueue,T.type=F.type,o=F.dependencies,T.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),p=p.sibling;return on(jn,jn.current&1|2),d.child}o=o.sibling}T.tail!==null&&_n()>Zd&&(d.flags|=128,b=!0,nf(T,!1),d.lanes=4194304)}else{if(!b)if(o=zp(F),o!==null){if(d.flags|=128,b=!0,p=o.updateQueue,p!==null&&(d.updateQueue=p,d.flags|=4),nf(T,!0),T.tail===null&&T.tailMode==="hidden"&&!F.alternate&&!vn)return Ts(d),null}else 2*_n()-T.renderingStartTime>Zd&&p!==1073741824&&(d.flags|=128,b=!0,nf(T,!1),d.lanes=4194304);T.isBackwards?(F.sibling=d.child,d.child=F):(p=T.last,p!==null?p.sibling=F:d.child=F,T.last=F)}return T.tail!==null?(d=T.tail,T.rendering=d,T.tail=d.sibling,T.renderingStartTime=_n(),d.sibling=null,p=jn.current,on(jn,b?p&1|2:p&1),d):(Ts(d),null);case 22:case 23:return Sy(),b=d.memoizedState!==null,o!==null&&o.memoizedState!==null!==b&&(d.flags|=8192),b&&(d.mode&1)!==0?(Cr&1073741824)!==0&&(Ts(d),d.subtreeFlags&6&&(d.flags|=8192)):Ts(d),null;case 24:return null;case 25:return null}throw Error(n(156,d.tag))}function vI(o,d){switch(Ov(d),d.tag){case 1:return ir(d.type)&&Tp(),o=d.flags,o&65536?(d.flags=o&-65537|128,d):null;case 3:return qd(),un(rr),un(Cs),Gv(),o=d.flags,(o&65536)!==0&&(o&128)===0?(d.flags=o&-65537|128,d):null;case 5:return Hv(d),null;case 13:if(un(jn),o=d.memoizedState,o!==null&&o.dehydrated!==null){if(d.alternate===null)throw Error(n(340));Ud()}return o=d.flags,o&65536?(d.flags=o&-65537|128,d):null;case 19:return un(jn),null;case 4:return qd(),null;case 10:return zv(d.type._context),null;case 22:case 23:return Sy(),null;case 24:return null;default:return null}}var Kp=!1,Es=!1,yI=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function Yd(o,d){var p=o.ref;if(p!==null)if(typeof p=="function")try{p(null)}catch(b){Mn(o,d,b)}else p.current=null}function fy(o,d,p){try{p()}catch(b){Mn(o,d,b)}}var w2=!1;function bI(o,d){if(Ie=Xl,o=Bh(),zh(o)){if("selectionStart"in o)var p={start:o.selectionStart,end:o.selectionEnd};else e:{p=(p=o.ownerDocument)&&p.defaultView||window;var b=p.getSelection&&p.getSelection();if(b&&b.rangeCount!==0){p=b.anchorNode;var C=b.anchorOffset,T=b.focusNode;b=b.focusOffset;try{p.nodeType,T.nodeType}catch{p=null;break e}var F=0,G=-1,ee=-1,ve=0,Pe=0,Ee=o,ke=null;t:for(;;){for(var Be;Ee!==p||C!==0&&Ee.nodeType!==3||(G=F+C),Ee!==T||b!==0&&Ee.nodeType!==3||(ee=F+b),Ee.nodeType===3&&(F+=Ee.nodeValue.length),(Be=Ee.firstChild)!==null;)ke=Ee,Ee=Be;for(;;){if(Ee===o)break t;if(ke===p&&++ve===C&&(G=F),ke===T&&++Pe===b&&(ee=F),(Be=Ee.nextSibling)!==null)break;Ee=ke,ke=Ee.parentNode}Ee=Be}p=G===-1||ee===-1?null:{start:G,end:ee}}else p=null}p=p||{start:0,end:0}}else p=null;for(rt={focusedElem:o,selectionRange:p},Xl=!1,Ue=d;Ue!==null;)if(d=Ue,o=d.child,(d.subtreeFlags&1028)!==0&&o!==null)o.return=d,Ue=o;else for(;Ue!==null;){d=Ue;try{var He=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(He!==null){var Ye=He.memoizedProps,Ln=He.memoizedState,ue=d.stateNode,se=ue.getSnapshotBeforeUpdate(d.elementType===d.type?Ye:Ni(d.type,Ye),Ln);ue.__reactInternalSnapshotBeforeUpdate=se}break;case 3:var pe=d.stateNode.containerInfo;pe.nodeType===1?pe.textContent="":pe.nodeType===9&&pe.documentElement&&pe.removeChild(pe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Me){Mn(d,d.return,Me)}if(o=d.sibling,o!==null){o.return=d.return,Ue=o;break}Ue=d.return}return He=w2,w2=!1,He}function sf(o,d,p){var b=d.updateQueue;if(b=b!==null?b.lastEffect:null,b!==null){var C=b=b.next;do{if((C.tag&o)===o){var T=C.destroy;C.destroy=void 0,T!==void 0&&fy(d,p,T)}C=C.next}while(C!==b)}}function Zp(o,d){if(d=d.updateQueue,d=d!==null?d.lastEffect:null,d!==null){var p=d=d.next;do{if((p.tag&o)===o){var b=p.create;p.destroy=b()}p=p.next}while(p!==d)}}function my(o){var d=o.ref;if(d!==null){var p=o.stateNode;switch(o.tag){case 5:o=p;break;default:o=p}typeof d=="function"?d(o):d.current=o}}function _2(o){var d=o.alternate;d!==null&&(o.alternate=null,_2(d)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(d=o.stateNode,d!==null&&(delete d[Ur],delete d[qo],delete d[Go],delete d[Tv],delete d[Ev])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function N2(o){return o.tag===5||o.tag===3||o.tag===4}function j2(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||N2(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function py(o,d,p){var b=o.tag;if(b===5||b===6)o=o.stateNode,d?p.nodeType===8?p.parentNode.insertBefore(o,d):p.insertBefore(o,d):(p.nodeType===8?(d=p.parentNode,d.insertBefore(o,p)):(d=p,d.appendChild(o)),p=p._reactRootContainer,p!=null||d.onclick!==null||(d.onclick=je));else if(b!==4&&(o=o.child,o!==null))for(py(o,d,p),o=o.sibling;o!==null;)py(o,d,p),o=o.sibling}function gy(o,d,p){var b=o.tag;if(b===5||b===6)o=o.stateNode,d?p.insertBefore(o,d):p.appendChild(o);else if(b!==4&&(o=o.child,o!==null))for(gy(o,d,p),o=o.sibling;o!==null;)gy(o,d,p),o=o.sibling}var gs=null,ji=!1;function Jo(o,d,p){for(p=p.child;p!==null;)S2(o,d,p),p=p.sibling}function S2(o,d,p){if(xr&&typeof xr.onCommitFiberUnmount=="function")try{xr.onCommitFiberUnmount(ql,p)}catch{}switch(p.tag){case 5:Es||Yd(p,d);case 6:var b=gs,C=ji;gs=null,Jo(o,d,p),gs=b,ji=C,gs!==null&&(ji?(o=gs,p=p.stateNode,o.nodeType===8?o.parentNode.removeChild(p):o.removeChild(p)):gs.removeChild(p.stateNode));break;case 18:gs!==null&&(ji?(o=gs,p=p.stateNode,o.nodeType===8?Gh(o.parentNode,p):o.nodeType===1&&Gh(o,p),br(o)):Gh(gs,p.stateNode));break;case 4:b=gs,C=ji,gs=p.stateNode.containerInfo,ji=!0,Jo(o,d,p),gs=b,ji=C;break;case 0:case 11:case 14:case 15:if(!Es&&(b=p.updateQueue,b!==null&&(b=b.lastEffect,b!==null))){C=b=b.next;do{var T=C,F=T.destroy;T=T.tag,F!==void 0&&((T&2)!==0||(T&4)!==0)&&fy(p,d,F),C=C.next}while(C!==b)}Jo(o,d,p);break;case 1:if(!Es&&(Yd(p,d),b=p.stateNode,typeof b.componentWillUnmount=="function"))try{b.props=p.memoizedProps,b.state=p.memoizedState,b.componentWillUnmount()}catch(G){Mn(p,d,G)}Jo(o,d,p);break;case 21:Jo(o,d,p);break;case 22:p.mode&1?(Es=(b=Es)||p.memoizedState!==null,Jo(o,d,p),Es=b):Jo(o,d,p);break;default:Jo(o,d,p)}}function k2(o){var d=o.updateQueue;if(d!==null){o.updateQueue=null;var p=o.stateNode;p===null&&(p=o.stateNode=new yI),d.forEach(function(b){var C=TI.bind(null,o,b);p.has(b)||(p.add(b),b.then(C,C))})}}function Si(o,d){var p=d.deletions;if(p!==null)for(var b=0;b<p.length;b++){var C=p[b];try{var T=o,F=d,G=F;e:for(;G!==null;){switch(G.tag){case 5:gs=G.stateNode,ji=!1;break e;case 3:gs=G.stateNode.containerInfo,ji=!0;break e;case 4:gs=G.stateNode.containerInfo,ji=!0;break e}G=G.return}if(gs===null)throw Error(n(160));S2(T,F,C),gs=null,ji=!1;var ee=C.alternate;ee!==null&&(ee.return=null),C.return=null}catch(ve){Mn(C,d,ve)}}if(d.subtreeFlags&12854)for(d=d.child;d!==null;)C2(d,o),d=d.sibling}function C2(o,d){var p=o.alternate,b=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(Si(d,o),aa(o),b&4){try{sf(3,o,o.return),Zp(3,o)}catch(Ye){Mn(o,o.return,Ye)}try{sf(5,o,o.return)}catch(Ye){Mn(o,o.return,Ye)}}break;case 1:Si(d,o),aa(o),b&512&&p!==null&&Yd(p,p.return);break;case 5:if(Si(d,o),aa(o),b&512&&p!==null&&Yd(p,p.return),o.flags&32){var C=o.stateNode;try{Rt(C,"")}catch(Ye){Mn(o,o.return,Ye)}}if(b&4&&(C=o.stateNode,C!=null)){var T=o.memoizedProps,F=p!==null?p.memoizedProps:T,G=o.type,ee=o.updateQueue;if(o.updateQueue=null,ee!==null)try{G==="input"&&T.type==="radio"&&T.name!=null&&Xt(C,T),st(G,F);var ve=st(G,T);for(F=0;F<ee.length;F+=2){var Pe=ee[F],Ee=ee[F+1];Pe==="style"?mi(C,Ee):Pe==="dangerouslySetInnerHTML"?En(C,Ee):Pe==="children"?Rt(C,Ee):R(C,Pe,Ee,ve)}switch(G){case"input":Zt(C,T);break;case"textarea":Se(C,T);break;case"select":var ke=C._wrapperState.wasMultiple;C._wrapperState.wasMultiple=!!T.multiple;var Be=T.value;Be!=null?Tn(C,!!T.multiple,Be,!1):ke!==!!T.multiple&&(T.defaultValue!=null?Tn(C,!!T.multiple,T.defaultValue,!0):Tn(C,!!T.multiple,T.multiple?[]:"",!1))}C[qo]=T}catch(Ye){Mn(o,o.return,Ye)}}break;case 6:if(Si(d,o),aa(o),b&4){if(o.stateNode===null)throw Error(n(162));C=o.stateNode,T=o.memoizedProps;try{C.nodeValue=T}catch(Ye){Mn(o,o.return,Ye)}}break;case 3:if(Si(d,o),aa(o),b&4&&p!==null&&p.memoizedState.isDehydrated)try{br(d.containerInfo)}catch(Ye){Mn(o,o.return,Ye)}break;case 4:Si(d,o),aa(o);break;case 13:Si(d,o),aa(o),C=o.child,C.flags&8192&&(T=C.memoizedState!==null,C.stateNode.isHidden=T,!T||C.alternate!==null&&C.alternate.memoizedState!==null||(yy=_n())),b&4&&k2(o);break;case 22:if(Pe=p!==null&&p.memoizedState!==null,o.mode&1?(Es=(ve=Es)||Pe,Si(d,o),Es=ve):Si(d,o),aa(o),b&8192){if(ve=o.memoizedState!==null,(o.stateNode.isHidden=ve)&&!Pe&&(o.mode&1)!==0)for(Ue=o,Pe=o.child;Pe!==null;){for(Ee=Ue=Pe;Ue!==null;){switch(ke=Ue,Be=ke.child,ke.tag){case 0:case 11:case 14:case 15:sf(4,ke,ke.return);break;case 1:Yd(ke,ke.return);var He=ke.stateNode;if(typeof He.componentWillUnmount=="function"){b=ke,p=ke.return;try{d=b,He.props=d.memoizedProps,He.state=d.memoizedState,He.componentWillUnmount()}catch(Ye){Mn(b,p,Ye)}}break;case 5:Yd(ke,ke.return);break;case 22:if(ke.memoizedState!==null){E2(Ee);continue}}Be!==null?(Be.return=ke,Ue=Be):E2(Ee)}Pe=Pe.sibling}e:for(Pe=null,Ee=o;;){if(Ee.tag===5){if(Pe===null){Pe=Ee;try{C=Ee.stateNode,ve?(T=C.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(G=Ee.stateNode,ee=Ee.memoizedProps.style,F=ee!=null&&ee.hasOwnProperty("display")?ee.display:null,G.style.display=Ir("display",F))}catch(Ye){Mn(o,o.return,Ye)}}}else if(Ee.tag===6){if(Pe===null)try{Ee.stateNode.nodeValue=ve?"":Ee.memoizedProps}catch(Ye){Mn(o,o.return,Ye)}}else if((Ee.tag!==22&&Ee.tag!==23||Ee.memoizedState===null||Ee===o)&&Ee.child!==null){Ee.child.return=Ee,Ee=Ee.child;continue}if(Ee===o)break e;for(;Ee.sibling===null;){if(Ee.return===null||Ee.return===o)break e;Pe===Ee&&(Pe=null),Ee=Ee.return}Pe===Ee&&(Pe=null),Ee.sibling.return=Ee.return,Ee=Ee.sibling}}break;case 19:Si(d,o),aa(o),b&4&&k2(o);break;case 21:break;default:Si(d,o),aa(o)}}function aa(o){var d=o.flags;if(d&2){try{e:{for(var p=o.return;p!==null;){if(N2(p)){var b=p;break e}p=p.return}throw Error(n(160))}switch(b.tag){case 5:var C=b.stateNode;b.flags&32&&(Rt(C,""),b.flags&=-33);var T=j2(o);gy(o,T,C);break;case 3:case 4:var F=b.stateNode.containerInfo,G=j2(o);py(o,G,F);break;default:throw Error(n(161))}}catch(ee){Mn(o,o.return,ee)}o.flags&=-3}d&4096&&(o.flags&=-4097)}function wI(o,d,p){Ue=o,P2(o)}function P2(o,d,p){for(var b=(o.mode&1)!==0;Ue!==null;){var C=Ue,T=C.child;if(C.tag===22&&b){var F=C.memoizedState!==null||Kp;if(!F){var G=C.alternate,ee=G!==null&&G.memoizedState!==null||Es;G=Kp;var ve=Es;if(Kp=F,(Es=ee)&&!ve)for(Ue=C;Ue!==null;)F=Ue,ee=F.child,F.tag===22&&F.memoizedState!==null?A2(C):ee!==null?(ee.return=F,Ue=ee):A2(C);for(;T!==null;)Ue=T,P2(T),T=T.sibling;Ue=C,Kp=G,Es=ve}T2(o)}else(C.subtreeFlags&8772)!==0&&T!==null?(T.return=C,Ue=T):T2(o)}}function T2(o){for(;Ue!==null;){var d=Ue;if((d.flags&8772)!==0){var p=d.alternate;try{if((d.flags&8772)!==0)switch(d.tag){case 0:case 11:case 15:Es||Zp(5,d);break;case 1:var b=d.stateNode;if(d.flags&4&&!Es)if(p===null)b.componentDidMount();else{var C=d.elementType===d.type?p.memoizedProps:Ni(d.type,p.memoizedProps);b.componentDidUpdate(C,p.memoizedState,b.__reactInternalSnapshotBeforeUpdate)}var T=d.updateQueue;T!==null&&Ej(d,T,b);break;case 3:var F=d.updateQueue;if(F!==null){if(p=null,d.child!==null)switch(d.child.tag){case 5:p=d.child.stateNode;break;case 1:p=d.child.stateNode}Ej(d,F,p)}break;case 5:var G=d.stateNode;if(p===null&&d.flags&4){p=G;var ee=d.memoizedProps;switch(d.type){case"button":case"input":case"select":case"textarea":ee.autoFocus&&p.focus();break;case"img":ee.src&&(p.src=ee.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(d.memoizedState===null){var ve=d.alternate;if(ve!==null){var Pe=ve.memoizedState;if(Pe!==null){var Ee=Pe.dehydrated;Ee!==null&&br(Ee)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Es||d.flags&512&&my(d)}catch(ke){Mn(d,d.return,ke)}}if(d===o){Ue=null;break}if(p=d.sibling,p!==null){p.return=d.return,Ue=p;break}Ue=d.return}}function E2(o){for(;Ue!==null;){var d=Ue;if(d===o){Ue=null;break}var p=d.sibling;if(p!==null){p.return=d.return,Ue=p;break}Ue=d.return}}function A2(o){for(;Ue!==null;){var d=Ue;try{switch(d.tag){case 0:case 11:case 15:var p=d.return;try{Zp(4,d)}catch(ee){Mn(d,p,ee)}break;case 1:var b=d.stateNode;if(typeof b.componentDidMount=="function"){var C=d.return;try{b.componentDidMount()}catch(ee){Mn(d,C,ee)}}var T=d.return;try{my(d)}catch(ee){Mn(d,T,ee)}break;case 5:var F=d.return;try{my(d)}catch(ee){Mn(d,F,ee)}}}catch(ee){Mn(d,d.return,ee)}if(d===o){Ue=null;break}var G=d.sibling;if(G!==null){G.return=d.return,Ue=G;break}Ue=d.return}}var _I=Math.ceil,Qp=A.ReactCurrentDispatcher,xy=A.ReactCurrentOwner,Gr=A.ReactCurrentBatchConfig,Bt=0,is=null,qn=null,xs=0,Cr=0,Kd=Yo(0),Jn=0,rf=null,hc=0,Xp=0,vy=0,af=null,or=null,yy=0,Zd=1/0,Xa=null,Jp=!1,by=null,el=null,eg=!1,tl=null,tg=0,of=0,wy=null,ng=-1,sg=0;function Ws(){return(Bt&6)!==0?_n():ng!==-1?ng:ng=_n()}function nl(o){return(o.mode&1)===0?1:(Bt&2)!==0&&xs!==0?xs&-xs:iI.transition!==null?(sg===0&&(sg=ap()),sg):(o=Ot,o!==0||(o=window.event,o=o===void 0?16:Tt(o.type)),o)}function ki(o,d,p,b){if(50<of)throw of=0,wy=null,Error(n(185));vr(o,p,b),((Bt&2)===0||o!==is)&&(o===is&&((Bt&2)===0&&(Xp|=p),Jn===4&&sl(o,xs)),lr(o,b),p===1&&Bt===0&&(d.mode&1)===0&&(Zd=_n()+500,Ap&&Zo()))}function lr(o,d){var p=o.callbackNode;gd(o,d);var b=an(o,o===is?xs:0);if(b===0)p!==null&&wh(p),o.callbackNode=null,o.callbackPriority=0;else if(d=b&-b,o.callbackPriority!==d){if(p!=null&&wh(p),d===1)o.tag===0?rI(R2.bind(null,o)):vj(R2.bind(null,o)),ks(function(){(Bt&6)===0&&Zo()}),p=null;else{switch(Ao(b)){case 1:p=_h;break;case 4:p=ip;break;case 16:p=md;break;case 536870912:p=Co;break;default:p=md}p=$2(p,M2.bind(null,o))}o.callbackPriority=d,o.callbackNode=p}}function M2(o,d){if(ng=-1,sg=0,(Bt&6)!==0)throw Error(n(327));var p=o.callbackNode;if(Qd()&&o.callbackNode!==p)return null;var b=an(o,o===is?xs:0);if(b===0)return null;if((b&30)!==0||(b&o.expiredLanes)!==0||d)d=rg(o,b);else{d=b;var C=Bt;Bt|=2;var T=D2();(is!==o||xs!==d)&&(Xa=null,Zd=_n()+500,mc(o,d));do try{SI();break}catch(G){O2(o,G)}while(!0);Bv(),Qp.current=T,Bt=C,qn!==null?d=0:(is=null,xs=0,d=Jn)}if(d!==0){if(d===2&&(C=js(o),C!==0&&(b=C,d=_y(o,C))),d===1)throw p=rf,mc(o,0),sl(o,b),lr(o,_n()),p;if(d===6)sl(o,b);else{if(C=o.current.alternate,(b&30)===0&&!NI(C)&&(d=rg(o,b),d===2&&(T=js(o),T!==0&&(b=T,d=_y(o,T))),d===1))throw p=rf,mc(o,0),sl(o,b),lr(o,_n()),p;switch(o.finishedWork=C,o.finishedLanes=b,d){case 0:case 1:throw Error(n(345));case 2:pc(o,or,Xa);break;case 3:if(sl(o,b),(b&130023424)===b&&(d=yy+500-_n(),10<d)){if(an(o,0)!==0)break;if(C=o.suspendedLanes,(C&b)!==b){Ws(),o.pingedLanes|=o.suspendedLanes&C;break}o.timeoutHandle=Qn(pc.bind(null,o,or,Xa),d);break}pc(o,or,Xa);break;case 4:if(sl(o,b),(b&4194240)===b)break;for(d=o.eventTimes,C=-1;0<b;){var F=31-xt(b);T=1<<F,F=d[F],F>C&&(C=F),b&=~T}if(b=C,b=_n()-b,b=(120>b?120:480>b?480:1080>b?1080:1920>b?1920:3e3>b?3e3:4320>b?4320:1960*_I(b/1960))-b,10<b){o.timeoutHandle=Qn(pc.bind(null,o,or,Xa),b);break}pc(o,or,Xa);break;case 5:pc(o,or,Xa);break;default:throw Error(n(329))}}}return lr(o,_n()),o.callbackNode===p?M2.bind(null,o):null}function _y(o,d){var p=af;return o.current.memoizedState.isDehydrated&&(mc(o,d).flags|=256),o=rg(o,d),o!==2&&(d=or,or=p,d!==null&&Ny(d)),o}function Ny(o){or===null?or=o:or.push.apply(or,o)}function NI(o){for(var d=o;;){if(d.flags&16384){var p=d.updateQueue;if(p!==null&&(p=p.stores,p!==null))for(var b=0;b<p.length;b++){var C=p[b],T=C.getSnapshot;C=C.value;try{if(!Nr(T(),C))return!1}catch{return!1}}}if(p=d.child,d.subtreeFlags&16384&&p!==null)p.return=d,d=p;else{if(d===o)break;for(;d.sibling===null;){if(d.return===null||d.return===o)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function sl(o,d){for(d&=~vy,d&=~Xp,o.suspendedLanes|=d,o.pingedLanes&=~d,o=o.expirationTimes;0<d;){var p=31-xt(d),b=1<<p;o[p]=-1,d&=~b}}function R2(o){if((Bt&6)!==0)throw Error(n(327));Qd();var d=an(o,0);if((d&1)===0)return lr(o,_n()),null;var p=rg(o,d);if(o.tag!==0&&p===2){var b=js(o);b!==0&&(d=b,p=_y(o,b))}if(p===1)throw p=rf,mc(o,0),sl(o,d),lr(o,_n()),p;if(p===6)throw Error(n(345));return o.finishedWork=o.current.alternate,o.finishedLanes=d,pc(o,or,Xa),lr(o,_n()),null}function jy(o,d){var p=Bt;Bt|=1;try{return o(d)}finally{Bt=p,Bt===0&&(Zd=_n()+500,Ap&&Zo())}}function fc(o){tl!==null&&tl.tag===0&&(Bt&6)===0&&Qd();var d=Bt;Bt|=1;var p=Gr.transition,b=Ot;try{if(Gr.transition=null,Ot=1,o)return o()}finally{Ot=b,Gr.transition=p,Bt=d,(Bt&6)===0&&Zo()}}function Sy(){Cr=Kd.current,un(Kd)}function mc(o,d){o.finishedWork=null,o.finishedLanes=0;var p=o.timeoutHandle;if(p!==-1&&(o.timeoutHandle=-1,Hn(p)),qn!==null)for(p=qn.return;p!==null;){var b=p;switch(Ov(b),b.tag){case 1:b=b.type.childContextTypes,b!=null&&Tp();break;case 3:qd(),un(rr),un(Cs),Gv();break;case 5:Hv(b);break;case 4:qd();break;case 13:un(jn);break;case 19:un(jn);break;case 10:zv(b.type._context);break;case 22:case 23:Sy()}p=p.return}if(is=o,qn=o=rl(o.current,null),xs=Cr=d,Jn=0,rf=null,vy=Xp=hc=0,or=af=null,cc!==null){for(d=0;d<cc.length;d++)if(p=cc[d],b=p.interleaved,b!==null){p.interleaved=null;var C=b.next,T=p.pending;if(T!==null){var F=T.next;T.next=C,b.next=F}p.pending=b}cc=null}return o}function O2(o,d){do{var p=qn;try{if(Bv(),$p.current=Hp,Up){for(var b=Sn.memoizedState;b!==null;){var C=b.queue;C!==null&&(C.pending=null),b=b.next}Up=!1}if(uc=0,rs=Xn=Sn=null,Xh=!1,Jh=0,xy.current=null,p===null||p.return===null){Jn=1,rf=d,qn=null;break}e:{var T=o,F=p.return,G=p,ee=d;if(d=xs,G.flags|=32768,ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var ve=ee,Pe=G,Ee=Pe.tag;if((Pe.mode&1)===0&&(Ee===0||Ee===11||Ee===15)){var ke=Pe.alternate;ke?(Pe.updateQueue=ke.updateQueue,Pe.memoizedState=ke.memoizedState,Pe.lanes=ke.lanes):(Pe.updateQueue=null,Pe.memoizedState=null)}var Be=i2(F);if(Be!==null){Be.flags&=-257,a2(Be,F,G,T,d),Be.mode&1&&r2(T,ve,d),d=Be,ee=ve;var He=d.updateQueue;if(He===null){var Ye=new Set;Ye.add(ee),d.updateQueue=Ye}else He.add(ee);break e}else{if((d&1)===0){r2(T,ve,d),ky();break e}ee=Error(n(426))}}else if(vn&&G.mode&1){var Ln=i2(F);if(Ln!==null){(Ln.flags&65536)===0&&(Ln.flags|=256),a2(Ln,F,G,T,d),Lv(Gd(ee,G));break e}}T=ee=Gd(ee,G),Jn!==4&&(Jn=2),af===null?af=[T]:af.push(T),T=F;do{switch(T.tag){case 3:T.flags|=65536,d&=-d,T.lanes|=d;var ue=n2(T,ee,d);Tj(T,ue);break e;case 1:G=ee;var se=T.type,pe=T.stateNode;if((T.flags&128)===0&&(typeof se.getDerivedStateFromError=="function"||pe!==null&&typeof pe.componentDidCatch=="function"&&(el===null||!el.has(pe)))){T.flags|=65536,d&=-d,T.lanes|=d;var Me=s2(T,G,d);Tj(T,Me);break e}}T=T.return}while(T!==null)}L2(p)}catch(Qe){d=Qe,qn===p&&p!==null&&(qn=p=p.return);continue}break}while(!0)}function D2(){var o=Qp.current;return Qp.current=Hp,o===null?Hp:o}function ky(){(Jn===0||Jn===3||Jn===2)&&(Jn=4),is===null||(hc&268435455)===0&&(Xp&268435455)===0||sl(is,xs)}function rg(o,d){var p=Bt;Bt|=2;var b=D2();(is!==o||xs!==d)&&(Xa=null,mc(o,d));do try{jI();break}catch(C){O2(o,C)}while(!0);if(Bv(),Bt=p,Qp.current=b,qn!==null)throw Error(n(261));return is=null,xs=0,Jn}function jI(){for(;qn!==null;)I2(qn)}function SI(){for(;qn!==null&&!fv();)I2(qn)}function I2(o){var d=z2(o.alternate,o,Cr);o.memoizedProps=o.pendingProps,d===null?L2(o):qn=d,xy.current=null}function L2(o){var d=o;do{var p=d.alternate;if(o=d.return,(d.flags&32768)===0){if(p=xI(p,d,Cr),p!==null){qn=p;return}}else{if(p=vI(p,d),p!==null){p.flags&=32767,qn=p;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{Jn=6,qn=null;return}}if(d=d.sibling,d!==null){qn=d;return}qn=d=o}while(d!==null);Jn===0&&(Jn=5)}function pc(o,d,p){var b=Ot,C=Gr.transition;try{Gr.transition=null,Ot=1,kI(o,d,p,b)}finally{Gr.transition=C,Ot=b}return null}function kI(o,d,p,b){do Qd();while(tl!==null);if((Bt&6)!==0)throw Error(n(327));p=o.finishedWork;var C=o.finishedLanes;if(p===null)return null;if(o.finishedWork=null,o.finishedLanes=0,p===o.current)throw Error(n(177));o.callbackNode=null,o.callbackPriority=0;var T=p.lanes|p.childLanes;
vendor: 5,985 bytes, line 40
40if(An(o,T),o===is&&(qn=is=null,xs=0),(p.subtreeFlags&2064)===0&&(p.flags&2064)===0||eg||(eg=!0,$2(md,function(){return Qd(),null})),T=(p.flags&15990)!==0,(p.subtreeFlags&15990)!==0||T){T=Gr.transition,Gr.transition=null;var F=Ot;Ot=1;var G=Bt;Bt|=4,xy.current=null,bI(o,p),C2(p,o),zr(rt),Xl=!!Ie,rt=Ie=null,o.current=p,wI(p),fd(),Bt=G,Ot=F,Gr.transition=T}else o.current=p;if(eg&&(eg=!1,tl=o,tg=C),T=o.pendingLanes,T===0&&(el=null),Gl(p.stateNode),lr(o,_n()),d!==null)for(b=o.onRecoverableError,p=0;p<d.length;p++)C=d[p],b(C.value,{componentStack:C.stack,digest:C.digest});if(Jp)throw Jp=!1,o=by,by=null,o;return(tg&1)!==0&&o.tag!==0&&Qd(),T=o.pendingLanes,(T&1)!==0?o===wy?of++:(of=0,wy=o):of=0,Zo(),null}function Qd(){if(tl!==null){var o=Ao(tg),d=Gr.transition,p=Ot;try{if(Gr.transition=null,Ot=16>o?16:o,tl===null)var b=!1;else{if(o=tl,tl=null,tg=0,(Bt&6)!==0)throw Error(n(331));var C=Bt;for(Bt|=4,Ue=o.current;Ue!==null;){var T=Ue,F=T.child;if((Ue.flags&16)!==0){var G=T.deletions;if(G!==null){for(var ee=0;ee<G.length;ee++){var ve=G[ee];for(Ue=ve;Ue!==null;){var Pe=Ue;switch(Pe.tag){case 0:case 11:case 15:sf(8,Pe,T)}var Ee=Pe.child;if(Ee!==null)Ee.return=Pe,Ue=Ee;else for(;Ue!==null;){Pe=Ue;var ke=Pe.sibling,Be=Pe.return;if(_2(Pe),Pe===ve){Ue=null;break}if(ke!==null){ke.return=Be,Ue=ke;break}Ue=Be}}}var He=T.alternate;if(He!==null){var Ye=He.child;if(Ye!==null){He.child=null;do{var Ln=Ye.sibling;Ye.sibling=null,Ye=Ln}while(Ye!==null)}}Ue=T}}if((T.subtreeFlags&2064)!==0&&F!==null)F.return=T,Ue=F;else e:for(;Ue!==null;){if(T=Ue,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:sf(9,T,T.return)}var ue=T.sibling;if(ue!==null){ue.return=T.return,Ue=ue;break e}Ue=T.return}}var se=o.current;for(Ue=se;Ue!==null;){F=Ue;var pe=F.child;if((F.subtreeFlags&2064)!==0&&pe!==null)pe.return=F,Ue=pe;else e:for(F=se;Ue!==null;){if(G=Ue,(G.flags&2048)!==0)try{switch(G.tag){case 0:case 11:case 15:Zp(9,G)}}catch(Qe){Mn(G,G.return,Qe)}if(G===F){Ue=null;break e}var Me=G.sibling;if(Me!==null){Me.return=G.return,Ue=Me;break e}Ue=G.return}}if(Bt=C,Zo(),xr&&typeof xr.onPostCommitFiberRoot=="function")try{xr.onPostCommitFiberRoot(ql,o)}catch{}b=!0}return b}finally{Ot=p,Gr.transition=d}}return!1}function F2(o,d,p){d=Gd(p,d),d=n2(o,d,1),o=Xo(o,d,1),d=Ws(),o!==null&&(vr(o,1,d),lr(o,d))}function Mn(o,d,p){if(o.tag===3)F2(o,o,p);else for(;d!==null;){if(d.tag===3){F2(d,o,p);break}else if(d.tag===1){var b=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&(el===null||!el.has(b))){o=Gd(p,o),o=s2(d,o,1),d=Xo(d,o,1),o=Ws(),d!==null&&(vr(d,1,o),lr(d,o));break}}d=d.return}}function CI(o,d,p){var b=o.pingCache;b!==null&&b.delete(d),d=Ws(),o.pingedLanes|=o.suspendedLanes&p,is===o&&(xs&p)===p&&(Jn===4||Jn===3&&(xs&130023424)===xs&&500>_n()-yy?mc(o,0):vy|=p),lr(o,d)}function B2(o,d){d===0&&((o.mode&1)===0?d=1:(d=To,To<<=1,(To&130023424)===0&&(To=4194304)));var p=Ws();o=Ka(o,d),o!==null&&(vr(o,d,p),lr(o,p))}function PI(o){var d=o.memoizedState,p=0;d!==null&&(p=d.retryLane),B2(o,p)}function TI(o,d){var p=0;switch(o.tag){case 13:var b=o.stateNode,C=o.memoizedState;C!==null&&(p=C.retryLane);break;case 19:b=o.stateNode;break;default:throw Error(n(314))}b!==null&&b.delete(d),B2(o,p)}var z2;z2=function(o,d,p){if(o!==null)if(o.memoizedProps!==d.pendingProps||rr.current)ar=!0;else{if((o.lanes&p)===0&&(d.flags&128)===0)return ar=!1,gI(o,d,p);ar=(o.flags&131072)!==0}else ar=!1,vn&&(d.flags&1048576)!==0&&yj(d,Rp,d.index);switch(d.lanes=0,d.tag){case 2:var b=d.type;Yp(o,d),o=d.pendingProps;var C=Bd(d,Cs.current);Hd(d,p),C=Zv(null,d,b,o,C,p);var T=Qv();return d.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(d.tag=1,d.memoizedState=null,d.updateQueue=null,ir(b)?(T=!0,Ep(d)):T=!1,d.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,Vv(d),C.updater=qp,d.stateNode=C,C._reactInternals=d,sy(d,b,o,p),d=oy(null,d,b,!0,T,p)):(d.tag=0,vn&&T&&Rv(d),Vs(null,d,C,p),d=d.child),d;case 16:b=d.elementType;e:{switch(Yp(o,d),o=d.pendingProps,C=b._init,b=C(b._payload),d.type=b,C=d.tag=AI(b),o=Ni(b,o),C){case 0:d=ay(null,d,b,o,p);break e;case 1:d=h2(null,d,b,o,p);break e;case 11:d=o2(null,d,b,o,p);break e;case 14:d=l2(null,d,b,Ni(b.type,o),p);break e}throw Error(n(306,b,""))}return d;case 0:return b=d.type,C=d.pendingProps,C=d.elementType===b?C:Ni(b,C),ay(o,d,b,C,p);case 1:return b=d.type,C=d.pendingProps,C=d.elementType===b?C:Ni(b,C),h2(o,d,b,C,p);case 3:e:{if(f2(d),o===null)throw Error(n(387));b=d.pendingProps,T=d.memoizedState,C=T.element,Pj(o,d),Bp(d,b,null,p);var F=d.memoizedState;if(b=F.element,T.isDehydrated)if(T={element:b,isDehydrated:!1,cache:F.cache,pendingSuspenseBoundaries:F.pendingSuspenseBoundaries,transitions:F.transitions},d.updateQueue.baseState=T,d.memoizedState=T,d.flags&256){C=Gd(Error(n(423)),d),d=m2(o,d,b,p,C);break e}else if(b!==C){C=Gd(Error(n(424)),d),d=m2(o,d,b,p,C);break e}else for(kr=sa(d.stateNode.containerInfo.firstChild),Sr=d,vn=!0,_i=null,p=kj(d,null,b,p),d.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(Ud(),b===C){d=Qa(o,d,p);break e}Vs(o,d,b,p)}d=d.child}return d;case 5:return Aj(d),o===null&&Iv(d),b=d.type,C=d.pendingProps,T=o!==null?o.memoizedProps:null,F=C.children,yt(b,C)?F=null:T!==null&&yt(b,T)&&(d.flags|=32),u2(o,d),Vs(o,d,F,p),d.child;case 6:return o===null&&Iv(d),null;case 13:return p2(o,d,p);case 4:return Wv(d,d.stateNode.containerInfo),b=d.pendingProps,o===null?d.child=Vd(d,null,b,p):Vs(o,d,b,p),d.child;case 11:return b=d.type,C=d.pendingProps,C=d.elementType===b?C:Ni(b,C),o2(o,d,b,C,p);case 7:return Vs(o,d,d.pendingProps,p),d.child;case 8:return Vs(o,d,d.pendingProps.children,p),d.child;case 12:return Vs(o,d,d.pendingProps.children,p),d.child;case 10:e:{if(b=d.type._context,C=d.pendingProps,T=d.memoizedProps,F=C.value,on(Ip,b._currentValue),b._currentValue=F,T!==null)if(Nr(T.value,F)){if(T.children===C.children&&!rr.current){d=Qa(o,d,p);break e}}else for(T=d.child,T!==null&&(T.return=d);T!==null;
vendor: 1,711 bytes, line 40
40){var G=T.dependencies;if(G!==null){F=T.child;for(var ee=G.firstContext;ee!==null;){if(ee.context===b){if(T.tag===1){ee=Za(-1,p&-p),ee.tag=2;var ve=T.updateQueue;if(ve!==null){ve=ve.shared;var Pe=ve.pending;Pe===null?ee.next=ee:(ee.next=Pe.next,Pe.next=ee),ve.pending=ee}}T.lanes|=p,ee=T.alternate,ee!==null&&(ee.lanes|=p),$v(T.return,p,d),G.lanes|=p;break}ee=ee.next}}else if(T.tag===10)F=T.type===d.type?null:T.child;else if(T.tag===18){if(F=T.return,F===null)throw Error(n(341));F.lanes|=p,G=F.alternate,G!==null&&(G.lanes|=p),$v(F,p,d),F=T.sibling}else F=T.child;if(F!==null)F.return=T;else for(F=T;F!==null;){if(F===d){F=null;break}if(T=F.sibling,T!==null){T.return=F.return,F=T;break}F=F.return}T=F}Vs(o,d,C.children,p),d=d.child}return d;case 9:return C=d.type,b=d.pendingProps.children,Hd(d,p),C=Hr(C),b=b(C),d.flags|=1,Vs(o,d,b,p),d.child;case 14:return b=d.type,C=Ni(b,d.pendingProps),C=Ni(b.type,C),l2(o,d,b,C,p);case 15:return c2(o,d,d.type,d.pendingProps,p);case 17:return b=d.type,C=d.pendingProps,C=d.elementType===b?C:Ni(b,C),Yp(o,d),d.tag=1,ir(b)?(o=!0,Ep(d)):o=!1,Hd(d,p),e2(d,b,C),sy(d,b,C,p),oy(null,d,b,!0,o,p);case 19:return x2(o,d,p);case 22:return d2(o,d,p)}throw Error(n(156,d.tag))};function $2(o,d){return rp(o,d)}function EI(o,d,p,b){this.tag=o,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=b,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(o,d,p,b){return new EI(o,d,p,b)}function Cy(o){return o=o.prototype,!(!o||!o.isReactComponent)}
vendor: 5,604 bytes, line 40
40function AI(o){if(typeof o=="function")return Cy(o)?1:0;if(o!=null){if(o=o.$$typeof,o===ce)return 11;if(o===ge)return 14}return 2}function rl(o,d){var p=o.alternate;return p===null?(p=Yr(o.tag,d,o.key,o.mode),p.elementType=o.elementType,p.type=o.type,p.stateNode=o.stateNode,p.alternate=o,o.alternate=p):(p.pendingProps=d,p.type=o.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=o.flags&14680064,p.childLanes=o.childLanes,p.lanes=o.lanes,p.child=o.child,p.memoizedProps=o.memoizedProps,p.memoizedState=o.memoizedState,p.updateQueue=o.updateQueue,d=o.dependencies,p.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},p.sibling=o.sibling,p.index=o.index,p.ref=o.ref,p}function ig(o,d,p,b,C,T){var F=2;if(b=o,typeof o=="function")Cy(o)&&(F=1);else if(typeof o=="string")F=5;else e:switch(o){case z:return gc(p.children,C,T,d);case V:F=8,C|=8;break;case te:return o=Yr(12,p,d,C|2),o.elementType=te,o.lanes=T,o;case K:return o=Yr(13,p,d,C),o.elementType=K,o.lanes=T,o;case q:return o=Yr(19,p,d,C),o.elementType=q,o.lanes=T,o;case be:return ag(p,C,T,d);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case H:F=10;break e;case Y:F=9;break e;case ce:F=11;break e;case ge:F=14;break e;case he:F=16,b=null;break e}throw Error(n(130,o==null?o:typeof o,""))}return d=Yr(F,p,d,C),d.elementType=o,d.type=b,d.lanes=T,d}function gc(o,d,p,b){return o=Yr(7,o,b,d),o.lanes=p,o}function ag(o,d,p,b){return o=Yr(22,o,b,d),o.elementType=be,o.lanes=p,o.stateNode={isHidden:!1},o}function Py(o,d,p){return o=Yr(6,o,null,d),o.lanes=p,o}function Ty(o,d,p){return d=Yr(4,o.children!==null?o.children:[],o.key,d),d.lanes=p,d.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},d}function MI(o,d,p,b,C){this.tag=d,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Eo(0),this.expirationTimes=Eo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Eo(0),this.identifierPrefix=b,this.onRecoverableError=C,this.mutableSourceEagerHydrationData=null}function Ey(o,d,p,b,C,T,F,G,ee){return o=new MI(o,d,p,G,ee),d===1?(d=1,T===!0&&(d|=8)):d=0,T=Yr(3,null,null,d),o.current=T,T.stateNode=o,T.memoizedState={element:b,isDehydrated:p,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vv(T),o}function RI(o,d,p){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:I,key:b==null?null:""+b,children:o,containerInfo:d,implementation:p}}function U2(o){if(!o)return Ko;o=o._reactInternals;e:{if(Ki(o)!==o||o.tag!==1)throw Error(n(170));var d=o;do{switch(d.tag){case 3:d=d.stateNode.context;break e;case 1:if(ir(d.type)){d=d.stateNode.__reactInternalMemoizedMergedChildContext;break e}}d=d.return}while(d!==null);throw Error(n(171))}if(o.tag===1){var p=o.type;if(ir(p))return gj(o,p,d)}return d}function V2(o,d,p,b,C,T,F,G,ee){return o=Ey(p,b,!0,o,C,T,F,G,ee),o.context=U2(null),p=o.current,b=Ws(),C=nl(p),T=Za(b,C),T.callback=d??null,Xo(p,T,C),o.current.lanes=C,vr(o,C,b),lr(o,b),o}function og(o,d,p,b){var C=d.current,T=Ws(),F=nl(C);return p=U2(p),d.context===null?d.context=p:d.pendingContext=p,d=Za(T,F),d.payload={element:o},b=b===void 0?null:b,b!==null&&(d.callback=b),o=Xo(C,d,F),o!==null&&(ki(o,C,F,T),Fp(o,C,F)),F}function lg(o){if(o=o.current,!o.child)return null;switch(o.child.tag){case 5:return o.child.stateNode;default:return o.child.stateNode}}function W2(o,d){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var p=o.retryLane;o.retryLane=p!==0&&p<d?p:d}}function Ay(o,d){W2(o,d),(o=o.alternate)&&W2(o,d)}function OI(){return null}var H2=typeof reportError=="function"?reportError:function(o){console.error(o)};function My(o){this._internalRoot=o}cg.prototype.render=My.prototype.render=function(o){var d=this._internalRoot;if(d===null)throw Error(n(409));og(o,d,null,null)},cg.prototype.unmount=My.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var d=o.containerInfo;fc(function(){og(null,o,null,null)}),d[Gt]=null}};function cg(o){this._internalRoot=o}cg.prototype.unstable_scheduleHydration=function(o){if(o){var d=yd();o={blockedOn:null,target:o,priority:d};for(var p=0;p<Zn.length&&d!==0&&d<Zn[p].priority;p++);Zn.splice(p,0,o),p===0&&bd(o)}};function Ry(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function dg(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function q2(){}function DI(o,d,p,b,C){if(C){if(typeof b=="function"){var T=b;b=function(){var ve=lg(F);T.call(ve)}}var F=V2(d,b,o,0,null,!1,!1,"",q2);return o._reactRootContainer=F,o[Gt]=F.current,Wo(o.nodeType===8?o.parentNode:o),fc(),F}for(;C=o.lastChild;)o.removeChild(C);if(typeof b=="function"){var G=b;b=function(){var ve=lg(ee);G.call(ve)}}var ee=Ey(o,0,!1,null,null,!1,!1,"",q2);return o._reactRootContainer=ee,o[Gt]=ee.current,Wo(o.nodeType===8?o.parentNode:o),fc(function(){og(d,ee,p,b)}),ee}function ug(o,d,p,b,C){var T=p._reactRootContainer;if(T){var F=T;if(typeof C=="function"){var G=C;C=function(){var ee=lg(F);G.call(ee)}}og(d,F,o,C)}else F=DI(p,d,o,C,b);return lg(F)}xd=function(o){switch(o.tag){case 3:var d=o.stateNode;if(d.current.memoizedState.isDehydrated){var p=ft(d.pendingLanes);p!==0&&(xi(d,p|1),lr(d,_n()),(Bt&6)===0&&(Zd=_n()+500,Zo()))}break;case 13:fc(function(){var b=Ka(o,1);if(b!==null){var C=Ws();
vendor: 4,726 bytes, line 40
40ki(b,o,1,C)}}),Ay(o,1)}},Oa=function(o){if(o.tag===13){var d=Ka(o,134217728);if(d!==null){var p=Ws();ki(d,o,134217728,p)}Ay(o,134217728)}},vd=function(o){if(o.tag===13){var d=nl(o),p=Ka(o,d);if(p!==null){var b=Ws();ki(p,o,d,b)}Ay(o,d)}},yd=function(){return Ot},Yl=function(o,d){var p=Ot;try{return Ot=o,d()}finally{Ot=p}},Je=function(o,d,p){switch(d){case"input":if(Zt(o,p),d=p.name,p.type==="radio"&&d!=null){for(p=o;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll("input[name="+JSON.stringify(""+d)+'][type="radio"]'),d=0;d<p.length;d++){var b=p[d];if(b!==o&&b.form===o.form){var C=Ld(b);if(!C)throw Error(n(90));Te(b),Zt(b,C)}}}break;case"textarea":Se(o,p);break;case"select":d=p.value,d!=null&&Tn(o,!!p.multiple,d,!1)}},ko=jy,pi=fc;var II={usingClientEntryPoint:!1,Events:[Wa,Ha,Ld,tr,xh,jy]},lf={findFiberByHostInstance:Va,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},LI={bundleType:lf.bundleType,version:lf.version,rendererPackageName:lf.rendererPackageName,rendererConfig:lf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=np(o),o===null?null:o.stateNode},findFiberByHostInstance:lf.findFiberByHostInstance||OI,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hg.isDisabled&&hg.supportsFiber)try{ql=hg.inject(LI),xr=hg}catch{}}return cr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=II,cr.createPortal=function(o,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ry(d))throw Error(n(200));return RI(o,d,null,p)},cr.createRoot=function(o,d){if(!Ry(o))throw Error(n(299));var p=!1,b="",C=H2;return d!=null&&(d.unstable_strictMode===!0&&(p=!0),d.identifierPrefix!==void 0&&(b=d.identifierPrefix),d.onRecoverableError!==void 0&&(C=d.onRecoverableError)),d=Ey(o,1,!1,null,null,p,!1,b,C),o[Gt]=d.current,Wo(o.nodeType===8?o.parentNode:o),new My(d)},cr.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var d=o._reactInternals;if(d===void 0)throw typeof o.render=="function"?Error(n(188)):(o=Object.keys(o).join(","),Error(n(268,o)));return o=np(d),o=o===null?null:o.stateNode,o},cr.flushSync=function(o){return fc(o)},cr.hydrate=function(o,d,p){if(!dg(d))throw Error(n(200));return ug(null,o,d,!0,p)},cr.hydrateRoot=function(o,d,p){if(!Ry(o))throw Error(n(405));var b=p!=null&&p.hydratedSources||null,C=!1,T="",F=H2;if(p!=null&&(p.unstable_strictMode===!0&&(C=!0),p.identifierPrefix!==void 0&&(T=p.identifierPrefix),p.onRecoverableError!==void 0&&(F=p.onRecoverableError)),d=V2(d,null,o,1,p??null,C,!1,T,F),o[Gt]=d.current,Wo(o),b)for(o=0;o<b.length;o++)p=b[o],C=p._getVersion,C=C(p._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[p,C]:d.mutableSourceEagerHydrationData.push(p,C);return new cg(d)},cr.render=function(o,d,p){if(!dg(d))throw Error(n(200));return ug(null,o,d,!1,p)},cr.unmountComponentAtNode=function(o){if(!dg(o))throw Error(n(40));return o._reactRootContainer?(fc(function(){ug(null,null,o,!1,function(){o._reactRootContainer=null,o[Gt]=null})}),!0):!1},cr.unstable_batchedUpdates=jy,cr.unstable_renderSubtreeIntoContainer=function(o,d,p,b){if(!dg(p))throw Error(n(200));if(o==null||o._reactInternals===void 0)throw Error(n(38));return ug(o,d,p,!1,b)},cr.version="18.3.1-next-f1338f8080-20240426",cr}var tS;function JT(){if(tS)return Ly.exports;tS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ly.exports=HI(),Ly.exports}var nS;function qI(){if(nS)return mg;nS=1;var e=JT();return mg.createRoot=e.createRoot,mg.hydrateRoot=e.hydrateRoot,mg}var GI=qI();const YI=Ll(GI),KI=20,ZI=1e6,co={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let zy=0;function QI(){return zy=(zy+1)%Number.MAX_VALUE,zy.toString()}const $y=new Map,sS=e=>{if($y.has(e))return;const t=setTimeout(()=>{$y.delete(e),Ff({type:co.REMOVE_TOAST,toastId:e})},ZI);$y.set(e,t)},XI=(e,t)=>{switch(t.type){case co.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,KI)};case co.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case co.DISMISS_TOAST:{const{toastId:n}=t;
40return n?sS(n):e.toasts.forEach(s=>{sS(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case co.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},zg=[];let $g={toasts:[]};function Ff(e){$g=XI($g,e),zg.forEach(t=>{t($g)})}function JI({...e}){const t=QI(),n=i=>Ff({type:co.UPDATE_TOAST,toast:{...i,id:t}}),s=()=>Ff({type:co.DISMISS_TOAST,toastId:t});return Ff({type:co.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||s()}}}),{id:t,dismiss:s,update:n}}function z1(){const[e,t]=w.useState($g);return w.useEffect(()=>(zg.push(t),()=>{const n=zg.indexOf(t);n>-1&&zg.splice(n,1)}),[e]),{...e,toast:JI,dismiss:n=>Ff({type:co.DISMISS_TOAST,toastId:n})}}function e5(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=e5(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function t5(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=e5(e))&&(s&&(s+=" "),s+=t);return s}const rS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,iS=t5,ex=(e,t)=>n=>{var s;if((t==null?void 0:t.variants)==null)return iS(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,l=Object.keys(i).map(m=>{const g=n==null?void 0:n[m],x=a==null?void 0:a[m];if(g===null)return null;const v=rS(g)||rS(x);return i[m][v]}),u=n&&Object.entries(n).reduce((m,g)=>{let[x,v]=g;return v===void 0||(m[x]=v),m},{}),h=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((m,g)=>{let{class:x,className:v,..._}=g;return Object.entries(_).every(N=>{let[S,j]=N;return Array.isArray(j)?j.includes({...a,...u}[S]):{...a,...u}[S]===j})?[...m,x,v]:m},[]);return iS(e,l,h,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.475.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const eL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n5=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.475.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var tL={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 51 * @license lucide-react v0.475.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const nL=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:a,iconNode:l,...u},h)=>w.createElement("svg",{ref:h,...tL,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:n5("lucide",i),...u},[...l.map(([m,g])=>w.createElement(m,g)),...Array.isArray(a)?a:[a]]));/** 56 * @license lucide-react v0.475.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const _e=(e,t)=>{const n=w.forwardRef(({className:s,...i},a)=>w.createElement(nL,{ref:a,iconNode:t,className:n5(`lucide-${eL(e)}`,s),...i}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.475.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const sL=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],rL=_e("Activity",sL);/** 66 * @license lucide-react v0.475.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const iL=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],gr=_e("ArrowLeft",iL);/** 71 * @license lucide-react v0.475.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const aL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],wa=_e("ArrowRight",aL);/** 76 * @license lucide-react v0.475.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const oL=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],lL=_e("ArrowUpRight",oL);/** 81 * @license lucide-react v0.475.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const cL=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],d0=_e("Award",cL);/** 86 * @license lucide-react v0.475.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const dL=[["path",{d:"M4 10a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z",key:"1ol0lm"}],["path",{d:"M8 10h8",key:"c7uz4u"}],["path",{d:"M8 18h8",key:"1no2b1"}],["path",{d:"M8 22v-6a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v6",key:"1fr6do"}],["path",{d:"M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2",key:"donm21"}
90]],ri=_e("Backpack",dL);/** 91 * @license lucide-react v0.475.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const uL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],Ug=_e("Ban",uL);/** 96 * @license lucide-react v0.475.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const hL=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Du=_e("Bell",hL);/** 101 * @license lucide-react v0.475.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const fL=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],mL=_e("Bookmark",fL);/** 106 * @license lucide-react v0.475.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const pL=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],pa=_e("Calendar",pL);/** 111 * @license lucide-react v0.475.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const gL=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Kf=_e("Camera",gL);/** 116 * @license lucide-react v0.475.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const xL=[["path",{d:"m21 8-2 2-1.5-3.7A2 2 0 0 0 15.646 5H8.4a2 2 0 0 0-1.903 1.257L5 10 3 8",key:"1imjwt"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 14h.01",key:"7oqj8z"}],["rect",{width:"18",height:"8",x:"3",y:"10",rx:"2",key:"a7itu8"}],["path",{d:"M5 18v2",key:"ppbyun"}],["path",{d:"M19 18v2",key:"gy7782"}]],vL=_e("CarFront",xL);/** 121 * @license lucide-react v0.475.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const yL=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],bL=_e("ChartColumn",yL);/** 126 * @license lucide-react v0.475.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const wL=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],aS=_e("CheckCheck",wL);/** 131 * @license lucide-react v0.475.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const _L=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Cm=_e("Check",_L);/** 136 * @license lucide-react v0.475.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const NL=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Yu=_e("ChevronDown",NL);/** 141 * @license lucide-react v0.475.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const jL=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],oS=_e("ChevronLeft",jL);/** 146 * @license lucide-react v0.475.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const SL=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],uo=_e("ChevronRight",SL);/** 151 * @license lucide-react v0.475.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const kL=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],$1=_e("ChevronUp",kL);/** 156 * @license lucide-react v0.475.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const CL=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],PL=_e("ChevronsLeft",CL);/** 161 * @license lucide-react v0.475.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const TL=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],EL=_e("ChevronsRight",TL);/** 166 * @license lucide-react v0.475.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const AL=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Uy=_e("CircleCheckBig",AL);/** 171 * @license lucide-react v0.475.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const ML=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ht=_e("CircleCheck",ML);/** 176 * @license lucide-react v0.475.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const RL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],OL=_e("CircleHelp",RL);/** 181 * @license lucide-react v0.475.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const DL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],lS=_e("CircleStop",DL);/** 186 * @license lucide-react v0.475.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const IL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],U1=_e("CircleX",IL);/** 191 * @license lucide-react v0.475.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const LL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],FL=_e("Circle",LL);/** 196 * @license lucide-react v0.475.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const BL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],zn=_e("Clock",BL);/** 201 * @license lucide-react v0.475.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const zL=[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M16 14v6",key:"1j4efv"}],["path",{d:"M8 14v6",key:"17c4r9"}],["path",{d:"M12 16v6",key:"c8a4gj"}]],$L=_e("CloudRain",zL);/** 206 * @license lucide-react v0.475.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const UL=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],VL=_e("Cloud",UL);/** 211 * @license lucide-react v0.475.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const WL=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],s5=_e("Code",WL);/** 216 * @license lucide-react v0.475.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const HL=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",ke
220y:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ws=_e("Compass",HL);/** 221 * @license lucide-react v0.475.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const qL=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],cS=_e("Copy",qL);/** 226 * @license lucide-react v0.475.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const GL=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Vy=_e("Download",GL);/** 231 * @license lucide-react v0.475.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const YL=[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]],KL=_e("Droplets",YL);/** 236 * @license lucide-react v0.475.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const ZL=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],r5=_e("EllipsisVertical",ZL);/** 241 * @license lucide-react v0.475.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const QL=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],XL=_e("Ellipsis",QL);/** 246 * @license lucide-react v0.475.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const JL=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Iu=_e("ExternalLink",JL);/** 251 * @license lucide-react v0.475.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const e6=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],t6=_e("EyeOff",e6);/** 256 * @license lucide-react v0.475.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const n6=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],V1=_e("Eye",n6);/** 261 * @license lucide-react v0.475.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const s6=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],r6=_e("FileText",s6);/** 266 * @license lucide-react v0.475.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const i6=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],a6=_e("Filter",i6);/** 271 * @license lucide-react v0.475.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const o6=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],l6=_e("Flag",o6);/** 276 * @license lucide-react v0.475.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const c6=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],Vg=_e("Flame",c6);/** 281 * @license lucide-react v0.475.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const d6=[["path",{d:"M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z",key:"1dudjm"}],["path",{d:"M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z",key:"l2t8xc"}],["path",{d:"M16 17h4",key:"1dejxt"}],["path",{d:"M4 13h4",key:"1bwh8b"}]],u6=_e("Footprints",d6);/** 286 * @license lucide-react v0.475.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const h6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Ku=_e("Globe",h6);/** 291 * @license lucide-react v0.475.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const f6=[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]],m6=_e("Grip",f6);/** 296 * @license lucide-react v0.475.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const p6=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],dS=_e("Heart",p6);/** 301 * @license lucide-react v0.475.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const g6=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],Ii=_e("House",g6);/** 306 * @license lucide-react v0.475.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const x6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Qs=_e("Image",x6);/** 311 * @license lucide-react v0.475.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const v6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],tx=_e("Info",v6);/** 316 * @license lucide-react v0.475.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const y6=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}
320]],b6=_e("Key",y6);/** 321 * @license lucide-react v0.475.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const w6=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],_6=_e("LayoutDashboard",w6);/** 326 * @license lucide-react v0.475.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const N6=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],W1=_e("LayoutGrid",N6);/** 331 * @license lucide-react v0.475.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const j6=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],S6=_e("List",j6);/** 336 * @license lucide-react v0.475.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const k6=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],gt=_e("LoaderCircle",k6);/** 341 * @license lucide-react v0.475.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const C6=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],i5=_e("Lock",C6);/** 346 * @license lucide-react v0.475.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const P6=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],H1=_e("LogOut",P6);/** 351 * @license lucide-react v0.475.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const T6=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],nx=_e("Mail",T6);/** 356 * @license lucide-react v0.475.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const E6=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Dn=_e("MapPin",E6);/** 361 * @license lucide-react v0.475.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const A6=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],Zs=_e("Map",A6);/** 366 * @license lucide-react v0.475.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const M6=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],a5=_e("Menu",M6);/** 371 * @license lucide-react v0.475.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const R6=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],sd=_e("MessageCircle",R6);/** 376 * @license lucide-react v0.475.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const O6=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],dw=_e("MessageSquare",O6);/** 381 * @license lucide-react v0.475.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const D6=[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]],I6=_e("Mic",D6);/** 386 * @license lucide-react v0.475.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const L6=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],sx=_e("Monitor",L6);/** 391 * @license lucide-react v0.475.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const F6=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],B6=_e("Moon",F6);/** 396 * @license lucide-react v0.475.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const z6=[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]],kc=_e("Mountain",z6);/** 401 * @license lucide-react v0.475.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const $6=[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]],Cf=_e("Navigation",$6);/** 406 * @license lucide-react v0.475.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const U6=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],ou=_e("Package",U6);/** 411 * @license lucide-react v0.475.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const V6=[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],o5=_e("Palette",V6);/** 416 * @license lucide-react v0.475.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const W6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],H6=_e("PanelsTopLeft",W6);/** 421 * @license lucide-react v0.475.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const q6=[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.48
4256",key:"1pkts6"}]],G6=_e("Paperclip",q6);/** 426 * @license lucide-react v0.475.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const Y6=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],K6=_e("Pause",Y6);/** 431 * @license lucide-react v0.475.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const Z6=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],uS=_e("PenLine",Z6);/** 436 * @license lucide-react v0.475.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const Q6=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Pm=_e("Pen",Q6);/** 441 * @license lucide-react v0.475.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const X6=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],lu=_e("Pencil",X6);/** 446 * @license lucide-react v0.475.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const J6=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],rx=_e("Phone",J6);/** 451 * @license lucide-react v0.475.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const eF=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],tF=_e("Play",eF);/** 456 * @license lucide-react v0.475.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const nF=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Cn=_e("Plus",nF);/** 461 * @license lucide-react v0.475.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const sF=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],l5=_e("Quote",sF);/** 466 * @license lucide-react v0.475.0 - ISC 467 * 468 * This source code is licensed under the ISC license. 469 * See the LICENSE file in the root directory of this source tree. 470 */const rF=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],iF=_e("RefreshCw",rF);/** 471 * @license lucide-react v0.475.0 - ISC 472 * 473 * This source code is licensed under the ISC license. 474 * See the LICENSE file in the root directory of this source tree. 475 */const aF=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],uw=_e("RotateCcw",aF);/** 476 * @license lucide-react v0.475.0 - ISC 477 * 478 * This source code is licensed under the ISC license. 479 * See the LICENSE file in the root directory of this source tree. 480 */const oF=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],c5=_e("Save",oF);/** 481 * @license lucide-react v0.475.0 - ISC 482 * 483 * This source code is licensed under the ISC license. 484 * See the LICENSE file in the root directory of this source tree. 485 */const lF=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],ai=_e("Search",lF);/** 486 * @license lucide-react v0.475.0 - ISC 487 * 488 * This source code is licensed under the ISC license. 489 * See the LICENSE file in the root directory of this source tree. 490 */const cF=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Zf=_e("Send",cF);/** 491 * @license lucide-react v0.475.0 - ISC 492 * 493 * This source code is licensed under the ISC license. 494 * See the LICENSE file in the root directory of this source tree. 495 */const dF=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],uF=_e("Settings",dF);/** 496 * @license lucide-react v0.475.0 - ISC 497 * 498 * This source code is licensed under the ISC license. 499 * See the LICENSE file in the root directory of this source tree. 500 */const hF=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],Zu=_e("Share2",hF);/** 501 * @license lucide-react v0.475.0 - ISC 502 * 503 * This source code is licensed under the ISC license. 504 * See the LICENSE file in the root directory of this source tree. 505 */const fF=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
505y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Al=_e("ShieldCheck",fF);/** 506 * @license lucide-react v0.475.0 - ISC 507 * 508 * This source code is licensed under the ISC license. 509 * See the LICENSE file in the root directory of this source tree. 510 */const mF=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Os=_e("Shield",mF);/** 511 * @license lucide-react v0.475.0 - ISC 512 * 513 * This source code is licensed under the ISC license. 514 * See the LICENSE file in the root directory of this source tree. 515 */const pF=[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]],gF=_e("Shirt",pF);/** 516 * @license lucide-react v0.475.0 - ISC 517 * 518 * This source code is licensed under the ISC license. 519 * See the LICENSE file in the root directory of this source tree. 520 */const xF=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],q1=_e("Smartphone",xF);/** 521 * @license lucide-react v0.475.0 - ISC 522 * 523 * This source code is licensed under the ISC license. 524 * See the LICENSE file in the root directory of this source tree. 525 */const vF=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],yF=_e("Snowflake",vF);/** 526 * @license lucide-react v0.475.0 - ISC 527 * 528 * This source code is licensed under the ISC license. 529 * See the LICENSE file in the root directory of this source tree. 530 */const bF=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],mo=_e("Sparkles",bF);/** 531 * @license lucide-react v0.475.0 - ISC 532 * 533 * This source code is licensed under the ISC license. 534 * See the LICENSE file in the root directory of this source tree. 535 */const wF=[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],u0=_e("SquareCheckBig",wF);/** 536 * @license lucide-react v0.475.0 - ISC 537 * 538 * This source code is licensed under the ISC license. 539 * See the LICENSE file in the root directory of this source tree. 540 */const _F=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Wy=_e("SquarePen",_F);/** 541 * @license lucide-react v0.475.0 - ISC 542 * 543 * This source code is licensed under the ISC license. 544 * See the LICENSE file in the root directory of this source tree. 545 */const NF=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],hw=_e("Square",NF);/** 546 * @license lucide-react v0.475.0 - ISC 547 * 548 * This source code is licensed under the ISC license. 549 * See the LICENSE file in the root directory of this source tree. 550 */const jF=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],SF=_e("Star",jF);/** 551 * @license lucide-react v0.475.0 - ISC 552 * 553 * This source code is licensed under the ISC license. 554 * See the LICENSE file in the root directory of this source tree. 555 */const kF=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],h0=_e("Sun",kF);/** 556 * @license lucide-react v0.475.0 - ISC 557 * 558 * This source code is licensed under the ISC license. 559 * See the LICENSE file in the root directory of this source tree. 560 */const CF=[["path",{d:"M12 2v8",key:"1q4o3n"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]],PF=_e("Sunrise",CF);/** 561 * @license lucide-react v0.475.0 - ISC 562 * 563 * This source code is licensed under the ISC license. 564 * See the LICENSE file in the root directory of this source tree. 565 */const TF=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]],G1=_e("Tablet",TF);/** 566 * @license lucide-react v0.475.0 - ISC 567 * 568 * This source code is licensed under the ISC license. 569 * See the LICENSE file in the root directory of this source tree. 570 */const EF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],AF=_e("Target",EF);/** 571 * @license lucide-react v0.475.0 - ISC 572 * 573 * This source code is licensed under the ISC license. 574 * See the LICENSE file in the root directory of this source tree. 575 */const MF=[["path",{d:"M3.5 21 14 3",key:"1szst5"}],["path",{d:"M20.5 21 10 3",key:"1310c3"}],["path",{d:"M15.5 21 12 15l-3.5 6",key:"1ddtfw"}],["path",{d:"M2 21h20",key:"1nyx9w"}]],da=_e("Tent",MF);/** 576 * @license lucide-react v0.475.0 - ISC 577 * 578 * This source code is licensed under the ISC license. 579 * See the LICENSE file in the root directory of this source tree. 580 */const RF=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
580],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],us=_e("Trash2",RF);/** 581 * @license lucide-react v0.475.0 - ISC 582 * 583 * This source code is licensed under the ISC license. 584 * See the LICENSE file in the root directory of this source tree. 585 */const OF=[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"1l6gj6"}],["path",{d:"M7 16v6",key:"1a82de"}],["path",{d:"M13 19v3",key:"13sx9i"}],["path",{d:"M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5",key:"1sj9kv"}]],Hy=_e("Trees",OF);/** 586 * @license lucide-react v0.475.0 - ISC 587 * 588 * This source code is licensed under the ISC license. 589 * See the LICENSE file in the root directory of this source tree. 590 */const DF=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Lu=_e("TriangleAlert",DF);/** 591 * @license lucide-react v0.475.0 - ISC 592 * 593 * This source code is licensed under the ISC license. 594 * See the LICENSE file in the root directory of this source tree. 595 */const IF=[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]],LF=_e("Trophy",IF);/** 596 * @license lucide-react v0.475.0 - ISC 597 * 598 * This source code is licensed under the ISC license. 599 * See the LICENSE file in the root directory of this source tree. 600 */const FF=[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],BF=_e("Type",FF);/** 601 * @license lucide-react v0.475.0 - ISC 602 * 603 * This source code is licensed under the ISC license. 604 * See the LICENSE file in the root directory of this source tree. 605 */const zF=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],rd=_e("User",zF);/** 606 * @license lucide-react v0.475.0 - ISC 607 * 608 * This source code is licensed under the ISC license. 609 * See the LICENSE file in the root directory of this source tree. 610 */const $F=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Li=_e("Users",$F);/** 611 * @license lucide-react v0.475.0 - ISC 612 * 613 * This source code is licensed under the ISC license. 614 * See the LICENSE file in the root directory of this source tree. 615 */const UF=[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]],VF=_e("Utensils",UF);/** 616 * @license lucide-react v0.475.0 - ISC 617 * 618 * This source code is licensed under the ISC license. 619 * See the LICENSE file in the root directory of this source tree. 620 */const WF=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],f0=_e("Video",WF);/** 621 * @license lucide-react v0.475.0 - ISC 622 * 623 * This source code is licensed under the ISC license. 624 * See the LICENSE file in the root directory of this source tree. 625 */const HF=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],qF=_e("WifiOff",HF);/** 626 * @license lucide-react v0.475.0 - ISC 627 * 628 * This source code is licensed under the ISC license. 629 * See the LICENSE file in the root directory of this source tree. 630 */const GF=[["path",{d:"M12 20h.01",key:"zekei9"}
vendor: 6,277 bytes, lines 630-640
630],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],fw=_e("Wifi",GF);/** 631 * @license lucide-react v0.475.0 - ISC 632 * 633 * This source code is licensed under the ISC license. 634 * See the LICENSE file in the root directory of this source tree. 635 */const YF=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hn=_e("X",YF);/** 636 * @license lucide-react v0.475.0 - ISC 637 * 638 * This source code is licensed under the ISC license. 639 * See the LICENSE file in the root directory of this source tree. 640 */const KF=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ZF=_e("Zap",KF),QF=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},XF=(e,t)=>({classGroupId:e,validator:t}),d5=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),m0="-",hS=[],JF="arbitrary..",e8=e=>{const t=n8(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return t8(l);const u=l.split(m0),h=u[0]===""&&u.length>1?1:0;return u5(u,h,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const h=s[l],m=n[l];return h?m?QF(m,h):h:m||hS}return n[l]||hS}}},u5=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const m=u5(e,t+1,a);if(m)return m}const l=n.validators;if(l===null)return;const u=t===0?e.join(m0):e.slice(t).join(m0),h=l.length;for(let m=0;m<h;m++){const g=l[m];if(g.validator(u))return g.classGroupId}},t8=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?JF+s:void 0})(),n8=e=>{const{theme:t,classGroups:n}=e;return s8(n,t)},s8=(e,t)=>{const n=d5();for(const s in e){const i=e[s];Y1(i,n,s,t)}return n},Y1=(e,t,n,s)=>{const i=e.length;for(let a=0;a<i;a++){const l=e[a];r8(l,t,n,s)}},r8=(e,t,n,s)=>{if(typeof e=="string"){i8(e,t,n);return}if(typeof e=="function"){a8(e,t,n,s);return}o8(e,t,n,s)},i8=(e,t,n)=>{const s=e===""?t:h5(t,e);s.classGroupId=n},a8=(e,t,n,s)=>{if(l8(e)){Y1(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(XF(n,e))},o8=(e,t,n,s)=>{const i=Object.entries(e),a=i.length;for(let l=0;l<a;l++){const[u,h]=i[l];Y1(h,h5(t,u),n,s)}},h5=(e,t)=>{let n=e;const s=t.split(m0),i=s.length;for(let a=0;a<i;a++){const l=s[a];let u=n.nextPart.get(l);u||(u=d5(),n.nextPart.set(l,u)),n=u}return n},l8=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,c8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const i=(a,l)=>{n[a]=l,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(a){let l=n[a];if(l!==void 0)return l;if((l=s[a])!==void 0)return i(a,l),l},set(a,l){a in n?n[a]=l:i(a,l)}}},mw="!",fS=":",d8=[],mS=(e,t,n,s,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),u8=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=i=>{const a=[];let l=0,u=0,h=0,m;const g=i.length;for(let S=0;S<g;S++){const j=i[S];if(l===0&&u===0){if(j===fS){a.push(i.slice(h,S)),h=S+1;continue}if(j==="/"){m=S;continue}}j==="["?l++:j==="]"?l--:j==="("?u++:j===")"&&u--}const x=a.length===0?i:i.slice(h);let v=x,_=!1;x.endsWith(mw)?(v=x.slice(0,-1),_=!0):x.startsWith(mw)&&(v=x.slice(1),_=!0);const N=m&&m>h?m-h:void 0;return mS(a,_,v,N)};if(t){const i=t+fS,a=s;s=l=>l.startsWith(i)?a(l.slice(i.length)):mS(d8,!1,l,void 0,!0)}if(n){const i=s;s=a=>n({className:a,parseClassName:i})}return s},h8=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let a=0;a<n.length;a++){const l=n[a],u=l[0]==="[",h=t.has(l);u||h?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(l)):i.push(l)}return i.length>0&&(i.sort(),s.push(...i)),s}},f8=e=>({cache:c8(e.cacheSize),parseClassName:u8(e),sortModifiers:h8(e),...e8(e)}),m8=/\s+/,p8=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:a}=t,l=[],u=e.trim().split(m8);let h="";for(let m=u.length-1;m>=0;m-=1){const g=u[m],{isExternal:x,modifiers:v,hasImportantModifier:_,baseClassName:N,maybePostfixModifierPosition:S}=n(g);if(x){h=g+(h.length>0?" "+h:h);continue}let j=!!S,P=s(j?N.substring(0,S):N);if(!P){if(!j){h=g+(h.length>0?" "+h:h);continue}if(P=s(N),!P){h=g+(h.length>0?" "+h:h);continue}j=!1}const E=v.length===0?"":v.length===1?v[0]:a(v).join(":"),R=_?E+mw:E,A=R+P;if(l.indexOf(A)>-1)continue;l.push(A);const B=i(P,j);for(let I=0;I<B.length;++I){const z=B[I];l.push(R+z)}h=g+(h.length>0?" "+h:h)}return h},g8=(...e)=>{let t=0,n,s,i="";for(;t<e.length;)(n=e[t++])&&(s=f5(n))&&(i&&(i+=" "),i+=s);return i},f5=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=f5(e[s]))&&(n&&(n+=" "),n+=t);return n},x8=(e,...t)=>{let n,s,i,a;const l=h=>{const m=t.reduce((g,x)=>x(g),e());return n=f8(m),s=n.cache.get,i=n.cache.set,a=u,u(h)},u=h=>{const m=s(h);if(m)return m;const g=p8(h,n);return i(h,g),g};return a=l,(...h)=>a(g8(...h))},v8=[],es=e=>{const t=n=>n[e]||v8;return t.isThemeGetter=!0,t},m5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,p5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,y8=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,b8=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,w8=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_8=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,N8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,j8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,al=e=>y8.test(e),St=e=>!!e&&!Number.isNaN(Number(e)),ol=e=>!!e&&Number.isInteger(Number(e)),qy=e=>e.endsWith("%")&&St(e.slice(0,-1)),Ja=e=>b8.test(e),g5=()=>!0,S8=e=>w8.test(e)&&!_8.test(e),K1=()=>!1,k8=e=>N8.test(e),C8=e=>j8.test(e),P8=e=>!qe(e)&&!Ge(e),T8=e=>Fl(e,y5,K1),qe=e=>m5.test(e),xc=e=>Fl(e,b5,S8),pS=e=>Fl(e,L8,St),E8=e=>Fl(e,_5,g5),A8=e=>Fl(e,w5,K1),gS=e=>Fl(e,x5,K1),M8=e=>Fl(e,v5,C8),pg=e=>Fl(e,N5,k8),Ge=e=>p5.test(e),df=e=>id(e,b5),R8=e=>id(e,w5),xS=e=>id(e,x5),O8=e=>id(e,y5),D8=e=>id(e,v5),gg=e=>
vendor: 4,269 bytes, line 640
640id(e,N5,!0),I8=e=>id(e,_5,!0),Fl=(e,t,n)=>{const s=m5.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},id=(e,t,n=!1)=>{const s=p5.exec(e);return s?s[1]?t(s[1]):n:!1},x5=e=>e==="position"||e==="percentage",v5=e=>e==="image"||e==="url",y5=e=>e==="length"||e==="size"||e==="bg-size",b5=e=>e==="length",L8=e=>e==="number",w5=e=>e==="family-name",_5=e=>e==="number"||e==="weight",N5=e=>e==="shadow",F8=()=>{const e=es("color"),t=es("font"),n=es("text"),s=es("font-weight"),i=es("tracking"),a=es("leading"),l=es("breakpoint"),u=es("container"),h=es("spacing"),m=es("radius"),g=es("shadow"),x=es("inset-shadow"),v=es("text-shadow"),_=es("drop-shadow"),N=es("blur"),S=es("perspective"),j=es("aspect"),P=es("ease"),E=es("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...A(),Ge,qe],I=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],V=()=>[Ge,qe,h],te=()=>[al,"full","auto",...V()],H=()=>[ol,"none","subgrid",Ge,qe],Y=()=>["auto",{span:["full",ol,Ge,qe]},ol,Ge,qe],ce=()=>[ol,"auto",Ge,qe],K=()=>["auto","min","max","fr",Ge,qe],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ge=()=>["start","end","center","stretch","center-safe","end-safe"],he=()=>["auto",...V()],be=()=>[al,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],W=()=>[al,"screen","full","dvw","lvw","svw","min","max","fit",...V()],Z=()=>[al,"screen","full","lh","dvh","lvh","svh","min","max","fit",...V()],D=()=>[e,Ge,qe],O=()=>[...A(),xS,gS,{position:[Ge,qe]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",O8,T8,{size:[Ge,qe]}],le=()=>[qy,df,xc],fe=()=>["","none","full",m,Ge,qe],me=()=>["",St,df,xc],oe=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>[St,qy,xS,gS],Ce=()=>["","none",N,Ge,qe],De=()=>["none",St,Ge,qe],Te=()=>["none",St,Ge,qe],We=()=>[St,Ge,qe],$e=()=>[al,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ja],breakpoint:[Ja],color:[g5],container:[Ja],"drop-shadow":[Ja],ease:["in","out","in-out"],font:[P8],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ja],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ja],shadow:[Ja],spacing:["px",St],text:[Ja],"text-shadow":[Ja],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",al,qe,Ge,j]}],container:["container"],columns:[{columns:[St,qe,Ge,u]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:B()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:te()}],"inset-x":[{"inset-x":te()}],"inset-y":[{"inset-y":te()}],start:[{"inset-s":te(),start:te()}],end:[{"inset-e":te(),end:te()}],"inset-bs":[{"inset-bs":te()}],"inset-be":[{"inset-be":te()}],top:[{top:te()}
vendor: 4,775 bytes, line 640
640],right:[{right:te()}],bottom:[{bottom:te()}],left:[{left:te()}],visibility:["visible","invisible","collapse"],z:[{z:[ol,"auto",Ge,qe]}],basis:[{basis:[al,"full","auto",u,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[St,al,"auto","initial","none",qe]}],grow:[{grow:["",St,Ge,qe]}],shrink:[{shrink:["",St,Ge,qe]}],order:[{order:[ol,"first","last","none",Ge,qe]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...ge(),"normal"]}],"justify-self":[{"justify-self":["auto",...ge()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...ge(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ge(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...ge(),"baseline"]}],"place-self":[{"place-self":["auto",...ge()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pbs:[{pbs:V()}],pbe:[{pbe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:he()}],mx:[{mx:he()}],my:[{my:he()}],ms:[{ms:he()}],me:[{me:he()}],mbs:[{mbs:he()}],mbe:[{mbe:he()}],mt:[{mt:he()}],mr:[{mr:he()}],mb:[{mb:he()}],ml:[{ml:he()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:be()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...Z()]}],"min-block-size":[{"min-block":["auto",...Z()]}],"max-block-size":[{"max-block":["none",...Z()]}],w:[{w:[u,"screen",...be()]}],"min-w":[{"min-w":[u,"screen","none",...be()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...be()]}],h:[{h:["screen","lh",...be()]}],"min-h":[{"min-h":["screen","lh","none",...be()]}],"max-h":[{"max-h":["screen","lh",...be()]}],"font-size":[{text:["base",n,df,xc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,I8,E8]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qy,qe]}],"font-family":[{font:[R8,A8,t]}],"font-features":[{"font-features":[qe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ge,qe]}],"line-clamp":[{"line-clamp":[St,"none",Ge,pS]}],leading:[{leading:[a,...V()]}],"list-image":[{"list-image":["none",Ge,qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ge,qe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[St,"from-font","auto",Ge,xc]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[St,"auto",Ge,qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ge,qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ge,qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ol,Ge,qe],radial:["",Ge,qe],conic:[ol,Ge,qe]},D8,M8]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:le()}
640],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}
vendor: 5,325 bytes, line 640
640],"divide-color":[{divide:D()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[St,Ge,qe]}],"outline-w":[{outline:["",St,df,xc]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",g,gg,pg]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",x,gg,pg]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[St,xc]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",v,gg,pg]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[St,Ge,qe]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[St]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ne()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":Ne()}],"mask-image-t-to-pos":[{"mask-t-to":Ne()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":Ne()}],"mask-image-r-to-pos":[{"mask-r-to":Ne()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":Ne()}],"mask-image-b-to-pos":[{"mask-b-to":Ne()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":Ne()}],"mask-image-l-to-pos":[{"mask-l-to":Ne()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":Ne()}],"mask-image-x-to-pos":[{"mask-x-to":Ne()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":Ne()}],"mask-image-y-to-pos":[{"mask-y-to":Ne()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[Ge,qe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ne()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[St]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ne()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ge,qe]}],filter:[{filter:["","none",Ge,qe]}],blur:[{blur:Ce()}],brightness:[{brightness:[St,Ge,qe]}],contrast:[{contrast:[St,Ge,qe]}],"drop-shadow":[{"drop-shadow":["","none",_,gg,pg]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",St,Ge,qe]}],"hue-rotate":[{"hue-rotate":[St,Ge,qe]}],invert:[{invert:["",St,Ge,qe]}],saturate:[{saturate:[St,Ge,qe]}],sepia:[{sepia:["",St,Ge,qe]}],"backdrop-filter":[{"backdrop-filter":["","none",Ge,qe]}],"backdrop-blur":[{"backdrop-blur":Ce()}],"backdrop-brightness":[{"backdrop-brightness":[St,Ge,qe]}],"backdrop-contrast":[{"backdrop-contrast":[St,Ge,qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",St,Ge,qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[St,Ge,qe]}],"backdrop-invert":[{"backdrop-invert":["",St,Ge,qe]}],"backdrop-opacity":[{"backdrop-opacity":[St,Ge,qe]}],"backdrop-saturate":[{"backdrop-saturate":[St,Ge,qe]}],"backdrop-sepia":[{"backdrop-sepia":["",St,Ge,qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ge,qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[St,"initial",Ge,qe]}],ease:[{ease:["linear","initial",P,Ge,qe]}],delay:[{delay:[St,Ge,qe]}],animate:[{animate:["none",E,Ge,qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ge,qe]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:Te()}],"scale-x":[{"scale-x":Te()}],"scale-y":[{"scale-y":Te()}],"scale-z":[{"scale-z":Te()}],"scale-3d":["scale-3d"],skew:[{skew:We()}],"skew-x":[{"skew-x":We()}
vendor: 7,384 bytes, line 640
640],"skew-y":[{"skew-y":We()}],transform:[{transform:[Ge,qe,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$e()}],"translate-x":[{"translate-x":$e()}],"translate-y":[{"translate-y":$e()}],"translate-z":[{"translate-z":$e()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ge,qe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mbs":[{"scroll-mbs":V()}],"scroll-mbe":[{"scroll-mbe":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pbs":[{"scroll-pbs":V()}],"scroll-pbe":[{"scroll-pbe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ge,qe]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[St,df,xc,pS]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},B8=x8(F8);function Ct(...e){return B8(t5(e))}const j5=w.forwardRef(({...e},t)=>r.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));j5.displayName="ToastProvider";const S5=w.forwardRef(({...e},t)=>r.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));S5.displayName="ToastViewport";const z8=ex("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),k5=w.forwardRef(({className:e,variant:t,...n},s)=>r.jsx("div",{ref:s,className:Ct(z8({variant:t}),e),...n}));k5.displayName="Toast";const $8=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Ct("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));$8.displayName="ToastAction";const C5=w.forwardRef(({className:e,...t},n)=>r.jsx("button",{ref:n,className:Ct("absolute right-2 top-2 rounded-md p-1 text-foreground
640/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:r.jsx(hn,{className:"h-4 w-4"})}));C5.displayName="ToastClose";const P5=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Ct("text-sm font-semibold",e),...t}));P5.displayName="ToastTitle";const T5=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Ct("text-sm opacity-90",e),...t}));T5.displayName="ToastDescription";function U8(){const{toasts:e}=z1();return r.jsxs(j5,{children:[e.map(function({id:t,title:n,description:s,action:i,...a}){return r.jsxs(k5,{...a,children:[r.jsxs("div",{className:"grid gap-1",children:[n&&r.jsx(P5,{children:n}),s&&r.jsx(T5,{children:s})]}),i,r.jsx(C5,{})]},t)}),r.jsx(S5,{})]})}var Qu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},V8={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},fl,B1,UT,W8=(UT=class{constructor(){tt(this,fl,V8);tt(this,B1,!1)}setTimeoutProvider(e){Le(this,fl,e)}setTimeout(e,t){return J(this,fl).setTimeout(e,t)}clearTimeout(e){J(this,fl).clearTimeout(e)}setInterval(e,t){return J(this,fl).setInterval(e,t)}clearInterval(e){J(this,fl).clearInterval(e)}},fl=new WeakMap,B1=new WeakMap,UT),Cc=new W8;function H8(e){setTimeout(e,0)}var qc=typeof window>"u"||"Deno"in globalThis;function Ks(){}function q8(e,t){return typeof e=="function"?e(t):e}function pw(e){return typeof e=="number"&&e>=0&&e!==1/0}function E5(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Sl(e,t){return typeof e=="function"?e(t):e}function ti(e,t){return typeof e=="function"?e(t):e}function vS(e,t){const{type:n="all",exact:s,fetchStatus:i,predicate:a,queryKey:l,stale:u}=e;if(l){if(s){if(t.queryHash!==Z1(l,t.options))return!1}else if(!Qf(t.queryKey,l))return!1}if(n!=="all"){const h=t.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||a&&!a(t))}function yS(e,t){const{exact:n,status:s,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Gc(t.options.mutationKey)!==Gc(a))return!1}else if(!Qf(t.options.mutationKey,a))return!1}return!(s&&t.state.status!==s||i&&!i(t))}function Z1(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gc)(e)}function Gc(e){return JSON.stringify(e,(t,n)=>gw(n)?Object.keys(n).sort().reduce((s,i)=>(s[i]=n[i],s),{}):n)}function Qf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Qf(e[n],t[n])):!1}var G8=Object.prototype.hasOwnProperty;function A5(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=bS(e)&&bS(t);if(!s&&!(gw(e)&&gw(t)))return t;const a=(s?e:Object.keys(e)).length,l=s?t:Object.keys(t),u=l.length,h=s?new Array(u):{};let m=0;for(let g=0;g<u;g++){const x=s?g:l[g],v=e[x],_=t[x];if(v===_){h[x]=v,(s?g<a:G8.call(e,x))&&m++;continue}if(v===null||_===null||typeof v!="object"||typeof _!="object"){h[x]=_;continue}const N=A5(v,_,n+1);h[x]=N,N===v&&m++}return a===u&&m===a?e:h}function p0(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function bS(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gw(e){if(!wS(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!wS(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function wS(e){return Object.prototype.toString.call(e)==="[object Object]"}function Y8(e){return new Promise(t=>{Cc.setTimeout(t,e)})}function xw(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?A5(e,t):t}function K8(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function Z8(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var Q1=Symbol();function M5(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Q1?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function X1(e,t){return typeof e=="function"?e(...t):!!e}function Q8(e,t,n){let s=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),s||(s=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Mc,ml,Nu,VT,X8=(VT=class extends Qu{constructor(){super();tt(this,Mc);tt(this,ml);tt(this,Nu);Le(this,Nu,t=>{if(!qc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){J(this,ml)||this.setEventListener(J(this,Nu))}onUnsubscribe(){var t;this.hasListeners()||((t=J(this,ml))==null||t.call(this),Le(this,ml,void 0))}setEventListener(t){var n;Le(this,Nu,t),(n=J(this,ml))==null||n.call(this),Le(this,ml,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){J(this,Mc)!==t&&(Le(this,Mc,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 5,005 bytes, line 640
640this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof J(this,Mc)=="boolean"?J(this,Mc):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Mc=new WeakMap,ml=new WeakMap,Nu=new WeakMap,VT),J1=new X8;function vw(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function s(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{s({status:"fulfilled",value:i}),e(i)},n.reject=i=>{s({status:"rejected",reason:i}),t(i)},n}var J8=H8;function eB(){let e=[],t=0,n=u=>{u()},s=u=>{u()},i=J8;const a=u=>{t?e.push(u):i(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&i(()=>{s(()=>{u.forEach(h=>{n(h)})})})};return{batch:u=>{let h;t++;try{h=u()}finally{t--,t||l()}return h},batchCalls:u=>(...h)=>{a(()=>{u(...h)})},schedule:a,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{s=u},setScheduler:u=>{i=u}}}var ts=eB(),ju,pl,Su,WT,tB=(WT=class extends Qu{constructor(){super();tt(this,ju,!0);tt(this,pl);tt(this,Su);Le(this,Su,t=>{if(!qc&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){J(this,pl)||this.setEventListener(J(this,Su))}onUnsubscribe(){var t;this.hasListeners()||((t=J(this,pl))==null||t.call(this),Le(this,pl,void 0))}setEventListener(t){var n;Le(this,Su,t),(n=J(this,pl))==null||n.call(this),Le(this,pl,t(this.setOnline.bind(this)))}setOnline(t){J(this,ju)!==t&&(Le(this,ju,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return J(this,ju)}},ju=new WeakMap,pl=new WeakMap,Su=new WeakMap,WT),g0=new tB;function nB(e){return Math.min(1e3*2**e,3e4)}function R5(e){return(e??"online")==="online"?g0.isOnline():!0}var yw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function O5(e){let t=!1,n=0,s;const i=vw(),a=()=>i.status!=="pending",l=S=>{var j;if(!a()){const P=new yw(S);v(P),(j=e.onCancel)==null||j.call(e,P)}},u=()=>{t=!0},h=()=>{t=!1},m=()=>J1.isFocused()&&(e.networkMode==="always"||g0.isOnline())&&e.canRun(),g=()=>R5(e.networkMode)&&e.canRun(),x=S=>{a()||(s==null||s(),i.resolve(S))},v=S=>{a()||(s==null||s(),i.reject(S))},_=()=>new Promise(S=>{var j;s=P=>{(a()||m())&&S(P)},(j=e.onPause)==null||j.call(e)}).then(()=>{var S;s=void 0,a()||(S=e.onContinue)==null||S.call(e)}),N=()=>{if(a())return;let S;const j=n===0?e.initialPromise:void 0;try{S=j??e.fn()}catch(P){S=Promise.reject(P)}Promise.resolve(S).then(x).catch(P=>{var I;if(a())return;const E=e.retry??(qc?0:3),R=e.retryDelay??nB,A=typeof R=="function"?R(n,P):R,B=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,P);if(t||!B){v(P);return}n++,(I=e.onFail)==null||I.call(e,n,P),Y8(A).then(()=>m()?void 0:_()).then(()=>{t?v(P):N()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(s==null||s(),i),cancelRetry:u,continueRetry:h,canStart:g,start:()=>(g()?N():_().then(N),i)}}var Rc,HT,D5=(HT=class{constructor(){tt(this,Rc)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pw(this.gcTime)&&Le(this,Rc,Cc.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qc?1/0:300*1e3))}clearGcTimeout(){J(this,Rc)&&(Cc.clearTimeout(J(this,Rc)),Le(this,Rc,void 0))}},Rc=new WeakMap,HT),Oc,ku,ei,Dc,os,wm,Ic,Ti,no,qT,sB=(qT=class extends D5{constructor(t){super();tt(this,Ti);tt(this,Oc);tt(this,ku);tt(this,ei);tt(this,Dc);tt(this,os);tt(this,wm);tt(this,Ic);Le(this,Ic,!1),Le(this,wm,t.defaultOptions),this.setOptions(t.options),this.observers=[],Le(this,Dc,t.client),Le(this,ei,J(this,Dc).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Le(this,Oc,NS(this.options)),this.state=t.state??J(this,Oc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=J(this,os))==null?void 0:t.promise}setOptions(t){if(this.options={...J(this,wm),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=NS(this.options);n.data!==void 0&&(this.setState(_S(n.data,n.dataUpdatedAt)),Le(this,Oc,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&J(this,ei).remove(this)}setData(t,n){const s=xw(this.state.data,t,this.options);return jt(this,Ti,no).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t,n){jt(this,Ti,no).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var s,i;const n=(s=J(this,os))==null?void 0:s.promise;return(i=J(this,os))==null||i.cancel(t),n?n.then(Ks).catch(Ks):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(J(this,Oc))}isActive(){return this.observers.some(t=>ti(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Q1||this.state.dataUpdateCount+this.state.errorUpdate
640Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Sl(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!E5(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=J(this,os))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=J(this,os))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),J(this,ei).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(J(this,os)&&(J(this,Ic)?J(this,os).cancel({revert:!0}):J(this,os).cancelRetry()),this.scheduleGc()),J(this,ei).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||jt(this,Ti,no).call(this,{type:"invalidate"})}async fetch(t,n){var h,m,g,x,v,_,N,S,j,P,E,R;if(this.state.fetchStatus!=="idle"&&((h=J(this,os))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(J(this,os))return J(this,os).continueRetry(),J(this,os).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(B=>B.options.queryFn);A&&this.setOptions(A.options)}const s=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(Le(this,Ic,!0),s.signal)})},a=()=>{const A=M5(this.options,n),I=(()=>{const z={client:J(this,Dc),queryKey:this.queryKey,meta:this.meta};return i(z),z})();return Le(this,Ic,!1),this.options.persister?this.options.persister(A,I,this):A(I)},u=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:J(this,Dc),state:this.state,fetchFn:a};return i(A),A})();(m=this.options.behavior)==null||m.onFetch(u,this),Le(this,ku,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=u.fetchOptions)==null?void 0:g.meta))&&jt(this,Ti,no).call(this,{type:"fetch",meta:(x=u.fetchOptions)==null?void 0:x.meta}),Le(this,os,O5({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:A=>{A instanceof yw&&A.revert&&this.setState({...J(this,ku),fetchStatus:"idle"}),s.abort()},onFail:(A,B)=>{jt(this,Ti,no).call(this,{type:"failed",failureCount:A,error:B})},onPause:()=>{jt(this,Ti,no).call(this,{type:"pause"})},onContinue:()=>{jt(this,Ti,no).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const A=await J(this,os).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(_=(v=J(this,ei).config).onSuccess)==null||_.call(v,A,this),(S=(N=J(this,ei).config).onSettled)==null||S.call(N,A,this.state.error,this),A}catch(A){if(A instanceof yw){if(A.silent)return J(this,os).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw jt(this,Ti,no).call(this,{type:"error",error:A}),(P=(j=J(this,ei).config).onError)==null||P.call(j,A,this),(R=(E=J(this,ei).config).onSettled)==null||R.call(E,this.state.data,A,this),A}finally{this.scheduleGc()}}},Oc=new WeakMap,ku=new WeakMap,ei=new WeakMap,Dc=new WeakMap,os=new WeakMap,wm=new WeakMap,Ic=new WeakMap,Ti=new WeakSet,no=function(t){const n=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...I5(s.data,this.options),fetchMeta:t.meta??null};case"success":const i={...s,..._S(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Le(this,ku,t.manual?i:void 0),i;case"error":const a=t.error;
vendor: 10,109 bytes, line 640
640return{...s,error:a,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),ts.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),J(this,ei).notify({query:this,type:"updated",action:t})})},qT);function I5(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:R5(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _S(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function NS(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var hr,Dt,_m,Gs,Lc,Cu,io,gl,Nm,Pu,Tu,Fc,Bc,xl,Eu,Kt,Pf,bw,ww,_w,Nw,jw,Sw,kw,F5,GT,L5=(GT=class extends Qu{constructor(t,n){super();tt(this,Kt);tt(this,hr);tt(this,Dt);tt(this,_m);tt(this,Gs);tt(this,Lc);tt(this,Cu);tt(this,io);tt(this,gl);tt(this,Nm);tt(this,Pu);tt(this,Tu);tt(this,Fc);tt(this,Bc);tt(this,xl);tt(this,Eu,new Set);this.options=n,Le(this,hr,t),Le(this,gl,null),Le(this,io,vw()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(J(this,Dt).addObserver(this),jS(J(this,Dt),this.options)?jt(this,Kt,Pf).call(this):this.updateResult(),jt(this,Kt,Nw).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cw(J(this,Dt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cw(J(this,Dt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,jt(this,Kt,jw).call(this),jt(this,Kt,Sw).call(this),J(this,Dt).removeObserver(this)}setOptions(t){const n=this.options,s=J(this,Dt);if(this.options=J(this,hr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ti(this.options.enabled,J(this,Dt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");jt(this,Kt,kw).call(this),J(this,Dt).setOptions(this.options),n._defaulted&&!p0(this.options,n)&&J(this,hr).getQueryCache().notify({type:"observerOptionsUpdated",query:J(this,Dt),observer:this});const i=this.hasListeners();i&&SS(J(this,Dt),s,this.options,n)&&jt(this,Kt,Pf).call(this),this.updateResult(),i&&(J(this,Dt)!==s||ti(this.options.enabled,J(this,Dt))!==ti(n.enabled,J(this,Dt))||Sl(this.options.staleTime,J(this,Dt))!==Sl(n.staleTime,J(this,Dt)))&&jt(this,Kt,bw).call(this);const a=jt(this,Kt,ww).call(this);i&&(J(this,Dt)!==s||ti(this.options.enabled,J(this,Dt))!==ti(n.enabled,J(this,Dt))||a!==J(this,xl))&&jt(this,Kt,_w).call(this,a)}getOptimisticResult(t){const n=J(this,hr).getQueryCache().build(J(this,hr),t),s=this.createResult(n,t);return iB(this,s)&&(Le(this,Gs,s),Le(this,Cu,this.options),Le(this,Lc,J(this,Dt).state)),s}getCurrentResult(){return J(this,Gs)}trackResult(t,n){return new Proxy(t,{get:(s,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&J(this,io).status==="pending"&&J(this,io).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,i))})}trackProp(t){J(this,Eu).add(t)}getCurrentQuery(){return J(this,Dt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=J(this,hr).defaultQueryOptions(t),s=J(this,hr).getQueryCache().build(J(this,hr),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(t){return jt(this,Kt,Pf).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),J(this,Gs)))}createResult(t,n){var te;const s=J(this,Dt),i=this.options,a=J(this,Gs),l=J(this,Lc),u=J(this,Cu),m=t!==s?t.state:J(this,_m),{state:g}=t;let x={...g},v=!1,_;if(n._optimisticResults){const H=this.hasListeners(),Y=!H&&jS(t,n),ce=H&&SS(t,s,n,i);(Y||ce)&&(x={...x,...I5(g.data,t.options)}),n._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:N,errorUpdatedAt:S,status:j}=x;_=x.data;let P=!1;if(n.placeholderData!==void 0&&_===void 0&&j==="pending"){let H;a!=null&&a.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(H=a.data,P=!0):H=typeof n.placeholderData=="function"?n.placeholderData((te=J(this,Tu))==null?void 0:te.state.data,J(this,Tu)):n.placeholderData,H!==void 0&&(j="success",_=xw(a==null?void 0:a.data,H,n),v=!0)}if(n.select&&_!==void 0&&!P)if(a&&_===(l==null?void 0:l.data)&&n.select===J(this,Nm))_=J(this,Pu);else try{Le(this,Nm,n.select),_=n.select(_),_=xw(a==null?void 0:a.data,_,n),Le(this,Pu,_),Le(this,gl,null)}catch(H){Le(this,gl,H)}J(this,gl)&&(N=J(this,gl),_=J(this,Pu),S=Date.now(),j="error");const E=x.fetchStatus==="fetching",R=j==="pending",A=j==="error",B=R&&E,I=_!==void 0,V={status:j,fetchStatus:x.fetchStatus,isPending:R,isSuccess:j==="success",isError:A,isInitialLoading:B,isLoading:B,data:_,dataUpdatedAt:x.dataUpdatedAt,error:N,errorUpdatedAt:S,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>m.dataUpdateCount||x.errorUpdateCount>m.errorUpdateCount,isFetching:E,isRefetching:E&&!R,isLoadingError:A&&!I,isPaused:x.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:A&&I,isStale:e_(t,n),refetch:this.refetch,promise:J(this,io),isEnabled:ti(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const H=V.data!==void 0,Y=V.status==="error"&&!H,ce=ge=>{Y?ge.reject(V.error):H&&ge.resolve(V.data)},K=()=>{const ge=Le(this,io,V.promise=vw());ce(ge)},q=J(this,io);switch(q.status){case"pending":t.queryHash===s.queryHash&&ce(q);break;case"fulfilled":(Y||V.data!==q.value)&&K();break;case"rejected":(!Y||V.error!==q.reason)&&K();break}}return V}updateResult(){const t=J(this,Gs),n=this.createResult(J(this,Dt),this.options);if(Le(this,Lc,J(this,Dt).state),Le(this,Cu,this.options),J(this,Lc).data!==void 0&&Le(this,Tu,J(this,Dt)),p0(n,t))return;Le(this,Gs,n);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!J(this,Eu).size)return!0;const l=new Set(a??J(this,Eu));return this.options.throwOnError&&l.add("error"),Object.keys(J(this,Gs)).some(u=>{const h=u;return J(this,Gs)[h]!==t[h]&&l.has(h)})};jt(this,Kt,F5).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&jt(this,Kt,Nw).call(this)}},hr=new WeakMap,Dt=new WeakMap,_m=new WeakMap,Gs=new WeakMap,Lc=new WeakMap,Cu=new WeakMap,io=new WeakMap,gl=new WeakMap,Nm=new WeakMap,Pu=new WeakMap,Tu=new WeakMap,Fc=new WeakMap,Bc=new WeakMap,xl=new WeakMap,Eu=new WeakMap,Kt=new WeakSet,Pf=function(t){jt(this,Kt,kw).call(this);let n=J(this,Dt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ks)),n},bw=function(){jt(this,Kt,jw).call(this);const t=Sl(this.options.staleTime,J(this,Dt));if(qc||J(this,Gs).isStale||!pw(t))return;const s=E5(J(this,Gs).dataUpdatedAt,t)+1;Le(this,Fc,Cc.setTimeout(()=>{J(this,Gs).isStale||this.updateResult()},s))},ww=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(J(this,Dt)):this.options.refetchInterval)??!1},_w=function(t){jt(this,Kt,Sw).call(this),Le(this,xl,t),!(qc||ti(this.options.enabled,J(this,Dt))===!1||!pw(J(this,xl))||J(this,xl)===0)&&Le(this,Bc,Cc.setInterval(()=>{(this.options.refetchIntervalInBackground||J1.isFocused())&&jt(this,Kt,Pf).call(this)},J(this,xl)))},Nw=function(){jt(this,Kt,bw).call(this),jt(this,Kt,_w).call(this,jt(this,Kt,ww).call(this))},jw=function(){J(this,Fc)&&(Cc.clearTimeout(J(this,Fc)),Le(this,Fc,void 0))},Sw=function(){J(this,Bc)&&(Cc.clearInterval(J(this,Bc)),Le(this,Bc,void 0))},kw=function(){const t=J(this,hr).getQueryCache().build(J(this,hr),this.options);if(t===J(this,Dt))return;const n=J(this,Dt);Le(this,Dt,t),Le(this,_m,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},F5=function(t){ts.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(J(this,Gs))}),J(this,hr).getQueryCache().notify({query:J(this,Dt),type:"observerResultsUpdated"})})},GT);function rB(e,t){return ti(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function jS(e,t){return rB(e,t)||e.state.data!==void 0&&Cw(e,t,t.refetchOnMount)}function Cw(e,t,n){if(ti(t.enabled,e)!==!1&&Sl(t.staleTime,e)!=="static"){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&e_(e,t)}return!1}function SS(e,t,n,s){return(e!==t||ti(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&e_(e,n)}function e_(e,t){return ti(t.enabled,e)!==!1&&e.isStaleByTime(Sl(t.staleTime,e))}function iB(e,t){return!p0(e.getCurrentResult(),t)}function x0(e){return{onFetch:(t,n)=>{var g,x,v,_,N;const s=t.options,i=(v=(x=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:x.fetchMore)==null?void 0:v.direction,a=((_=t.state.data)==null?void 0:_.pages)||[],l=((N=t.state.data)==null?void 0:N.pageParams)||[];let u={pages:[],pageParams:[]},h=0;const m=async()=>{let S=!1;const j=R=>{Q8(R,()=>t.signal,()=>S=!0)},P=M5(t.options,t.fetchOptions),E=async(R,A,B)=>{if(S)return Promise.reject();if(A==null&&R.pages.length)return Promise.resolve(R);const z=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:A,direction:B?"backward":"forward",meta:t.options.meta};return j(Y),Y})(),V=await P(z),{maxPages:te}=t.options,H=B?Z8:K8;return{pages:H(R.pages,V,te),pageParams:H(R.pageParams,A,te)}};if(i&&a.length){const R=i==="backward",A=R?B5:Pw,B={pages:a,pageParams:l},I=A(s,B);u=await E(B,I,R)}else{const R=e??a.length;do{const A=h===0?l[0]??s.initialPageParam:Pw(s,u);
640if(h>0&&A==null)break;u=await E(u,A),h++}while(h<R)}return u};t.options.persister?t.fetchFn=()=>{var S,j;return(j=(S=t.options).persister)==null?void 0:j.call(S,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=m}}}function Pw(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function B5(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}function aB(e,t){return t?Pw(e,t)!=null:!1}function oB(e,t){return!t||!e.getPreviousPageParam?!1:B5(e,t)!=null}var lB=class extends L5{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:x0()})}getOptimisticResult(e){return e.behavior=x0(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var N,S;const{state:n}=e,s=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:l,isRefetchError:u}=s,h=(S=(N=n.fetchMeta)==null?void 0:N.fetchMore)==null?void 0:S.direction,m=l&&h==="forward",g=i&&h==="forward",x=l&&h==="backward",v=i&&h==="backward";return{...s,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:aB(t,n.data),hasPreviousPage:oB(t,n.data),isFetchNextPageError:m,isFetchingNextPage:g,isFetchPreviousPageError:x,isFetchingPreviousPage:v,isRefetchError:u&&!m&&!x,isRefetching:a&&!g&&!v}}},jm,oa,As,zc,la,cl,YT,cB=(YT=class extends D5{constructor(t){super();tt(this,la);tt(this,jm);tt(this,oa);tt(this,As);tt(this,zc);Le(this,jm,t.client),this.mutationId=t.mutationId,Le(this,As,t.mutationCache),Le(this,oa,[]),this.state=t.state||z5(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){J(this,oa).includes(t)||(J(this,oa).push(t),this.clearGcTimeout(),J(this,As).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Le(this,oa,J(this,oa).filter(n=>n!==t)),this.scheduleGc(),J(this,As).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){J(this,oa).length||(this.state.status==="pending"?this.scheduleGc():J(this,As).remove(this))}continue(){var t;return((t=J(this,zc))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,u,h,m,g,x,v,_,N,S,j,P,E,R,A,B,I,z;const n=()=>{jt(this,la,cl).call(this,{type:"continue"})},s={client:J(this,jm),meta:this.options.meta,mutationKey:this.options.mutationKey};Le(this,zc,O5({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(V,te)=>{jt(this,la,cl).call(this,{type:"failed",failureCount:V,error:te})},onPause:()=>{jt(this,la,cl).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>J(this,As).canRun(this)}));const i=this.state.status==="pending",a=!J(this,zc).canStart();try{if(i)n();else{jt(this,la,cl).call(this,{type:"pending",variables:t,isPaused:a}),J(this,As).config.onMutate&&await J(this,As).config.onMutate(t,this,s);const te=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,s));te!==this.state.context&&jt(this,la,cl).call(this,{type:"pending",context:te,variables:t,isPaused:a})}const V=await J(this,zc).start();return await((m=(h=J(this,As).config).onSuccess)==null?void 0:m.call(h,V,t,this.state.context,this,s)),await((x=(g=this.options).onSuccess)==null?void 0:x.call(g,V,t,this.state.context,s)),await((_=(v=J(this,As).config).onSettled)==null?void 0:_.call(v,V,null,this.state.variables,this.state.context,this,s)),await((S=(N=this.options).onSettled)==null?void 0:S.call(N,V,null,t,this.state.context,s)),jt(this,la,cl).call(this,{type:"success",data:V}),V}catch(V){try{await((P=(j=J(this,As).config).onError)==null?void 0:P.call(j,V,t,this.state.context,this,s))}catch(te){Promise.reject(te)}try{await((R=(E=this.options).onError)==null?void 0:R.call(E,V,t,this.state.context,s))}catch(te){Promise.reject(te)}try{await((B=(A=J(this,As).config).onSettled)==null?void 0:B.call(A,void 0,V,this.state.variables,this.state.context,this,s))}catch(te){Promise.reject(te)}try{await((z=(I=this.options).onSettled)==null?void 0:z.call(I,void 0,V,t,this.state.context,s))}catch(te){Promise.reject(te)}throw jt(this,la,cl).call(this,{type:"error",error:V}),V}finally{J(this,As).runNext(this)}}},jm=new WeakMap,oa=new WeakMap,As=new WeakMap,zc=new WeakMap,la=new WeakSet,cl=function(t){const n=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};
640case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ts.batch(()=>{J(this,oa).forEach(s=>{s.onMutationUpdate(t)}),J(this,As).notify({mutation:this,type:"updated",action:t})})},YT);function z5(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ao,Ei,Sm,KT,dB=(KT=class extends Qu{constructor(t={}){super();tt(this,ao);tt(this,Ei);tt(this,Sm);this.config=t,Le(this,ao,new Set),Le(this,Ei,new Map),Le(this,Sm,0)}build(t,n,s){const i=new cB({client:t,mutationCache:this,mutationId:++fg(this,Sm)._,options:t.defaultMutationOptions(n),state:s});return this.add(i),i}add(t){J(this,ao).add(t);const n=xg(t);if(typeof n=="string"){const s=J(this,Ei).get(n);s?s.push(t):J(this,Ei).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(J(this,ao).delete(t)){const n=xg(t);if(typeof n=="string"){const s=J(this,Ei).get(n);if(s)if(s.length>1){const i=s.indexOf(t);i!==-1&&s.splice(i,1)}else s[0]===t&&J(this,Ei).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=xg(t);if(typeof n=="string"){const s=J(this,Ei).get(n),i=s==null?void 0:s.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var s;const n=xg(t);if(typeof n=="string"){const i=(s=J(this,Ei).get(n))==null?void 0:s.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ts.batch(()=>{J(this,ao).forEach(t=>{this.notify({type:"removed",mutation:t})}),J(this,ao).clear(),J(this,Ei).clear()})}getAll(){return Array.from(J(this,ao))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>yS(n,s))}findAll(t={}){return this.getAll().filter(n=>yS(t,n))}notify(t){ts.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ts.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ks))))}},ao=new WeakMap,Ei=new WeakMap,Sm=new WeakMap,KT);function xg(e){var t;return(t=e.options.scope)==null?void 0:t.id}var oo,vl,fr,lo,yo,Wg,Tw,ZT,uB=(ZT=class extends Qu{constructor(n,s){super();tt(this,yo);tt(this,oo);tt(this,vl);tt(this,fr);tt(this,lo);Le(this,oo,n),this.setOptions(s),this.bindMethods(),jt(this,yo,Wg).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const s=this.options;this.options=J(this,oo).defaultMutationOptions(n),p0(this.options,s)||J(this,oo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:J(this,fr),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&Gc(s.mutationKey)!==Gc(this.options.mutationKey)?this.reset():((i=J(this,fr))==null?void 0:i.state.status)==="pending"&&J(this,fr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=J(this,fr))==null||n.removeObserver(this)}onMutationUpdate(n){jt(this,yo,Wg).call(this),jt(this,yo,Tw).call(this,n)}getCurrentResult(){return J(this,vl)}reset(){var n;(n=J(this,fr))==null||n.removeObserver(this),Le(this,fr,void 0),jt(this,yo,Wg).call(this),jt(this,yo,Tw).call(this)}mutate(n,s){var i;return Le(this,lo,s),(i=J(this,fr))==null||i.removeObserver(this),Le(this,fr,J(this,oo).getMutationCache().build(J(this,oo),this.options)),J(this,fr).addObserver(this),J(this,fr).execute(n)}},oo=new WeakMap,vl=new WeakMap,fr=new WeakMap,lo=new WeakMap,yo=new WeakSet,Wg=function(){var s;const n=((s=J(this,fr))==null?void 0:s.state)??z5();Le(this,vl,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Tw=function(n){ts.batch(()=>{var s,i,a,l,u,h,m,g;if(J(this,lo)&&this.hasListeners()){const x=J(this,vl).variables,v=J(this,vl).context,_={client:J(this,oo),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(s=J(this,lo)).onSuccess)==null||i.call(s,n.data,x,v,_)}catch(N){Promise.reject(N)}try{(l=(a=J(this,lo)).onSettled)==null||l.call(a,n.data,null,x,v,_)}catch(N){Promise.reject(N)}}else if((n==null?void 0:n.type)==="error"){try{(h=(u=J(this,lo)).onError)==null||h.call(u,n.error,x,v,_)}catch(N){Promise.reject(N)}try{(g=(m=J(this,lo)).onSettled)==null||g.call(m,void 0,n.error,x,v,_)}catch(N){Promise.reject(N)}}}
vendor: 4,665 bytes, line 640
640this.listeners.forEach(x=>{x(J(this,vl))})})},ZT),ca,QT,hB=(QT=class extends Qu{constructor(t={}){super();tt(this,ca);this.config=t,Le(this,ca,new Map)}build(t,n,s){const i=n.queryKey,a=n.queryHash??Z1(i,n);let l=this.get(a);return l||(l=new sB({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){J(this,ca).has(t.queryHash)||(J(this,ca).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=J(this,ca).get(t.queryHash);n&&(t.destroy(),n===t&&J(this,ca).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ts.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return J(this,ca).get(t)}getAll(){return[...J(this,ca).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>vS(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>vS(t,s)):n}notify(t){ts.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ts.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ts.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ca=new WeakMap,QT),Rn,yl,bl,Au,Mu,wl,Ru,Ou,XT,fB=(XT=class{constructor(e={}){tt(this,Rn);tt(this,yl);tt(this,bl);tt(this,Au);tt(this,Mu);tt(this,wl);tt(this,Ru);tt(this,Ou);Le(this,Rn,e.queryCache||new hB),Le(this,yl,e.mutationCache||new dB),Le(this,bl,e.defaultOptions||{}),Le(this,Au,new Map),Le(this,Mu,new Map),Le(this,wl,0)}mount(){fg(this,wl)._++,J(this,wl)===1&&(Le(this,Ru,J1.subscribe(async e=>{e&&(await this.resumePausedMutations(),J(this,Rn).onFocus())})),Le(this,Ou,g0.subscribe(async e=>{e&&(await this.resumePausedMutations(),J(this,Rn).onOnline())})))}unmount(){var e,t;fg(this,wl)._--,J(this,wl)===0&&((e=J(this,Ru))==null||e.call(this),Le(this,Ru,void 0),(t=J(this,Ou))==null||t.call(this),Le(this,Ou,void 0))}isFetching(e){return J(this,Rn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return J(this,yl).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=J(this,Rn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=J(this,Rn).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Sl(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return J(this,Rn).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),i=J(this,Rn).get(s.queryHash),a=i==null?void 0:i.state.data,l=q8(t,a);if(l!==void 0)return J(this,Rn).build(this,s).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return ts.batch(()=>J(this,Rn).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=J(this,Rn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=J(this,Rn);ts.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=J(this,Rn);return ts.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=ts.batch(()=>J(this,Rn).findAll(e).map(i=>i.cancel(n)));return Promise.all(s).then(Ks).catch(Ks)}invalidateQueries(e,t={}){return ts.batch(()=>(J(this,Rn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=ts.batch(()=>J(this,Rn).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(Ks)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(s).then(Ks)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=J(this,Rn).build(this,t);return n.isStaleByTime(Sl(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ks).catch(Ks)}fetchInfiniteQuery(e){return e.behavior=x0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ks).catch(Ks)}ensureInfiniteQueryData(e){return e.behavior=x0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return g0.isOnline()?J(this,yl).resumePausedMutations():Promise.resolve()}getQueryCache(){return J(this,Rn)}getMutationCache(){return J(this,yl)}getDefaultOptions(){return J(this,bl)}setDefaultOptions(e){Le(this,bl,e)}setQueryDefaults(e,t){J(this,Au).set(Gc(e),{queryKey:e,defaultOptions:t})}
640getQueryDefaults(e){const t=[...J(this,Au).values()],n={};return t.forEach(s=>{Qf(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){J(this,Mu).set(Gc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...J(this,Mu).values()],n={};return t.forEach(s=>{Qf(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...J(this,bl).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Z1(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Q1&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...J(this,bl).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){J(this,Rn).clear(),J(this,yl).clear()}},Rn=new WeakMap,yl=new WeakMap,bl=new WeakMap,Au=new WeakMap,Mu=new WeakMap,wl=new WeakMap,Ru=new WeakMap,Ou=new WeakMap,XT),$5=w.createContext(void 0),tn=e=>{const t=w.useContext($5);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},mB=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),r.jsx($5.Provider,{value:e,children:t})),U5=w.createContext(!1),pB=()=>w.useContext(U5);U5.Provider;function gB(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var xB=w.createContext(gB()),vB=()=>w.useContext(xB),yB=(e,t,n)=>{const s=n!=null&&n.state.error&&typeof e.throwOnError=="function"?X1(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},bB=e=>{w.useEffect(()=>{e.clearReset()},[e])},wB=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&e.data===void 0||X1(n,[e.error,s])),_B=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...i)=>n(s(...i)):n(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},NB=(e,t)=>e.isLoading&&e.isFetching&&!t,jB=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,kS=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});
640function V5(e,t,n){var v,_,N,S;const s=pB(),i=vB(),a=tn(),l=a.defaultQueryOptions(e);(_=(v=a.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||_.call(v,l);const u=a.getQueryCache().get(l.queryHash);l._optimisticResults=s?"isRestoring":"optimistic",_B(l),yB(l,i,u),bB(i);const h=!a.getQueryCache().get(l.queryHash),[m]=w.useState(()=>new t(a,l)),g=m.getOptimisticResult(l),x=!s&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(j=>{const P=x?m.subscribe(ts.batchCalls(j)):Ks;return m.updateResult(),P},[m,x]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),w.useEffect(()=>{m.setOptions(l)},[l,m]),jB(l,g))throw kS(l,m,i);if(wB({result:g,errorResetBoundary:i,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw g.error;if((S=(N=a.getDefaultOptions().queries)==null?void 0:N._experimental_afterQuery)==null||S.call(N,l,g),l.experimental_prefetchInRender&&!qc&&NB(g,s)){const j=h?kS(l,m,i):u==null?void 0:u.promise;j==null||j.catch(Ks).finally(()=>{m.updateResult()})}return l.notifyOnChangeProps?g:m.trackResult(g)}function Re(e,t){return V5(e,L5)}function pt(e,t){const n=tn(),[s]=w.useState(()=>new uB(n,e));w.useEffect(()=>{s.setOptions(e)},[s,e]);const i=w.useSyncExternalStore(w.useCallback(l=>s.subscribe(ts.batchCalls(l)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),a=w.useCallback((l,u)=>{s.mutate(l,u).catch(Ks)},[s]);if(i.error&&X1(s.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function SB(e,t){return V5(e,lB)}const kB=new fB({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});function W5(e,t){return function(){return e.apply(t,arguments)}}const{toString:CB}=Object.prototype,{getPrototypeOf:t_}=Object,{iterator:ix,toStringTag:H5}=Symbol,ax=(e=>t=>{const n=CB.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Wi=e=>(e=e.toLowerCase(),t=>ax(t)===e),ox=e=>t=>typeof t===e,{isArray:Xu}=Array,Fu=ox("undefined");function Tm(e){return e!==null&&!Fu(e)&&e.constructor!==null&&!Fu(e.constructor)&&mr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const q5=Wi("ArrayBuffer");function PB(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&q5(e.buffer),t}const TB=ox("string"),mr=ox("function"),G5=ox("number"),Em=e=>e!==null&&typeof e=="object",EB=e=>e===!0||e===!1,Hg=e=>{if(ax(e)!=="object")return!1;const t=t_(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(H5 in e)&&!(ix in e)},AB=e=>{if(!Em(e)||Tm(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},MB=Wi("Date"),RB=Wi("File"),OB=Wi("Blob"),DB=Wi("FileList"),IB=e=>Em(e)&&mr(e.pipe),LB=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||mr(e.append)&&((t=ax(e))==="formdata"||t==="object"&&mr(e.toString)&&e.toString()==="[object FormData]"))},FB=Wi("URLSearchParams"),[BB,zB,$B,UB]=["ReadableStream","Request","Response","Headers"].map(Wi),VB=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Am(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,i;if(typeof e!="object"&&(e=[e]),Xu(e))for(s=0,i=e.length;s<i;s++)t.call(null,e[s],s,e);else{if(Tm(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),l=a.length;let u;for(s=0;s<l;s++)u=a[s],t.call(null,e[u],u,e)}}function Y5(e,t){if(Tm(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s=n.length,i;for(;s-- >0;)if(i=n[s],t===i.toLowerCase())return i;return null}const Pc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,K5=e=>!Fu(e)&&e!==Pc;function Ew(){const{caseless:e,skipUndefined:t}=K5(this)&&this||{},n={},s=(i,a)=>
vendor: 9,371 bytes, line 640
640{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const l=e&&Y5(n,a)||a;Hg(n[l])&&Hg(i)?n[l]=Ew(n[l],i):Hg(i)?n[l]=Ew({},i):Xu(i)?n[l]=i.slice():(!t||!Fu(i))&&(n[l]=i)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&Am(arguments[i],s);return n}const WB=(e,t,n,{allOwnKeys:s}={})=>(Am(t,(i,a)=>{n&&mr(i)?Object.defineProperty(e,a,{value:W5(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),e),HB=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qB=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},GB=(e,t,n,s)=>{let i,a,l;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)l=i[a],(!s||s(l,e,t))&&!u[l]&&(t[l]=e[l],u[l]=!0);e=n!==!1&&t_(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},YB=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},KB=e=>{if(!e)return null;if(Xu(e))return e;let t=e.length;if(!G5(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ZB=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&t_(Uint8Array)),QB=(e,t)=>{const s=(e&&e[ix]).call(e);let i;for(;(i=s.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},XB=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},JB=Wi("HTMLFormElement"),e9=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,i){return s.toUpperCase()+i}),CS=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),t9=Wi("RegExp"),Z5=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};Am(n,(i,a)=>{let l;(l=t(i,a,e))!==!1&&(s[a]=l||i)}),Object.defineProperties(e,s)},n9=e=>{Z5(e,(t,n)=>{if(mr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(mr(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},s9=(e,t)=>{const n={},s=i=>{i.forEach(a=>{n[a]=!0})};return Xu(e)?s(e):s(String(e).split(t)),n},r9=()=>{},i9=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function a9(e){return!!(e&&mr(e.append)&&e[H5]==="FormData"&&e[ix])}const o9=e=>{const t=new Array(10),n=(s,i)=>{if(Em(s)){if(t.indexOf(s)>=0)return;if(Tm(s))return s;if(!("toJSON"in s)){t[i]=s;const a=Xu(s)?[]:{};return Am(s,(l,u)=>{const h=n(l,i+1);!Fu(h)&&(a[u]=h)}),t[i]=void 0,a}}return s};return n(e,0)},l9=Wi("AsyncFunction"),c9=e=>e&&(Em(e)||mr(e))&&mr(e.then)&&mr(e.catch),Q5=((e,t)=>e?setImmediate:t?((n,s)=>(Pc.addEventListener("message",({source:i,data:a})=>{i===Pc&&a===n&&s.length&&s.shift()()},!1),i=>{s.push(i),Pc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",mr(Pc.postMessage)),d9=typeof queueMicrotask<"u"?queueMicrotask.bind(Pc):typeof process<"u"&&process.nextTick||Q5,u9=e=>e!=null&&mr(e[ix]),ye={isArray:Xu,isArrayBuffer:q5,isBuffer:Tm,isFormData:LB,isArrayBufferView:PB,isString:TB,isNumber:G5,isBoolean:EB,isObject:Em,isPlainObject:Hg,isEmptyObject:AB,isReadableStream:BB,isRequest:zB,isResponse:$B,isHeaders:UB,isUndefined:Fu,isDate:MB,isFile:RB,isBlob:OB,isRegExp:t9,isFunction:mr,isStream:IB,isURLSearchParams:FB,isTypedArray:ZB,isFileList:DB,forEach:Am,merge:Ew,extend:WB,trim:VB,stripBOM:HB,inherits:qB,toFlatObject:GB,kindOf:ax,kindOfTest:Wi,endsWith:YB,toArray:KB,forEachEntry:QB,matchAll:XB,isHTMLForm:JB,hasOwnProperty:CS,hasOwnProp:CS,reduceDescriptors:Z5,freezeMethods:n9,toObjectSet:s9,toCamelCase:e9,noop:r9,toFiniteNumber:i9,findKey:Y5,global:Pc,isContextDefined:K5,isSpecCompliantForm:a9,toJSONObject:o9,isAsyncFn:l9,isThenable:c9,setImmediate:Q5,asap:d9,isIterable:u9};let ct=class X5 extends Error{static from(t,n,s,i,a,l){const u=new X5(t.message,n||t.code,s,i,a);return u.cause=t,u.name=t.name,l&&Object.assign(u,l),u}constructor(t,n,s,i,a){super(t),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),i&&(this.request=i),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ye.toJSONObject(this.config),code:this.code,status:this.status}}};ct.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ct.ERR_BAD_OPTION="ERR_BAD_OPTION";ct.ECONNABORTED="ECONNABORTED";ct.ETIMEDOUT="ETIMEDOUT";ct.ERR_NETWORK="ERR_NETWORK";ct.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ct.ERR_DEPRECATED="ERR_DEPRECATED";ct.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ct.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ct.ERR_CANCELED="ERR_CANCELED";ct.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ct.ERR_INVALID_URL="ERR_INVALID_URL";const h9=null;function Aw(e){return ye.isPlainObject(e)||ye.isArray(e)}function J5(e){return ye.endsWith(e,"[]")?e.slice(0,-2):e}function PS(e,t,n){return e?e.concat(t).map(function(i,a){return i=J5(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function f9(e){return ye.isArray(e)&&!e.some(Aw)}const m9=ye.toFlatObject(ye,{},null,function(t){return/^is[A-Z]/.test(t)});function lx(e,t,n){if(!ye.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ye.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,j){return!ye.isUndefined(j[S])});const s=n.metaTokens,i=n.visitor||g,a=n.dots,l=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&ye.isSpecCompliantForm(t);if(!ye.isFunction(i))throw new TypeError("visitor must be a function");function m(N){if(N===null)return"";if(ye.isDate(N))return N.toISOString();if(ye.isBoolean(N))return N.toString();if(!h&&ye.isBlob(N))throw new ct("Blob is not supported. Use a Buffer instead.");return ye.isArrayBuffer(N)||ye.isTypedArray(N)?h&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function g(N,S,j){let P=N;if(N&&!j&&typeof N=="object"){if(ye.endsWith(S,"{}"))S=s?S:S.slice(0,-2),N=JSON.stringify(N);else if(ye.isArray(N)&&f9(N)||(ye.isFileList(N)||ye.endsWith(S,"[]"))&&(P=ye.toArray(N)))return S=J5(S),P.forEach(function(R,A){!(ye.isUndefined(R)||R===null)&&t.append(l===!0?PS([S],A,a):l===null?S:S+"[]",m(R))}),!1}return Aw(N)?!0:(t.append(PS(j,S,a),m(N)),!1)}const x=[],v=Object.assign(m9,{defaultVisitor:g,convertValue:m,isVisitable:Aw});function _(N,S){if(!ye.isUndefined(N)){if(x.indexOf(N)!==-1)throw Error("Circular reference detected in "+S.join("."));x.push(N),ye.forEach(N,function(P,E){(!(ye.isUndefined(P)||P===null)&&i.call(t,P,ye.isString(E)?E.trim():E,S,v))===!0&&_(P,S?S.concat(E):[E])}),x.pop()}}if(!ye.isObject(e))throw new TypeError("data must be an object");return _(e),t}function TS(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function n_(e,t){this._pairs=[],e&&lx(e,this,t)}const eE=n_.prototype;eE.append=function(t,n){this._pairs.push([t,n])};eE.toString=function(t){const n=t?function(s){return t.call(this,s,TS)}:TS;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function p9(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tE(e,t,n){if(!t)return e;const s=n&&n.encode||p9,i=ye.isFunction(n)?{serialize:n}:n,a=i&&i.serialize;let l;if(a?l=a(t,i):l=ye.isURLSearchParams(t)?t.toString():new n_(t,i).toString(s),l){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class ES{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ye.forEach(this.handlers,function(s){s!==null&&t(s)})}}const s_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},g9=typeof URLSearchParams<"u"?URLSearchParams:n_,x9=typeof FormData<"u"?FormData:null,v9=typeof Blob<"u"?Blob:null,y9={isBrowser:!0,classes:{URLSearchParams:g9,FormData:x9,Blob:v9},protocols:["http","https","file","blob","url","data"]},r_=typeof window<"u"&&typeof document<"u",Mw=typeof navigator=="object"&&navigator||void 0,b9=r_&&(!Mw||["ReactNative","NativeScript","NS"].indexOf(Mw.product)<0),w9=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_9=r_&&window.location.href||"http://localhost",N9=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:r_,hasStandardBrowserEnv:b9,hasStandardBrowserWebWorkerEnv:w9,navigator:Mw,origin:_9},Symbol.toStringTag,{value:"Module"})),Rs={...N9,...y9};function j9(e,t){return lx(e,new Rs.classes.URLSearchParams,{visitor:function(n,s,i,a){return Rs.isNode&&ye.isBuffer(n)?(this.append(s,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function S9(e){return ye.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function k9(e){const t={},n=Object.keys(e);let s;const i=n.length;let a;for(s=0;s<i;s++)a=n[s],t[a]=e[a];return t}function nE(e){function t(n,s,i,a){let l=n[a++];if(l==="__proto__")return!0;const u=Number.isFinite(+l),h=a>=n.length;
vendor: 4,551 bytes, lines 640-641
640return l=!l&&ye.isArray(i)?i.length:l,h?(ye.hasOwnProp(i,l)?i[l]=[i[l],s]:i[l]=s,!u):((!i[l]||!ye.isObject(i[l]))&&(i[l]=[]),t(n,s,i[l],a)&&ye.isArray(i[l])&&(i[l]=k9(i[l])),!u)}if(ye.isFormData(e)&&ye.isFunction(e.entries)){const n={};return ye.forEachEntry(e,(s,i)=>{t(S9(s),i,n,0)}),n}return null}function C9(e,t,n){if(ye.isString(e))try{return(t||JSON.parse)(e),ye.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const Mm={transitional:s_,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",i=s.indexOf("application/json")>-1,a=ye.isObject(t);if(a&&ye.isHTMLForm(t)&&(t=new FormData(t)),ye.isFormData(t))return i?JSON.stringify(nE(t)):t;if(ye.isArrayBuffer(t)||ye.isBuffer(t)||ye.isStream(t)||ye.isFile(t)||ye.isBlob(t)||ye.isReadableStream(t))return t;if(ye.isArrayBufferView(t))return t.buffer;if(ye.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(a){if(s.indexOf("application/x-www-form-urlencoded")>-1)return j9(t,this.formSerializer).toString();if((u=ye.isFileList(t))||s.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return lx(u?{"files[]":t}:t,h&&new h,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),C9(t)):t}],transformResponse:[function(t){const n=this.transitional||Mm.transitional,s=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ye.isResponse(t)||ye.isReadableStream(t))return t;if(t&&ye.isString(t)&&(s&&!this.responseType||i)){const l=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(u){if(l)throw u.name==="SyntaxError"?ct.from(u,ct.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rs.classes.FormData,Blob:Rs.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch"],e=>{Mm.headers[e]={}});const P9=ye.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),T9=e=>{const t={};let n,s,i;return e&&e.split(` 641`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),s=l.substring(i+1).trim(),!(!n||t[n]&&P9[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},AS=Symbol("internals");function uf(e){return e&&String(e).trim().toLowerCase()}function qg(e){return e===!1||e==null?e:ye.isArray(e)?e.map(qg):String(e)}function E9(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const A9=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Gy(e,t,n,s,i){if(ye.isFunction(s))return s.call(this,t,n);if(i&&(t=n),!!ye.isString(t)){if(ye.isString(s))return t.indexOf(s)!==-1;if(ye.isRegExp(s))return s.test(t)}}function M9(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function R9(e,t){const n=ye.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(i,a,l){return this[s].call(this,t,i,a,l)},configurable:!0})})}let pr=class{constructor(t){t&&this.set(t)}set(t,n,s){const i=this;function a(u,h,m){const g=uf(h);if(!g)throw new Error("header name must be a non-empty string");const x=ye.findKey(i,g);(!x||i[x]===void 0||m===!0||m===void 0&&i[x]!==!1)&&(i[x||h]=qg(u))}const l=(u,h)=>ye.forEach(u,(m,g)=>a(m,g,h));if(ye.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(ye.isString(t)&&(t=t.trim())&&!A9(t))l(T9(t),n);else if(ye.isObject(t)&&ye.isIterable(t)){let u={},h,m;for(const g of t){if(!ye.isArray(g))throw TypeError("Object iterator must return a key-value pair");u[m=g[0]]=(h=u[m])?ye.isArray(h)?[...h,g[1]]:[h,g[1]]:g[1]}l(u,n)}else t!=null&&a(n,t,s);return this}get(t,n){if(t=uf(t),t){const s=ye.findKey(this,t);if(s){const i=this[s];if(!n)return i;if(n===!0)return E9(i);if(ye.isFunction(n))return n.call(this,i,s);if(ye.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=uf(t),t){const s=ye.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||Gy(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let i=!1;function a(l){if(l=uf(l),l){const u=ye.findKey(s,l);
vendor: 9,519 bytes, lines 641-642
641u&&(!n||Gy(s,s[u],u,n))&&(delete s[u],i=!0)}}return ye.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let s=n.length,i=!1;for(;s--;){const a=n[s];(!t||Gy(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,s={};return ye.forEach(this,(i,a)=>{const l=ye.findKey(s,a);if(l){n[l]=qg(i),delete n[a];return}const u=t?M9(a):String(a).trim();u!==a&&delete n[a],n[u]=qg(i),s[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ye.forEach(this,(s,i)=>{s!=null&&s!==!1&&(n[i]=t&&ye.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` 642`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(i=>s.set(i)),s}static accessor(t){const s=(this[AS]=this[AS]={accessors:{}}).accessors,i=this.prototype;function a(l){const u=uf(l);s[u]||(R9(i,l),s[u]=!0)}return ye.isArray(t)?t.forEach(a):a(t),this}};pr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ye.reduceDescriptors(pr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});ye.freezeMethods(pr);function Yy(e,t){const n=this||Mm,s=t||n,i=pr.from(s.headers);let a=s.data;return ye.forEach(e,function(u){a=u.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function sE(e){return!!(e&&e.__CANCEL__)}let Rm=class extends ct{constructor(t,n,s){super(t??"canceled",ct.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function rE(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new ct("Request failed with status code "+n.status,[ct.ERR_BAD_REQUEST,ct.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function O9(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function D9(e,t){e=e||10;const n=new Array(e),s=new Array(e);let i=0,a=0,l;return t=t!==void 0?t:1e3,function(h){const m=Date.now(),g=s[a];l||(l=m),n[i]=h,s[i]=m;let x=a,v=0;for(;x!==i;)v+=n[x++],x=x%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),m-l<t)return;const _=g&&m-g;return _?Math.round(v*1e3/_):void 0}}function I9(e,t){let n=0,s=1e3/t,i,a;const l=(m,g=Date.now())=>{n=g,i=null,a&&(clearTimeout(a),a=null),e(...m)};return[(...m)=>{const g=Date.now(),x=g-n;x>=s?l(m,g):(i=m,a||(a=setTimeout(()=>{a=null,l(i)},s-x)))},()=>i&&l(i)]}const v0=(e,t,n=3)=>{let s=0;const i=D9(50,250);return I9(a=>{const l=a.loaded,u=a.lengthComputable?a.total:void 0,h=l-s,m=i(h),g=l<=u;s=l;const x={loaded:l,total:u,progress:u?l/u:void 0,bytes:h,rate:m||void 0,estimated:m&&u&&g?(u-l)/m:void 0,event:a,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(x)},n)},MS=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},RS=e=>(...t)=>ye.asap(()=>e(...t)),L9=Rs.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Rs.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Rs.origin),Rs.navigator&&/(msie|trident)/i.test(Rs.navigator.userAgent)):()=>!0,F9=Rs.hasStandardBrowserEnv?{write(e,t,n,s,i,a,l){if(typeof document>"u")return;const u=[`${e}=${encodeURIComponent(t)}`];ye.isNumber(n)&&u.push(`expires=${new Date(n).toUTCString()}`),ye.isString(s)&&u.push(`path=${s}`),ye.isString(i)&&u.push(`domain=${i}`),a===!0&&u.push("secure"),ye.isString(l)&&u.push(`SameSite=${l}`),document.cookie=u.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function B9(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function z9(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function iE(e,t,n){let s=!B9(t);return e&&(s||n==!1)?z9(e,t):t}const OS=e=>e instanceof pr?{...e}:e;function Yc(e,t){t=t||{};const n={};function s(m,g,x,v){return ye.isPlainObject(m)&&ye.isPlainObject(g)?ye.merge.call({caseless:v},m,g):ye.isPlainObject(g)?ye.merge({},g):ye.isArray(g)?g.slice():g}function i(m,g,x,v){if(ye.isUndefined(g)){if(!ye.isUndefined(m))return s(void 0,m,x,v)}else return s(m,g,x,v)}function a(m,g){if(!ye.isUndefined(g))return s(void 0,g)}function l(m,g){if(ye.isUndefined(g)){if(!ye.isUndefined(m))return s(void 0,m)}else return s(void 0,g)}function u(m,g,x){if(x in t)return s(m,g);if(x in e)return s(void 0,m)}const h={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:u,headers:(m,g,x)=>i(OS(m),OS(g),x,!0)};return ye.forEach(Object.keys({...e,...t}),function(g){if(g==="__proto__"||g==="constructor"||g==="prototype")return;const x=ye.hasOwnProp(h,g)?h[g]:i,v=x(e[g],t[g],g);ye.isUndefined(v)&&x!==u||(n[g]=v)}),n}const aE=e=>{const t=Yc({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:a,headers:l,auth:u}=t;if(t.headers=l=pr.from(l),t.url=tE(iE(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&l.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),ye.isFormData(n)){if(Rs.hasStandardBrowserEnv||Rs.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(ye.isFunction(n.getHeaders)){const h=n.getHeaders(),m=["content-type","content-length"];Object.entries(h).forEach(([g,x])=>{m.includes(g.toLowerCase())&&l.set(g,x)})}}if(Rs.hasStandardBrowserEnv&&(s&&ye.isFunction(s)&&(s=s(t)),s||s!==!1&&L9(t.url))){const h=i&&a&&F9.read(a);h&&l.set(i,h)}return t},$9=typeof XMLHttpRequest<"u",U9=$9&&function(e){return new Promise(function(n,s){const i=aE(e);let a=i.data;const l=pr.from(i.headers).normalize();let{responseType:u,onUploadProgress:h,onDownloadProgress:m}=i,g,x,v,_,N;function S(){_&&_(),N&&N(),i.cancelToken&&i.cancelToken.unsubscribe(g),i.signal&&i.signal.removeEventListener("abort",g)}let j=new XMLHttpRequest;j.open(i.method.toUpperCase(),i.url,!0),j.timeout=i.timeout;function P(){if(!j)return;const R=pr.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),B={data:!u||u==="text"||u==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:R,config:e,request:j};rE(function(z){n(z),S()},function(z){s(z),S()},B),j=null}"onloadend"in j?j.onloadend=P:j.onreadystatechange=function(){!j||j.readyState!==4||j.status===0&&!(j.responseURL&&j.responseURL.indexOf("file:")===0)||setTimeout(P)},j.onabort=function(){j&&(s(new ct("Request aborted",ct.ECONNABORTED,e,j)),j=null)},j.onerror=function(A){const B=A&&A.message?A.message:"Network Error",I=new ct(B,ct.ERR_NETWORK,e,j);I.event=A||null,s(I),j=null},j.ontimeout=function(){let A=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const B=i.transitional||s_;i.timeoutErrorMessage&&(A=i.timeoutErrorMessage),s(new ct(A,B.clarifyTimeoutError?ct.ETIMEDOUT:ct.ECONNABORTED,e,j)),j=null},a===void 0&&l.setContentType(null),"setRequestHeader"in j&&ye.forEach(l.toJSON(),function(A,B){j.setRequestHeader(B,A)}),ye.isUndefined(i.withCredentials)||(j.withCredentials=!!i.withCredentials),u&&u!=="json"&&(j.responseType=i.responseType),m&&([v,N]=v0(m,!0),j.addEventListener("progress",v)),h&&j.upload&&([x,_]=v0(h),j.upload.addEventListener("progress",x),j.upload.addEventListener("loadend",_)),(i.cancelToken||i.signal)&&(g=R=>{j&&(s(!R||R.type?new Rm(null,e,j):R),j.abort(),j=null)},i.cancelToken&&i.cancelToken.subscribe(g),i.signal&&(i.signal.aborted?g():i.signal.addEventListener("abort",g)));const E=O9(i.url);if(E&&Rs.protocols.indexOf(E)===-1){s(new ct("Unsupported protocol "+E+":",ct.ERR_BAD_REQUEST,e));return}j.send(a||null)})},V9=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,i;const a=function(m){if(!i){i=!0,u();const g=m instanceof Error?m:this.reason;s.abort(g instanceof ct?g:new Rm(g instanceof Error?g.message:g))}};let l=t&&setTimeout(()=>{l=null,a(new ct(`timeout of ${t}ms exceeded`,ct.ETIMEDOUT))},t);const u=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(m=>{m.unsubscribe?m.unsubscribe(a):m.removeEventListener("abort",a)}),e=null)};e.forEach(m=>m.addEventListener("abort",a));const{signal:h}=s;return h.unsubscribe=()=>ye.asap(u),h}},W9=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,i;for(;s<n;)i=s+t,yield e.slice(s,i),s=i},H9=async function*(e,t){for await(const n of q9(e))yield*W9(n,t)},q9=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},DS=(e,t,n,s)=>{const i=H9(e,t);let a=0,l,u=h=>{l||(l=!0,s&&s(h))};return new ReadableStream({async pull(h){try{const{done:m,value:g}=await i.next();if(m){u(),h.close();return}let x=g.byteLength;if(n){let v=a+=x;n(v)}h.enqueue(new Uint8Array(g))}catch(m){throw u(m),m}},cancel(h){return u(h),i.return()}},{highWaterMark:2})},IS=64*1024,{isFunction:vg}=ye,G9=(({Request:e,Response:t})=>({Request:e,Response:t}))(ye.global),{ReadableStream:LS,TextEncoder:FS}
vendor: 8,661 bytes, lines 642-645
642=ye.global,BS=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Y9=e=>{e=ye.merge.call({skipUndefined:!0},G9,e);const{fetch:t,Request:n,Response:s}=e,i=t?vg(t):typeof fetch=="function",a=vg(n),l=vg(s);if(!i)return!1;const u=i&&vg(LS),h=i&&(typeof FS=="function"?(N=>S=>N.encode(S))(new FS):async N=>new Uint8Array(await new n(N).arrayBuffer())),m=a&&u&&BS(()=>{let N=!1;const S=new n(Rs.origin,{body:new LS,method:"POST",get duplex(){return N=!0,"half"}}).headers.has("Content-Type");return N&&!S}),g=l&&u&&BS(()=>ye.isReadableStream(new s("").body)),x={stream:g&&(N=>N.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(N=>{!x[N]&&(x[N]=(S,j)=>{let P=S&&S[N];if(P)return P.call(S);throw new ct(`Response type '${N}' is not supported`,ct.ERR_NOT_SUPPORT,j)})});const v=async N=>{if(N==null)return 0;if(ye.isBlob(N))return N.size;if(ye.isSpecCompliantForm(N))return(await new n(Rs.origin,{method:"POST",body:N}).arrayBuffer()).byteLength;if(ye.isArrayBufferView(N)||ye.isArrayBuffer(N))return N.byteLength;if(ye.isURLSearchParams(N)&&(N=N+""),ye.isString(N))return(await h(N)).byteLength},_=async(N,S)=>{const j=ye.toFiniteNumber(N.getContentLength());return j??v(S)};return async N=>{let{url:S,method:j,data:P,signal:E,cancelToken:R,timeout:A,onDownloadProgress:B,onUploadProgress:I,responseType:z,headers:V,withCredentials:te="same-origin",fetchOptions:H}=aE(N),Y=t||fetch;z=z?(z+"").toLowerCase():"text";let ce=V9([E,R&&R.toAbortSignal()],A),K=null;const q=ce&&ce.unsubscribe&&(()=>{ce.unsubscribe()});let ge;try{if(I&&m&&j!=="get"&&j!=="head"&&(ge=await _(V,P))!==0){let O=new n(S,{method:"POST",body:P,duplex:"half"}),U;if(ye.isFormData(P)&&(U=O.headers.get("content-type"))&&V.setContentType(U),O.body){const[ie,le]=MS(ge,v0(RS(I)));P=DS(O.body,IS,ie,le)}}ye.isString(te)||(te=te?"include":"omit");const he=a&&"credentials"in n.prototype,be={...H,signal:ce,method:j.toUpperCase(),headers:V.normalize().toJSON(),body:P,duplex:"half",credentials:he?te:void 0};K=a&&new n(S,be);let W=await(a?Y(K,H):Y(S,be));const Z=g&&(z==="stream"||z==="response");if(g&&(B||Z&&q)){const O={};["status","statusText","headers"].forEach(fe=>{O[fe]=W[fe]});const U=ye.toFiniteNumber(W.headers.get("content-length")),[ie,le]=B&&MS(U,v0(RS(B),!0))||[];W=new s(DS(W.body,IS,ie,()=>{le&&le(),q&&q()}),O)}z=z||"text";let D=await x[ye.findKey(x,z)||"text"](W,N);return!Z&&q&&q(),await new Promise((O,U)=>{rE(O,U,{data:D,headers:pr.from(W.headers),status:W.status,statusText:W.statusText,config:N,request:K})})}catch(he){throw q&&q(),he&&he.name==="TypeError"&&/Load failed|fetch/i.test(he.message)?Object.assign(new ct("Network Error",ct.ERR_NETWORK,N,K,he&&he.response),{cause:he.cause||he}):ct.from(he,he&&he.code,N,K,he&&he.response)}}},K9=new Map,oE=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:i}=t,a=[s,i,n];let l=a.length,u=l,h,m,g=K9;for(;u--;)h=a[u],m=g.get(h),m===void 0&&g.set(h,m=u?new Map:Y9(t)),g=m;return m};oE();const i_={http:h9,xhr:U9,fetch:{get:oE}};ye.forEach(i_,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const zS=e=>`- ${e}`,Z9=e=>ye.isFunction(e)||e===null||e===!1;function Q9(e,t){e=ye.isArray(e)?e:[e];const{length:n}=e;let s,i;const a={};for(let l=0;l<n;l++){s=e[l];let u;if(i=s,!Z9(s)&&(i=i_[(u=String(s)).toLowerCase()],i===void 0))throw new ct(`Unknown adapter '${u}'`);if(i&&(ye.isFunction(i)||(i=i.get(t))))break;a[u||"#"+l]=i}if(!i){const l=Object.entries(a).map(([h,m])=>`adapter ${h} `+(m===!1?"is not supported by the environment":"is not available in the build"));let u=n?l.length>1?`since : 643`+l.map(zS).join(` 644`):" "+zS(l[0]):"as no adapter specified";throw new ct("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i}const lE={getAdapter:Q9,adapters:i_};function Ky(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Rm(null,e)}function $S(e){return Ky(e),e.headers=pr.from(e.headers),e.data=Yy.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),lE.getAdapter(e.adapter||Mm.adapter,e)(e).then(function(s){return Ky(e),s.data=Yy.call(e,e.transformResponse,s),s.headers=pr.from(s.headers),s},function(s){return sE(s)||(Ky(e),s&&s.response&&(s.response.data=Yy.call(e,e.transformResponse,s.response),s.response.headers=pr.from(s.response.headers))),Promise.reject(s)})}const cE="1.13.5",cx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{cx[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const US={};cx.transitional=function(t,n,s){function i(a,l){return"[Axios v"+cE+"] Transitional option '"+a+"'"+l+(s?". "+s:"")}return(a,l,u)=>{if(t===!1)throw new ct(i(l," has been removed"+(n?" in "+n:"")),ct.ERR_DEPRECATED);return n&&!US[l]&&(US[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,l,u):!0}};cx.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function X9(e,t,n){if(typeof e!="object")throw new ct("options must be an object",ct.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let i=s.length;for(;i-- >0;){const a=s[i],l=t[a];if(l){const u=e[a],h=u===void 0||l(u,a,e);if(h!==!0)throw new ct("option "+a+" must be "+h,ct.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ct("Unknown option "+a,ct.ERR_BAD_OPTION)}}const Gg={assertOptions:X9,validators:cx},Kr=Gg.validators;let $c=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ES,response:new ES}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?a&&!String(s.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(s.stack+=` 645`+a):s.stack=a}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Yc(this.defaults,n);const{transitional:s,paramsSerializer:i,headers:a}=n;s!==void 0&&Gg.assertOptions(s,{silentJSONParsing:Kr.transitional(Kr.boolean),forcedJSONParsing:Kr.transitional(Kr.boolean),clarifyTimeoutError:Kr.transitional(Kr.boolean),legacyInterceptorReqResOrdering:Kr.transitional(Kr.boolean)},!1),i!=null&&(ye.isFunction(i)?n.paramsSerializer={serialize:i}:Gg.assertOptions(i,{encode:Kr.function,serialize:Kr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Gg.assertOptions(n,{baseUrl:Kr.spelling("baseURL"),withXsrfToken:Kr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&ye.merge(a.common,a[n.method]);a&&ye.forEach(["delete","get","head","post","put","patch","common"],N=>{delete a[N]}),n.headers=pr.concat(l,a);const u=[];let h=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;h=h&&S.synchronous;const j=n.transitional||s_;j&&j.legacyInterceptorReqResOrdering?u.unshift(S.fulfilled,S.rejected):u.push(S.fulfilled,S.rejected)});const m=[];this.interceptors.response.forEach(function(S){m.push(S.fulfilled,S.rejected)});let g,x=0,v;if(!h){const N=[$S.bind(this),void 0];for(N.unshift(...u),N.push(...m),v=N.length,g=Promise.resolve(n);x<v;)g=g.then(N[x++],N[x++]);return g}v=u.length;let _=n;for(;x<v;){const N=u[x++],S=u[x++];try{_=N(_)}catch(j){S.call(this,j);break}}try{g=$S.call(this,_)}catch(N){return Promise.reject(N)}for(x=0,v=m.length;x<v;)g=g.then(m[x++],m[x++]);return g}getUri(t){t=Yc(this.defaults,t);const n=iE(t.baseURL,t.url,t.allowAbsoluteUrls);return tE(n,t.params,t.paramsSerializer)}};ye.forEach(["delete","get","head","options"],function(t){$c.prototype[t]=function(n,s){return this.request(Yc(s||{},{method:t,url:n,data:(s||{}).data}))}});ye.forEach(["post","put","patch"],function(t){function n(s){return function(a,l,u){return this.request(Yc(u||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:a,data:l}))}}$c.prototype[t]=n(),$c.prototype[t+"Form"]=n(!0)});let J9=class dE{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const s=this;this.promise.then(i=>{if(!s._listeners)return;let a=s._listeners.length;for(;a-- >0;)s._listeners[a](i);s._listeners=null}),this.promise.then=i=>{let a;const l=new Promise(u=>{s.subscribe(u),a=u}).then(i);return l.cancel=function(){s.unsubscribe(a)},l},t(function(a,l,u){s.reason||(s.reason=new Rm(a,l,u),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
645subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new dE(function(i){t=i}),cancel:t}}};function ez(e){return function(n){return e.apply(null,n)}}function tz(e){return ye.isObject(e)&&e.isAxiosError===!0}const Rw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Rw).forEach(([e,t])=>{Rw[t]=e});function uE(e){const t=new $c(e),n=W5($c.prototype.request,t);return ye.extend(n,$c.prototype,t,{allOwnKeys:!0}),ye.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return uE(Yc(e,i))},n}const Un=uE(Mm);Un.Axios=$c;Un.CanceledError=Rm;Un.CancelToken=J9;Un.isCancel=sE;Un.VERSION=cE;Un.toFormData=lx;Un.AxiosError=ct;Un.Cancel=Un.CanceledError;Un.all=function(t){return Promise.all(t)};Un.spread=ez;Un.isAxiosError=tz;Un.mergeConfig=Yc;Un.AxiosHeaders=pr;Un.formToJSON=e=>nE(ye.isHTMLForm(e)?new FormData(e):e);Un.getAdapter=lE.getAdapter;Un.HttpStatusCode=Rw;Un.default=Un;const{Axios:_he,AxiosError:Nhe,CanceledError:jhe,isCancel:She,CancelToken:khe,VERSION:Che,all:Phe,Cancel:The,isAxiosError:Ehe,spread:Ahe,toFormData:Mhe,AxiosHeaders:Rhe,HttpStatusCode:Ohe,formToJSON:Dhe,getAdapter:Ihe,mergeConfig:Lhe}=Un,nz=typeof window>"u",VS=!nz&&window.self!==window.top,Zy=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),vs=[];for(let e=0;e<256;++e)vs.push((e+256).toString(16).slice(1));function sz(e,t=0){return(vs[e[t+0]]+vs[e[t+1]]+vs[e[t+2]]+vs[e[t+3]]+"-"+vs[e[t+4]]+vs[e[t+5]]+"-"+vs[e[t+6]]+vs[e[t+7]]+"-"+vs[e[t+8]]+vs[e[t+9]]+"-"+vs[e[t+10]]+vs[e[t+11]]+vs[e[t+12]]+vs[e[t+13]]+vs[e[t+14]]+vs[e[t+15]]).toLowerCase()}let Qy;const rz=new Uint8Array(16);function iz(){if(!Qy){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Qy=crypto.getRandomValues.bind(crypto)}return Qy(rz)}const az=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),WS={randomUUID:az};function oz(e,t,n){var i;e=e||{};const s=e.random??((i=e.rng)==null?void 0:i.call(e))??iz();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,sz(s)}function lz(e,t,n){return WS.randomUUID&&!e?WS.randomUUID():oz(e)}class cz extends Error{constructor(t,n,s,i,a){super(t),this.name="Base44Error",this.status=n,this.code=s,this.data=i,this.originalError=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Tf({baseURL:e,headers:t={},token:n,interceptResponses:s=!0,onError:i}){const a=Un.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(a.defaults.headers.common.Authorization=`Bearer ${n}`),a.interceptors.request.use(l=>{typeof window<"u"&&l.headers.set("X-Origin-URL",window.location.href);const u=lz();if(l.requestId=u,VS)try{window.parent.postMessage({type:"api-request-start",requestId:u,data:{url:e+l.url,method:l.method,body:l.data instanceof FormData?"[FormData object]":l.data}},"*")}catch{}return l}),s&&a.interceptors.response.use(l=>{var u;const h=(u=l.config)===null||u===void 0?void 0:u.requestId;try{VS&&h&&window.parent.postMessage({type:"api-request-end",requestId:h,data:{statusCode:l.status,response:l.data}},"*")}catch{}return l.data},l=>{var u,h,m,g,x,v,_,N;const S=((h=(u=l.response)===null||u===void 0?void 0:u.data)===null||h===void 0?void 0:h.message)||((g=(m=l.response)===null||m===void 0?void 0:m.data)===null||g===void 0?void 0:g.detail)||l.message,j=new cz(S,(x=l.response)===null||x===void 0?void 0:x.status,(_=(v=l.response)===null||v===void 0?void 0:v.data)===null||_===void 0?void 0:_.code,(N=l.response)===null||N===void 0?void 0:N.data,l);return i==null||i(j),Promise.reject(j)}),a}function HS(e){const{axios:t,appId:n,getSocket:s}=e;return new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return uz(t,n,a,s)}})}function dz(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function uz(e,t,n,s){const i=`/apps/${t}/entities/${n}`;return{async list(a,l,u,h){const m={};return a&&(m.sort=a),l&&(m.limit=l),u&&(m.skip=u),h&&(m.fields=Array.isArray(h)?h.join(","):h),e.get(i,{params:m})},async filter(a,l,u,h,m){const g={q:JSON.stringify(a)};return l&&(g.sort=l),u&&(g.limit=u),h&&(g.skip=h),m&&(g.fields=Array.isArray(m)?m.join(","):m),e.get(i,{params:g})},async get(a){return e.get(`${i}/${a}`)},async create(a){return e.post(i,a)},async update(a,l){return e.put(`${i}/${a}`,l)},async delete(a){return e.delete(`${i}/${a}`)},async deleteMany(a){return e.delete(i,{data:a})},async bulkCreate(a){return e.post(`${i}/bulk`,a)},async updateMany(a,l){return e.patch(`${i}/update-many`,{query:a,data:l})}
645,async bulkUpdate(a){return e.put(`${i}/bulk`,a)},async importEntities(a){const l=new FormData;return l.append("file",a,a.name),e.post(`${i}/import`,l,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(a){const l=`entities:${t}:${n}`;return s().subscribeToRoom(l,{update_model:m=>{const g=dz(m.data);if(g)try{a(g)}catch(x){console.error("[Base44 SDK] Subscription callback error:",x)}}})}}}function hz(e,t){return{async call(n,s,i){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(s!=null&&s.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:a,queryParams:l,...u}=i??{},h={...u,...a&&{path_params:a},...l&&{query_params:l}};return await e.post(`/apps/${t}/integrations/custom/${n}/${s}`,h)}}}function qS(e,t){const n=hz(e,t);return new Proxy({},{get(s,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?n:new Proxy({},{get(a,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return async u=>{if(typeof u=="string")throw new Error(`Integration ${l} must receive an object with named parameters, received: ${u}`);let h,m;return u instanceof FormData||u&&Object.values(u).some(g=>g instanceof File)?(h=new FormData,Object.keys(u).forEach(g=>{u[g]instanceof File?h.append(g,u[g],u[g].name):typeof u[g]=="object"&&u[g]!==null?h.append(g,JSON.stringify(u[g])):h.append(g,u[g])}),m="multipart/form-data"):(h=u,m="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${l}`,h||u,{headers:{"Content-Type":m}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${l}`,h||u,{headers:{"Content-Type":m}})}}})}})}function fz(){return typeof window>"u"?!1:window!==window.parent}function mz(e,t,n){const a=Math.round(window.screenX+(window.outerWidth-500)/2),l=Math.round(window.screenY+(window.outerHeight-600)/2),u=window.open(e,"base44_auth",`width=500,height=600,left=${a},top=${l},resizable=yes,scrollbars=yes`);if(!u)return;const h=()=>{window.removeEventListener("message",m),clearInterval(g),u.closed||u.close()},m=x=>{var v;if(x.origin!==n||x.source!==u||!(!((v=x.data)===null||v===void 0)&&v.access_token))return;h();const _=new URL(t),{access_token:N,is_new_user:S}=x.data;_.searchParams.set("access_token",N),S!=null&&_.searchParams.set("is_new_user",String(S)),window.location.href=_.toString()},g=setInterval(()=>{u.closed&&h()},500);window.addEventListener("message",m)}function pz(e,t,n,s){return{async me(){return e.get(`/apps/${n}/entities/User/me`)},async updateMe(i){return e.put(`/apps/${n}/entities/User/me`,i)},redirectToLogin(i){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const a=i?new URL(i,window.location.origin).toString():window.location.href,l=`${s.appBaseUrl}/login?from_url=${encodeURIComponent(a)}`;window.location.href=l},loginWithProvider(i,a="/"){const l=new URL(a,window.location.origin).toString(),u=`app_id=${n}&from_url=${encodeURIComponent(l)}`;let h;i==="sso"?h=`/apps/${n}/auth/sso/login`:h=`/apps/auth${i==="google"?"":`/${i}`}/login`;const m=`${s.appBaseUrl}/api${h}?${u}`;if(fz()){const g=`${m}&popup_origin=${encodeURIComponent(window.location.origin)}`;return mz(g,l,window.location.origin)}window.location.href=m},logout(i){if(delete e.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(u){console.error("Failed to remove token from localStorage:",u)}const a=i||window.location.href,l=`${s.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(a)}`;window.location.href=l}},setToken(i,a=!0){if(i&&(e.defaults.headers.common.Authorization=`Bearer ${i}`,t.defaults.headers.common.Authorization=`Bearer ${i}`,a&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",i),window.localStorage.setItem("token",i)}catch(l){console.error("Failed to save token to localStorage:",l)}},async loginViaEmailPassword(i,a,l){var u;try{const h=await e.post(`/apps/${n}/auth/login`,{email:i,password:a,...l&&{turnstile_token:l}}),{access_token:m,user:g}=h;return m&&this.setToken(m),{access_token:m,user:g}}catch(h){throw((u=h.response)===null||u===void 0?void 0:u.status)===401&&await this.logout(),h}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(i,a){return e.post(`/apps/${n}/users/invite-user`,{user_email:i,role:a})},register(i){return e.post(`/apps/${n}/auth/register`,i)},verifyOtp({email:i,otpCode:a}){return e.post(`/apps/${n}/auth/verify-otp`,{email:i,otp_code:a})},resendOtp(i){return e.post(`/apps/${n}/auth/resend-otp`,{email:i})},resetPasswordRequest(i){return e.post(`/apps/${n}/auth/reset-password-request`,{email:i})},resetPassword({resetToken:i,newPassword:a}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:i,new_password:a})},changePassword({userId:i,currentPassword:a,newPassword:l}){return e.post(`/apps/${n}/auth/change-password`,{user_id:i,current_password:a,new_password:l})}}}function gz(e,t){return{async getAccessToken(n){const s=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(s)}}}
645function xz(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${n}`)).access_token},async getConnection(n){var s;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const a=await e.get(`/apps/${t}/external-auth/tokens/${n}`);return{accessToken:a.access_token,connectionConfig:(s=a.connection_config)!==null&&s!==void 0?s:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`)).access_token},async getCurrentAppUserConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const a=await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`);return{accessToken:a.access_token,connectionConfig:(s=a.connection_config)!==null&&s!==void 0?s:null}}}}function vz(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${n}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${n}`)}}}function Xf(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:s=!0,removeFromUrl:i=!0}=e;let a=null;if(typeof window<"u"&&window.location)try{const l=new URLSearchParams(window.location.search);if(a=l.get(n),a){if(s&&yz(a,{storageKey:t}),i){l.delete(n);const u=`${window.location.pathname}${l.toString()?`?${l.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,u)}return a}}catch(l){console.error("Error retrieving token from URL:",l)}if(typeof window<"u"&&window.localStorage)try{return a=window.localStorage.getItem(t),a}catch(l){console.error("Error retrieving token from local storage:",l)}return null}function yz(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(s){return console.error("Error saving token to local storage:",s),!1}}function GS(e,t,n){const s=(a,l)=>a?`${String(a).replace(/\/$/,"")}${l}`:l,i=a=>{const l=new Headers;if(n!=null&&n.getAuthHeaders){const u=n.getAuthHeaders();Object.entries(u).forEach(([h,m])=>{m!=null&&l.set(h,String(m))})}return a&&new Headers(a).forEach((u,h)=>{l.set(h,u)}),l};return{async invoke(a,l){if(typeof l=="string")throw new Error(`Function ${a} must receive an object with named parameters, received: ${l}`);let u,h;return l instanceof FormData||l&&Object.values(l).some(m=>m instanceof File)?(u=new FormData,Object.keys(l).forEach(m=>{l[m]instanceof File?u.append(m,l[m],l[m].name):typeof l[m]=="object"&&l[m]!==null?u.append(m,JSON.stringify(l[m])):u.append(m,l[m])}),h="multipart/form-data"):(u=l,h="application/json"),e.post(`/apps/${t}/functions/${a}`,u||l,{headers:{"Content-Type":h}})},async fetch(a,l={}){const h=`/functions${a.startsWith("/")?a:`/${a}`}`,m=i(l.headers),g={...l,headers:m};return await fetch(s(n==null?void 0:n.baseURL,h),g)}}}function YS({axios:e,getSocket:t,appId:n,serverUrl:s,token:i}){const a=`/apps/${n}/agents`,l={},u=()=>e.get(`${a}/conversations`),h=S=>e.get(`${a}/conversations/${S}`);return{getConversations:u,getConversation:h,listConversations:S=>e.get(`${a}/conversations`,{params:S}),createConversation:S=>e.post(`${a}/conversations`,S),addMessage:async(S,j)=>e.post(`${a}/conversations/v2/${S.id}/messages`,j),subscribeToConversation:(S,j)=>{const P=`/agent-conversations/${S}`,E=t(),R=h(S).then(A=>(l[S]=A,A));return E.subscribeToRoom(P,{connect:()=>{},update_model:async({data:A})=>{const B=JSON.parse(A);if(B._message){await R;const I=B._message,z=l[S];if(z){const V=z.messages||[],te=V.findIndex(Y=>Y.id===I.id),H=te!==-1?V.map((Y,ce)=>ce===te?I:Y):[...V,I];l[S]={...z,messages:H},j==null||j(l[S])}}}})},getWhatsAppConnectURL:S=>{const j=`${s}/api/apps/${n}/agents/${encodeURIComponent(S)}/whatsapp`,P=i??Xf();return P?`${j}?token=${P}`:j},getTelegramConnectURL:S=>{const j=`${s}/api/apps/${n}/agents/${encodeURIComponent(S)}/telegram`,P=i??Xf();return P?`${j}?token=${P}`:j}}}function KS(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(s){await e.post(`${n}/log-user-in-app/${s}`)},async fetchLogs(s={}){return await e.get(n,{params:s})},async getStats(s={}){return await e.get(`${n}/stats`,{params:s})}}}
vendor: 5,581 bytes, line 645
645function bz(e,t){return{async inviteUser(n,s){if(s!=="user"&&s!=="admin")throw new Error(`Invalid role: "${s}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:s})}}}const _a=Object.create(null);_a.open="0";_a.close="1";_a.ping="2";_a.pong="3";_a.message="4";_a.upgrade="5";_a.noop="6";const Yg=Object.create(null);Object.keys(_a).forEach(e=>{Yg[_a[e]]=e});const Ow={type:"error",data:"parser error"},hE=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",fE=typeof ArrayBuffer=="function",mE=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,a_=({type:e,data:t},n,s)=>hE&&t instanceof Blob?n?s(t):ZS(t,s):fE&&(t instanceof ArrayBuffer||mE(t))?n?s(t):ZS(new Blob([t]),s):s(_a[e]+(t||"")),ZS=(e,t)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];t("b"+(s||""))},n.readAsDataURL(e)};function QS(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Xy;function wz(e,t){if(hE&&e.data instanceof Blob)return e.data.arrayBuffer().then(QS).then(t);if(fE&&(e.data instanceof ArrayBuffer||mE(e.data)))return t(QS(e.data));a_(e,!1,n=>{Xy||(Xy=new TextEncoder),t(Xy.encode(n))})}const XS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ef=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<XS.length;e++)Ef[XS.charCodeAt(e)]=e;const _z=e=>{let t=e.length*.75,n=e.length,s,i=0,a,l,u,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const m=new ArrayBuffer(t),g=new Uint8Array(m);for(s=0;s<n;s+=4)a=Ef[e.charCodeAt(s)],l=Ef[e.charCodeAt(s+1)],u=Ef[e.charCodeAt(s+2)],h=Ef[e.charCodeAt(s+3)],g[i++]=a<<2|l>>4,g[i++]=(l&15)<<4|u>>2,g[i++]=(u&3)<<6|h&63;return m},Nz=typeof ArrayBuffer=="function",o_=(e,t)=>{if(typeof e!="string")return{type:"message",data:pE(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:jz(e.substring(1),t)}:Yg[n]?e.length>1?{type:Yg[n],data:e.substring(1)}:{type:Yg[n]}:Ow},jz=(e,t)=>{if(Nz){const n=_z(e);return pE(n,t)}else return{base64:!0,data:e}},pE=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},gE="�",Sz=(e,t)=>{const n=e.length,s=new Array(n);let i=0;e.forEach((a,l)=>{a_(a,!1,u=>{s[l]=u,++i===n&&t(s.join(gE))})})},kz=(e,t)=>{const n=e.split(gE),s=[];for(let i=0;i<n.length;i++){const a=o_(n[i],t);if(s.push(a),a.type==="error")break}return s};function Cz(){return new TransformStream({transform(e,t){wz(e,n=>{const s=n.length;let i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);const a=new DataView(i.buffer);a.setUint8(0,126),a.setUint16(1,s)}else{i=new Uint8Array(9);const a=new DataView(i.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(s))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Jy;function yg(e){return e.reduce((t,n)=>t+n.length,0)}function bg(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let s=0;for(let i=0;i<t;i++)n[i]=e[0][s++],s===e[0].length&&(e.shift(),s=0);return e.length&&s<e[0].length&&(e[0]=e[0].slice(s)),n}function Pz(e,t){Jy||(Jy=new TextDecoder);const n=[];let s=0,i=-1,a=!1;return new TransformStream({transform(l,u){for(n.push(l);;){if(s===0){if(yg(n)<1)break;const h=bg(n,1);a=(h[0]&128)===128,i=h[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(yg(n)<2)break;const h=bg(n,2);i=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),s=3}else if(s===2){if(yg(n)<8)break;const h=bg(n,8),m=new DataView(h.buffer,h.byteOffset,h.length),g=m.getUint32(0);if(g>Math.pow(2,21)-1){u.enqueue(Ow);break}i=g*Math.pow(2,32)+m.getUint32(4),s=3}else{if(yg(n)<i)break;const h=bg(n,i);u.enqueue(o_(a?h:Jy.decode(h),t)),s=0}if(i===0||i>e){u.enqueue(Ow);break}}}})}const xE=4;function Gn(e){if(e)return Tz(e)}function Tz(e){for(var t in Gn.prototype)e[t]=Gn.prototype[t];return e}Gn.prototype.on=Gn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Gn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Gn.prototype.off=Gn.prototype.removeListener=Gn.prototype.removeAllListeners=Gn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var s,i=0;i<n.length;i++)if(s=n[i],s===t||s.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Gn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],s=1;s<arguments.length;s++)t[s-1]=arguments[s];if(n){n=n.slice(0);for(var s=0,i=n.length;s<i;++s)n[s].apply(this,t)}return this};Gn.prototype.emitReserved=Gn.prototype.emit;Gn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Gn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const dx=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ni=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ez="arraybuffer";function vE(e,...t){return t.reduce((n,s)=>(e.hasOwnProperty(s)&&(n[s]=e[s]),n),{})}
vendor: 7,055 bytes, line 645
645const Az=ni.setTimeout,Mz=ni.clearTimeout;function ux(e,t){t.useNativeTimers?(e.setTimeoutFn=Az.bind(ni),e.clearTimeoutFn=Mz.bind(ni)):(e.setTimeoutFn=ni.setTimeout.bind(ni),e.clearTimeoutFn=ni.clearTimeout.bind(ni))}const Rz=1.33;function Oz(e){return typeof e=="string"?Dz(e):Math.ceil((e.byteLength||e.size)*Rz)}function Dz(e){let t=0,n=0;for(let s=0,i=e.length;s<i;s++)t=e.charCodeAt(s),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(s++,n+=4);return n}function yE(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Iz(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Lz(e){let t={},n=e.split("&");for(let s=0,i=n.length;s<i;s++){let a=n[s].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class Fz extends Error{constructor(t,n,s){super(t),this.description=n,this.context=s,this.type="TransportError"}}class l_ extends Gn{constructor(t){super(),this.writable=!1,ux(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,s){return super.emitReserved("error",new Fz(t,n,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=o_(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Iz(t);return n.length?"?"+n:""}}class Bz extends l_{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};kz(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Sz(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=yE()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let bE=!1;try{bE=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const zz=bE;function $z(){}class Uz extends Bz{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let s=location.port;s||(s=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,n){const s=this.request({method:"POST",data:t});s.on("success",n),s.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=t}}class ga extends Gn{constructor(t,n,s){super(),this.createRequest=t,ux(this,s),this._opts=s,this._method=s.method||"GET",this._uri=n,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var t;const n=vE(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(n);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&s.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var i;s.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=ga.requestsCount++,ga.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$z,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete ga.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}ga.requestsCount=0;ga.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",JS);else if(typeof addEventListener=="function"){const e="onpagehide"in ni?"pagehide":"unload";addEventListener(e,JS,!1)}}function JS(){for(let e in ga.requests)ga.requests.hasOwnProperty(e)&&ga.requests[e].abort()}const Vz=(function(){const e=wE({xdomain:!1});return e&&e.responseType!==null})();class Wz extends Uz{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Vz&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ga(wE,this.uri(),t)}}function wE(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||zz))return new XMLHttpRequest}catch{}if(!t)try{return new ni[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const _E=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Hz extends l_{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,s=_E?{}:vE(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,s)}catch(i){return this.emitReserved("error",i)}
vendor: 2,877 bytes, line 645
645this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const s=t[n],i=n===t.length-1;a_(s,this.supportsBinary,a=>{try{this.doWrite(s,a)}catch{}i&&dx(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=yE()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const eb=ni.WebSocket||ni.MozWebSocket;class qz extends Hz{createSocket(t,n,s){return _E?new eb(t,n,s):n?new eb(t,n):new eb(t)}doWrite(t,n){this.ws.send(n)}}class Gz extends l_{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Pz(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(n).getReader(),i=Cz();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const a=()=>{s.read().then(({done:u,value:h})=>{u||(this.onPacket(h),a())}).catch(u=>{})};a();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const s=t[n],i=n===t.length-1;this._writer.write(s).then(()=>{i&&dx(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Yz={websocket:qz,webtransport:Gz,polling:Wz},Kz=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Zz=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Dw(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),s=e.indexOf("]");n!=-1&&s!=-1&&(e=e.substring(0,n)+e.substring(n,s).replace(/:/g,";")+e.substring(s,e.length));let i=Kz.exec(e||""),a={},l=14;for(;l--;)a[Zz[l]]=i[l]||"";return n!=-1&&s!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;
645/g,":"),a.ipv6uri=!0),a.pathNames=Qz(a,a.path),a.queryKey=Xz(a,a.query),a}function Qz(e,t){const n=/\/{2,9}/g,s=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&s.splice(0,1),t.slice(-1)=="/"&&s.splice(s.length-1,1),s}function Xz(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,a){i&&(n[i]=a)}),n}const Iw=typeof addEventListener=="function"&&typeof removeEventListener=="function",Kg=[];Iw&&addEventListener("offline",()=>{Kg.forEach(e=>e())},!1);class kl extends Gn{constructor(t,n){if(super(),this.binaryType=Ez,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const s=Dw(t);n.hostname=s.host,n.secure=s.protocol==="https"||s.protocol==="wss",n.port=s.port,s.query&&(n.query=s.query)}else n.host&&(n.hostname=Dw(n.host).host);ux(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(s=>{const i=s.prototype.name;this.transports.push(i),this._transportsByName[i]=s}
vendor: 13,115 bytes, line 645
645),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Lz(this.opts.query)),Iw&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Kg.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=xE,n.transport=t,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&kl.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",kl.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let s=0;s<this.writeBuffer.length;s++){const i=this.writeBuffer[s].data;if(i&&(n+=Oz(i)),s>0&&n>this._maxPayload)return this.writeBuffer.slice(0,s);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,dx(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,s){return this._sendPacket("message",t,n,s),this}send(t,n,s){return this._sendPacket("message",t,n,s),this}_sendPacket(t,n,s,i){if(typeof n=="function"&&(i=n,n=void 0),typeof s=="function"&&(i=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const a={type:t,data:n,options:s};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}_onError(t){if(kl.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Iw&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Kg.indexOf(this._offlineEventListener);s!==-1&&Kg.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}kl.protocol=xE;class Jz extends kl{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),s=!1;kl.priorWebsocketSuccess=!1;const i=()=>{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",x=>{if(!s)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;kl.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(g(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const v=new Error("probe error");v.transport=n.name,this.emitReserved("upgradeError",v)}}))};function a(){s||(s=!0,g(),n.close(),n=null)}const l=x=>{const v=new Error("probe error: "+x);v.transport=n.name,a(),this.emitReserved("upgradeError",v)};function u(){l("transport closed")}function h(){l("socket closed")}function m(x){n&&x.name!==n.name&&a()}const g=()=>{n.removeListener("open",i),n.removeListener("error",l),n.removeListener("close",u),this.off("close",h),this.off("upgrading",m)};n.once("open",i),n.once("error",l),n.once("close",u),this.once("close",h),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let s=0;s<t.length;s++)~this.transports.indexOf(t[s])&&n.push(t[s]);return n}}let e$=class extends Jz{constructor(t,n={}){const s=typeof t=="object"?t:n;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>Yz[i]).filter(i=>!!i)),super(t,s)}};function t$(e,t="",n){let s=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),s=Dw(e)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const a=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+a+":"+s.port+t,s.href=s.protocol+"://"+a+(n&&n.port===s.port?"":":"+s.port),s}const n$=typeof ArrayBuffer=="function",s$=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,NE=Object.prototype.toString,r$=typeof Blob=="function"||typeof Blob<"u"&&NE.call(Blob)==="[object BlobConstructor]",i$=typeof File=="function"||typeof File<"u"&&NE.call(File)==="[object FileConstructor]";function c_(e){return n$&&(e instanceof ArrayBuffer||s$(e))||r$&&e instanceof Blob||i$&&e instanceof File}function Zg(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,s=e.length;n<s;n++)if(Zg(e[n]))return!0;return!1}if(c_(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Zg(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Zg(e[n]))return!0;return!1}function a$(e){const t=[],n=e.data,s=e;return s.data=Lw(n,t),s.attachments=t.length,{packet:s,buffers:t}}function Lw(e,t){if(!e)return e;if(c_(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let s=0;s<e.length;s++)n[s]=Lw(e[s],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=Lw(e[s],t));return n}return e}function o$(e,t){return e.data=Fw(e.data,t),delete e.attachments,e}function Fw(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Fw(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Fw(e[n],t));return e}const l$=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var It;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(It||(It={}));class c${constructor(t){this.replacer=t}encode(t){return(t.type===It.EVENT||t.type===It.ACK)&&Zg(t)?this.encodeAsBinary({type:t.type===It.EVENT?It.BINARY_EVENT:It.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===It.BINARY_EVENT||t.type===It.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=a$(t),s=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(s),i}}class d_ extends Gn{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const s=n.type===It.BINARY_EVENT;s||n.type===It.BINARY_ACK?(n.type=s?It.EVENT:It.ACK,this.reconstructor=new d$(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(c_(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const s={type:Number(t.charAt(0))};if(It[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===It.BINARY_EVENT||s.type===It.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const l=t.substring(a,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");s.attachments=Number(l)}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););s.nsp=t.substring(a,n)}else s.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const a=n+1;for(;++n;){const l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}s.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(d_.isPayloadValid(s.type,a))s.data=a;else throw new Error("invalid payload")}return s}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case It.CONNECT:return ek(n);case It.DISCONNECT:return n===void 0;case It.CONNECT_ERROR:return typeof n=="string"||ek(n);case It.EVENT:case It.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&l$.indexOf(n[0])===-1);case It.ACK:case It.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class d${constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=o$(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function ek(e){return Object.prototype.toString.call(e)==="[object Object]"}const u$=Object.freeze(Object.defineProperty({__proto__:null,Decoder:d_,Encoder:c$,get PacketType(){return It}},Symbol.toStringTag,{value:"Module"}));function Ai(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const h$=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});
vendor: 3,135 bytes, line 645
645class jE extends Gn{constructor(t,n,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Ai(t,"open",this.onopen.bind(this)),Ai(t,"packet",this.onpacket.bind(this)),Ai(t,"error",this.onerror.bind(this)),Ai(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var s,i,a;if(h$.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const l={type:It.EVENT,data:n};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const g=this.ids++,x=n.pop();this._registerAckCallback(g,x),l.id=g}const u=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,h=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!u||(h?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(t,n){var s;const i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let u=0;u<this.sendBuffer.length;u++)this.sendBuffer[u].id===t&&this.sendBuffer.splice(u,1);n.call(this,new Error("operation has timed out"))},i),l=(...u)=>{this.io.clearTimeoutFn(a),n.apply(this,u)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...n){return new Promise((s,i)=>{const a=(l,u)=>l?i(l):s(u);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...a)=>(this._queue[0],i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...a)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:It.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}
vendor: 7,087 bytes, line 645
645_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(s=>String(s.id)===t)){const s=this.acks[t];delete this.acks[t],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case It.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case It.EVENT:case It.BINARY_EVENT:this.onevent(t);break;case It.ACK:case It.BINARY_ACK:this.onack(t);break;case It.DISCONNECT:this.ondisconnect();break;case It.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let s=!1;return function(...i){s||(s=!0,n.packet({type:It.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:It.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let s=0;s<n.length;s++)if(t===n[s])return n.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let s=0;s<n.length;s++)if(t===n[s])return n.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const s of n)s.apply(this,t.data)}}}function Ju(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ju.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Ju.prototype.reset=function(){this.attempts=0};Ju.prototype.setMin=function(e){this.ms=e};Ju.prototype.setMax=function(e){this.max=e};Ju.prototype.setJitter=function(e){this.jitter=e};class Bw extends Gn{constructor(t,n){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ux(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Ju({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||u$;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new e$(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const i=Ai(n,"open",function(){s.onopen(),t&&t()}),a=u=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",u),t?t(u):this.maybeReconnectOnOpen()},l=Ai(n,"error",a);if(this._timeout!==!1){const u=this._timeout,h=this.setTimeoutFn(()=>{i(),a(new Error("timeout")),n.close()},u);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(i),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Ai(t,"ping",this.onping.bind(this)),Ai(t,"data",this.ondata.bind(this)),Ai(t,"error",this.onerror.bind(this)),Ai(t,"close",this.onclose.bind(this)),Ai(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){dx(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new jE(this,t,n),this.nsps[t]=s),s}_destroy(t){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let s=0;s<n.length;s++)this.engine.write(n[s],t.options)}
645cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const hf={};function Qg(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=t$(e,t.path||"/socket.io"),s=n.source,i=n.id,a=n.path,l=hf[i]&&a in hf[i].nsps,u=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let h;return u?h=new Bw(s,t):(hf[i]||(hf[i]=new Bw(s,t)),h=hf[i]),n.query&&!t.query&&(t.query=n.queryKey),h.socket(n.path,t)}Object.assign(Qg,{Manager:Bw,Socket:jE,io:Qg,connect:Qg});function tk(e,t){var n;const s=Qg(e.serverUrl,{path:e.mountPath,transports:e.transports,query:{app_id:e.appId,token:(n=e.token)!==null&&n!==void 0?n:Xf()}});return s.on("connect",async()=>{var i;return console.log("connect",s.id),(i=t.connect)===null||i===void 0?void 0:i.call(t)}),s.on("update_model",async i=>{var a;return(a=t.update_model)===null||a===void 0?void 0:a.call(t,i)}),s.on("error",async i=>{var a;return(a=t.error)===null||a===void 0?void 0:a.call(t,i)}),s.on("connect_error",async i=>{var a;return console.error("connect_error",i),(a=t.error)===null||a===void 0?void 0:a.call(t,i)}),s}function f$({config:e}){let t={...e};const n={},s={connect:async()=>{const _=[];Object.keys(n).forEach(N=>{h(N);const S=x(N);S==null||S.forEach(({connect:j})=>{const P=async()=>j==null?void 0:j();_.push(P())})}),await Promise.all(_)},update_model:async _=>{const S=x(_.room).map(j=>{var P;return(P=j.update_model)===null||P===void 0?void 0:P.call(j,_)});await Promise.all(S)},error:async _=>{console.error("error",_);const N=Object.values(n).flat().map(S=>{var j;return(j=S.error)===null||j===void 0?void 0:j.call(S,_)});await Promise.all(N)}};let i=tk(e,s);function a(){l()}function l(){i&&i.disconnect()}function u(_){a(),t={...t,..._},i=tk(t,s)}function h(_){i.emit("join",_)}function m(_){i.emit("leave",_)}async function g(_,N){var S;const j=JSON.stringify(N);return(S=s.update_model)===null||S===void 0?void 0:S.call(s,{room:_,data:j})}function x(_){return n[_]}return{socket:i,subscribeToRoom:(_,N)=>(n[_]||(h(_),n[_]=[]),n[_].push(N),()=>{var S,j;n[_]=(j=(S=n[_])===null||S===void 0?void 0:S.filter(P=>P!==N))!==null&&j!==void 0?j:[],n[_].length===0&&m(_)}),updateConfig:u,updateModel:g,disconnect:l}}const ff=typeof window<"u"?window:{base44SharedInstances:{}};function m$(e,t){return ff.base44SharedInstances||(ff.base44SharedInstances={}),ff.base44SharedInstances[e]||(ff.base44SharedInstances[e]={instance:t()}),ff.base44SharedInstances[e].instance}const p$="__user_heartbeat_event__",g$="__initialization_event__",x$="__session_duration_event__",nk="analytics-enable",sk="base44_analytics_session_id",v$={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},y$="analytics",rn=m$(y$,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...v$,...C$()}})),b$=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:s})=>{var i;const{maxQueueSize:a,throttleTime:l,batchSize:u}=rn.config;if(!(!((i=rn.config)===null||i===void 0)&&i.enabled))return{track:()=>{},cleanup:()=>{}};let h;const m=`${t}/api/apps/${n}/analytics/track/batch`,g=async R=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:R}})},x=R=>{try{const A=JSON.stringify({events:R}),B=new Blob([A],{type:"application/json"});return typeof navigator>"u"||A.length>6e4||!navigator.sendBeacon(m,B)}catch{return!1}},v=async(R,A={})=>
645{if(R.length===0)return;const B=await k$(s),I=R.map(S$(B));try{(!A.isBeacon||!x(I))&&await g(I)}catch{}},_=()=>{ik(v,{throttleTime:l,batchSize:u})},N=R=>{if(rn.requestsQueue.length>=a)return;const A=j$();rn.requestsQueue.push({...R,...A}),_()},S=()=>{ik(v,{throttleTime:l,batchSize:u}),h=ak(N),_$()},j=()=>{rk(),h==null||h(),N$(N);const R=rn.requestsQueue.splice(0);v(R,{isBeacon:!0})},P=()=>{typeof window>"u"||(document.visibilityState==="hidden"?j():document.visibilityState==="visible"&&S())},E=()=>{rk(),h==null||h(),typeof window<"u"&&window.removeEventListener("visibilitychange",P)};return _(),h=ak(N),w$(N),typeof window<"u"&&window.addEventListener("visibilitychange",P),{track:N,cleanup:E}};function rk(){rn.isProcessing=!1}async function ik(e,t){if(rn.isProcessing)return;rn.isProcessing=!0;const{throttleTime:n=1e3,batchSize:s=30}=t??{};for(;rn.isProcessing&&rn.requestsQueue.length>0;){const i=rn.requestsQueue.splice(0,s);i.length&&await e(i),await new Promise(a=>setTimeout(a,n))}rn.isProcessing=!1}function ak(e){var t;if(rn.isHeartBeatProcessing||((t=rn.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};rn.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:p$})},rn.config.heartBeatInterval);return()=>{clearInterval(n),rn.isHeartBeatProcessing=!1}}function w$(e){typeof window>"u"||rn.wasInitializationTracked||(rn.wasInitializationTracked=!0,e({eventName:g$,properties:{referrer:document==null?void 0:document.referrer}}))}function _$(){typeof window>"u"||rn.sessionStartTime!==null||(rn.sessionStartTime=new Date().toISOString())}function N$(e){if(typeof window>"u"||rn.sessionStartTime===null)return;const t=new Date().getTime()-new Date(rn.sessionStartTime).getTime();rn.sessionStartTime=null,e({eventName:x$,properties:{sessionDuration:t}})}function j$(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function S$(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let tb=null;async function k$(e){if(!rn.sessionContext){if(!tb){const t=P$();tb=e.me().then(n=>({user_id:n.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}rn.sessionContext=await tb}return rn.sessionContext}function C$(){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search).get(nk);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(nk);const s=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",s),{enabled:t==="true"}}function P$(){if(typeof window>"u")return Zy();try{const e=localStorage.getItem(sk);if(!e){const t=Zy();return localStorage.setItem(sk,t),t}return e}catch{return Zy()}}function T$(e){var t,n;const{serverUrl:s="https://base44.app",appId:i,token:a,serviceToken:l,requiresAuth:u=!1,appBaseUrl:h,options:m,functionsVersion:g,headers:x}=e,v=typeof h=="string"?h:"",_={serverUrl:s,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:i,token:a};let N=null;const S=()=>(N||(N=f$({config:_})),N),j={...x,"X-App-Id":String(i)},P=g?{...j,"Base44-Functions-Version":g}:j,E=Tf({baseURL:`${s}/api`,headers:j,token:a,onError:m==null?void 0:m.onError}),R=Tf({baseURL:`${s}/api`,headers:P,token:a,interceptResponses:!1,onError:m==null?void 0:m.onError}),A={...j,...a?{"on-behalf-of":`Bearer ${a}`}:{}},B=Tf({baseURL:`${s}/api`,headers:A,token:l,onError:m==null?void 0:m.onError}),I=Tf({baseURL:`${s}/api`,headers:P,token:l,interceptResponses:!1}),z=pz(E,R,i,{appBaseUrl:v}),V={entities:HS({axios:E,appId:i,getSocket:S}),integrations:qS(E,i),connectors:vz(E,i),auth:z,functions:GS(R,i,{getAuthHeaders:()=>{const Y={},ce=a||Xf();return ce&&(Y.Authorization=`Bearer ${ce}`),Y},baseURL:(t=R.defaults)===null||t===void 0?void 0:t.baseURL}),agents:YS({axios:E,getSocket:S,appId:i,serverUrl:s,token:a}),appLogs:KS(E,i),users:bz(E,i),analytics:b$({axiosClient:E,serverUrl:s,appId:i,userAuthModule:z}),cleanup:()=>{V.analytics.cleanup(),N&&N.disconnect()}},te={entities:HS({axios:B,appId:i,getSocket:S}),integrations:qS(B,i),sso:gz(B,i),connectors:xz(B,i),functions:GS(I,i,{getAuthHeaders:()=>{const Y={};return l&&(Y.Authorization=`Bearer ${l}`),Y},baseURL:(n=I.defaults)===null||n===void 0?void 0:n.baseURL}
vendor: 37,588 bytes, lines 645-653
645),agents:YS({axios:B,getSocket:S,appId:i,serverUrl:s,token:a}),appLogs:KS(B,i),cleanup:()=>{N&&N.disconnect()}};if(typeof window<"u"){const Y=a||Xf();Y&&V.auth.setToken(Y)}return u&&typeof window<"u"&&setTimeout(async()=>{try{await V.auth.isAuthenticated()||V.auth.redirectToLogin(window.location.href)}catch(Y){console.error("Authentication check failed:",Y),V.auth.redirectToLogin(window.location.href)}},0),{...V,setToken(Y){V.auth.setToken(Y),N&&N.updateConfig({token:Y}),_.token=Y},getConfig(){return{serverUrl:s,appId:i,requiresAuth:u}},get asServiceRole(){if(!l)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return te}}}const SE=typeof window>"u",E$=SE?{localStorage:new Map}:window,Bf=E$.localStorage,A$=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),Xd=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(SE)return t;const s=`base44_${A$(e)}`,i=new URLSearchParams(window.location.search),a=i.get(e);if(n){i.delete(e);const u=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,u)}if(a)return Bf.setItem(s,a),a;if(t)return Bf.setItem(s,t),t;const l=Bf.getItem(s);return l||null},M$=()=>(Xd("clear_access_token")==="true"&&(Bf.removeItem("base44_access_token"),Bf.removeItem("token")),{appId:Xd("app_id",{defaultValue:"69b0acbeed53c67ca62169c9"}),token:Xd("access_token",{removeFromUrl:!0}),fromUrl:Xd("from_url",{defaultValue:window.location.href}),functionsVersion:Xd("functions_version",{defaultValue:"prod"}),appBaseUrl:Xd("app_base_url",{defaultValue:void 0})}),Af={...M$()},{appId:R$,token:O$,functionsVersion:D$,appBaseUrl:I$}=Af,ne=T$({appId:R$,token:O$,functionsVersion:D$,serverUrl:"",requiresAuth:!1,appBaseUrl:I$}),u_=w.createContext({});function eh(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const hx=w.createContext(null),fx=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class L$ extends w.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function F$({children:e,isPresent:t}){const n=w.useId(),s=w.useRef(null),i=w.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=w.useContext(fx);return w.useInsertionEffect(()=>{const{width:l,height:u,top:h,left:m}=i.current;if(t||!s.current||!l||!u)return;s.current.dataset.motionPopId=n;const g=document.createElement("style");return a&&(g.nonce=a),document.head.appendChild(g),g.sheet&&g.sheet.insertRule(` 646 [data-motion-pop-id="${n}"] { 647 position: absolute !important; 648 width: ${l}px !important; 649 height: ${u}px !important; 650 top: ${h}px !important; 651 left: ${m}px !important; 652 } 653 `),()=>{document.head.removeChild(g)}},[t]),r.jsx(L$,{isPresent:t,childRef:s,sizeRef:i,children:w.cloneElement(e,{ref:s})})}const B$=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:a,mode:l})=>{const u=eh(z$),h=w.useId(),m=w.useCallback(x=>{u.set(x,!0);for(const v of u.values())if(!v)return;s&&s()},[u,s]),g=w.useMemo(()=>({id:h,initial:t,isPresent:n,custom:i,onExitComplete:m,register:x=>(u.set(x,!1),()=>u.delete(x))}),a?[Math.random(),m]:[n,m]);return w.useMemo(()=>{u.forEach((x,v)=>u.set(v,!1))},[n]),w.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),l==="popLayout"&&(e=r.jsx(F$,{isPresent:n,children:e})),r.jsx(hx.Provider,{value:g,children:e})};function z$(){return new Map}function kE(e=!0){const t=w.useContext(hx);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,a=w.useId();w.useEffect(()=>{e&&i(a)},[e]);const l=w.useCallback(()=>e&&s&&s(a),[a,s,e]);return!n&&s?[!1,l]:[!0]}const wg=e=>e.key||"";function ok(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const h_=typeof window<"u",mx=h_?w.useLayoutEffect:w.useEffect,Lt=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:a="sync",propagate:l=!1})=>{const[u,h]=kE(l),m=w.useMemo(()=>ok(e),[e]),g=l&&!u?[]:m.map(wg),x=w.useRef(!0),v=w.useRef(m),_=eh(()=>new Map),[N,S]=w.useState(m),[j,P]=w.useState(m);mx(()=>{x.current=!1,v.current=m;for(let A=0;A<j.length;A++){const B=wg(j[A]);g.includes(B)?_.delete(B):_.get(B)!==!0&&_.set(B,!1)}},[j,g.length,g.join("-")]);const E=[];if(m!==N){let A=[...m];for(let B=0;B<j.length;B++){const I=j[B],z=wg(I);g.includes(z)||(A.splice(B,0,I),E.push(I))}a==="wait"&&E.length&&(A=E),P(ok(A)),S(m);return}const{forceRender:R}=w.useContext(u_);return r.jsx(r.Fragment,{children:j.map(A=>{const B=wg(A),I=l&&!u?!1:m===j||g.includes(B),z=()=>{if(_.has(B))_.set(B,!0);else return;let V=!0;_.forEach(te=>{te||(V=!1)}),V&&(R==null||R(),P(v.current),l&&(h==null||h()),s&&s())};return r.jsx(B$,{isPresent:I,initial:!x.current||n?void 0:!1,custom:I?void 0:t,presenceAffectsLayout:i,mode:a,onExitComplete:I?void 0:z,children:A},B)})})},Xs=e=>e;let $$=Xs,CE=Xs;function f_(e){let t;return()=>(t===void 0&&(t=e()),t)}const Kc=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s},po=e=>e*1e3,go=e=>e/1e3,U$={useManualTiming:!1};function V$(e){let t=new Set,n=new Set,s=!1,i=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function u(m){a.has(m)&&(h.schedule(m),e()),m(l)}const h={schedule:(m,g=!1,x=!1)=>{const _=x&&s?t:n;return g&&a.add(m),_.has(m)||_.add(m),m},cancel:m=>{n.delete(m),a.delete(m)},process:m=>{if(l=m,s){i=!0;return}s=!0,[t,n]=[n,t],t.forEach(u),t.clear(),s=!1,i&&(i=!1,h.process(m))}};return h}const _g=["read","resolveKeyframes","update","preRender","render","postRender"],W$=40;function PE(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,l=_g.reduce((P,E)=>(P[E]=V$(a),P),{}),{read:u,resolveKeyframes:h,update:m,preRender:g,render:x,postRender:v}=l,_=()=>{const P=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(P-i.timestamp,W$),1),i.timestamp=P,i.isProcessing=!0,u.process(i),h.process(i),m.process(i),g.process(i),x.process(i),v.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(_))},N=()=>{n=!0,s=!0,i.isProcessing||e(_)};return{schedule:_g.reduce((P,E)=>{const R=l[E];return P[E]=(A,B=!1,I=!1)=>(n||N(),R.schedule(A,B,I)),P},{}),cancel:P=>{for(let E=0;E<_g.length;E++)l[_g[E]].cancel(P)},state:i,steps:l}}const{schedule:Ht,cancel:Fi,state:ls,steps:nb}=PE(typeof requestAnimationFrame<"u"?requestAnimationFrame:Xs,!0),TE=w.createContext({strict:!1}),lk={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Bu={};for(const e in lk)Bu[e]={isEnabled:t=>lk[e].some(n=>!!t[n])};function H$(e){for(const t in e)Bu[t]={...Bu[t],...e[t]}}const q$=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function y0(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||q$.has(e)}let EE=e=>!y0(e);function G$(e){e&&(EE=t=>t.startsWith("on")?!y0(t):e(t))}try{G$(require("@emotion/is-prop-valid").default)}catch{}function Y$(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(EE(i)||n===!0&&y0(i)||!t&&!y0(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}function K$(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...s)=>e(...s);return new Proxy(n,{get:(s,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const px=w.createContext({});function Jf(e){return typeof e=="string"||Array.isArray(e)}function gx(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const m_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],p_=["initial",...m_];function xx(e){return gx(e.animate)||p_.some(t=>Jf(e[t]))}function AE(e){return!!(xx(e)||e.variants)}function Z$(e,t){if(xx(e)){const{initial:n,animate:s}=e;return{initial:n===!1||Jf(n)?n:void 0,animate:Jf(s)?s:void 0}}return e.inherit!==!1?t:{}}function Q$(e){const{initial:t,animate:n}=Z$(e,w.useContext(px));return w.useMemo(()=>({initial:t,animate:n}),[ck(t),ck(n)])}function ck(e){return Array.isArray(e)?e.join(" "):e}const X$=Symbol.for("motionComponentSymbol");function cu(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function J$(e,t,n){return w.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):cu(n)&&(n.current=s))},[t])}const g_=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),e7="framerAppearId",ME="data-"+g_(e7),{schedule:x_}=PE(queueMicrotask,!1),RE=w.createContext({});function t7(e,t,n,s,i){var a,l;const{visualElement:u}=w.useContext(px),h=w.useContext(TE),m=w.useContext(hx),g=w.useContext(fx).reducedMotion,x=w.useRef(null);s=s||h.renderer,!x.current&&s&&(x.current=s(e,{visualState:t,parent:u,props:n,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:g}));const v=x.current,_=w.useContext(RE);v&&!v.projection&&i&&(v.type==="html"||v.type==="svg")&&n7(x.current,n,i,_);const N=w.useRef(!1);w.useInsertionEffect(()=>{v&&N.current&&v.update(n,m)});const S=n[ME],j=w.useRef(!!S&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,S))&&((l=window.MotionHasOptimisedAnimation)===null||l===void 0?void 0:l.call(window,S)));return mx(()=>{v&&(N.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),x_.render(v.render),j.current&&v.animationState&&v.animationState.animateChanges())}),w.useEffect(()=>{v&&(!j.current&&v.animationState&&v.animationState.animateChanges(),j.current&&(queueMicrotask(()=>{var P;(P=window.MotionHandoffMarkAsComplete)===null||P===void 0||P.call(window,S)}),j.current=!1))}),v}function n7(e,t,n,s){const{layoutId:i,layout:a,drag:l,dragConstraints:u,layoutScroll:h,layoutRoot:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:OE(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!l||u&&cu(u),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:s,layoutScroll:h,layoutRoot:m})}function OE(e){if(e)return e.options.allowProjection!==!1?e.projection:OE(e.parent)}function s7({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:s,Component:i}){var a,l;e&&H$(e);function u(m,g){let x;const v={...w.useContext(fx),...m,layoutId:r7(m)},{isStatic:_}=v,N=Q$(m),S=s(m,_);if(!_&&h_){i7();const j=a7(v);x=j.MeasureLayout,N.visualElement=t7(i,S,v,t,j.ProjectionNode)}return r.jsxs(px.Provider,{value:N,children:[x&&N.visualElement?r.jsx(x,{visualElement:N.visualElement,...v}):null,n(i,m,J$(S,N.visualElement,g),S,_,N.visualElement)]})}u.displayName=`motion.${typeof i=="string"?i:`create(${(l=(a=i.displayName)!==null&&a!==void 0?a:i.name)!==null&&l!==void 0?l:""})`}`;const h=w.forwardRef(u);return h[X$]=i,h}function r7({layoutId:e}){const t=w.useContext(u_).id;return t&&e!==void 0?t+"-"+e:e}function i7(e,t){w.useContext(TE).strict}function a7(e){const{drag:t,layout:n}=Bu;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const o7=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function v_(e){return typeof e!="string"||e.includes("-")?!1:!!(o7.indexOf(e)>-1||/[A-Z]/u.test(e))}function dk(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function y_(e,t,n,s){if(typeof t=="function"){const[i,a]=dk(s);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=dk(s);t=t(n!==void 0?n:e.custom,i,a)}return t}const zw=e=>Array.isArray(e),l7=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),c7=e=>zw(e)?e[e.length-1]||0:e,Ds=e=>!!(e&&e.getVelocity);function Xg(e){const t=Ds(e)?e.get():e;return l7(t)?t.toValue():t}function d7({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},s,i,a){const l={latestValues:u7(s,i,a,e),renderState:t()};return n&&(l.onMount=u=>n({props:s,current:u,...l}),l.onUpdate=u=>n(u)),l}const DE=e=>(t,n)=>{const s=w.useContext(px),i=w.useContext(hx),a=()=>d7(e,t,s,i);return n?a():eh(a)};function u7(e,t,n,s){const i={},a=s(e,{});for(const v in a)i[v]=Xg(a[v]);let{initial:l,animate:u}=e;const h=xx(e),m=AE(e);t&&m&&!h&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let g=n?n.initial===!1:!1;g=g||l===!1;const x=g?u:l;if(x&&typeof x!="boolean"&&!gx(x)){const v=Array.isArray(x)?x:[x];for(let _=0;_<v.length;_++){const N=y_(e,v[_]);if(N){const{transitionEnd:S,transition:j,...P}=N;for(const E in P){let R=P[E];if(Array.isArray(R)){const A=g?R.length-1:0;R=R[A]}R!==null&&(i[E]=R)}for(const E in S)i[E]=S[E]}}}return i}const th=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ad=new Set(th),IE=e=>t=>typeof t=="string"&&t.startsWith(e),LE=IE("--"),h7=IE("var(--"),b_=e=>h7(e)?f7.test(e.split("/*")[0].trim()):!1,f7=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,FE=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Na=(e,t,n)=>n>t?t:n<e?e:n,nh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},em={...nh,transform:e=>Na(0,1,e)},Ng={...nh,default:1},Om=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),dl=Om("deg"),xa=Om("%"),ot=Om("px"),m7=Om("vh"),p7=Om("vw"),uk={...xa,parse:e=>xa.parse(e)/100,transform:e=>xa.transform(e*100)},g7={borderWidth:ot,borderTopWidth:ot,borderRightWidth:ot,borderBottomWidth:ot,borderLeftWidth:ot,borderRadius:ot,radius:ot,borderTopLeftRadius:ot,borderTopRightRadius:ot,borderBottomRightRadius:ot,borderBottomLeftRadius:ot,width:ot,maxWidth:ot,height:ot,maxHeight:ot,top:ot,right:ot,bottom:ot,left:ot,padding:ot,paddingTop:ot,paddingRight:ot,paddingBottom:ot,paddingLeft:ot,margin:ot,marginTop:ot,marginRight:ot,marginBottom:ot,marginLeft:ot,backgroundPositionX:ot,backgroundPositionY:ot},x7={rotate:dl,rotateX:dl,rotateY:dl,rotateZ:dl,scale:Ng,scaleX:Ng,scaleY:Ng,scaleZ:Ng,skew:dl,skewX:dl,skewY:dl,distance:ot,translateX:ot,translateY:ot,translateZ:ot,x:ot,y:ot,z:ot,perspective:ot,transformPerspective:ot,opacity:em,originX:uk,originY:uk,originZ:ot},hk={...nh,transform:Math.round},w_={...g7,...x7,zIndex:hk,size:ot,fillOpacity:em,strokeOpacity:em,numOctaves:hk},v7={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},y7=th.length;function b7(e,t,n){let s="",i=!0;for(let a=0;a<y7;a++){const l=th[a],u=e[l];if(u===void 0)continue;let h=!0;if(typeof u=="number"?h=u===(l.startsWith("scale")?1:0):h=parseFloat(u)===0,!h||n){const m=FE(u,w_[l]);if(!h){i=!1;const g=v7[l]||l;s+=`${g}(${m}) `}n&&(t[l]=m)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function __(e,t,n){const{style:s,vars:i,transformOrigin:a}=e;let l=!1,u=!1;for(const h in t){const m=t[h];if(ad.has(h)){l=!0;continue}else if(LE(h)){i[h]=m;continue}else{const g=FE(m,w_[h]);h.startsWith("origin")?(u=!0,a[h]=g):s[h]=g}}if(t.transform||(l||n?s.transform=b7(t,e.transform,n):s.transform&&(s.transform="none")),u){const{originX:h="50%",originY:m="50%",originZ:g=0}=a;s.transformOrigin=`${h} ${m} ${g}`}}const w7={offset:"stroke-dashoffset",array:"stroke-dasharray"},_7={offset:"strokeDashoffset",array:"strokeDasharray"};function N7(e,t,n=1,s=0,i=!0){e.pathLength=1;const a=i?w7:_7;e[a.offset]=ot.transform(-s);const l=ot.transform(t),u=ot.transform(n);e[a.array]=`${l} ${u}`}function fk(e,t,n){return typeof e=="string"?e:ot.transform(t+n*e)}function j7(e,t,n){const s=fk(t,e.x,e.width),i=fk(n,e.y,e.height);return`${s} ${i}`}function N_(e,{attrX:t,attrY:n,attrScale:s,originX:i,originY:a,pathLength:l,pathSpacing:u=1,pathOffset:h=0,...m},g,x){if(__(e,m,x),g){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:v,style:_,dimensions:N}=e;v.transform&&(N&&(_.transform=v.transform),delete v.transform),N&&(i!==void 0||a!==void 0||_.transform)&&(_.transformOrigin=j7(N,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(v.x=t),n!==void 0&&(v.y=n),s!==void 0&&(v.scale=s),l!==void 0&&N7(v,l,u,h,!1)}const j_=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),BE=()=>({...j_(),attrs:{}}),S_=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zE(e,{style:t,vars:n},s,i){Object.assign(e.style,t,i&&i.getProjectionStyles(s));for(const a in n)e.style.setProperty(a,n[a])}const $E=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function UE(e,t,n,s){zE(e,t,void 0,s);for(const i in t.attrs)e.setAttribute($E.has(i)?i:g_(i),t.attrs[i])}const b0={};function S7(e){Object.assign(b0,e)}function VE(e,{layout:t,layoutId:n}){return ad.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!b0[e]||e==="opacity")}function k_(e,t,n){var s;const{style:i}=e,a={};for(const l in i)(Ds(i[l])||t.style&&Ds(t.style[l])||VE(l,e)||((s=n==null?void 0:n.getValue(l))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(a[l]=i[l]);return a}function WE(e,t,n){const s=k_(e,t,n);for(const i in e)if(Ds(e[i])||Ds(t[i])){const a=th.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[a]=e[i]}return s}function k7(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const mk=["x","y","width","height","cx","cy","r"],C7={useVisualState:DE({scrapeMotionValuesFromProps:WE,createRenderState:BE,onUpdate:({props:e,prevProps:t,current:n,renderState:s,latestValues:i})=>{if(!n)return;let a=!!e.drag;if(!a){for(const u in i)if(ad.has(u)){a=!0;break}}if(!a)return;let l=!t;if(t)for(let u=0;u<mk.length;u++){const h=mk[u];e[h]!==t[h]&&(l=!0)}l&&Ht.read(()=>{k7(n,s),Ht.render(()=>{N_(s,i,S_(n.tagName),e.transformTemplate),UE(n,s)})})}})},P7={useVisualState:DE({scrapeMotionValuesFromProps:k_,createRenderState:j_})};function HE(e,t,n){for(const s in t)!Ds(t[s])&&!VE(s,n)&&(e[s]=t[s])}function T7({transformTemplate:e},t){return w.useMemo(()=>{const n=j_();return __(n,t,e),Object.assign({},n.vars,n.style)},[t])}function E7(e,t){const n=e.style||{},s={};return HE(s,n,e),Object.assign(s,T7(e,t)),s}function A7(e,t){const n={},s=E7(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}function M7(e,t,n,s){const i=w.useMemo(()=>{const a=BE();return N_(a,t,S_(s),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};HE(a,e.style,e),i.style={...a,...i.style}}return i}function R7(e=!1){return(n,s,i,{latestValues:a},l)=>{const h=(v_(n)?M7:A7)(s,a,l,n),m=Y$(s,typeof n=="string",e),g=n!==w.Fragment?{...m,...h,ref:i}:{},{children:x}=s,v=w.useMemo(()=>Ds(x)?x.get():x,[x]);return w.createElement(n,{...g,children:v})}}function O7(e,t){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const l={...v_(s)?C7:P7,preloadedFeatures:e,useRender:R7(i),createVisualElement:t,Component:s};return s7(l)}}function qE(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}function vx(e,t,n){const s=e.getProps();return y_(s,t,n!==void 0?n:s.custom,e)}const GE=f_(()=>window.ScrollTimeline!==void 0);class D7{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let s=0;s<this.animations.length;s++)this.animations[s][t]=n}attachTimeline(t,n){const s=this.animations.map(i=>{if(GE()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{s.forEach((i,a)=>{i&&i(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class I7 extends D7{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function C_(e,t){return e?e[t]||e.default||e:void 0}const $w=2e4;function YE(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<$w;)t+=n,s=e.next(t);return t>=$w?1/0:t}function P_(e){return typeof e=="function"}function pk(e,t){e.timeline=t,e.onfinish=null}const T_=e=>Array.isArray(e)&&typeof e[0]=="number",L7={linearEasing:void 0};function F7(e,t){const n=f_(e);return()=>{var s;return(s=L7[t])!==null&&s!==void 0?s:n()}}const w0=F7(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),KE=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)s+=e(Kc(0,i-1,a))+", ";return`linear(${s.substring(0,s.length-2)})`};function ZE(e){return!!(typeof e=="function"&&w0()||!e||typeof e=="string"&&(e in Uw||w0())||T_(e)||Array.isArray(e)&&e.every(ZE))}const Mf=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Uw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mf([0,.65,.55,1]),circOut:Mf([.55,0,1,.45]),backIn:Mf([.31,.01,.66,-.59]),backOut:Mf([.33,1.53,.69,.99])};function QE(e,t){if(e)return typeof e=="function"&&w0()?KE(e,t):T_(e)?Mf(e):Array.isArray(e)?e.map(n=>QE(n,t)||Uw.easeOut):Uw[e]}const Ci={x:!1,y:!1};function XE(){return Ci.x||Ci.y}function JE(e,t,n){var s;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const a=(s=void 0)!==null&&s!==void 0?s:i.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function e4(e,t){const n=JE(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function gk(e){return t=>{t.pointerType==="touch"||XE()||e(t)}}function B7(e,t,n={}){const[s,i,a]=e4(e,n),l=gk(u=>{const{target:h}=u,m=t(u);if(typeof m!="function"||!h)return;const g=gk(x=>{m(x),h.removeEventListener("pointerleave",g)});h.addEventListener("pointerleave",g,i)});return s.forEach(u=>{u.addEventListener("pointerenter",l,i)}),a}const t4=(e,t)=>t?e===t?!0:t4(e,t.parentElement):!1,E_=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,z7=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function $7(e){return z7.has(e.tagName)||e.tabIndex!==-1}const Rf=new WeakSet;function xk(e){return t=>{t.key==="Enter"&&e(t)}}function sb(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const U7=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=xk(()=>{if(Rf.has(n))return;sb(n,"down");const i=xk(()=>{sb(n,"up")}),a=()=>sb(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function vk(e){return E_(e)&&!XE()}function V7(e,t,n={}){const[s,i,a]=e4(e,n),l=u=>{const h=u.currentTarget;if(!vk(u)||Rf.has(h))return;Rf.add(h);const m=t(u),g=(_,N)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",v),!(!vk(_)||!Rf.has(h))&&(Rf.delete(h),typeof m=="function"&&m(_,{success:N}))},x=_=>{g(_,n.useGlobalTarget||t4(h,_.target))},v=_=>{g(_,!1)};window.addEventListener("pointerup",x,i),window.addEventListener("pointercancel",v,i)};return s.forEach(u=>{!$7(u)&&u.getAttribute("tabindex")===null&&(u.tabIndex=0),(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,i),u.addEventListener("focus",m=>U7(m,i),i)}),a}function W7(e){return e==="x"||e==="y"?Ci[e]?null:(Ci[e]=!0,()=>{Ci[e]=!1}):Ci.x||Ci.y?null:(Ci.x=Ci.y=!0,()=>{Ci.x=Ci.y=!1})}const n4=new Set(["width","height","top","left","right","bottom",...th]);let Jg;function H7(){Jg=void 0}const va={now:()=>(Jg===void 0&&va.set(ls.isProcessing||U$.useManualTiming?ls.timestamp:performance.now()),Jg),set:e=>{Jg=e,queueMicrotask(H7)}};function A_(e,t){e.indexOf(t)===-1&&e.push(t)}function M_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class R_{constructor(){this.subscriptions=[]}add(t){return A_(this.subscriptions,t),()=>M_(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let a=0;a<i;a++){const l=this.subscriptions[a];l&&l(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function O_(e,t){return t?e*(1e3/t):0}const yk=30,q7=e=>!isNaN(parseFloat(e)),zf={current:void 0};class G7{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const a=va.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=va.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=q7(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new R_);const s=this.events[t].add(n);return t==="change"?()=>{s(),Ht.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return zf.current&&zf.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=va.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>yk)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,yk);return O_(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fa(e,t){return new G7(e,t)}function Y7(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fa(n))}function K7(e,t){const n=vx(e,t);let{transitionEnd:s={},transition:i={},...a}=n||{};a={...a,...s};for(const l in a){const u=c7(a[l]);Y7(e,l,u)}}function Z7(e){return!!(Ds(e)&&e.add)}function Vw(e,t){const n=e.getValue("willChange");if(Z7(n))return n.add(t)}function s4(e){return e.props[ME]}const r4=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Q7=1e-7,X7=12;function J7(e,t,n,s,i){let a,l,u=0;do l=t+(n-t)/2,a=r4(l,s,i)-e,a>0?n=l:t=l;while(Math.abs(a)>Q7&&++u<X7);return l}function Dm(e,t,n,s){if(e===t&&n===s)return Xs;const i=a=>J7(a,0,1,e,n);return a=>a===0||a===1?a:r4(i(a),t,s)}const i4=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,a4=e=>t=>1-e(1-t),o4=Dm(.33,1.53,.69,.99),D_=a4(o4),l4=i4(D_),c4=e=>(e*=2)<1?.5*D_(e):.5*(2-Math.pow(2,-10*(e-1))),I_=e=>1-Math.sin(Math.acos(e)),d4=a4(I_),u4=i4(I_),h4=e=>/^0[^.\s]+$/u.test(e);function eU(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||h4(e):!0}const $f=e=>Math.round(e*1e5)/1e5,L_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function tU(e){return e==null}const nU=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,F_=(e,t)=>n=>!!(typeof n=="string"&&nU.test(n)&&n.startsWith(e)||t&&!tU(n)&&Object.prototype.hasOwnProperty.call(n,t)),f4=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,a,l,u]=s.match(L_);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},sU=e=>Na(0,255,e),rb={...nh,transform:e=>Math.round(sU(e))},Tc={test:F_("rgb","red"),parse:f4("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+rb.transform(e)+", "+rb.transform(t)+", "+rb.transform(n)+", "+$f(em.transform(s))+")"};function rU(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ww={test:F_("#"),parse:rU,transform:Tc.transform},du={test:F_("hsl","hue"),parse:f4("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+xa.transform($f(t))+", "+xa.transform($f(n))+", "+$f(em.transform(s))+")"},Ms={test:e=>Tc.test(e)||Ww.test(e)||du.test(e),parse:e=>Tc.test(e)?Tc.parse(e):du.test(e)?du.parse(e):Ww.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Tc.transform(e):du.transform(e)},iU=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function aU(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(L_))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(iU))===null||n===void 0?void 0:n.length)||0)>0}const m4="number",p4="color",oU="var",lU="var(",bk="${}",cU=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function tm(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let a=0;const u=t.replace(cU,h=>(Ms.test(h)?(s.color.push(a),i.push(p4),n.push(Ms.parse(h))):h.startsWith(lU)?(s.var.push(a),i.push(oU),n.push(h)):(s.number.push(a),i.push(m4),n.push(parseFloat(h))),++a,bk)).split(bk);return{values:n,split:u,indexes:s,types:i}}function g4(e){return tm(e).values}function x4(e){const{split:t,types:n}=tm(e),s=t.length;return i=>{let a="";for(let l=0;l<s;l++)if(a+=t[l],i[l]!==void 0){const u=n[l];u===m4?a+=$f(i[l]):u===p4?a+=Ms.transform(i[l]):a+=i[l]}return a}}const dU=e=>typeof e=="number"?0:e;function uU(e){const t=g4(e);return x4(e)(t.map(dU))}const Ml={test:aU,parse:g4,createTransformer:x4,getAnimatableNone:uU},hU=new Set(["brightness","contrast","saturate","opacity"]);function fU(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(L_)||[];if(!s)return e;const i=n.replace(s,"");let a=hU.has(t)?1:0;return s!==n&&(a*=100),t+"("+a+i+")"}const mU=/\b([a-z-]*)\(.*?\)/gu,Hw={...Ml,getAnimatableNone:e=>{const t=e.match(mU);return t?t.map(fU).join(" "):e}},pU={...w_,color:Ms,backgroundColor:Ms,outlineColor:Ms,fill:Ms,stroke:Ms,borderColor:Ms,borderTopColor:Ms,borderRightColor:Ms,borderBottomColor:Ms,borderLeftColor:Ms,filter:Hw,WebkitFilter:Hw},B_=e=>pU[e];function v4(e,t){let n=B_(e);return n!==Hw&&(n=Ml),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const gU=new Set(["auto","none","0"]);function xU(e,t,n){let s=0,i;for(;s<e.length&&!i;){const a=e[s];typeof a=="string"&&!gU.has(a)&&tm(a).values.length&&(i=e[s]),s++}if(i&&n)for(const a of t)e[a]=v4(n,i)}const wk=e=>e===nh||e===ot,_k=(e,t)=>parseFloat(e.split(", ")[t]),Nk=(e,t)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return _k(i[1],t);{const a=s.match(/^matrix\((.+)\)$/u);return a?_k(a[1],e):0}},vU=new Set(["x","y","z"]),yU=th.filter(e=>!vU.has(e));function bU(e){const t=[];return yU.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const zu={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Nk(4,13),y:Nk(5,14)};zu.translateX=zu.x;zu.translateY=zu.y;const Uc=new Set;let qw=!1,Gw=!1;function y4(){if(Gw){const e=Array.from(Uc).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=bU(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([a,l])=>{var u;(u=s.getValue(a))===null||u===void 0||u.set(l)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Gw=!1,qw=!1,Uc.forEach(e=>e.complete()),Uc.clear()}function b4(){Uc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gw=!0)})}function wU(){b4(),y4()}class z_{constructor(t,n,s,i,a,l=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=a,this.isAsync=l}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Uc.add(this),qw||(qw=!0,Ht.read(b4),Ht.resolveKeyframes(y4))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const l=i==null?void 0:i.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(s&&n){const h=s.readValue(n,u);h!=null&&(t[0]=h)}t[0]===void 0&&(t[0]=u),i&&l===void 0&&i.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Uc.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Uc.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const w4=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),_U=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function NU(e){const t=_U.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}function _4(e,t,n=1){const[s,i]=NU(e);if(!s)return;const a=window.getComputedStyle(t).getPropertyValue(s);if(a){const l=a.trim();return w4(l)?parseFloat(l):l}return b_(i)?_4(i,t,n+1):i}const N4=e=>t=>t.test(e),jU={test:e=>e==="auto",parse:e=>e},j4=[nh,ot,xa,dl,p7,m7,jU],jk=e=>j4.find(N4(e));class S4 extends z_{constructor(t,n,s,i,a){super(t,n,s,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<t.length;h++){let m=t[h];if(typeof m=="string"&&(m=m.trim(),b_(m))){const g=_4(m,n.current);g!==void 0&&(t[h]=g),h===t.length-1&&(this.finalKeyframe=m)}}if(this.resolveNoneKeyframes(),!n4.has(s)||t.length!==2)return;const[i,a]=t,l=jk(i),u=jk(a);if(l!==u)if(wk(l)&&wk(u))for(let h=0;h<t.length;h++){const m=t[h];typeof m=="string"&&(t[h]=parseFloat(m))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)eU(t[i])&&s.push(i);s.length&&xU(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=zu[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const a=n.getValue(s);a&&a.jump(this.measuredOrigin,!1);const l=i.length-1,u=i[l];i[l]=zu[s](n.measureViewportBox(),window.getComputedStyle(n.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEac
vendor: 11,876 bytes, line 653
653h(([h,m])=>{n.getValue(h).set(m)}),this.resolveNoneKeyframes()}}const Sk=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ml.test(e)||e==="0")&&!e.startsWith("url("));function SU(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function kU(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],l=Sk(i,t),u=Sk(a,t);return!l||!u?!1:SU(e)||(n==="spring"||P_(n))&&s}const CU=e=>e!==null;function yx(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(CU),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||s===void 0?i[a]:s}const PU=40;class k4{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:l="loop",...u}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=va.now(),this.options={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:a,repeatType:l,...u},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>PU?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&wU(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=va.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:a,delay:l,onComplete:u,onUpdate:h,isGenerator:m}=this.options;if(!m&&!kU(t,s,i,a))if(l)this.options.duration=0;else{h&&h(yx(t,this.options,n)),u&&u(),this.resolveFinishedPromise();return}const g=this.initPlayback(t,n);g!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...g},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const kn=(e,t,n)=>e+(t-e)*n;function ib(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function TU({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,a=0,l=0;if(!t)i=a=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,h=2*n-u;i=ib(h,u,e+1/3),a=ib(h,u,e),l=ib(h,u,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(l*255),alpha:s}}function _0(e,t){return n=>n>0?t:e}const ab=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},EU=[Ww,Tc,du],AU=e=>EU.find(t=>t.test(e));function kk(e){const t=AU(e);if(!t)return!1;let n=t.parse(e);return t===du&&(n=TU(n)),n}const Ck=(e,t)=>{const n=kk(e),s=kk(t);if(!n||!s)return _0(e,t);const i={...n};return a=>(i.red=ab(n.red,s.red,a),i.green=ab(n.green,s.green,a),i.blue=ab(n.blue,s.blue,a),i.alpha=kn(n.alpha,s.alpha,a),Tc.transform(i))},MU=(e,t)=>n=>t(e(n)),Im=(...e)=>e.reduce(MU),Yw=new Set(["none","hidden"]);function RU(e,t){return Yw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function OU(e,t){return n=>kn(e,t,n)}function $_(e){return typeof e=="number"?OU:typeof e=="string"?b_(e)?_0:Ms.test(e)?Ck:LU:Array.isArray(e)?C4:typeof e=="object"?Ms.test(e)?Ck:DU:_0}function C4(e,t){const n=[...e],s=n.length,i=e.map((a,l)=>$_(a)(a,t[l]));return a=>{for(let l=0;l<s;l++)n[l]=i[l](a);return n}}function DU(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=$_(e[i])(e[i],t[i]));return i=>{for(const a in s)n[a]=s[a](i);return n}}function IU(e,t){var n;const s=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const l=t.types[a],u=e.indexes[l][i[l]],h=(n=e.values[u])!==null&&n!==void 0?n:0;s[a]=h,i[l]++}return s}const LU=(e,t)=>{const n=Ml.createTransformer(t),s=tm(e),i=tm(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Yw.has(e)&&!i.values.length||Yw.has(t)&&!s.values.length?RU(e,t):Im(C4(IU(s,i),i.values),n):_0(e,t)};function P4(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?kn(e,t,n):$_(e)(e,t)}const FU=5;function T4(e,t,n){const s=Math.max(t-FU,0);return O_(n-e(s),t-s)}const On={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ob=.001;function BU({duration:e=On.duration,bounce:t=On.bounce,velocity:n=On.velocity,mass:s=On.mass}){let i,a,l=1-t;l=Na(On.minDamping,On.maxDamping,l),e=Na(On.minDuration,On.maxDuration,go(e)),l<1?(i=m=>{const g=m*l,x=g*e,v=g-n,_=Kw(m,l),N=Math.exp(-x);return ob-v/_*N},a=m=>{const x=m*l*e,v=x*n+n,_=Math.pow(l,2)*Math.pow(m,2)*e,N=Math.exp(-x),S=Kw(Math.pow(m,2),l);return(-i(m)+ob>0?-1:1)*((v-_)*N)/S}):(i=m=>{const g=Math.exp(-m*e),x=(m-n)*e+1;return-ob+g*x},a=m=>{const g=Math.exp(-m*e),x=(n-m)*(e*e);return g*x});const u=5/e,h=$U(i,a,u);if(e=po(e),isNaN(h))return{stiffness:On.stiffness,damping:On.damping,duration:e};{const m=Math.pow(h,2)*s;return{stiffness:m,damping:l*2*Math.sqrt(s*m),duration:e}}}const zU=12;function $U(e,t,n){let s=n;for(let i=1;i<zU;i++)s=s-e(s)/t(s);return s}function Kw(e,t){return e*Math.sqrt(1-t*t)}const UU=["duration","bounce"],VU=["stiffness","damping","mass"];function Pk(e,t){return t.some(n=>e[n]!==void 0)}function WU(e){let t={velocity:On.velocity,stiffness:On.stiffness,damping:On.damping,mass:On.mass,isResolvedFromDuration:!1,...e};if(!Pk(e,VU)&&Pk(e,UU))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,a=2*Na(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:On.mass,stiffness:i,damping:a}}else{const n=BU(e);t={...t,...n,mass:On.mass},t.isResolvedFromDuration=!0}return t}function E4(e=On.visualDuration,t=On.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const a=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:a},{stiffness:h,damping:m,mass:g,duration:x,velocity:v,isResolvedFromDuration:_}=WU({...n,velocity:-go(n.velocity||0)}),N=v||0,S=m/(2*Math.sqrt(h*g)),j=l-a,P=go(Math.sqrt(h/g)),E=Math.abs(j)<5;s||(s=E?On.restSpeed.granular:On.restSpeed.default),i||(i=E?On.restDelta.granular:On.restDelta.default);let R;if(S<1){const B=Kw(P,S);R=I=>{const z=Math.exp(-S*P*I);return l-z*((N+S*P*j)/B*Math.sin(B*I)+j*Math.cos(B*I))}}else if(S===1)R=B=>l-Math.exp(-P*B)*(j+(N+P*j)*B);else{const B=P*Math.sqrt(S*S-1);R=I=>{const z=Math.exp(-S*P*I),V=Math.min(B*I,300);return l-z*((N+S*P*j)*Math.sinh(V)+B*j*Math.cosh(V))/B}}const A={calculatedDuration:_&&x||null,next:B=>{const I=R(B);if(_)u.done=B>=x;else{let z=0;S<1&&(z=B===0?po(N):T4(R,B,I));const V=Math.abs(z)<=s,te=Math.abs(l-I)<=i;u.done=V&&te}return u.value=u.done?l:I,u},toString:()=>{const B=Math.min(YE(A),$w),I=KE(z=>A.next(B*z).value,B,30);return B+"ms "+I}};return A}function Tk({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:l,min:u,max:h,restDelta:m=.5,restSpeed:g}){const x=e[0],v={done:!1,value:x},_=V=>u!==void 0&&V<u||h!==void 0&&V>h,N=V=>u===void 0?h:h===void 0||Math.abs(u-V)<Math.abs(h-V)?u:h;let S=n*t;const j=x+S,P=l===void 0?j:l(j);P!==j&&(S=P-x);const E=V=>-S*Math.exp(-V/s),R=V=>P+E(V),A=V=>{const te=E(V),H=R(V);v.done=Math.abs(te)<=m,v.value=v.done?P:H};let B,I;const z=V=>{_(v.value)&&(B=V,I=E4({keyframes:[v.value,N(v.value)],velocity:T4(R,V,v.value),damping:i,stiffness:a,restDelta:m,restSpeed:g}))};return z(0),{calculatedDuration:null,next:V=>{let te=!1;return!I&&B===void 0&&(te=!0,A(V),z(V)),B!==void 0&&V>=B?I.next(V-B):(!te&&A(V),v)}}}const HU=Dm(.42,0,1,1),qU=Dm(0,0,.58,1),A4=Dm(.42,0,.58,1),GU=e=>Array.isArray(e)&&typeof e[0]!="number",YU={linear:Xs,easeIn:HU,easeInOut:A4,easeOut:qU,circIn:I_,circInOut:u4,circOut:d4,backIn:D_,backInOut:l4,backOut:o4,anticipate:c4},Ek=e=>{if(T_(e)){CE(e.length===4);const[t,n,s,i]=e;return Dm(t,n,s,i)}else if(typeof e=="string")return YU[e];return e};function KU(e,t,n){const s=[],i=n||P4,a=e.length-1;for(let l=0;l<a;l++){let u=i(e[l],e[l+1]);if(t){const h=Array.isArray(t)?t[l]||Xs:t;u=Im(h,u)}s.push(u)}return s}function U_(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const a=e.length;if(CE(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=KU(t,s,i),h=u.length,m=g=>{if(l&&g<e[0])return t[0];let x=0;if(h>1)for(;x<e.length-2&&!(g<e[x+1]);x++);const v=Kc(e[x],e[x+1],g);return u[x](v)};return n?g=>m(Na(e[0],e[a-1],g)):m}function ZU(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Kc(0,t,s);e.push(kn(n,1,i))}}function M4(e){const t=[0];return ZU(t,e.length-1),t}function QU(e,t){return e.map(n=>n*t)}function XU(e,t){return e.map(()=>t||A4).splice(0,e.length-1)}function N0({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=GU(s)?s.map(Ek):Ek(s),a={done:!1,value:t[0]},l=QU(n&&n.length===t.length?n:M4(t),e),u=U_(l,t,{ease:Array.isArray(i)?i:XU(t,i)});return{calculatedDuration:e,next:h=>(a.value=u(h),a.done=h>=e,a)}}const JU=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ht.update(t,!0),stop:()=>Fi(t),now:()=>ls.isProcessing?ls.timestamp:va.now()}},eV={decay:Tk,inertia:Tk,tween:N0,keyframes:N0,spring:E4},tV=e=>e/100;class V_ extends k4{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:h}=this.options;h&&h()};const{name:n,motionValue:s,element:i,keyframes:a}=this.options,l=(i==null?void 0:i.KeyframeResolver)||z_,u=(h,m)=>this.onKeyframesResolved(h,m);this.resolver=new l(a,u,n,s,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:a,velocity:l=0}=this.options,u=P_(n)?n:eV[n]||N0;let h,m;u!==N0&&typeof t[0]!="number"&&(h=Im(tV,P4(t[0],t[1])),t=[0,100]);const g=u({...this.options,keyframes:t});a==="mirror"&&(m=u({...this.options,keyframes:[...t].reverse(),velocity:-l})),g.calculatedDuration===null&&(g.calculatedDuration=YE(g));const{calculatedDuration:x}=g,v=x+i,_=v*(s+1)-i;return{generator:g,mirroredGenerator:m,mapPercentToKeyframes:h,calculatedDuration:x,resolvedDuration:v,totalDuration:_}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:s}=this;if(!s){const{keyframes:V}=this.options;return{done:!0,value:V[V.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:l,mapPercentToKeyframes:u,keyframes:h,calculatedDuration:m,totalDuration:g,resolvedDuration:x}=s;if(this.startTime===null)return a.next(0);const{delay:v,repeat:_,repeatType:N,repeatDelay:S,onUpdate:j}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-g/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const P=this.currentTime-v*(this.speed>=0?1:-1),E=this.speed>=0?P<0:P>g;this.currentTime=Math.max(P,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=g);let R=this.currentTime,A=a;if(_){const V=Math.min(this.currentTime,g)/x;let te=Math.floor(V),H=V%1;!H&&V>=1&&(H=1),H===1&&te--,te=Math.min(te,_+1),!!(te%2)&&(N==="reverse"?(H=1-H,S&&(H-=S/x)):N==="mirror"&&(A=l)),R=Na(0,1,H)*x}const B=E?{done:!1,value:h[0]}:A.next(R);u&&(B.value=u(B.value));let{done:I}=B;!E&&m!==null&&(I=this.speed>=0?this.currentTime>=g:this.currentTime<=0);const z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return z&&i!==void 0&&(B.value=yx(h,this.options,i)),j&&j(B.value),z&&this.finish(),B}get duration(){const{resolved:t}=this;return t?go(t.calculatedDuration):0}
vendor: 56,095 bytes, line 653
653get time(){return go(this.currentTime)}set time(t){t=po(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=go(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=JU,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const nV=new Set(["opacity","clipPath","filter","transform"]);function sV(e,t,n,{delay:s=0,duration:i=300,repeat:a=0,repeatType:l="loop",ease:u="easeInOut",times:h}={}){const m={[t]:n};h&&(m.offset=h);const g=QE(u,i);return Array.isArray(g)&&(m.easing=g),e.animate(m,{delay:s,duration:i,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:a+1,direction:l==="reverse"?"alternate":"normal"})}const rV=f_(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),j0=10,iV=2e4;function aV(e){return P_(e.type)||e.type==="spring"||!ZE(e.ease)}function oV(e,t){const n=new V_({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:e[0]};const i=[];let a=0;for(;!s.done&&a<iV;)s=n.sample(a),i.push(s.value),a+=j0;return{times:void 0,keyframes:i,duration:a-j0,ease:"linear"}}const R4={anticipate:c4,backInOut:l4,circInOut:u4};function lV(e){return e in R4}class Ak extends k4{constructor(t){super(t);const{name:n,motionValue:s,element:i,keyframes:a}=this.options;this.resolver=new S4(a,(l,u)=>this.onKeyframesResolved(l,u),n,s,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:s=300,times:i,ease:a,type:l,motionValue:u,name:h,startTime:m}=this.options;if(!u.owner||!u.owner.current)return!1;if(typeof a=="string"&&w0()&&lV(a)&&(a=R4[a]),aV(this.options)){const{onComplete:x,onUpdate:v,motionValue:_,element:N,...S}=this.options,j=oV(t,S);t=j.keyframes,t.length===1&&(t[1]=t[0]),s=j.duration,i=j.times,a=j.ease,l="keyframes"}const g=sV(u.owner.current,h,t,{...this.options,duration:s,times:i,ease:a});return g.startTime=m??this.calcStartTime(),this.pendingTimeline?(pk(g,this.pendingTimeline),this.pendingTimeline=void 0):g.onfinish=()=>{const{onComplete:x}=this.options;u.set(yx(t,this.options,n)),x&&x(),this.cancel(),this.resolveFinishedPromise()},{animation:g,duration:s,times:i,type:l,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return go(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return go(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=po(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Xs;const{animation:s}=n;pk(s,t)}return Xs}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:s,duration:i,type:a,ease:l,times:u}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:m,onUpdate:g,onComplete:x,element:v,..._}=this.options,N=new V_({..._,keyframes:s,duration:i,type:a,ease:l,times:u,isGenerator:!0}),S=po(this.time);m.setWithVelocity(N.sample(S-j0).value,N.sample(S).value,j0)}const{onStop:h}=this.options;h&&h(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:s,repeatDelay:i,repeatType:a,damping:l,type:u}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:m}=n.owner.getProps();return rV()&&s&&nV.has(s)&&!h&&!m&&!i&&a!=="mirror"&&l!==0&&u!=="inertia"}}const cV={type:"spring",stiffness:500,damping:25,restSpeed:10},dV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),uV={type:"keyframes",duration:.8},hV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},fV=(e,{keyframes:t})=>t.length>2?uV:ad.has(e)?e.startsWith("scale")?dV(t[1]):cV:hV;function mV({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:a,repeatType:l,repeatDelay:u,from:h,elapsed:m,...g}){return!!Object.keys(g).length}const W_=(e,t,n,s={},i,a)=>l=>{const u=C_(s,e)||{},h=u.delay||s.delay||0;let{elapsed:m=0}=s;m=m-po(h);let g={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-m,onUpdate:v=>{t.set(v),u.onUpdate&&u.onUpdate(v)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:a?void 0:i};mV(u)||(g={...g,...fV(e,g)}),g.duration&&(g.duration=po(g.duration)),g.repeatDelay&&(g.repeatDelay=po(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let x=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(g.duration=0,g.delay===0&&(x=!0)),x&&!a&&t.get()!==void 0){const v=yx(g.keyframes,u);if(v!==void 0)return Ht.update(()=>{g.onUpdate(v),g.onComplete()}),new I7([])}return!a&&Ak.supports(g)?new Ak(g):new V_(g)};function pV({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function O4(e,t,{delay:n=0,transitionOverride:s,type:i}={}){var a;let{transition:l=e.getDefaultTransition(),transitionEnd:u,...h}=t;s&&(l=s);const m=[],g=i&&e.animationState&&e.animationState.getState()[i];for(const x in h){const v=e.getValue(x,(a=e.latestValues[x])!==null&&a!==void 0?a:null),_=h[x];if(_===void 0||g&&pV(g,x))continue;const N={delay:n,...C_(l||{},x)};let S=!1;if(window.MotionHandoffAnimation){const P=s4(e);if(P){const E=window.MotionHandoffAnimation(P,x,Ht);E!==null&&(N.startTime=E,S=!0)}}Vw(e,x),v.start(W_(x,v,_,e.shouldReduceMotion&&n4.has(x)?{type:!1}:N,e,S));const j=v.animation;j&&m.push(j)}return u&&Promise.all(m).then(()=>{Ht.update(()=>{u&&K7(e,u)})}),m}function Zw(e,t,n={}){var s;const i=vx(e,t,n.type==="exit"?(s=e.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const l=i?()=>Promise.all(O4(e,i,n)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(m=0)=>{const{delayChildren:g=0,staggerChildren:x,staggerDirection:v}=a;return gV(e,t,g+m,x,v,n)}:()=>Promise.resolve(),{when:h}=a;if(h){const[m,g]=h==="beforeChildren"?[l,u]:[u,l];return m().then(()=>g())}else return Promise.all([l(),u(n.delay)])}function gV(e,t,n=0,s=0,i=1,a){const l=[],u=(e.variantChildren.size-1)*s,h=i===1?(m=0)=>m*s:(m=0)=>u-m*s;return Array.from(e.variantChildren).sort(xV).forEach((m,g)=>{m.notify("AnimationStart",t),l.push(Zw(m,t,{...a,delay:n+h(g)}).then(()=>m.notify("AnimationComplete",t)))}),Promise.all(l)}function xV(e,t){return e.sortNodePosition(t)}function vV(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(a=>Zw(e,a,n));s=Promise.all(i)}else if(typeof t=="string")s=Zw(e,t,n);else{const i=typeof t=="function"?vx(e,t,n.custom):t;s=Promise.all(O4(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const yV=p_.length;function D4(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?D4(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<yV;n++){const s=p_[n],i=e.props[s];(Jf(i)||i===!1)&&(t[s]=i)}return t}const bV=[...m_].reverse(),wV=m_.length;function _V(e){return t=>Promise.all(t.map(({animation:n,options:s})=>vV(e,n,s)))}function NV(e){let t=_V(e),n=Mk(),s=!0;const i=h=>(m,g)=>{var x;const v=vx(e,g,h==="exit"?(x=e.presenceContext)===null||x===void 0?void 0:x.custom:void 0);if(v){const{transition:_,transitionEnd:N,...S}=v;m={...m,...S,...N}}return m};function a(h){t=h(e)}function l(h){const{props:m}=e,g=D4(e.parent)||{},x=[],v=new Set;let _={},N=1/0;for(let j=0;j<wV;j++){const P=bV[j],E=n[P],R=m[P]!==void 0?m[P]:g[P],A=Jf(R),B=P===h?E.isActive:null;B===!1&&(N=j);let I=R===g[P]&&R!==m[P]&&A;if(I&&s&&e.manuallyAnimateOnMount&&(I=!1),E.protectedKeys={..._},!E.isActive&&B===null||!R&&!E.prevProp||gx(R)||typeof R=="boolean")continue;const z=jV(E.prevProp,R);let V=z||P===h&&E.isActive&&!I&&A||j>N&&A,te=!1;const H=Array.isArray(R)?R:[R];let Y=H.reduce(i(P),{});B===!1&&(Y={});const{prevResolvedValues:ce={}}=E,K={...ce,...Y},q=be=>{V=!0,v.has(be)&&(te=!0,v.delete(be)),E.needsAnimating[be]=!0;const W=e.getValue(be);W&&(W.liveStyle=!1)};for(const be in K){const W=Y[be],Z=ce[be];if(_.hasOwnProperty(be))continue;let D=!1;zw(W)&&zw(Z)?D=!qE(W,Z):D=W!==Z,D?W!=null?q(be):v.add(be):W!==void 0&&v.has(be)?q(be):E.protectedKeys[be]=!0}E.prevProp=R,E.prevResolvedValues=Y,E.isActive&&(_={..._,...Y}),s&&e.blockInitialAnimation&&(V=!1),V&&(!(I&&z)||te)&&x.push(...H.map(be=>({animation:be,options:{type:P}})))}if(v.size){const j={};v.forEach(P=>{const E=e.getBaseTarget(P),R=e.getValue(P);R&&(R.liveStyle=!0),j[P]=E??null}),x.push({animation:j})}let S=!!x.length;return s&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(S=!1),s=!1,S?t(x):Promise.resolve()}function u(h,m){var g;if(n[h].isActive===m)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var _;return(_=v.animationState)===null||_===void 0?void 0:_.setActive(h,m)}),n[h].isActive=m;const x=l(h);for(const v in n)n[v].protectedKeys={};return x}return{animateChanges:l,setActive:u,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Mk(),s=!0}}}function jV(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!qE(t,e):!1}function vc(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mk(){return{animate:vc(!0),whileInView:vc(),whileHover:vc(),whileTap:vc(),whileDrag:vc(),whileFocus:vc(),exit:vc()}}class Bl{constructor(t){this.isMounted=!1,this.node=t}update(){}}class SV extends Bl{constructor(t){super(t),t.animationState||(t.animationState=NV(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();gx(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let kV=0;class CV extends Bl{constructor(){super(...arguments),this.id=kV++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const PV={animation:{Feature:SV},exit:{Feature:CV}};function nm(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function Lm(e){return{point:{x:e.pageX,y:e.pageY}}}const TV=e=>t=>E_(t)&&e(t,Lm(t));function Uf(e,t,n,s){return nm(e,t,TV(n),s)}const Rk=(e,t)=>Math.abs(e-t);function EV(e,t){const n=Rk(e.x,t.x),s=Rk(e.y,t.y);return Math.sqrt(n**2+s**2)}class I4{constructor(t,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=cb(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,_=EV(x.offset,{x:0,y:0})>=3;if(!v&&!_)return;const{point:N}=x,{timestamp:S}=ls;this.history.push({...N,timestamp:S});const{onStart:j,onMove:P}=this.handlers;v||(j&&j(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),P&&P(this.lastMoveEvent,x)},this.handlePointerMove=(x,v)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=lb(v,this.transformPagePoint),Ht.update(this.updatePoint,!0)},this.handlePointerUp=(x,v)=>{this.end();const{onEnd:_,onSessionEnd:N,resumeAnimation:S}=this.handlers;if(this.dragSnapToOrigin&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const j=cb(x.type==="pointercancel"?this.lastMoveEventInfo:lb(v,this.transformPagePoint),this.history);this.startEvent&&_&&_(x,j),N&&N(x,j)},!E_(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const l=Lm(t),u=lb(l,this.transformPagePoint),{point:h}=u,{timestamp:m}=ls;this.history=[{...h,timestamp:m}];const{onSessionStart:g}=n;g&&g(t,cb(u,this.history)),this.removeListeners=Im(Uf(this.contextWindow,"pointermove",this.handlePointerMove),Uf(this.contextWindow,"pointerup",this.handlePointerUp),Uf(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Fi(this.updatePoint)}}function lb(e,t){return t?{point:t(e.point)}:e}function Ok(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cb({point:e},t){return{point:e,delta:Ok(e,L4(t)),offset:Ok(e,AV(t)),velocity:MV(t,.1)}}function AV(e){return e[0]}function L4(e){return e[e.length-1]}function MV(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const i=L4(e);for(;n>=0&&(s=e[n],!(i.timestamp-s.timestamp>po(t)));)n--;if(!s)return{x:0,y:0};const a=go(i.timestamp-s.timestamp);if(a===0)return{x:0,y:0};const l={x:(i.x-s.x)/a,y:(i.y-s.y)/a};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}const F4=1e-4,RV=1-F4,OV=1+F4,B4=.01,DV=0-B4,IV=0+B4;function Rr(e){return e.max-e.min}function LV(e,t,n){return Math.abs(e-t)<=n}function Dk(e,t,n,s=.5){e.origin=s,e.originPoint=kn(t.min,t.max,e.origin),e.scale=Rr(n)/Rr(t),e.translate=kn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=RV&&e.scale<=OV||isNaN(e.scale))&&(e.scale=1),(e.translate>=DV&&e.translate<=IV||isNaN(e.translate))&&(e.translate=0)}function Vf(e,t,n,s){Dk(e.x,t.x,n.x,s?s.originX:void 0),Dk(e.y,t.y,n.y,s?s.originY:void 0)}function Ik(e,t,n){e.min=n.min+t.min,e.max=e.min+Rr(t)}function FV(e,t,n){Ik(e.x,t.x,n.x),Ik(e.y,t.y,n.y)}function Lk(e,t,n){e.min=t.min-n.min,e.max=e.min+Rr(t)}function Wf(e,t,n){Lk(e.x,t.x,n.x),Lk(e.y,t.y,n.y)}function BV(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?kn(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?kn(n,e,s.max):Math.min(e,n)),e}function Fk(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function zV(e,{top:t,left:n,bottom:s,right:i}){return{x:Fk(e.x,n,i),y:Fk(e.y,t,s)}}function Bk(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function $V(e,t){return{x:Bk(e.x,t.x),y:Bk(e.y,t.y)}}function UV(e,t){let n=.5;const s=Rr(e),i=Rr(t);return i>s?n=Kc(t.min,t.max-s,e.min):s>i&&(n=Kc(e.min,e.max-i,t.min)),Na(0,1,n)}function VV(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Qw=.35;function WV(e=Qw){return e===!1?e=0:e===!0&&(e=Qw),{x:zk(e,"left","right"),y:zk(e,"top","bottom")}}function zk(e,t,n){return{min:$k(e,t),max:$k(e,n)}}function $k(e,t){return typeof e=="number"?e:e[t]||0}const Uk=()=>({translate:0,scale:1,origin:0,originPoint:0}),uu=()=>({x:Uk(),y:Uk()}),Vk=()=>({min:0,max:0}),Fn=()=>({x:Vk(),y:Vk()});function Xr(e){return[e("x"),e("y")]}function z4({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function HV({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function qV(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function db(e){return e===void 0||e===1}function Xw({scale:e,scaleX:t,scaleY:n}){return!db(e)||!db(t)||!db(n)}function _c(e){return Xw(e)||$4(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $4(e){return Wk(e.x)||Wk(e.y)}function Wk(e){return e&&e!=="0%"}function S0(e,t,n){const s=e-n,i=t*s;return n+i}function Hk(e,t,n,s,i){return i!==void 0&&(e=S0(e,i,s)),S0(e,n,s)+t}function Jw(e,t=0,n=1,s,i){e.min=Hk(e.min,t,n,s,i),e.max=Hk(e.max,t,n,s,i)}function U4(e,{x:t,y:n}){Jw(e.x,t.translate,t.scale,t.originPoint),Jw(e.y,n.translate,n.scale,n.originPoint)}const qk=.999999999999,Gk=1.0000000000001;function GV(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,l;for(let u=0;u<i;u++){a=n[u],l=a.projectionDelta;const{visualElement:h}=a.options;h&&h.props.style&&h.props.style.display==="contents"||(s&&a.options.layoutScroll&&a.scroll&&a!==a.root&&fu(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,U4(e,l)),s&&_c(a.latestValues)&&fu(e,a.latestValues))}t.x<Gk&&t.x>qk&&(t.x=1),t.y<Gk&&t.y>qk&&(t.y=1)}function hu(e,t){e.min=e.min+t,e.max=e.max+t}function Yk(e,t,n,s,i=.5){const a=kn(e.min,e.max,i);Jw(e,t,n,a,s)}function fu(e,t){Yk(e.x,t.x,t.scaleX,t.scale,t.originX),Yk(e.y,t.y,t.scaleY,t.scale,t.originY)}function V4(e,t){return z4(qV(e.getBoundingClientRect(),t))}function YV(e,t,n){const s=V4(e,n),{scroll:i}=t;return i&&(hu(s.x,i.offset.x),hu(s.y,i.offset.y)),s}const W4=({current:e})=>e?e.ownerDocument.defaultView:null,KV=new WeakMap;class ZV{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Fn(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=g=>{const{dragSnapToOrigin:x}=this.getProps();x?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Lm(g).point)},a=(g,x)=>{const{drag:v,dragPropagation:_,onDragStart:N}=this.getProps();if(v&&!_&&(this.openDragLock&&this.openDragLock(),this.openDragLock=W7(v),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xr(j=>{let P=this.getAxisMotionValue(j).get()||0;if(xa.test(P)){const{projection:E}=this.visualElement;if(E&&E.layout){const R=E.layout.layoutBox[j];R&&(P=Rr(R)*(parseFloat(P)/100))}}this.originPoint[j]=P}),N&&Ht.postRender(()=>N(g,x)),Vw(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},l=(g,x)=>{const{dragPropagation:v,dragDirectionLock:_,onDirectionLock:N,onDrag:S}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:j}=x;if(_&&this.currentDirection===null){this.currentDirection=QV(j),this.currentDirection!==null&&N&&N(this.currentDirection);return}this.updateAxis("x",x.point,j),this.updateAxis("y",x.point,j),this.visualElement.render(),S&&S(g,x)},u=(g,x)=>this.stop(g,x),h=()=>Xr(g=>{var x;return this.getAnimationState(g)==="paused"&&((x=this.getAxisMotionValue(g).animation)===null||x===void 0?void 0:x.play())}),{dragSnapToOrigin:m}=this.getProps();this.panSession=new I4(t,{onSessionStart:i,onStart:a,onMove:l,onSessionEnd:u,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,contextWindow:W4(this.visualElement)})}stop(t,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Ht.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:i}=this.getProps();if(!s||!jg(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let l=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(l=BV(l,this.constraints[t],this.elastic[t])),a.set(l)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&cu(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=zV(i.layoutBox,n):this.constraints=!1,this.elastic=WV(s),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Xr(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=VV(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!cu(t))return!1;const s=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=YV(s,i.root,this.visualElement.getTransformPagePoint());let l=$V(i.layout.layoutBox,a);if(n){const u=n(HV(l));this.hasMutatedConstraints=!!u,u&&(l=z4(u))}return l}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:a,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),h=this.constraints||{},m=Xr(g=>{if(!jg(g,n,this.currentDirection))return;let x=h&&h[g]||{};l&&(x={min:0,max:0});const v=i?200:1e6,_=i?40:1e7,N={type:"inertia",velocity:s?t[g]:0,bounceStiffness:v,bounceDamping:_,timeConstant:750,restDelta:1,restSpeed:10,...a,...x};return this.startAxisValueAnimation(g,N)});return Promise.all(m).then(u)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Vw(this.visualElement,t),s.start(W_(t,s,0,n,this.visualElement,!1))}stopAnimation(){Xr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){Xr(n=>{const{drag:s}=this.getProps();if(!jg(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:u}=i.layout.layoutBox[n];a.set(t[n]-kn(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!cu(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Xr(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const h=u.get();i[l]=UV({min:h,max:h},this.constraints[l])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Xr(l=>{if(!jg(l,t,null))return;const u=this.getAxisMotionValue(l),{min:h,max:m}=this.constraints[l];u.set(kn(h,m,i[l]))})}addListeners(){if(!this.visualElement.current)return;KV.set(this.visualElement,this);const t=this.visualElement.current,n=Uf(t,"pointerdown",h=>{const{drag:m,dragListener:g=!0}=this.getProps();m&&g&&this.start(h)}),s=()=>{const{dragConstraints:h}=this.getProps();cu(h)&&h.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ht.read(s);const l=nm(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(Xr(g=>{const x=this.getAxisMotionValue(g);x&&(this.originPoint[g]+=h[g].translate,x.set(x.get()+h[g].translate))}),this.visualElement.render())}));return()=>{l(),n(),a(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:l=Qw,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:a,dragElastic:l,dragMomentum:u}}}function jg(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function QV(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class XV extends Bl{constructor(t){super(t),this.removeGroupControls=Xs,this.removeListeners=Xs,this.controls=new ZV(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xs}unmount(){this.removeGroupControls(),this.removeListeners()}}const Kk=e=>(t,n)=>{e&&Ht.postRender(()=>e(t,n))};class JV extends Bl{constructor(){super(...arguments),this.removePointerDownListener=Xs}onPointerDown(t){this.session=new I4(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:W4(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Kk(t),onStart:Kk(n),onMove:s,onEnd:(a,l)=>{delete this.session,i&&Ht.postRender(()=>i(a,l))}}}mount(){this.removePointerDownListener=Uf(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const e0={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Zk(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const mf={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ot.test(e))e=parseFloat(e);else return e;const n=Zk(e,t.target.x),s=Zk(e,t.target.y);return`${n}% ${s}%`}},eW={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=Ml.parse(e);if(i.length>5)return s;const a=Ml.createTransformer(e),l=typeof i[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;i[0+l]/=u,i[1+l]/=h;const m=kn(u,h,.5);return typeof i[2+l]=="number"&&(i[2+l]/=m),typeof i[3+l]=="number"&&(i[3+l]/=m),a(i)}};class tW extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:a}=t;S7(nW),a&&(n.group&&n.group.add(a),s&&s.register&&i&&s.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),e0.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:a}=this.props,l=s.projection;return l&&(l.isPresent=a,i||t.layoutDependency!==n||n===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?l.promote():l.relegate()||Ht.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),x_.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function H4(e){const[t,n]=kE(),s=w.useContext(u_);return r.jsx(tW,{...e,layoutGroup:s,switchLayoutGroup:w.useContext(RE),isPresent:t,safeToRemove:n})}const nW={borderRadius:{...mf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mf,borderTopRightRadius:mf,borderBottomLeftRadius:mf,borderBottomRightRadius:mf,boxShadow:eW};function sW(e,t,n){const s=Ds(e)?e:fa(e);return s.start(W_("",s,t,n)),s.animation}function rW(e){return e instanceof SVGElement&&e.tagName!=="svg"}const iW=(e,t)=>e.depth-t.depth;class aW{constructor(){this.children=[],this.isDirty=!1}add(t){A_(this.children,t),this.isDirty=!0}remove(t){M_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(iW),this.isDirty=!1,this.children.forEach(t)}}function oW(e,t){const n=va.now(),s=({timestamp:i})=>{const a=i-n;a>=t&&(Fi(s),e(a-t))};return Ht.read(s,!0),()=>Fi(s)}const q4=["TopLeft","TopRight","BottomLeft","BottomRight"],lW=q4.length,Qk=e=>typeof e=="string"?parseFloat(e):e,Xk=e=>typeof e=="number"||ot.test(e);function cW(e,t,n,s,i,a){i?(e.opacity=kn(0,n.opacity!==void 0?n.opacity:1,dW(s)),e.opacityExit=kn(t.opacity!==void 0?t.opacity:1,0,uW(s))):a&&(e.opacity=kn(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let l=0;l<lW;l++){const u=`border${q4[l]}Radius`;let h=Jk(t,u),m=Jk(n,u);if(h===void 0&&m===void 0)continue;h||(h=0),m||(m=0),h===0||m===0||Xk(h)===Xk(m)?(e[u]=Math.max(kn(Qk(h),Qk(m),s),0),(xa.test(m)||xa.test(h))&&(e[u]+="%")):e[u]=m}(t.rotate||n.rotate)&&(e.rotate=kn(t.rotate||0,n.rotate||0,s))}function Jk(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const dW=G4(0,.5,d4),uW=G4(.5,.95,Xs);function G4(e,t,n){return s=>s<e?0:s>t?1:n(Kc(e,t,s))}function eC(e,t){e.min=t.min,e.max=t.max}function Zr(e,t){eC(e.x,t.x),eC(e.y,t.y)}function tC(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function nC(e,t,n,s,i){return e-=t,e=S0(e,1/n,s),i!==void 0&&(e=S0(e,1/i,s)),e}function hW(e,t=0,n=1,s=.5,i,a=e,l=e){if(xa.test(t)&&(t=parseFloat(t),t=kn(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=kn(a.min,a.max,s);e===a&&(u-=t),e.min=nC(e.min,t,n,u,i),e.max=nC(e.max,t,n,u,i)}function sC(e,t,[n,s,i],a,l){hW(e,t[n],t[s],t[i],t.scale,a,l)}const fW=["x","scaleX","originX"],mW=["y","scaleY","originY"];function rC(e,t,n,s){sC(e.x,t,fW,n?n.x:void 0,s?s.x:void 0),sC(e.y,t,mW,n?n.y:void 0,s?s.y:void 0)}function iC(e){return e.translate===0&&e.scale===1}function Y4(e){return iC(e.x)&&iC(e.y)}function aC(e,t){return e.min===t.min&&e.max===t.max}function pW(e,t){return aC(e.x,t.x)&&aC(e.y,t.y)}function oC(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function K4(e,t){return oC(e.x,t.x)&&oC(e.y,t.y)}function lC(e){return Rr(e.x)/Rr(e.y)}function cC(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class gW{constructor(){this.members=[]}add(t){A_(this.members,t),t.scheduleRender()}remove(t){if(M_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){s=a;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function xW(e,t,n){let s="";const i=e.x.translate/t.x,a=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((i||a||l)&&(s=`translate3d(${i}px, ${a}px, ${l}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:m,rotate:g,rotateX:x,rotateY:v,skewX:_,skewY:N}=n;m&&(s=`perspective(${m}px) ${s}`),g&&(s+=`rotate(${g}deg) `),x&&(s+=`rotateX(${x}deg) `),v&&(s+=`rotateY(${v}deg) `),_&&(s+=`skewX(${_}deg) `),N&&(s+=`skewY(${N}deg) `)}const u=e.x.scale*t.x,h=e.y.scale*t.y;return(u!==1||h!==1)&&(s+=`scale(${u}, ${h})`),s||"none"}const Nc={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Of=typeof window<"u"&&window.MotionDebug!==void 0,ub=["","X","Y","Z"],vW={visibility:"hidden"},dC=1e3;let yW=0;function hb(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Z4(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=s4(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ht,!(i||a))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Z4(s)}function Q4({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(l={},u=t==null?void 0:t()){this.id=yW++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Of&&(Nc.totalNodes=Nc.resolvedTargetDeltas=Nc.recalculatedProjection=0),this.nodes.forEach(_W),this.nodes.forEach(CW),this.nodes.forEach(PW),this.nodes.forEach(NW),Of&&window.MotionDebug.record(Nc)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new aW)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new R_),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const h=this.eventHandlers.get(l);h&&h.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l,u=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=rW(l),this.instance=l;const{layoutId:h,layout:m,visualElement:g}=this.options;if(g&&!g.current&&g.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),u&&(m||h)&&(this.isLayoutDirty=!0),e){let x;const v=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,x&&x(),x=oW(v,250),e0.hasAnimatedSinceResize&&(e0.hasAnimatedSinceResize=!1,this.nodes.forEach(hC))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&g&&(h||m)&&this.addEventListener("didUpdate",({delta:x,hasLayoutChanged:v,hasRelativeTargetChanged:_,layout:N})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||g.getDefaultTransition()||RW,{onLayoutAnimationStart:j,onLayoutAnimationComplete:P}=g.getProps(),E=!this.targetLayout||!K4(this.targetLayout,N)||_,R=!v&&_;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||R||v&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(x,R);const A={...C_(S,"layout"),onPlay:j,onComplete:P};(g.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else v||hC(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=N})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Fi(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(TW),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Z4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const x=this.path[g];x.shouldResetTransform=!0,x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:u,layout:h}=this.options;if(u===void 0&&!h)return;const m=this.getTransformTemplate();this.prevTransformTemplateValue=m?m(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(uC);return}this.isUpdating||this.nodes.forEach(SW),this.isUpdating=!1,this.nodes.forEach(kW),this.nodes.forEach(bW),this.nodes.forEach(wW),this.clearAllSnapshots();const u=va.now();ls.delta=Na(0,1e3/60,u-ls.timestamp),ls.timestamp=u,ls.isProcessing=!0,nb.update.process(ls),nb.preRender.process(ls),nb.render.process(ls),ls.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,x_.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(jW),this.sharedNodes.forEach(EW)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let h=0;h<this.path.length;h++)this.path[h].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Fn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u){const h=s(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:h,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!i)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!Y4(this.projectionDelta),h=this.getTransformTemplate(),m=h?h(this.latestValues,""):void 0,g=m!==this.prevTransformTemplateValue;l&&(u||_c(this.latestValues)||g)&&(i(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let h=this.removeElementScroll(u);return l&&(h=this.removeTransform(h)),OW(h),{animationId:this.root.animationId,measuredBox:u,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){var l;const{visualElement:u}=this.options;if(!u)return Fn();const h=u.measureViewportBox();if(!(((l=this.scroll)===null||l===void 0?void 0:l.wasRoot)||this.path.some(DW))){const{scroll:g}=this.root;g&&(hu(h.x,g.offset.x),hu(h.y,g.offset.y))}return h}removeElementScroll(l){var u;const h=Fn();if(Zr(h,l),!((u=this.scroll)===null||u===void 0)&&u.wasRoot)return h;for(let m=0;m<this.path.length;m++){const g=this.path[m],{scroll:x,options:v}=g;g!==this.root&&x&&v.layoutScroll&&(x.wasRoot&&Zr(h,l),hu(h.x,x.offset.x),hu(h.y,x.offset.y))}return h}applyTransform(l,u=!1){const h=Fn();Zr(h,l);for(let m=0;m<this.path.length;m++){const g=this.path[m];!u&&g.options.layoutScroll&&g.scroll&&g!==g.root&&fu(h,{x:-g.scroll.offset.x,y:-g.scroll.offset.y}),_c(g.latestValues)&&fu(h,g.latestValues)}return _c(this.latestValues)&&fu(h,this.latestValues),h}removeTransform(l){const u=Fn();Zr(u,l);for(let h=0;h<this.path.length;h++){const m=this.path[h];if(!m.instance||!_c(m.latestValues))continue;Xw(m.latestValues)&&m.updateSnapshot();const g=Fn(),x=m.measurePageBox();Zr(g,x),rC(u,m.latestValues,m.snapshot?m.snapshot.layoutBox:void 0,g)}return _c(this.latestValues)&&rC(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ls.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var u;const h=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=h.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=h.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=h.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==h;if(!(l||m&&this.isSharedProjectionDirty||this.isProjectionDirty||!((u=this.parent)===null||u===void 0)&&u.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:x,layoutId:v}=this.options;if(!(!this.layout||!(x||v))){if(this.resolvedRelativeTargetAt=ls.timestamp,!this.targetDelta&&!this.relativeTarget){const _=this.getClosestProjectingParent();_&&_.layout&&this.animationProgress!==1?(this.relativeParent=_,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Fn(),this.relativeTargetOrigin=Fn(),Wf(this.relativeTargetOrigin,this.layout.layoutBox,_.layout.layoutBox),Zr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Fn(),this.targetWithTransforms=Fn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),FV(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Zr(this.target,this.layout.layoutBox),U4(this.target,this.targetDelta)):Zr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const _=this.getClosestProjectingParent();_&&!!_.resumingFrom==!!this.resumingFrom&&!_.options.layoutScroll&&_.target&&this.animationProgress!==1?(this.relativeParent=_,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Fn(),this.relativeTargetOrigin=Fn(),Wf(this.relativeTargetOrigin,this.target,_.target),Zr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Of&&Nc.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Xw(this.parent.latestValues)||$4(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var l;const u=this.getLead(),h=!!this.resumingFrom||this!==u;let m=!0;if((this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty)&&(m=!1),h&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===ls.timestamp&&(m=!1),m)return;const{layout:g,layoutId:x}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(g||x))return;Zr(this.layoutCorrected,this.layout.layoutBox);const v=this.treeScale.x,_=this.treeScale.y;GV(this.layoutCorrected,this.treeScale,this.path,h),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=Fn());const{target:N}=u;if(!N){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(tC(this.prevProjectionDelta.x,this.projectionDelta.x),tC(this.prevProjectionDelta.y,this.projectionDelta.y)),Vf(this.projectionDelta,this.layoutCorrected,N,this.latestValues),(this.treeScale.x!==v||this.treeScale.y!==_||!cC(this.projectionDelta.x,this.prevProjectionDelta.x)||!cC(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",N)),Of&&Nc.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var u;if((u=this.options.visualElement)===null||u===void 0||u.scheduleRender(),l){const h=this.getStack();h&&h.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=uu(),this.projectionDelta=uu(),this.projectionDeltaWithTransform=uu()}setAnimationOrigin(l,u=!1){const h=this.snapshot,m=h?h.latestValues:{},g={...this.latestValues},x=uu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const v=Fn(),_=h?h.source:void 0,N=this.layout?this.layout.source:void 0,S=_!==N,j=this.getStack(),P=!j||j.members.length<=1,E=!!(S&&!P&&this.options.crossfade===!0&&!this.path.some(MW));this.animationProgress=0;let R;this.mixTargetDelta=A=>{const B=A/1e3;fC(x.x,l.x,B),fC(x.y,l.y,B),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wf(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),AW(this.relativeTarget,this.relativeTargetOrigin,v,B),R&&pW(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Fn()),Zr(R,this.relativeTarget)),S&&(this.animationValues=g,cW(g,m,this.latestValues,B,E,P)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=B},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Fi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ht.update(()=>{e0.hasAnimatedSinceResize=!0,this.currentAnimation=sW(0,dC,{...l,onUpdate:u=>{this.mixTargetDelta(u),l.onUpdate&&l.onUpdate(u)},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(dC),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:h,layout:m,latestValues:g}=l;if(!(!u||!h||!m)){if(this!==l&&this.layout&&m&&X4(this.options.animationType,this.layout.layoutBox,m.layoutBox)){h=this.target||Fn();const x=Rr(this.layout.layoutBox.x);h.x.min=l.target.x.min,h.x.max=h.x.min+x;const v=Rr(this.layout.layoutBox.y);h.y.min=l.target.y.min,h.y.max=h.y.min+v}Zr(u,h),fu(u,g),Vf(this.projectionDeltaWithTransform,this.layoutCorrected,u,g)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new gW),this.sharedNodes.get(l).add(u);const m=u.options.initialPromotionConfig;u.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:u}=this.options;return u?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:u}=this.options;return u?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:h}={}){const m=this.getStack();m&&m.promote(this,h),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:h}=l;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(u=!0),!u)return;const m={};h.z&&hb("z",l,m,this.animationValues);for(let g=0;g<ub.length;g++)hb(`rotate${ub[g]}`,l,m,this.animationValues),hb(`skew${ub[g]}`,l,m,this.animationValues);l.render();for(const g in m)l.setStaticValue(g,m[g]),this.animationValues&&(this.animationValues[g]=m[g]);l.scheduleRender()}getProjectionStyles(l){var u,h;if(!this.instance||this.isSVG)return;if(!this.isVisible)return vW;const m={visibility:""},g=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,m.opacity="",m.pointerEvents=Xg(l==null?void 0:l.pointerEvents)||"",m.transform=g?g(this.latestValues,""):"none",m;const x=this.getLead();if(!this.projectionDelta||!this.layout||!x.target){const S={};return this.options.layoutId&&(S.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,S.pointerEvents=Xg(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!_c(this.latestValues)&&(S.transform=g?g({},""):"none",this.hasProjected=!1),S}const v=x.animationValues||x.latestValues;this.applyTransformsToTarget(),m.transform=xW(this.projectionDeltaWithTransform,this.treeScale,v),g&&(m.transform=g(v,m.transform));const{x:_,y:N}=this.projectionDelta;m.transformOrigin=`${_.origin*100}% ${N.origin*100}% 0`,x.animationValues?m.opacity=x===this?(h=(u=v.opacity)!==null&&u!==void 0?u:this.latestValues.opacity)!==null&&h!==void 0?h:1:this.preserveOpacity?this.latestValues.opacity:v.opacityExit:m.opacity=x===this?v.opacity!==void 0?v.opacity:"":v.opacityExit!==void 0?v.opacityExit:0;for(const S in b0){if(v[S]===void 0)continue;const{correct:j,applyTo:P}=b0[S],E=m.transform==="none"?v[S]:j(v[S],x);if(P){const R=P.length;for(let A=0;A<R;A++)m[P[A]]=E}else m[S]=E}return this.options.layoutId&&(m.pointerEvents=x===this?Xg(l==null?void 0:l.pointerEvents)||"":"none"),m}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(uC),this.root.sharedNodes.clear()}}}function bW(e){e.updateLayout()}function wW(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=e.layout,{animationType:a}=e.options,l=n.source!==e.layout.source;a==="size"?Xr(x=>{const v=l?n.measuredBox[x]:n.layoutBox[x],_=Rr(v);v.min=s[x].min,v.max=v.min+_}):X4(a,n.layoutBox,s)&&Xr(x=>{const v=l?n.measuredBox[x]:n.layoutBox[x],_=Rr(s[x]);v.max=v.min+_,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[x].max=e.relativeTarget[x].min+_)});const u=uu();Vf(u,s,n.layoutBox);const h=uu();l?Vf(h,e.applyTransform(i,!0),n.measuredBox):Vf(h,s,n.layoutBox);const m=!Y4(u);let g=!1;if(!e.resumeFrom){const x=e.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:v,layout:_}=x;if(v&&_){const N=Fn();Wf(N,n.layoutBox,v.layoutBox);const S=Fn();Wf(S,s,_.layoutBox),K4(N,S)||(g=!0),x.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=N,e.relativeParent=x)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:h,layoutDelta:u,hasLayoutChanged:m,hasRelativeTargetChanged:g})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function _W(e){Of&&Nc.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function NW(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function jW(e){e.clearSnapshot()}function uC(e){e.clearMeasurements()}function SW(e){e.isLayoutDirty=!1}function kW(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function hC(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function CW(e){e.resolveTargetDelta()}function PW(e){e.calcProjection()}function TW(e){e.resetSkewAndRotation()}function EW(e){e.removeLeadSnapshot()}function fC(e,t,n){e.translate=kn(t.translate,0,n),e.scale=kn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function mC(e,t,n,s){e.min=kn(t.min,n.min,s),e.max=kn(t.max,n.max,s)}function AW(e,t,n,s){mC(e.x,t.x,n.x,s),mC(e.y,t.y,n.y,s)}function MW(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const RW={duration:.45,ease:[.4,0,.1,1]},pC=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),gC=pC("applewebkit/")&&!pC("chrome/")?Math.round:Xs;function xC(e){e.min=gC(e.min),e.max=gC(e.max)}function OW(e){xC(e.x),xC(e.y)}function X4(e,t,n){return e==="position"||e==="preserve-aspect"&&!LV(lC(t),lC(n),.2)}function DW(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const IW=Q4({attachResizeListener:(e,t)=>nm(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fb={current:void 0},J4=Q4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fb.current){const e=new IW({});e.mount(window),e.setOptions({layoutScroll:!0}),fb.current=e}return fb.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),LW={pan:{Feature:JV},drag:{Feature:XV,ProjectionNode:J4,MeasureLayout:H4}};function vC(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=s[i];a&&Ht.postRender(()=>
vendor: 4,414 bytes, line 653
653a(t,Lm(t)))}class FW extends Bl{mount(){const{current:t}=this.node;t&&(this.unmount=B7(t,n=>(vC(this.node,n,"Start"),s=>vC(this.node,s,"End"))))}unmount(){}}class BW extends Bl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Im(nm(this.node.current,"focus",()=>this.onFocus()),nm(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function yC(e,t,n){const{props:s}=e;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=s[i];a&&Ht.postRender(()=>a(t,Lm(t)))}class zW extends Bl{mount(){const{current:t}=this.node;t&&(this.unmount=V7(t,n=>(yC(this.node,n,"Start"),(s,{success:i})=>yC(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const e1=new WeakMap,mb=new WeakMap,$W=e=>{const t=e1.get(e.target);t&&t(e)},UW=e=>{e.forEach($W)};function VW({root:e,...t}){const n=e||document;mb.has(n)||mb.set(n,{});const s=mb.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(UW,{root:e,...t})),s[i]}function WW(e,t,n){const s=VW(t);return e1.set(e,n),s.observe(e),()=>{e1.delete(e),s.unobserve(e)}}const HW={some:0,all:1};class qW extends Bl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:a}=t,l={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:HW[i]},u=h=>{const{isIntersecting:m}=h;if(this.isInView===m||(this.isInView=m,a&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",m);const{onViewportEnter:g,onViewportLeave:x}=this.node.getProps(),v=m?g:x;v&&v(h)};return WW(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(GW(t,n))&&this.startObserver()}unmount(){}}function GW({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const YW={inView:{Feature:qW},tap:{Feature:zW},focus:{Feature:BW},hover:{Feature:FW}},KW={layout:{ProjectionNode:J4,MeasureLayout:H4}},k0={current:null},H_={current:!1};function eA(){if(H_.current=!0,!!h_)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>k0.current=e.matches;e.addListener(t),t()}else k0.current=!1}const ZW=[...j4,Ms,Ml],QW=e=>ZW.find(N4(e)),bC=new WeakMap;function XW(e,t,n){for(const s in t){const i=t[s],a=n[s];if(Ds(i))e.addValue(s,i);else if(Ds(a))e.addValue(s,fa(i,{owner:e}));else if(a!==i)if(e.hasValue(s)){const l=e.getValue(s);l.liveStyle===!0?l.jump(i):l.hasAnimated||l.set(i)}else{const l=e.getStaticValue(s);e.addValue(s,fa(l!==void 0?l:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const wC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class JW{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:a,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=z_,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const _=va.now();this.renderScheduledAt<_&&(this.renderScheduledAt=_,Ht.render(this.render,!1,!0))};const{latestValues:h,renderState:m,onUpdate:g}=l;this.onUpdate=g,this.latestValues=h,this.baseTarget={...h},this.initialValues=n.initial?{...h}:{},this.renderState=m,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=u,this.blockInitialAnimation=!!a,this.isControllingVariants=x
vendor: 4,950 bytes, line 653
653x(n),this.isVariantNode=AE(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:x,...v}=this.scrapeMotionValuesFromProps(n,{},this);for(const _ in v){const N=v[_];h[_]!==void 0&&Ds(N)&&N.set(h[_],!1)}}mount(t){this.current=t,bC.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),H_.current||eA(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:k0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){bC.delete(this.current),this.projection&&this.projection.unmount(),Fi(this.notifyUpdate),Fi(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=ad.has(t),i=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Ht.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),l&&l(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Bu){const n=Bu[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Fn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<wC.length;s++){const i=wC[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,l=t[a];l&&(this.propEventSubscriptions[i]=this.on(i,l))}this.prevMotionValues=XW(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=fa(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){var s;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(s=this.getBaseTargetFromProps(this.props,t))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(w4(i)||h4(i))?i=parseFloat(i):!QW(i)&&Ml.test(n)&&(i=v4(t,n)),this.setBaseTarget(t,Ds(i)?i.get():i)),Ds(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const l=y_(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);l&&(i=l[t])}if(s&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Ds(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new R_),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}
653class tA extends JW{constructor(){super(...arguments),this.KeyframeResolver=S4}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ds(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function eH(e){return window.getComputedStyle(e)}class tH extends tA{constructor(){super(...arguments),this.type="html",this.renderInstance=zE}readValueFromInstance(t,n){if(ad.has(n)){const s=B_(n);return s&&s.default||0}else{const s=eH(t),i=(LE(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return V4(t,n)}build(t,n,s){__(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return k_(t,n,s)}}class nH extends tA{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Fn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ad.has(n)){const s=B_(n);return s&&s.default||0}return n=$E.has(n)?n:g_(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return WE(t,n,s)}build(t,n,s){N_(t,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,s,i){UE(t,n,s,i)}mount(t){this.isSVGTag=S_(t.tagName),super.mount(t)}}const sH=(e,t)=>v_(e)?new nH(t):new tH(t,{allowProjection:e!==w.Fragment}),rH=O7({...PV,...YW,...LW,...KW},sH),re=K$(rH);function nA(e,t){let n;const s=()=>{const{currentTime:i}=t,l=(i===null?0:i.value)/100;n!==l&&e(l),n=l};return Ht.update(s,!0),()=>Fi(s)}const t0=new WeakMap;let ul;function iH(e,t){if(t){const{inlineSize:n,blockSize:s}=t[0];return{width:n,height:s}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function aH({target:e,contentRect:t,borderBoxSize:n}){var s;(s=t0.get(e))===null||s===void 0||s.forEach(i=>{i({target:e,contentSize:t,get size(){return iH(e,n)}})})}function oH(e){e.forEach(aH)}function lH(){typeof ResizeObserver>"u"||(ul=new ResizeObserver(oH))}function cH(e,t){ul||lH();const n=JE(e);return n.forEach(s=>{let i=t0.get(s);i||(i=new Set,t0.set(s,i)),i.add(t),ul==null||ul.observe(s)}),()=>{n.forEach(s=>{const i=t0.get(s);i==null||i.delete(t),i!=null&&i.size||ul==null||ul.unobserve(s)})}}const n0=new Set;let Hf;function dH(){Hf=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};n0.forEach(n=>n(t))},window.addEventListener("resize",Hf)}function uH(e){return n0.add(e),Hf||dH(),()=>{n0.delete(e),!n0.size&&Hf&&(Hf=void 0)}}function hH(e,t){return typeof e=="function"?uH(e):cH(e,t)}const fH=50,_C=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),mH=()=>({time:0,x:_C(),y:_C()}),pH={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function NC(e,t,n,s){const i=n[t],{length:a,position:l}=pH[t],u=i.current,h=n.time;i.current=e[`scroll${l}`],i.scrollLength=e[`scroll${a}`]-e[`client${a}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=Kc(0,i.scrollLength,i.current);const m=s-h;i.velocity=m>fH?0:O_(i.current-u,m)}function gH(e,t,n){NC(e,"x",t,n),NC(e,"y",t,n),t.time=n}function xH(e,t){const n={x:0,y:0};let s=e;for(;s&&s!==t;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const i=s.getBoundingClientRect();s=s.parentElement;const a=s.getBoundingClientRect();n.x+=i.left-a.left,n.y+=i.top-a.top}else if(s instanceof SVGGraphicsElement){const{x:i,y:a}=s.getBBox();n.x+=i,n.y+=a;let l=null,u=s.parentNode;for(;!l;)u.tagName==="svg"&&(l=u),u=s.parentNode;s=l}else break;return n}const t1={start:0,center:.5,end:1};function jC(e,t,n=0){let s=0;if(e in t1&&(e=t1[e]),typeof e=="string"){const i=parseFloat(e);e.endsWith("px")?s=i:e.endsWith("%")?e=i/100:e.endsWith("vw")?s=i/100*document.documentElement.clientWidth:e.endsWith("vh")?s=i/100*document.documentElement.clientHeight:e=i}return typeof e=="number"&&(s=t*e),n+s}const vH=[0,0];function yH(e,t,n,s){let i=Array.isArray(e)?e:vH,a=0,l=0;return typeof e=="number"?i=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?i=e.split(" "):i=[e,t1[e]?e:"0"]),a=jC(i[0],n,s),l=jC(i[1],t),a-l}const bH={All:[[0,0],[1,1]]},wH={x:0,y:0};function _H(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}
653function NH(e,t,n){const{offset:s=bH.All}=n,{target:i=e,axis:a="y"}=n,l=a==="y"?"height":"width",u=i!==e?xH(i,e):wH,h=i===e?{width:e.scrollWidth,height:e.scrollHeight}:_H(i),m={width:e.clientWidth,height:e.clientHeight};t[a].offset.length=0;let g=!t[a].interpolate;const x=s.length;for(let v=0;v<x;v++){const _=yH(s[v],m[l],h[l],u[a]);!g&&_!==t[a].interpolatorOffsets[v]&&(g=!0),t[a].offset[v]=_}g&&(t[a].interpolate=U_(t[a].offset,M4(s),{clamp:!1}),t[a].interpolatorOffsets=[...t[a].offset]),t[a].progress=Na(0,1,t[a].interpolate(t[a].current))}function jH(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let s=t;for(;s&&s!==e;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}function SH(e,t,n,s={}){return{measure:()=>jH(e,s.target,n),update:i=>{gH(e,n,i),(s.offset||s.target)&&NH(e,n,s)},notify:()=>t(n)}}const pf=new WeakMap,SC=new WeakMap,pb=new WeakMap,kC=e=>e===document.documentElement?window:e;function q_(e,{container:t=document.documentElement,...n}={}){let s=pb.get(t);s||(s=new Set,pb.set(t,s));const i=mH(),a=SH(t,e,i,n);if(s.add(a),!pf.has(t)){const u=()=>{for(const v of s)v.measure()},h=()=>{for(const v of s)v.update(ls.timestamp)},m=()=>{for(const v of s)v.notify()},g=()=>{Ht.read(u,!1,!0),Ht.read(h,!1,!0),Ht.update(m,!1,!0)};pf.set(t,g);const x=kC(t);window.addEventListener("resize",g,{passive:!0}),t!==document.documentElement&&SC.set(t,hH(t,g)),x.addEventListener("scroll",g,{passive:!0})}const l=pf.get(t);return Ht.read(l,!1,!0),()=>{var u;Fi(l);const h=pb.get(t);if(!h||(h.delete(a),h.size))return;const m=pf.get(t);pf.delete(t),m&&(kC(t).removeEventListener("scroll",m),(u=SC.get(t))===null||u===void 0||u(),window.removeEventListener("resize",m))}}function kH({source:e,container:t,axis:n="y"}){e&&(t=e);const s={value:0},i=q_(a=>{s.value=a[n].progress*100},{container:t,axis:n});return{currentTime:s,cancel:i}}const gb=new Map;function sA({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),gb.has(t)||gb.set(t,{});const s=gb.get(t);return s[n]||(s[n]=GE()?new ScrollTimeline({source:t,axis:n}):kH({source:t,axis:n})),s[n]}function CH(e){return e.length===2}function rA(e){return e&&(e.target||e.offset)}function PH(e,t){return CH(e)||rA(t)?q_(n=>{e(n[t.axis].progress,n)},t):nA(e,sA(t))}function TH(e,t){if(e.flatten(),rA(t))return e.pause(),q_(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=sA(t);return e.attachTimeline?e.attachTimeline(n,s=>(s.pause(),nA(i=>{s.time=s.duration*i},n))):Xs}}function EH(e,{axis:t="y",...n}={}){const s={axis:t,...n};return typeof e=="function"?PH(e,s):TH(e,s)}function CC(e,t){$$(!!(!t||t.current))}const AH=()=>({scrollX:fa(0),scrollY:fa(0),scrollXProgress:fa(0),scrollYProgress:fa(0)});function MH({container:e,target:t,layoutEffect:n=!0,...s}={}){const i=eh(AH);return(n?mx:w.useEffect)(()=>(CC("target",t),CC("container",e),EH((l,{x:u,y:h})=>{i.scrollX.set(u.current),i.scrollXProgress.set(u.progress),i.scrollY.set(h.current),i.scrollYProgress.set(h.progress)},{...s,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0})),[e,t,JSON.stringify(s.offset)]),i}function n1(e){const t=eh(()=>fa(e)),{isStatic:n}=w.useContext(fx);if(n){const[,s]=w.useState(e);w.useEffect(()=>t.on("change",s),[])}return t}function iA(e,t){const n=n1(t()),s=()=>n.set(t());return s(),mx(()=>{const i=()=>Ht.preRender(s,!1,!0),a=e.map(l=>l.on("change",i));return()=>{a.forEach(l=>l()),Fi(s)}}),n}const RH=e=>e&&typeof e=="object"&&e.mix,OH=e=>RH(e)?e.mix:void 0;function DH(...e){const t=!Array.isArray(e[0]),n=t?0:-1,s=e[0+n],i=e[1+n],a=e[2+n],l=e[3+n],u=U_(i,a,{mixer:OH(a[0]),...l});return t?u(s):u}function IH(e){zf.current=[],e();const t=iA(zf.current,e);return zf.current=void 0,t}function LH(e,t,n,s){if(typeof e=="function")return IH(e);const i=typeof t=="function"?t:DH(t,n,s);return Array.isArray(e)?PC(e,i):PC([e],([a])=>i(a))}function PC(e,t){const n=eh(()=>[]);return iA(e,()=>{n.length=0;const s=e.length;for(let i=0;i<s;i++)n[i]=e[i].get();return t(n)})}function aA(){!H_.current&&eA();const[e]=w.useState(k0.current);return e}function FH(){const{data:e}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),t=e==null?void 0:e.email,{data:n}=Re({queryKey:["userTrips",t],queryFn:()=>t?ne.entities.TripMember.filter({user_email:t}).catch(()=>[]):[]}),{data:s}=Re({queryKey:["userGear",t],queryFn:()=>t?ne.entities.GearItem.filter({claimed_by:t}).catch(()=>[]):[]}),i=(n==null?void 0:n.length)||0,a=(s==null?void 0:s.length)||0,l=Math.floor(i*142.4),u=[{id:1,title:"First Step",description:"Complete your first trip",icon:u6,color:"text-emerald-500",bg:"bg-emerald-50",border:"border-emerald-200",target:1,current:i,category:"trips"},{id:2,title:"Explorer",description:"Join 5 different trips",icon:ws,color:"text-blue-500",bg:"bg-blue-50",border:"border-blue-200",target:5,current:i,category:"trips"},{id:3,title:"Overlander",description:"Join 10 trips",icon:kc,color:"text-purple-500",bg:"bg-purple-50",border:"border-purple-200",target:10,current:i,category:"trips"},{id:4,title:"Gearhead",description:"Claim 5 gear items",icon:ri,color:"text-orange-500",bg:"bg-orange-50",border:"border-orange-200",target:5,current:a,category:"gear"},{id:5,title:"Quartermaster",description:"Claim 20 gear items",icon:da,color:"text-amber-500",bg:"bg-amber-50",border:"border-amber-200",target:20,current:a,category:"gear"},{id:6,title:"Trailblazer",description:"Drive 500 estimated miles",icon:Zs,color:"text-rose-500",bg:"bg-rose-50",border:"border-rose-200",target:500,current:l,category:"miles"}],h=i*50+a*10+l*2;let m=1,g=100,x="Weekend Warrior",v="from-emerald-400 to-teal-500";h>
653=1e3?(m=4,g=2500,x="Trail Master",v="from-amber-400 to-orange-500"):h>=400?(m=3,g=1e3,x="Seasoned Adventurer",v="from-purple-400 to-indigo-500"):h>=100&&(m=2,g=400,x="Explorer",v="from-blue-400 to-cyan-500");const _=Math.min(100,Math.max(0,h/g*100));return r.jsxs("div",{className:"min-h-screen bg-[#f4f6f8] pb-24 md:pb-12 w-full",children:[r.jsx("div",{className:"bg-white px-6 pt-12 pb-6 shadow-sm sticky top-0 z-30",children:r.jsxs("div",{className:"max-w-3xl mx-auto flex items-center justify-between",children:[r.jsx("button",{onClick:()=>window.history.back(),className:"p-2 -ml-2 text-slate-400 hover:text-slate-900 transition-colors",children:r.jsx(gr,{className:"w-6 h-6"})}),r.jsx("h1",{className:"text-xl font-black tracking-tight text-slate-900",children:"Achievements"}),r.jsx("div",{className:"w-10"})]})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-4 md:px-8 mt-6",children:[r.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:`bg-gradient-to-br ${v} rounded-[32px] p-8 shadow-xl shadow-slate-200/50 text-white relative overflow-hidden mb-8`,children:[r.jsx("div",{className:"absolute -top-10 -right-10 w-40 h-40 bg-white/10 rounded-full blur-2xl"}),r.jsx("div",{className:"absolute -bottom-10 -left-10 w-32 h-32 bg-black/10 rounded-full blur-xl"}),r.jsxs("div",{className:"relative z-10 flex flex-col md:flex-row items-center md:items-end justify-between gap-6",children:[r.jsxs("div",{className:"flex flex-col items-center md:items-start w-full",children:[r.jsxs("div",{className:"flex items-center space-x-2 bg-white/20 px-3 py-1.5 rounded-xl backdrop-blur-sm mb-4 border border-white/20",children:[r.jsx(LF,{className:"w-4 h-4 text-white"}),r.jsxs("span",{className:"text-xs font-black tracking-widest uppercase",children:["Stage ",m]})]}),r.jsx("h2",{className:"text-3xl md:text-4xl font-black tracking-tight mb-2 text-center md:text-left",children:x}),r.jsxs("p",{className:"text-white/80 font-medium mb-6 text-center md:text-left",children:["Earn ",g-h," more points to reach the next stage."]}),r.jsx("div",{className:"w-full bg-black/20 rounded-full h-3 overflow-hidden border border-white/10 backdrop-blur-sm",children:r.jsx(re.div,{initial:{width:0},animate:{width:`${_}%`},transition:{duration:1,delay:.5,ease:"easeOut"},className:"bg-white h-full rounded-full"})}),r.jsxs("div",{className:"flex justify-between w-full mt-2 text-xs font-bold text-white/70",children:[r.jsxs("span",{children:[h," pts"]}),r.jsxs("span",{children:[g," pts"]})]})]}),r.jsx("div",{className:"shrink-0 w-24 h-24 md:w-32 md:h-32 bg-white/20 rounded-[28px] border border-white/30 backdrop-blur-md flex items-center justify-center shadow-inner rotate-3",children:r.jsx(d0,{className:"w-12 h-12 md:w-16 md:h-16 text-white drop-shadow-lg"})})]})]}),r.jsxs("h3",{className:"text-lg font-black tracking-tight text-slate-900 mb-4 px-2 flex items-center",children:[r.jsx(AF,{className:"w-5 h-5 mr-2 text-slate-400"}),"Active Goals"]}),r.jsx("div",{className:"grid gap-4 mb-10",children:u.filter(N=>N.current<N.target).slice(0,3).map((N,S)=>r.jsxs(re.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.2+S*.1},className:"bg-white rounded-[24px] p-5 shadow-sm border border-slate-100 flex items-center gap-5",children:[r.jsx("div",{className:`w-14 h-14 rounded-[18px] ${N.bg} border ${N.border} flex items-center justify-center shrink-0`,children:r.jsx(N.icon,{className:`w-6 h-6 ${N.color}`,strokeWidth:2.5})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("h4",{className:"font-bold text-slate-900 tracking-tight",children:N.title}),r.jsx("p",{className:"text-sm text-slate-500 font-medium truncate mb-2",children:N.description}),r.jsx("div",{className:"w-full bg-slate-100 rounded-full h-2.5 overflow-hidden",children:r.jsx(re.div,{initial:{width:0},animate:{width:`${Math.min(100,N.current/N.target*100)}%`},transition:{duration:1,delay:.5},className:`h-full ${N.bg.replace("50","500")}`})})]}),r.jsxs("div",{className:"text-right shrink-0 font-black tracking-tight text-slate-900",children:[N.current," ",r.jsxs("span",{className:"text-slate-400 font-medium text-xs",children:["/ ",N.target]})]})]},N.id))}),r.jsxs("h3",{className:"text-lg font-black tracking-tight text-slate-900 mb-4 px-2 flex items-center",children:[r.jsx(SF,{className:"w-5 h-5 mr-2 text-amber-400 fill-amber-400"}),"Earned Badges"]}),r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:u.filter(N=>N.current>=N.target).length>0?u.filter(N=>N.current>=N.target).map((N,S)=>r.jsxs(re.div,{initial:{opacity:0,scale:.9}
vendor: 4,498 bytes, lines 653-662
653,animate:{opacity:1,scale:1},transition:{delay:.4+S*.1},className:"bg-white rounded-[24px] p-5 shadow-sm border border-slate-100 flex flex-col items-center text-center relative overflow-hidden group",children:[r.jsx("div",{className:`absolute top-0 right-0 w-20 h-20 ${N.bg} rounded-bl-[100px] opacity-50 group-hover:scale-110 transition-transform`}),r.jsx("div",{className:`w-16 h-16 rounded-[20px] ${N.bg} border ${N.border} flex items-center justify-center mb-3 relative z-10 rotate-[-5deg] group-hover:rotate-0 transition-transform`,children:r.jsx(N.icon,{className:`w-8 h-8 ${N.color}`,strokeWidth:2.5})}),r.jsx("h4",{className:"font-bold text-slate-900 tracking-tight relative z-10",children:N.title}),r.jsx("p",{className:"text-[10px] font-bold tracking-widest text-slate-400 uppercase mt-1 relative z-10",children:"Unlocked"})]},N.id)):r.jsxs("div",{className:"col-span-2 md:col-span-3 text-center py-10 bg-slate-50 border border-slate-100 border-dashed rounded-[24px]",children:[r.jsx("div",{className:"w-16 h-16 bg-slate-100 rounded-full flex items-center justify-center mx-auto mb-3",children:r.jsx(d0,{className:"w-8 h-8 text-slate-300"})}),r.jsx("p",{className:"font-bold text-slate-500 tracking-tight",children:"No badges earned yet."}),r.jsx("p",{className:"text-sm text-slate-400 font-medium",children:"Keep exploring to unlock your first badge!"})]})})]})]})}var zl=JT();const oA=Ll(zl);/** 654 * @remix-run/router v1.23.2 655 * 656 * Copyright (c) Remix Software Inc. 657 * 658 * This source code is licensed under the MIT license found in the 659 * LICENSE.md file in the root directory of this source tree. 660 * 661 * @license MIT 662 */function sm(){return sm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},sm.apply(this,arguments)}var _l;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(_l||(_l={}));const TC="popstate";function BH(e){e===void 0&&(e={});function t(s,i){let{pathname:a,search:l,hash:u}=s.location;return s1("",{pathname:a,search:l,hash:u},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(s,i){return typeof i=="string"?i:C0(i)}return $H(t,n,null,e)}function Yn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function G_(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function zH(){return Math.random().toString(36).substr(2,8)}function EC(e,t){return{usr:e.state,key:e.key,idx:t}}function s1(e,t,n,s){return n===void 0&&(n=null),sm({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?sh(t):t,{state:n,key:t&&t.key||s||zH()})}function C0(e){let{pathname:t="/",search:n="",hash:s=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(t+=s.charAt(0)==="#"?s:"#"+s),t}function sh(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substr(s),e=e.substr(0,s)),e&&(t.pathname=e)}return t}function $H(e,t,n,s){s===void 0&&(s={});let{window:i=document.defaultView,v5Compat:a=!1}=s,l=i.history,u=_l.Pop,h=null,m=g();m==null&&(m=0,l.replaceState(sm({},l.state,{idx:m}),""));function g(){return(l.state||{idx:null}).idx}function x(){u=_l.Pop;let j=g(),P=j==null?null:j-m;m=j,h&&h({action:u,location:S.location,delta:P})}function v(j,P){u=_l.Push;let E=s1(S.location,j,P);m=g()+1;let R=EC(E,m),A=S.createHref(E);try{l.pushState(R,"",A)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;i.location.assign(A)}a&&h&&h({action:u,location:S.location,delta:1})}function _(j,P){u=_l.Replace;let E=s1(S.location,j,P);m=g();let R=EC(E,m),A=S.createHref(E);l.replaceState(R,"",A),a&&h&&h({action:u,location:S.location,delta:0})}function N(j){let P=i.location.origin!=="null"?i.location.origin:i.location.href,E=typeof j=="string"?j:C0(j);return E=E.replace(/ $/,"%20"),Yn(P,"No window.location.(origin|href) available to create URL for href: "+E),new URL(E,P)}let S={get action(){return u},get location(){return e(i,l)},listen(j){if(h)throw new Error("A history only accepts one active listener");return i.addEventListener(TC,x),h=j,()=>{i.removeEventListener(TC,x),h=null}},createHref(j){return t(i,j)},createURL:N,encodeLocation(j){let P=N(j);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:v,replace:_,go(j){return l.go(j)}};return S}var AC;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(AC||(AC={}));
vendor: 2,175 bytes, line 662
662function UH(e,t,n){return n===void 0&&(n="/"),VH(e,t,n)}function VH(e,t,n,s){let i=typeof t=="string"?sh(t):t,a=Y_(i.pathname||"/",n);if(a==null)return null;let l=lA(e);WH(l);let u=null;for(let h=0;u==null&&h<l.length;++h){let m=nq(a);u=JH(l[h],m)}return u}function lA(e,t,n,s){t===void 0&&(t=[]),n===void 0&&(n=[]),s===void 0&&(s="");let i=(a,l,u)=>{let h={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:l,route:a};h.relativePath.startsWith("/")&&(Yn(h.relativePath.startsWith(s),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(s.length));let m=Cl([s,h.relativePath]),g=n.concat(h);a.children&&a.children.length>0&&(Yn(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),lA(a.children,t,g,m)),!(a.path==null&&!a.index)&&t.push({path:m,score:QH(m,a.index),routesMeta:g})};return e.forEach((a,l)=>{var u;if(a.path===""||!((u=a.path)!=null&&u.includes("?")))i(a,l);else for(let h of cA(a.path))i(a,l,h)}),t}function cA(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(s.length===0)return i?[a,""]:[a];let l=cA(s.join("/")),u=[];return u.push(...l.map(h=>h===""?a:[a,h].join("/"))),i&&u.push(...l),u.map(h=>e.startsWith("/")&&h===""?"/":h)}function WH(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:XH(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}const HH=/^:[\w-]+$/,qH=3,GH=2,YH=1,KH=10,ZH=-2,MC=e=>e==="*";function QH(e,t){let n=e.split("/"),s=n.length;return n.some(MC)&&(s+=ZH),t&&(s+=GH),n.filter(i=>!MC(i)).reduce((i,a)=>i+(HH.test(a)?qH:a===""?YH:KH),s)}function XH(e,t){return e.length===t.length&&e.slice(0,-1).every((s,i)=>s===t[i])?e[e.length-1]-t[t.length-1]:0}function JH(e,t,n){let{routesMeta:s}=e,i={},a="/",l=[];for(let u=0;u<s.length;++u){let h=s[u],m=u===s.length-1,g=a==="/"?t:t.slice(a.length)||"/",x=eq({path:h.relativePath,caseSensitive:h.caseSensitive,end:m},g),v=h.route;if(!x)return null;
vendor: 7,087 bytes, lines 662-671
662Object.assign(i,x.params),l.push({params:i,pathname:Cl([a,x.pathname]),pathnameBase:oq(Cl([a,x.pathnameBase])),route:v}),x.pathnameBase!=="/"&&(a=Cl([a,x.pathnameBase]))}return l}function eq(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=tq(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],l=a.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:s.reduce((m,g,x)=>{let{paramName:v,isOptional:_}=g;if(v==="*"){let S=u[x]||"";l=a.slice(0,a.length-S.length).replace(/(.)\/+$/,"$1")}const N=u[x];return _&&!N?m[v]=void 0:m[v]=(N||"").replace(/%2F/g,"/"),m},{}),pathname:a,pathnameBase:l,pattern:e}}function tq(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),G_(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,h)=>(s.push({paramName:u,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),s]}function nq(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return G_(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Y_(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}const sq=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rq=e=>sq.test(e);function iq(e,t){t===void 0&&(t="/");let{pathname:n,search:s="",hash:i=""}=typeof e=="string"?sh(e):e,a;if(n)if(rq(n))a=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),G_(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?a=RC(n.substring(1),"/"):a=RC(n,t)}else a=t;return{pathname:a,search:lq(s),hash:cq(i)}}function RC(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function xb(e,t,n,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function aq(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function dA(e,t){let n=aq(e);return t?n.map((s,i)=>i===n.length-1?s.pathname:s.pathnameBase):n.map(s=>s.pathnameBase)}function uA(e,t,n,s){s===void 0&&(s=!1);let i;typeof e=="string"?i=sh(e):(i=sm({},e),Yn(!i.pathname||!i.pathname.includes("?"),xb("?","pathname","search",i)),Yn(!i.pathname||!i.pathname.includes("#"),xb("#","pathname","hash",i)),Yn(!i.search||!i.search.includes("#"),xb("#","search","hash",i)));let a=e===""||i.pathname==="",l=a?"/":i.pathname,u;if(l==null)u=n;else{let x=t.length-1;if(!s&&l.startsWith("..")){let v=l.split("/");for(;v[0]==="..";)v.shift(),x-=1;i.pathname=v.join("/")}u=x>=0?t[x]:"/"}let h=iq(i,u),m=l&&l!=="/"&&l.endsWith("/"),g=(a||l===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(m||g)&&(h.pathname+="/"),h}const Cl=e=>e.join("/").replace(/\/\/+/g,"/"),oq=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),lq=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cq=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function dq(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const hA=["post","put","patch","delete"];new Set(hA);const uq=["get",...hA];new Set(uq);/** 663 * React Router v6.30.3 664 * 665 * Copyright (c) Remix Software Inc. 666 * 667 * This source code is licensed under the MIT license found in the 668 * LICENSE.md file in the root directory of this source tree. 669 * 670 * @license MIT 671 */function rm(){return rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},rm.apply(this,arguments)}const K_=w.createContext(null),hq=w.createContext(null),od=w.createContext(null),bx=w.createContext(null),ld=w.createContext({outlet:null,matches:[],isDataRoute:!1}),fA=w.createContext(null);function fq(e,t){let{relative:n}=t===void 0?{}:t;Fm()||Yn(!1);let{basename:s,navigator:i}=w.useContext(od),{hash:a,pathname:l,search:u}=pA(e,{relative:n}),h=l;return s!=="/"&&(h=l==="/"?s:Cl([s,l])),i.createHref({pathname:h,search:u,hash:a})}function Fm(){return w.useContext(bx)!=null}function rh(){return Fm()||Yn(!1),w.useContext(bx).location}function mA(e){w.useContext(od).static||w.useLayoutEffect(e)}function Kn(){let{isDataRoute:e}=w.useContext(ld);return e?kq():mq()}function mq(){Fm()||Yn(!1);let e=w.useContext(K_),{basename:t,future:n,navigator:s}=w.useContext(od),{matches:i}=w.useContext(ld),{pathname:a}=rh(),l=JSON.stringify(dA(i,n.v7_relativeSplatPath)),u=w.useRef(!1);return mA(()=>{u.current=!0}),w.useCallback(function(m,g){if(g===void 0&&(g={}),!u.current)return;if(typeof m=="number"){s.go(m);return}let x=uA(m,JSON.parse(l),a,g.relative==="path");e==null&&t!=="/"&&(x.pathname=x.pathname==="/"?t:Cl([t,x.pathname])),(g.replace?s.replace:s.push)(x,g.state,g)},[t,s,l,a,e])}function pA(e,t){let{relative:n}=t===void 0?{}:t,{future:s}=w.useContext(od),{matches:i}=w.useContext(ld),{pathname:a}=rh(),l=JSON.stringify(dA(i,s.v7_relativeSplatPath));return w.useMemo(()=>uA(e,JSON.parse(l),a,n==="path"),[e,l,a,n])}function pq(e,t){return gq(e,t)}function gq(e,t,n,s){Fm()||Yn(!1);let{navigator:i}=w.useContext(od),{matches:a}=w.useContext(ld),l=a[a.length-1],u=l?l.params:{};l&&l.pathname;let h=l?l.pathnameBase:"/";l&&l.route;let m=rh(),g;if(t){var x;let j=typeof t=="string"?sh(t):t;h==="/"||(x=j.pathname)!=null&&x.startsWith(h)||Yn(!1),g=j}else g=m;let v=g.pathname||"/",_=v;if(h!=="/"){let j=h.replace(/^\//,"").split("/");_="/"+v.replace(/^\//,"").split("/").slice(j.length).join("/")}let N=UH(e,{pathname:_}),S=wq(N&&N.map(j=>Object.assign({},j,{params:Object.assign({},u,j.params),pathname:Cl([h,i.encodeLocation?i.encodeLocation(j.pathname).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?h:Cl([h,i.encodeLocation?i.encodeLocation(j.pathnameBase).pathname:j.pathnameBase])})),a,n,s);return t&&S?w.createElement(bx.Provider,{value:{location:rm({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:_l.Pop}},S):S}function xq(){let e=Sq(),t=dq(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application
671Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:i},n):null,null)}const vq=w.createElement(xq,null);class yq extends w.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?w.createElement(ld.Provider,{value:this.props.routeContext},w.createElement(fA.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function bq(e){let{routeContext:t,match:n,children:s}=e,i=w.useContext(K_);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(ld.Provider,{value:t},s)}function wq(e,t,n,s){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),s===void 0&&(s=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=s)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let g=l.findIndex(x=>x.route.id&&(u==null?void 0:u[x.route.id])!==void 0);g>=0||Yn(!1),l=l.slice(0,Math.min(l.length,g+1))}let h=!1,m=-1;if(n&&s&&s.v7_partialHydration)for(let g=0;g<l.length;g++){let x=l[g];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(m=g),x.route.id){let{loaderData:v,errors:_}=n,N=x.route.loader&&v[x.route.id]===void 0&&(!_||_[x.route.id]===void 0);if(x.route.lazy||N){h=!0,m>=0?l=l.slice(0,m+1):l=[l[0]];break}}}return l.reduceRight((g,x,v)=>{let _,N=!1,S=null,j=null;n&&(_=u&&x.route.id?u[x.route.id]:void 0,S=x.route.errorElement||vq,h&&(m<0&&v===0?(Cq("route-fallback"),N=!0,j=null):m===v&&(N=!0,j=x.route.hydrateFallbackElement||null)));let P=t.concat(l.slice(0,v+1)),E=()=>{let R;return _?R=S:N?R=j:x.route.Component?R=w.createElement(x.route.Component,null):x.route.element?R=x.route.element:R=g,w.createElement(bq,{match:x,routeContext:{outlet:g,matches:P,isDataRoute:n!=null},children:R})};return n&&(x.route.ErrorBoundary||x.route.errorElement||v===0)?w.createElement(yq,{location:n.location,revalidation:n.revalidation,component:S,error:_,children:E(),routeContext:{outlet:null,matches:P,isDataRoute:!0}}):E()},null)}var gA=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(gA||{}),xA=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(xA||{});function _q(e){let t=w.useContext(K_);return t||Yn(!1),t}function Nq(e){let t=w.useContext(hq);return t||Yn(!1),t}function jq(e){let t=w.useContext(ld);return t||Yn(!1),t}function vA(e){let t=jq(),n=t.matches[t.matches.length-1];return n.route.id||Yn(!1),n.route.id}function Sq(){var e;let t=w.useContext(fA),n=Nq(),s=vA();return t!==void 0?t:(e=n.errors)==null?void 0:e[s]}function kq(){let{router:e}=_q(gA.UseNavigateStable),t=vA(xA.UseNavigateStable),n=w.useRef(!1);return mA(()=>{n.current=!0}),w.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,rm({fromRouteId:t},a)))},[e,t])}const OC={};function Cq(e,t,n){OC[e]||(OC[e]=!0)}function Pq(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ys(e){Yn(!1)}function Tq(e){let{basename:t="/",children:n=null,location:s,navigationType:i=_l.Pop,navigator:a,static:l=!1,future:u}=e;Fm()&&Yn(!1);let h=t.replace(/^\/*/,"/"),m=w.useMemo(()=>({basename:h,navigator:a,static:l,future:rm({v7_relativeSplatPath:!1},u)}),[h,u,a,l]);typeof s=="string"&&(s=sh(s));let{pathname:g="/",search:x="",hash:v="",state:_=null,key:N="default"}=s,S=w.useMemo(()=>{let j=Y_(g,h);return j==null?null:{location:{pathname:j,search:x,hash:v,state:_,key:N},navigationType:i}},[h,g,x,v,_,N,i]);return S==null?null:w.createElement(od.Provider,{value:m},w.createElement(bx.Provider,{children:n,value:S}))}function yA(e){let{children:t,location:n}=e;return pq(r1(t),n)}new Promise(()=>{});
671function r1(e,t){t===void 0&&(t=[]);let n=[];return w.Children.forEach(e,(s,i)=>{if(!w.isValidElement(s))return;let a=[...t,i];if(s.type===w.Fragment){n.push.apply(n,r1(s.props.children,a));return}s.type!==Ys&&Yn(!1),!s.props.index||!s.props.children||Yn(!1);let l={id:s.props.id||a.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(l.children=r1(s.props.children,a)),n.push(l)}),n}/** 672 * React Router DOM v6.30.3 673 * 674 * Copyright (c) Remix Software Inc. 675 * 676 * This source code is licensed under the MIT license found in the 677 * LICENSE.md file in the root directory of this source tree. 678 * 679 * @license MIT 680 */function i1(){return i1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},i1.apply(this,arguments)}function Eq(e,t){if(e==null)return{};var n={},s=Object.keys(e),i,a;for(a=0;a<s.length;a++)i=s[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Aq(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Mq(e,t){return e.button===0&&(!t||t==="_self")&&!Aq(e)}const Rq=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Oq="6";try{window.__reactRouterVersion=Oq}catch{}const Dq="startTransition",DC=J0[Dq];function Iq(e){let{basename:t,children:n,future:s,window:i}=e,a=w.useRef();a.current==null&&(a.current=BH({window:i,v5Compat:!0}));let l=a.current,[u,h]=w.useState({action:l.action,location:l.location}),{v7_startTransition:m}=s||{},g=w.useCallback(x=>{m&&DC?DC(()=>h(x)):h(x)},[h,m]);return w.useLayoutEffect(()=>l.listen(g),[l,g]),w.useEffect(()=>Pq(s),[s]),w.createElement(Tq,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l,future:s})}const Lq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Fq=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Di=w.forwardRef(function(t,n){let{onClick:s,relative:i,reloadDocument:a,replace:l,state:u,target:h,to:m,preventScrollReset:g,viewTransition:x}=t,v=Eq(t,Rq),{basename:_}=w.useContext(od),N,S=!1;if(typeof m=="string"&&Fq.test(m)&&(N=m,Lq))try{let R=new URL(window.location.href),A=m.startsWith("//")?new URL(R.protocol+m):new URL(m),B=Y_(A.pathname,_);A.origin===R.origin&&B!=null?m=B+A.search+A.hash:S=!0}catch{}let j=fq(m,{relative:i}),P=Bq(m,{replace:l,state:u,target:h,preventScrollReset:g,relative:i,viewTransition:x});function E(R){s&&s(R),R.defaultPrevented||P(R)}return w.createElement("a",i1({},v,{href:N||j,onClick:S||a?s:E,ref:n,target:h}))});var IC;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(IC||(IC={}));var LC;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(LC||(LC={}));function Bq(e,t){let{target:n,replace:s,state:i,preventScrollReset:a,relative:l,viewTransition:u}=t===void 0?{}:t,h=Kn(),m=rh(),g=pA(e,{relative:l});return w.useCallback(x=>{if(Mq(x,n)){x.preventDefault();let v=s!==void 0?s:C0(m)===C0(g);h(e,{replace:v,state:i,preventScrollReset:a,relative:l,viewTransition:u})}},[m,h,g,s,i,n,e,a,l,u])}function Ls(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Rl(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function zq(e,t){const n=Ls(e);return isNaN(t)?Rl(e,NaN):(n.setDate(n.getDate()+t),n)}const bA=6048e5,$q=864e5;let Uq={};function wx(){return Uq}function im(e,t){var u,h,m,g;const n=wx(),s=(t==null?void 0:t.weekStartsOn)??((h=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:h.weekStartsOn)??n.weekStartsOn??((g=(m=n.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??0,i=Ls(e),a=i.getDay(),l=(a<s?7:0)+a-s;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function P0(e){return im(e,{weekStartsOn:1}
vendor: 19,104 bytes, line 680
680)}function wA(e){const t=Ls(e),n=t.getFullYear(),s=Rl(e,0);s.setFullYear(n+1,0,4),s.setHours(0,0,0,0);const i=P0(s),a=Rl(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const l=P0(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}function FC(e){const t=Ls(e);return t.setHours(0,0,0,0),t}function BC(e){const t=Ls(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Vq(e,t){const n=FC(e),s=FC(t),i=+n-BC(n),a=+s-BC(s);return Math.round((i-a)/$q)}function Wq(e){const t=wA(e),n=Rl(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),P0(n)}function Hq(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function qq(e){if(!Hq(e)&&typeof e!="number")return!1;const t=Ls(e);return!isNaN(Number(t))}function Gq(e){const t=Ls(e),n=Rl(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Yq={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Kq=(e,t,n)=>{let s;const i=Yq[e];return typeof i=="string"?s=i:t===1?s=i.one:s=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+s:s+" ago":s};function vb(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Zq={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Qq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Xq={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Jq={date:vb({formats:Zq,defaultWidth:"full"}),time:vb({formats:Qq,defaultWidth:"full"}),dateTime:vb({formats:Xq,defaultWidth:"full"})},eG={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},tG=(e,t,n,s)=>eG[e];function gf(e){return(t,n)=>{const s=n!=null&&n.context?String(n.context):"standalone";let i;if(s==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,u=n!=null&&n.width?String(n.width):l;i=e.formattingValues[u]||e.formattingValues[l]}else{const l=e.defaultWidth,u=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[u]||e.values[l]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const nG={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},sG={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},rG={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},iG={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},aG={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},oG={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},lG=(e,t)=>{const n=Number(e),s=n%100;if(s>20||s<10)switch(s%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},cG={ordinalNumber:lG,era:gf({values:nG,defaultWidth:"wide"}),quarter:gf({values:sG,defaultWidth:"wide",argumentCallback:e=>e-1}),month:gf({values:rG,defaultWidth:"wide"}),day:gf({values:iG,defaultWidth:"wide"}),dayPeriod:gf({values:aG,defaultWidth:"wide",formattingValues:oG,defaultFormattingWidth:"wide"})};function xf(e){return(t,n={})=>{const s=n.width,i=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const l=a[0],u=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth],h=Array.isArray(u)?uG(u,x=>x.test(l)):dG(u,x=>x.test(l));let m;m=e.valueCallback?e.valueCallback(h):h,m=n.valueCallback?n.valueCallback(m):m;const g=t.slice(l.length);return{value:m,rest:g}}}function dG(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function uG(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function hG(e){return(t,n={})=>{const s=t.match(e.matchPattern);if(!s)return null;const i=s[0],a=t.match(e.parsePattern);if(!a)return null;let l=e.valueCallback?e.valueCallback(a[0]):a[0];l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(i.length);return{value:l,rest:u}}}const fG=/^(\d+)(th|st|nd|rd)?/i,mG=/\d+/i,pG={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},gG={any:[/^b/i,/^(a|c)/i]},xG={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},vG={any:[/1/i,/2/i,/3/i,/4/i]},yG={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},bG={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},wG={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},_G={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},NG={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},jG={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},SG={ordinalNumber:hG({matchPattern:fG,parsePattern:mG,valueCallback:e=>parseInt(e,10)}),era:xf({matchPatterns:pG,defaultMatchWidth:"wide",parsePatterns:gG,defaultParseWidth:"any"}),quarter:xf({matchPatterns:xG,defaultMatchWidth:"wide",parsePatterns:vG,defaultParseWidth:"any",valueCallback:e=>e+1}),month:xf({matchPatterns:yG,defaultMatchWidth:"wide",parsePatterns:bG,defaultParseWidth:"any"}),day:xf({matchPatterns:wG,defaultMatchWidth:"wide",parsePatterns:_G,defaultParseWidth:"any"}),dayPeriod:xf({matchPatterns:NG,defaultMatchWidth:"any",parsePatterns:jG,defaultParseWidth:"any"})},kG={code:"en-US",formatDistance:Kq,formatLong:Jq,formatRelative:tG,localize:cG,match:SG,options:{weekStartsOn:0,firstWeekContainsDate:1}};function CG(e){const t=Ls(e);return Vq(t,Gq(t))+1}function PG(e){const t=Ls(e),n=+P0(t)-+Wq(t);return Math.round(n/bA)+1}function _A(e,t){var g,x,v,_;const n=Ls(e),s=n.getFullYear(),i=wx(),a=(t==null?void 0:t.firstWeekContainsDate)??((x=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:x.firstWeekContainsDate)??i.firstWeekContainsDate??((_=(v=i.locale)==null?void 0:v.options)==null?void 0:_.firstWeekContainsDate)??1,l=Rl(e,0);l.setFullYear(s+1,0,a),l.setHours(0,0,0,0);const u=im(l,t),h=Rl(e,0);h.setFullYear(s,0,a),h.setHours(0,0,0,0);const m=im(h,t);return n.getTime()>=u.getTime()?s+1:n.getTime()>=m.getTime()?s:s-1}function TG(e,t){var u,h,m,g;const n=wx(),s=(t==null?void 0:t.firstWeekContainsDate)??((h=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??n.firstWeekContainsDate??((g=(m=n.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,i=_A(e,t),a=Rl(e,0);return a.setFullYear(i,0,s),a.setHours(0,0,0,0),im(a,t)}function EG(e,t){const n=Ls(e),s=+im(n,t)-+TG(n,t);return Math.round(s/bA)+1}function Qt(e,t){const n=e<0?"-":"",s=Math.abs(e).toString().padStart(t,"0");return n+s}const ll={y(e,t){const n=e.getFullYear(),s=n>0?n:1-n;return Qt(t==="yy"?s%100:s,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Qt(n+1,2)},d(e,t){return Qt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Qt(e.getHours()%12||12,t.length)},H(e,t){return Qt(e.getHours(),t.length)},m(e,t){return Qt(e.getMinutes(),t.length)},s(e,t){return Qt(e.getSeconds(),t.length)},S(e,t){const n=t.length,s=e.getMilliseconds(),i=Math.trunc(s*Math.pow(10,n-3));return Qt(i,t.length)}},Jd={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zC={G:function(e,t,n){const s=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(s,{width:"abbreviated"});case"GGGGG":return n.era(s,{width:"narrow"});case"GGGG":default:return n.era(s,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const s=e.getFullYear(),i=s>0?s:1-s;return n.ordinalNumber(i,{unit:"year"})}return ll.y(e,t)},Y:function(e,t,n,s){const i=_A(e,s),a=i>0?i:1-i;if(t==="YY"){const l=a%100;return Qt(l,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):Qt(a,t.length)},R:function(e,t){const n=wA(e);return Qt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Qt(n,t.length)},Q:function(e,t,n){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(s);case"QQ":return Qt(s,2);case"Qo":return n.ordinalNumber(s,{unit:"quarter"});case"QQQ":return n.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(s,{width:"wide",context:"formatting"})}},q:function(e,t,n){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(s);case"qq":return Qt(s,2);case"qo":return n.ordinalNumber(s,{unit:"quarter"});case"qqq":return n.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(s,{width:"wide",context:"standalone"})}},M:function(e,t,n){const s=e.getMonth();switch(t){case"M":case"MM":return ll.M(e,t);case"Mo":return n.ordinalNumber(s+1,{unit:"month"});case"MMM":return n.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(s,{width:"wide",context:"formatting"})}},L:function(e,t,n){const s=e.getMonth();switch(t){case"L":return String(s+1);case"LL":return Qt(s+1,2);case"Lo":return n.ordinalNumber(s+1,{unit:"month"});case"LLL":return n.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(s,{width:"wide",context:"standalone"})}},w:function(e,t,n,s){const i=EG(e,s);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Qt(i,t.length)},I:function(e,t,n){const s=PG(e);return t==="Io"?n.ordinalNumber(s,{unit:"week"}):Qt(s,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ll.d(e,t)},D:function(e,t,n){const s=CG(e);return t==="Do"?n.ordinalNumber(s,{unit:"dayOfYear"}):Qt(s,t.length)},E:function(e,t,n){const s=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(s,{width:"short",context:"formatting"});case"EEEE":default:return n.day(s,{width:"wide",context:"formatting"})}},e:function(e,t,n,s){const i=e.getDay(),a=(i-s.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Qt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,s){const i=e.getDay(),a=(i-s.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Qt(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const s=e.getDay(),i=s===0?7:s;switch(t){case"i":return String(i);case"ii":return Qt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(s,{width:"short",context:"formatting"});case"iiii":default:return n.day(s,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const s=e.getHours();let i;switch(s===12?i=Jd.noon:s===0?i=Jd.midnight:i=s/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const s=e.getHours();let i;switch(s>=17?i=Jd.evening:s>=12?i=Jd.afternoon:s>=4?i=Jd.morning:i=Jd.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let s=e.getHours()%12;return s===0&&(s=12),n.ordinalNumber(s,{unit:"hour"})}return ll.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ll.H(e,t)},K:function(e,t,n){const s=e.getHours()%12;return t==="Ko"?n.ordinalNumber(s,{unit:"hour"}):Qt(s,t.length)},k:function(e,t,n){let s=e.getHours();return s===0&&(s=24),t==="ko"?n.ordinalNumber(s,{unit:"hour"}):Qt(s,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ll.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ll.s(e,t)},S:function(e,t){return ll.S(e,t)},X:function(e,t,n){const s=e.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return UC(s);case"XXXX":case"XX":return jc(s);case"XXXXX":case"XXX":default:return jc(s,":")}},x:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"x":return UC(s);case"xxxx":case"xx":return jc(s);case"xxxxx":case"xxx":default:return jc(s,":")}},O:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+$C(s,":");case"OOOO":default:return"GMT"+jc(s,":")}},z:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+$C(s,":");case"zzzz":default:return"GMT"+jc(s,":")}},t:function(e,t,n){const s=Math.trunc(e.getTime()/1e3);return Qt(s,t.length)},T:function(e,t,n){const s=e.getTime();return Qt(s,t.length)}};function $C(e,t=""){const n=e>0?"-":"+",s=Math.abs(e),i=Math.trunc(s/60),a=s%60;return a===0?n+String(i):n+String(i)+t+Qt(a,2)}function UC(e,t){return e%60===0?(e>0?"-":"+")+Qt(Math.abs(e)/60,2):jc(e,t)}function jc(e,t=""){const n=e>0?"-":"+",s=Math.abs(e),i=Qt(Math.trunc(s/60),2),a=Qt(s%60,2);return n+i+t+a}const VC=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},NA=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},AG=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],s=n[1],i=n[2];if(!i)return VC(e,t);let a;switch(s){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",VC(s,t)).replace("{{time}}",NA(i,t))},MG={p:NA,P:AG},RG=/^D+$/,OG=/^Y+$/,DG=["D","DD","YY","YYYY"];function IG(e){return RG.test(e)}function LG(e){return OG.test(e)}function FG(e,t,n){const s=BG(e,t,n);if(console.warn(s),DG.includes(e))throw new RangeError(s)}function BG(e,t,n){const s=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${s} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const zG=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$G=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,UG=/^'([^]*?)'?$/,VG=/''/g,WG=/[a-zA-Z]/;function $u(e,t,n){var g,x,v,_;const s=wx(),i=s.locale??kG,a=s.firstWeekContainsDate??((x=(g=s.locale)==null?void 0:g.options)==null?void 0:x.firstWeekContainsDate)??1,l=s.weekStartsOn??((_=(v=s.locale)==null?void 0:v.options)==null?void 0:_.weekStartsOn)??0,u=Ls(e);if(!qq(u))throw new RangeError("Invalid time value");let h=t.match($G).map(N=>{const S=N[0];if(S==="p"||S==="P"){const j=MG[S];return j(N,i.formatLong)}return N}).join("").match(zG).map(N=>{if(N==="''")return{isToken:!1,value:"'"};const S=N[0];if(S==="'")return{isToken:!1,value:HG(N)};if(zC[S])return{isToken:!0,value:N};
680if(S.match(WG))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:N}});i.localize.preprocessor&&(h=i.localize.preprocessor(u,h));const m={firstWeekContainsDate:a,weekStartsOn:l,locale:i};return h.map(N=>{if(!N.isToken)return N.value;const S=N.value;(LG(S)||IG(S))&&FG(S,t,String(e));const j=zC[S[0]];return j(u,S,i.localize,m)}).join("")}function HG(e){const t=e.match(UG);return t?t[1].replace(VG,"'"):e}function qG(e,t){const n=Ls(e),s=Ls(t);return n.getTime()>s.getTime()}function GG(e,t){const n=Ls(e),s=Ls(t);return+n<+s}function $n(e,t){if(!e)return"";let n;if(typeof e=="string"&&e.length===10&&e.includes("-"))return n=new Date(e+"T00:00:00"),$u(n,t);if(n=new Date(e),isNaN(n.getTime()))return"";const i=new Intl.DateTimeFormat("en-US",{timeZone:"America/Los_Angeles",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).formatToParts(n),a=h=>{var m;return parseInt(((m=i.find(g=>g.type===h))==null?void 0:m.value)||"0",10)};let l=a("hour");l===24&&(l=0);const u=new Date(a("year"),a("month")-1,a("day"),l,a("minute"),a("second"));return $u(u,t)}const YG=[{id:"1",action:"joined",user_name:"Alex",description:"joined the trip",created_date:new Date(Date.now()-36e5).toISOString()},{id:"2",action:"gear_claimed",user_name:"Jordan",description:"claimed Heavy Duty Tarp (x1)",created_date:new Date(Date.now()-864e5).toISOString()},{id:"3",action:"location_added",user_name:"Sarah",description:"added a new stop: Summit Trail",created_date:new Date(Date.now()-1728e5).toISOString()}];function KG(){const e=Kn(),n=new URLSearchParams(window.location.search).get("trip_id")||"1",{data:s}=Re({queryKey:["activity",n],queryFn:()=>ne.entities.ActivityLog.filter({trip_id:n},"-created_date").catch(()=>[])}),i=(s==null?void 0:s.length)>0?s:YG;return r.jsxs("div",{className:"min-h-screen bg-[#f9fafb]",children:[r.jsxs("header",{className:"bg-white/90 backdrop-blur-md border-b border-slate-100 p-4 px-6 flex items-center justify-between z-20 sticky top-0",children:[r.jsxs("div",{className:"flex items-center",children:[r.jsx("button",{onClick:()=>e(-1),className:"p-2 -ml-2 mr-2 rounded-full hover:bg-slate-100",children:r.jsx(gr,{className:"w-6 h-6"})}),r.jsx("h1",{className:"font-semibold tracking-tight text-lg",children:"Activity Feed"})]}),r.jsx("button",{onClick:()=>e("/Home"),className:"p-2 -mr-2 rounded-full hover:bg-slate-100 text-slate-600",children:r.jsx(Ii,{className:"w-6 h-6"})})]}),r.jsx("div",{className:"p-6",children:r.jsxs("div",{className:"relative pl-4 space-y-8",children:[r.jsx("div",{className:"absolute left-[23px] top-2 bottom-0 w-0.5 bg-slate-200"}),i.map((a,l)=>r.jsxs(re.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.4,delay:l*.12},className:"relative pl-8",children:[r.jsx("div",{className:"absolute left-[-5px] top-0 w-8 h-8 rounded-full bg-slate-100 border-4 border-[#f9fafb] flex items-center justify-center text-slate-500 z-10",children:a.action==="joined"?r.jsx(tx,{className:"w-3.5 h-3.5"}):r.jsx(zn,{className:"w-3.5 h-3.5"})}),r.jsxs("div",{children:[r.jsxs("p",{className:"text-sm font-semibold tracking-tight text-slate-800",children:[a.user_name," ",r.jsx("span",{className:"font-medium text-slate-500",children:a.description})]}),r.jsx("p",{className:"text-[10px] font-semibold tracking-tight text-slate-400 mt-1 uppercase tracking-wider",children:a.created_date?$n(new Date(a.created_date),"MMM d, h:mm a"):"Recently"})]})]},a.id||l))]})})]})}function Xe(e){return"/"+e.replace(/ /g,"-")}function ZG(){const{data:e=[]}=Re({queryKey:["admin-users"],queryFn:()=>ne.entities.User.list()}),{data:t=[]}=Re({queryKey:["admin-trips"],queryFn:()=>ne.entities.Trip.list("-created_date")}),{data:n=[]}=Re({queryKey:["admin-posts"],queryFn:()=>ne.entities.FeedPost.list("-created_date",10)}),s=t.filter(m=>m.approval_status==="pending_approval"),i=t.filter(m=>!m.approval_status||m.approval_status==="approved"),a=e.filter(m=>m.role==="superadmin"),l=e.filter(m=>m.role==="admin"),u=e.filter(m=>m.role==="moderator"),h=[{label:"Total Users",value:e.length,icon:Li,color:"bg-blue-50 text-blue-600 border-blue-100"},{label:"Admins & Mods",value:a.length+l.length+u.length,icon:Al,color:"bg-purple-50 text-purple-600 border-purple-100"},{label:"Total Trips",value:t.length,icon:Zs,color:"bg-emerald-50 text-emerald-600 border-emerald-100"}
680,{label:"Pending Approval",value:s.length,icon:zn,color:"bg-amber-50 text-amber-600 border-amber-100"},{label:"Approved Trips",value:i.length,icon:ht,color:"bg-green-50 text-green-600 border-green-100"},{label:"Feed Posts",value:n.length,icon:Qs,color:"bg-pink-50 text-pink-600 border-pink-100"}];return r.jsxs("div",{children:[r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-8",children:h.map((m,g)=>{const x=m.icon;return r.jsxs(re.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:g*.05},className:`p-5 rounded-2xl border ${m.color} flex flex-col`,children:[r.jsx(x,{className:"w-5 h-5 mb-3"}),r.jsx("p",{className:"text-3xl font-black",children:m.value}),r.jsx("p",{className:"text-xs font-bold mt-1 opacity-70 uppercase tracking-wider",children:m.label})]},m.label)})}),s.length>0&&r.jsxs("div",{children:[r.jsxs("h3",{className:"text-lg font-bold text-slate-900 mb-4 flex items-center gap-2",children:[r.jsx(zn,{className:"w-5 h-5 text-amber-500"}),"Trips Awaiting Approval (",s.length,")"]}),r.jsx("div",{className:"space-y-2",children:s.slice(0,5).map(m=>r.jsxs("div",{className:"bg-white border border-amber-100 rounded-xl p-3 flex items-center gap-3",children:[r.jsx("div",{className:"w-12 h-12 rounded-lg overflow-hidden bg-slate-100 flex-shrink-0",children:r.jsx("img",{src:m.cover_image_url||"https://images.unsplash.com/photo-1464822759023-fed622ff2c3b",alt:"",className:"w-full h-full object-cover"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"font-bold text-sm text-slate-900 truncate",children:m.title}),r.jsxs("p",{className:"text-xs text-slate-400",children:["by ",m.created_by||"Unknown"]})]}),r.jsx("span",{className:"px-2 py-1 bg-amber-100 text-amber-700 text-[10px] font-bold rounded-lg flex-shrink-0",children:"Pending"})]},m.id))})]}),s.length===0&&r.jsxs("div",{className:"text-center py-12 bg-white rounded-2xl border border-slate-100",children:[r.jsx(ht,{className:"w-10 h-10 text-emerald-400 mx-auto mb-3"}),r.jsx("p",{className:"font-bold text-slate-700",children:"All caught up!"}),r.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"No pending trip approvals."})]})]})}function _x(e,t){return e!=null&&e.profile_picture_url?e.profile_picture_url:`https://api.dicebear.com/7.x/avataaars/svg?seed=${t||(e==null?void 0:e.email)||"guest"}`}function Js({user:e,email:t,className:n="w-9 h-9 rounded-full",alt:s=""}){const i=t||(e==null?void 0:e.email),{data:a}=Re({queryKey:["public-users"],queryFn:async()=>{try{return(await ne.functions.invoke("getPublicUsers")).data.users||{}}catch{return{}}},staleTime:1e3*60*5});let l=e;return!(l!=null&&l.profile_picture_url)&&i&&(a!=null&&a[i])&&(l=a[i]),r.jsx("img",{src:_x(l,i),alt:s||i||"Avatar",className:`${n} bg-slate-100 object-cover`})}const WC={superadmin:{label:"Super Admin",color:"bg-purple-100 text-purple-700 border-purple-200",icon:Al},admin:{label:"Admin",color:"bg-red-100 text-red-700 border-red-200",icon:Al},moderator:{label:"Moderator",color:"bg-amber-100 text-amber-700 border-amber-200",icon:Os},user:{label:"User",color:"bg-slate-100 text-slate-600 border-slate-200",icon:rd}
680};function QG({currentUser:e}){const t=tn(),[n,s]=w.useState(""),[i,a]=w.useState("all"),[l,u]=w.useState(null),{data:h=[],isLoading:m}=Re({queryKey:["admin-users"],queryFn:()=>ne.entities.User.list()}),[g,x]=w.useState("all"),v=pt({mutationFn:({userId:E,role:R})=>ne.entities.User.update(E,{role:R}),onSuccess:()=>{t.invalidateQueries({queryKey:["admin-users"]}),u(null)}}),_=pt({mutationFn:({userId:E,approval_status:R})=>ne.entities.User.update(E,{approval_status:R}),onSuccess:()=>t.invalidateQueries({queryKey:["admin-users"]})}),N=E=>E.role!=="superadmin"&&E.role!=="admin"&&E.role!=="moderator"&&(!E.approval_status||E.approval_status==="pending"),S=h.filter(E=>{if(i!=="all"&&E.role!==i||g==="pending"&&!N(E))return!1;if(n){const R=n.toLowerCase();return(E.full_name||"").toLowerCase().includes(R)||(E.email||"").toLowerCase().includes(R)}return!0}),j=h.filter(N).length,P={all:h.length,superadmin:h.filter(E=>E.role==="superadmin").length,admin:h.filter(E=>E.role==="admin").length,moderator:h.filter(E=>E.role==="moderator").length,user:h.filter(E=>E.role==="user").length};return r.jsxs("div",{children:[r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-6",children:Object.entries(P).map(([E,R])=>r.jsxs("button",{onClick:()=>a(E),className:`p-4 rounded-2xl border text-left transition-all ${i===E?"bg-slate-900 text-white border-slate-900 shadow-lg":"bg-white border-slate-200 hover:border-slate-300"}`,children:[r.jsx("p",{className:`text-2xl font-black ${i===E?"text-white":"text-slate-900"}`,children:R}),r.jsx("p",{className:`text-xs font-bold uppercase tracking-wider ${i===E?"text-slate-300":"text-slate-400"}`,children:E==="all"?"Total":E+"s"})]},E))}),j>0&&r.jsxs("div",{className:"mb-4 bg-amber-50 border border-amber-200 rounded-2xl p-4 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(zn,{className:"w-5 h-5 text-amber-600"}),r.jsxs("span",{className:"font-bold text-amber-800 text-sm",children:[j," user",j>1?"s":""," waiting for approval"]})]}),r.jsx("button",{onClick:()=>x(g==="pending"?"all":"pending"),className:`px-3 py-1.5 rounded-lg text-xs font-bold transition-all ${g==="pending"?"bg-amber-600 text-white":"bg-amber-200 text-amber-800 hover:bg-amber-300"}`,children:g==="pending"?"Show All":"Show Pending"})]}),r.jsxs("div",{className:"relative mb-6",children:[r.jsx(ai,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),r.jsx("input",{value:n,onChange:E=>s(E.target.value),placeholder:"Search users by name or email...",className:"w-full pl-11 pr-4 py-3 bg-white border border-slate-200 rounded-xl text-sm font-medium outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all"})]}),m?r.jsx("div",{className:"flex justify-center py-12",children:r.jsx(gt,{className:"w-6 h-6 animate-spin text-slate-400"})}):r.jsx("div",{className:"space-y-2",children:S.map((E,R)=>{var z;const A=WC[E.role]||WC.user,B=A.icon,I=E.email===(e==null?void 0:e.email);return r.jsxs(re.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:R*.02},className:"bg-white border border-slate-100 rounded-2xl p-4 flex items-center justify-between hover:shadow-md transition-all",children:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r.jsx("img",{src:_x(E,E.email),alt:"",className:"w-10 h-10 rounded-full bg-slate-100 object-cover flex-shrink-0"}),r.jsxs("div",{className:"min-w-0",children:[r.jsxs("p",{className:"font-bold text-slate-900 text-sm truncate",children:[E.full_name||((z=E.email)==null?void 0:z.split("@")[0]),I&&r.jsx("span",{className:"text-xs text-slate-400 ml-1",children:"(You)"})]}),r.jsx("p",{className:"text-xs text-slate-400 truncate",children:E.email})]})]}),r.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0 flex-wrap justify-end",children:[!I&&E.role!=="superadmin"&&E.role!=="admin"&&E.role!=="moderator"&&r.jsxs(r.Fragment,{children:[(!E.approval_status||E.approval_status==="pending")&&r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx("span",{className:"px-2 py-1 rounded-lg text-[10px] font-bold bg-amber-100 text-amber-700 border border-amber-200",children:"Pending"}),r.jsx("button",{onClick:()=>_.mutate({userId:E.id,approval_status:"approved"}),disabled:_.isPending,className:"p-1.5 bg-emerald-100 hover:bg-emerald-200 text-emerald-700 rounded-lg transition-colors",title:"Ap
680prove",children:r.jsx(Uy,{className:"w-4 h-4"})}),r.jsx("button",{onClick:()=>_.mutate({userId:E.id,approval_status:"rejected"}),disabled:_.isPending,className:"p-1.5 bg-red-100 hover:bg-red-200 text-red-700 rounded-lg transition-colors",title:"Reject",children:r.jsx(U1,{className:"w-4 h-4"})})]}),E.approval_status==="approved"&&r.jsxs("span",{className:"px-2 py-1 rounded-lg text-[10px] font-bold bg-emerald-100 text-emerald-700 border border-emerald-200 flex items-center gap-1",children:[r.jsx(Uy,{className:"w-3 h-3"})," Approved"]}),E.approval_status==="rejected"&&r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx("span",{className:"px-2 py-1 rounded-lg text-[10px] font-bold bg-red-100 text-red-700 border border-red-200",children:"Rejected"}),r.jsx("button",{onClick:()=>_.mutate({userId:E.id,approval_status:"approved"}),disabled:_.isPending,className:"p-1.5 bg-emerald-100 hover:bg-emerald-200 text-emerald-700 rounded-lg transition-colors",title:"Approve",children:r.jsx(Uy,{className:"w-4 h-4"})})]})]}),l===E.id?r.jsxs("div",{className:"flex gap-1.5",children:[["admin","moderator","user"].map(V=>r.jsx("button",{onClick:()=>v.mutate({userId:E.id,role:V}),disabled:v.isPending,className:`px-3 py-1.5 rounded-lg text-xs font-bold border transition-all ${E.role===V?"bg-slate-900 text-white border-slate-900":"bg-white border-slate-200 text-slate-600 hover:bg-slate-50"}`,children:V==="admin"?"Admin":V==="moderator"?"Mod":"User"},V)),r.jsx("button",{onClick:()=>u(null),className:"px-2 py-1.5 text-xs text-slate-400 hover:text-slate-600",children:"â"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("span",{className:`px-2.5 py-1 rounded-lg text-[11px] font-bold border ${A.color} flex items-center gap-1`,children:[r.jsx(B,{className:"w-3 h-3"}),A.label]}),!I&&((e==null?void 0:e.role)==="admin"||(e==null?void 0:e.role)==="superadmin")&&r.jsx("button",{onClick:()=>u(E.id),className:"p-1.5 hover:bg-slate-100 rounded-lg transition-colors text-slate-400 hover:text-slate-600",children:r.jsx(Yu,{className:"w-4 h-4"})})]})]})]},E.id)})})]})}const yb={pending_approval:{label:"Pending",color:"bg-amber-100 text-amber-700 border-amber-200",icon:zn},approved:{label:"Approved",color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:ht},rejected:{label:"Rejected",color:"bg-red-100 text-red-700 border-red-200",icon:U1}};function XG({currentUser:e}){const t=tn(),n=Kn(),[s,i]=w.useState("pending_approval"),[a,l]=w.useState(""),[u,h]=w.useState(null),[m,g]=w.useState(""),{data:x=[],isLoading:v}=Re({queryKey:["admin-trips"],queryFn:()=>ne.entities.Trip.list("-created_date")}),_=pt({mutationFn:P=>ne.entities.Trip.update(P,{approval_status:"approved",approved_by:e.email}),onSuccess:()=>t.invalidateQueries({queryKey:["admin-trips"]})}),N=pt({mutationFn:({tripId:P,reason:E})=>ne.entities.Trip.update(P,{approval_status:"rejected",rejection_reason:E,approved_by:e.email}),onSuccess:()=>{t.invalidateQueries({queryKey:["admin-trips"]}),h(null),g("")}}),S=x.filter(P=>{if(s!=="all"&&(P.approval_status||"approved")!==s)return!1;if(a){const E=a.toLowerCase();return(P.title||"").toLowerCase().includes(E)||(P.location||"").toLowerCase().includes(E)||(P.created_by||"").toLowerCase().includes(E)}return!0}),j={pending_approval:x.filter(P=>(P.approval_status||"approved")==="pending_approval").length,approved:x.filter(P=>!P.approval_status||P.approval_status==="approved").length,rejected:x.filter(P=>P.approval_status==="rejected").length};return r.jsxs("div",{children:[r.jsx("div",{className:"grid grid-cols-3 gap-3 mb-6",children:Object.entries(yb).map(([P,E])=>{const R=E.icon;return r.jsxs("button",{onClick:()=>i(P),className:`p-4 rounded-2xl border text-left transition-all ${s===P?"bg-slate-900 text-white border-slate-900 shadow-lg":"bg-white border-slate-200 hover:border-slate-300"}`,children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx(R,{className:`w-4 h-4 ${s===P?"text-white":E.color.split(" ")[1]}`}),r.jsx("p",{className:`text-2xl font-black ${s===P?"text-white":"text-slate-900"}`,children:j[P]})]}),r.jsx("p",{className:`text-xs font-bold uppercase tracking-wider ${s===P?"text-slate-300":"text-slate-400"}`,children:E.label})]},P)})}),r.jsxs("div",{className:"relative mb-6",children:[r.jsx(ai,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),r.jsx("input",{value:a,onChange:P=>
680l(P.target.value),placeholder:"Search trips by name, location, or creator...",className:"w-full pl-11 pr-4 py-3 bg-white border border-slate-200 rounded-xl text-sm font-medium outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all"})]}),v?r.jsx("div",{className:"flex justify-center py-12",children:r.jsx(gt,{className:"w-6 h-6 animate-spin text-slate-400"})}):S.length===0?r.jsx("div",{className:"text-center py-16",children:r.jsx("p",{className:"text-slate-400 font-medium",children:"No trips match this filter."})}):r.jsx("div",{className:"space-y-3",children:S.map((P,E)=>{const R=P.approval_status||"approved",A=yb[R]||yb.approved,B=A.icon;return r.jsxs(re.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:E*.03},className:"bg-white border border-slate-100 rounded-2xl overflow-hidden hover:shadow-md transition-all",children:[r.jsxs("div",{className:"flex items-start gap-4 p-4",children:[r.jsx("div",{className:"w-20 h-20 rounded-xl overflow-hidden bg-slate-100 flex-shrink-0",children:r.jsx("img",{src:P.cover_image_url||"https://images.unsplash.com/photo-1464822759023-fed622ff2c3b",alt:"",className:"w-full h-full object-cover"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-start justify-between gap-2 mb-1",children:[r.jsx("h3",{className:"font-bold text-slate-900 text-sm truncate",children:P.title}),r.jsxs("span",{className:`px-2 py-0.5 rounded-lg text-[10px] font-bold border flex items-center gap-1 flex-shrink-0 ${A.color}`,children:[r.jsx(B,{className:"w-3 h-3"})," ",A.label]})]}),r.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-400 mb-1.5",children:[P.location&&r.jsxs("span",{className:"flex items-center gap-0.5",children:[r.jsx(Dn,{className:"w-3 h-3"}),P.location]}),P.start_date&&r.jsxs("span",{className:"flex items-center gap-0.5",children:[r.jsx(pa,{className:"w-3 h-3"}),P.start_date]})]}),r.jsxs("p",{className:"text-[11px] text-slate-400",children:["by ",r.jsx("span",{className:"font-semibold text-slate-500",children:P.created_by||"Unknown"})]}),P.rejection_reason&&R==="rejected"&&r.jsxs("p",{className:"text-xs text-red-500 mt-1 bg-red-50 px-2 py-1 rounded-lg",children:["Reason: ",P.rejection_reason]})]})]}),r.jsxs("div",{className:"border-t border-slate-50 px-4 py-2.5 flex items-center gap-2 justify-end bg-slate-50/50",children:[r.jsxs("button",{onClick:()=>n(Xe("TripDetails")+"?id="+P.id),className:"px-3 py-1.5 text-xs font-bold text-slate-500 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all flex items-center gap-1",children:[r.jsx(V1,{className:"w-3.5 h-3.5"})," View"]}),R==="pending_approval"&&r.jsxs(r.Fragment,{children:[r.jsxs("button",{onClick:()=>_.mutate(P.id),disabled:_.isPending,className:"px-3.5 py-1.5 text-xs font-bold bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 transition-all flex items-center gap-1 disabled:opacity-50",children:[_.isPending?r.jsx(gt,{className:"w-3 h-3 animate-spin"}):r.jsx(ht,{className:"w-3.5 h-3.5"})," Approve"]}),r.jsxs("button",{onClick:()=>h(P.id),className:"px-3.5 py-1.5 text-xs font-bold bg-red-100 text-red-600 rounded-lg hover:bg-red-200 transition-all flex items-center gap-1",children:[r.jsx(U1,{className:"w-3.5 h-3.5"})," Reject"]})]}),R==="rejected"&&r.jsx("button",{onClick:()=>_.mutate(P.id),disabled:_.isPending,className:"px-3.5 py-1.5 text-xs font-bold bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-all flex items-center gap-1",children:"Re-approve"}),R==="approved"&&r.jsx("button",{onClick:()=>h(P.id),className:"px-3.5 py-1.5 text-xs font-bold text-red-500 hover:bg-red-50 rounded-lg transition-all flex items-center gap-1",children:"Revoke"})]}),u===P.id&&r.jsxs("div",{className:"border-t border-slate-100 p-4 bg-red-50/50",children:[r.jsx("p",{className:"text-xs font-bold text-slate-700 mb-2",children:"Reason for rejection (optional):"}),r.jsx("textarea",{value:m,onChange:I=>g(I.target.value),placeholder:"Explain why this trip is being rejected...",className:"w-full p-3 border border-red-200 rounded-xl text-sm mb-2 outline-none focus:ring-2 focus:ring-red-200 resize-none h-20"}),r.jsxs("div",{className:"flex gap-2 justify-end",children:[r.jsx("button",{onClick:()=>{h(null),g("")},className:"px-3 py-1.5 text-xs font-bold text-slate-500 hover:bg-white rounded-lg",children:"Cancel"}),r.jsx("button",{onClick:()=>N.mutate({tripId:P.id,reason:m}),disabled:N.isPending,className:"px-4 py-1.5 text-xs font-bold bg-red-600 text-white rounded-lg hover:bg-red-700 disabled:opacity-50",children:N.isPending?r.jsx(gt,{className:"w-3 h-3 animate-spin"}):"Confirm Rejection"})]})]})]},P.id)})})]})}const ro={blue:{primary:"#2563eb",hover:"#1d4ed8",light:"#eff6ff",border:"#bfdbfe",text:"#1e40af",ring:"rgba(37,99,235,0.2)",shadow:"rgba(37,99,235,0.3)"},indigo:{primary:"#4f46e5",hover:"#4338ca",light:"#eef2ff",border:"#c7d2fe",text:"#3730a3",ring:"rgba(79,70,229,0.2)",shadow:"rgba(79,70,229,0.3)"},violet:{primary:"#7c3aed",hover:"#6d28d9",light:"#f5f3ff",border:"#c4b5fd",text:"#5b21b6",ring:"rgba(124,58,237,0.2)",shadow:"rgba(124,58,237,0.3)"},emerald:{primary:"#059669",hover:"#047857",light:"#ecfdf5",border:"#a7f3d0",text:"#065f46",ring:"rgba(5,150,105,0.2)",shadow:"rgba(5,150,105,0.3)"},rose:{primary:"#e11d48",hover:"#be123c",light:"#fff1f2",border:"#fecdd3",text:"#9f1239",ring:"rgba(225,29,72,0.2)",shadow:"rgba(225,29,72,0.3)"},amber:{primary:"#d97706",hover:"#b45309",light:"#fffbeb",border:"#fde68a",text:"#92400e",ring:"rgba(217,119,6,0.2)",shadow:"rgba(217,119,6,0.3)"},teal:{primary:"#0d9488",hover:"#0f766e",light:"#f0fdfa",border:"#99f6e4",text:"#115e59",ring:"rgba(13,148,136,0.2)",shadow:"rgba(13,148,136,0.3)"},slate:{primary:"#475569",hover:"#334155",light:"#f8fafc",border:"#cbd5e1",text:"#1e293b",ring:"rgba(71,85,105,0.2)",shadow:"rgba(71,85,105,0.3)"}},jA=w.createContext({theme:ro.blue,colorName:"blue"});function SA(){return w.useContext(jA)}function JG({children:e}){const{data:t=[]}=Re({queryKey:["app-settings"],queryFn:()=>ne.entities.AppSettings.list(),staleTime:6e4}),n=t.find(a=>a.key==="theme_color"),s=(n==null?void 0:n.value)||"blue",i=ro[s]||ro.blue;return r.jsx(jA.Provider,{value:{theme:i,colorName:s},children:e})}function Or({className:e="w-10 h-10",color:t="currentColor"}){return r.jsx("svg",{viewBox:"145 170 325 235",xmlns:"http://www.w3.org/2000/svg",className:e,fill:t,stroke:"none",children:r.jsxs("g",{transform:"translate(0,600) scale(0.1,-0.1)",children:[r.jsx("path",{d:"M2608 3823 c-30 -48 -86 -137 -123 -198 -37 -60 -130 -211 -205 -335 -75 -124 -270 -442 -434 -708 -163 -265 -299 -489 -302 -497 -5 -13 45 -15 397 -15 l404 0 145 237 c80 130 154 251 165 269 l20 34 62 -103 c33 -56 70 -118 82 -138 l21 -35 -79 -130 -79 -129 545 -3 c301 -1 548 0 550 2 2 2 -64 116 -148 252 -167 273 -292 479 -689 1134 -145 239 -266 439 -270 443 -4 5 -32 -31 -62 -80z m249 -426 c74 -121 139 -229 145 -242 9 -20 3 -35 -41 -109 -29 -47 -56 -88 -60 -90 -4 -3 -41 47 -81 112 -41 64 -84
680132 -96 150 l-21 33 -93 -153 c-143 -236 -145 -238 -150 -238 -4 0 -28 36 -54 80 l-49 80 -46 -72 c-26 -40 -56 -88 -66 -106 -11 -18 -23 -31 -28 -29 -5 1 -20 21 -32 42 l-23 40 154 250 c84 138 197 321 251 407 l96 156 30 -46 c17 -26 90 -145 164 -265z"}),r.jsx("path",{d:"M3391 3587 c-41 -67 -105 -175 -143 -239 l-69 -117 26 -45 c15 -26 30 -46 33 -46 4 1 56 82 116 181 60 99 112 181 115 183 8 5 254 -391 254 -408 0 -6 -18 -41 -40 -79 l-39 -67 -85 135 c-46 74 -87 135 -90 135 -6 0 -139 -215 -139 -224 0 -3 15 -29 34 -58 44 -69 225 -366 393 -645 l134 -223 290 0 290 0 -12 23 c-7 12 -141 234 -299 492 -157 259 -375 617 -484 798 -109 180 -201 327 -204 327 -4 -1 -40 -56 -81 -123z"})]})})}const HC={blue:"Blue",indigo:"Indigo",violet:"Violet",emerald:"Emerald",rose:"Rose",amber:"Amber",teal:"Teal",slate:"Slate"};function eY(){var v,_,N,S;const e=tn(),{data:t=[]}=Re({queryKey:["app-settings"],queryFn:()=>ne.entities.AppSettings.list()}),{data:n}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),s=(n==null?void 0:n.role)==="superadmin",i=((v=t.find(j=>j.key==="theme_color"))==null?void 0:v.value)||"blue",a=(_=t.find(j=>j.key==="theme_color"))==null?void 0:_.id,l=((N=t.find(j=>j.key==="app_name"))==null?void 0:N.value)||"WeAllCamp",u=(S=t.find(j=>j.key==="app_name"))==null?void 0:S.id,[h,m]=dt.useState(l);dt.useEffect(()=>{m(l)},[l]);const g=pt({mutationFn:async j=>{a?await ne.entities.AppSettings.update(a,{value:j}):await ne.entities.AppSettings.create({key:"theme_color",value:j})},onSuccess:()=>e.invalidateQueries({queryKey:["app-settings"]})}),x=pt({mutationFn:async j=>{u?await ne.entities.AppSettings.update(u,{value:j}):await ne.entities.AppSettings.create({key:"app_name",value:j})},onSuccess:()=>e.invalidateQueries({queryKey:["app-settings"]})});return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[r.jsx("div",{className:"w-10 h-10 bg-slate-100 rounded-xl flex items-center justify-center",children:r.jsx(o5,{className:"w-5 h-5 text-slate-600"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"App Theme Color"}),r.jsx("p",{className:"text-sm text-slate-400",children:"Choose the primary accent color for the entire app"})]})]}),r.jsxs("div",{className:"flex items-center gap-3 mb-6 mt-8",children:[r.jsx("div",{className:"w-10 h-10 bg-slate-100 rounded-xl flex items-center justify-center",children:r.jsx(BF,{className:"w-5 h-5 text-slate-600"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"App Name"}),r.jsx("p",{className:"text-sm text-slate-400",children:"Change the name of your web application"})]})]}),s?r.jsxs("div",{className:"flex gap-3 mb-10",children:[r.jsx("input",{type:"text",value:h,onChange:j=>m(j.target.value),className:"flex-1 bg-white border border-slate-200 rounded-xl px-4 py-2.5 font-medium text-slate-900 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300 transition-all",placeholder:"e.g. WeAllCamp"}),r.jsxs("button",{onClick:()=>x.mutate(h),disabled:x.isPending||h===l||!h.trim(),className:"bg-slate-900 hover:bg-slate-800 disabled:bg-slate-200 disabled:text-slate-400 text-white px-5 py-2.5 rounded-xl font-semibold transition-colors flex items-center gap-2",children:[r.jsx(c5,{className:"w-4 h-4"})," Save"]})]}):r.jsx("div",{className:"flex gap-3 mb-10",children:r.jsx("div",{className:"flex-1 bg-slate-50 border border-slate-200 rounded-xl px-4 py-2.5 font-medium text-slate-500 cursor-not-allowed",children:l})}),r.jsxs("div",{className:"rounded-2xl p-6 mb-8 border-2 flex items-center gap-4",style:{backgroundColor:ro[i].light,borderColor:ro[i].border},children:[r.jsx(Or,{className:"w-14 h-14",color:ro[i].primary}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-xl font-extrabold",style:{color:ro[i].text},children:l}),r.jsxs("p",{className:"text-sm font-medium",style:{color:ro[i].primary},children:["Current theme: ",HC[i]]})]})]}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:Object.entries(ro).map(([j,P])=>{const E=j===i;return r.jsxs(re.button,{whileTap:{scale:.95},onClick:()=>g.mutate(j),disabled:g.isPending,className:`relative rounded-2xl border-2 p-4 transition-all text-left ${E?"shadow-lg":"hover:shadow-md bg-white"}`,style:{borderColor:E?P.primary:"#e2e8f0",backgroundColor:E?P.light:void 0},children:[E&&r.jsx("div",{className:"absolute top-2.5 right-2.5 w-6 h-6 rounded-full flex items-center justify-center",style:{backgroundColor:P.primary},children:r.jsx(Cm,{className:"w-3.5 h-3.5 text-white",strokeWidth:3})}),r.jsx("div",{className:"w-10 h-10 rounded-xl mb-3",style:{backgroundColor:P.primary}}),r.jsx("p",{className:"font-bold text-sm text-slate-900",children:HC[j]}),r.jsx("p",{className:"text-[11px] text-slate-400 font-medium mt
680-0.5",children:P.primary})]},j)})})]})}const qC=[{value:"facebook",label:"Facebook Group",icon:"ð"},{value:"instagram",label:"Instagram",icon:"ð¸"},{value:"whatsapp",label:"WhatsApp Group",icon:"ð¬"},{value:"telegram",label:"Telegram",icon:"âï¸"},{value:"discord",label:"Discord",icon:"ð®"},{value:"twitter",label:"X / Twitter",icon:"ð¦"},{value:"youtube",label:"YouTube",icon:"ð¥"},{value:"tiktok",label:"TikTok",icon:"ðµ"},{value:"other",label:"Other",icon:"ð"}];function tY(){const e=tn(),[t,n]=w.useState("facebook"),[s,i]=w.useState(""),[a,l]=w.useState(""),{data:u=[]}=Re({queryKey:["app-settings"],queryFn:()=>ne.entities.AppSettings.list()}),h=u.find(_=>_.key==="social_links"),m=h!=null&&h.value?JSON.parse(h.value):[],g=pt({mutationFn:async _=>{const N=JSON.stringify(_);h!=null&&h.id?await ne.entities.AppSettings.update(h.id,{value:N}):await ne.entities.AppSettings.create({key:"social_links",value:N})},onSuccess:()=>e.invalidateQueries({queryKey:["app-settings"]})}),x=()=>{if(!s.trim())return;const _=qC.find(S=>S.value===t),N={platform:t,label:a.trim()||_.label,url:s.trim(),icon:_.icon};g.mutate([...m,N]),i(""),l("")},v=_=>{const N=m.filter((S,j)=>j!==_);g.mutate(N)};return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[r.jsx("div",{className:"w-10 h-10 bg-slate-100 rounded-xl flex items-center justify-center",children:r.jsx(Zu,{className:"w-5 h-5 text-slate-600"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"Social Media Links"}),r.jsx("p",{className:"text-sm text-slate-400",children:"Add community social media links visible to all members"})]})]}),r.jsxs("div",{className:"space-y-3 mb-8",children:[r.jsx(Lt,{children:m.map((_,N)=>r.jsxs(re.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,x:-20},className:"bg-white rounded-2xl border border-slate-200 p-4 flex items-center gap-4",children:[r.jsx("span",{className:"text-2xl",children:_.icon}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"font-bold text-sm text-slate-900",children:_.label}),r.jsx("p",{className:"text-xs text-slate-400 truncate",children:_.url})]}),r.jsx("a",{href:_.url,target:"_blank",rel:"noopener noreferrer",className:"p-2 hover:bg-slate-100 rounded-xl transition-colors",children:r.jsx(Iu,{className:"w-4 h-4 text-slate-400"})}),r.jsx("button",{onClick:()=>v(N),className:"p-2 hover:bg-red-50 rounded-xl transition-colors",children:r.jsx(us,{className:"w-4 h-4 text-red-400"})})]},N))}),m.length===0&&r.jsx("div",{className:"text-center py-10 text-slate-400 text-sm",children:"No social links added yet. Add one below."})]}),r.jsxs("div",{className:"bg-slate-50 rounded-2xl border border-slate-200 p-5",children:[r.jsx("h4",{className:"font-bold text-sm text-slate-700 mb-4",children:"Add New Link"}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3",children:[r.jsx("select",{value:t,onChange:_=>n(_.target.value),className:"w-full px-4 py-3 rounded-xl border border-slate-200 bg-white text-sm font-medium text-slate-700 focus:outline-none focus:ring-2 focus:ring-slate-300",children:qC.map(_=>r.jsxs("option",{value:_.value,children:[_.icon," ",_.label]},_.value))}),r.jsx("input",{type:"text",placeholder:"Custom label (optional)",value:a,onChange:_=>l(_.target.value),className:"w-full px-4 py-3 rounded-xl border border-slate-200 bg-white text-sm placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-300"})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsx("input",{type:"url",placeholder:"https://...",value:s,onChange:_=>i(_.target.value),className:"flex-1 px-4 py-3 rounded-xl border border-slate-200 bg-white text-sm placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-300"}),r.jsxs("button",{onClick:x,disabled:!s.trim()||g.isPending,className:"bg-slate-900 text-white font-bold px-5 py-3 rounded-xl hover:bg-black transition-colors disabled:opacity-50 flex items-center gap-2",children:[r.jsx(Cn,{className:"w-4 h-4"})," Add"]})]})]})]})}function nY(){const e=tn(),[t,n]=w.useState([]),[s,i]=w.useState(!1),[a,l]=w.useState(!1),{data:u}=Re({queryKey:["app-settings","admin_contacts"],queryFn:async()=>(await ne.entities.AppSettings.filter({key:"admin_contacts"}))[0]||null});w.useEffect(()=>{if(u!=null&&u.value)try{n(JSON.parse(u.value))}catch{n([])}},[u]);const h=()=>
680{n([...t,{name:"",email:"",phone:"",role:"Admin"}])},m=(v,_,N)=>{const S=[...t];S[v]={...S[v],[_]:N},n(S)},g=v=>{n(t.filter((_,N)=>N!==v))},x=async()=>{i(!0);const v=JSON.stringify(t);u?await ne.entities.AppSettings.update(u.id,{value:v}):await ne.entities.AppSettings.create({key:"admin_contacts",value:v}),e.invalidateQueries(["app-settings","admin_contacts"]),i(!1),l(!0),setTimeout(()=>l(!1),2e3)};return r.jsxs("div",{children:[r.jsxs("div",{className:"mb-6",children:[r.jsx("h2",{className:"text-lg font-bold text-slate-900 tracking-tight",children:"Contact Information"}),r.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"This info is shown to new users waiting for approval, so they can reach out."})]}),r.jsx("div",{className:"space-y-4 mb-6",children:t.map((v,_)=>r.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-5 space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("span",{className:"text-sm font-bold text-slate-700",children:["Contact #",_+1]}),r.jsx("button",{onClick:()=>g(_),className:"p-1.5 text-red-400 hover:text-red-600 hover:bg-red-50 rounded-lg transition-colors",children:r.jsx(us,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1",children:"Name"}),r.jsx("input",{type:"text",value:v.name,onChange:N=>m(_,"name",N.target.value),placeholder:"John Doe",className:"w-full bg-slate-50 border border-slate-200 rounded-xl px-3 py-2.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1",children:"Role Label"}),r.jsx("input",{type:"text",value:v.role,onChange:N=>m(_,"role",N.target.value),placeholder:"Admin",className:"w-full bg-slate-50 border border-slate-200 rounded-xl px-3 py-2.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500"})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"block text-xs font-semibold text-slate-500 mb-1 flex items-center gap-1",children:[r.jsx(nx,{className:"w-3 h-3"})," Email"]}),r.jsx("input",{type:"email",value:v.email,onChange:N=>m(_,"email",N.target.value),placeholder:"[email protected]",className:"w-full bg-slate-50 border border-slate-200 rounded-xl px-3 py-2.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500"})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"block text-xs font-semibold text-slate-500 mb-1 flex items-center gap-1",children:[r.jsx(rx,{className:"w-3 h-3"})," Phone"]}),r.jsx("input",{type:"tel",value:v.phone,onChange:N=>m(_,"phone",N.target.value),placeholder:"+1 (555) 123-4567",className:"w-full bg-slate-50 border border-slate-200 rounded-xl px-3 py-2.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500"})]})]})]},_))}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs("button",{onClick:h,className:"flex items-center gap-2 px-5 py-3 bg-slate-100 text-slate-700 font-bold rounded-xl hover:bg-slate-200 active:scale-[0.98] transition-all text-sm",children:[r.jsx(Cn,{className:"w-4 h-4"})," Add Contact"]}),r.jsxs("button",{onClick:x,disabled:s,className:"flex items-center gap-2 px-5 py-3 bg-blue-600 text-white font-bold rounded-xl hover:bg-blue-700 active:scale-[0.98] transition-all text-sm shadow-lg shadow-blue-600/20 disabled:opacity-50",children:[s?r.jsx(gt,{className:"w-4 h-4 animate-spin"}):r.jsx(c5,{className:"w-4 h-4"}),a?"Saved!":"Save Contacts"]})]})]})}const sY=[{id:"overview",label:"Overview",icon:_6},{id:"users",label:"Users",icon:Li},{id:"trips",label:"Trip Approvals",icon:Zs},{id:"theme",label:"Theme",icon:o5},{id:"social",label:"Social Links",icon:Zu},{id:"contact",label:"Contact Info",icon:rx}];function kA(){const e=Kn(),[t,n]=w.useState("overview"),{data:s,isLoading:i}=Re({queryKey:["user"],queryFn:()=>ne.auth.me()});if(i)return r.jsx("div",{className:"min-h-screen flex items-center justify-center",children:r.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(!s||s.role!=="admin"&&s.role!=="moderator"&&s.role!=="superadmin")return r.jsx("div",{className:"min-h-screen flex items-center justify-center bg-slate-50 p-6",children:r.jsxs("div",{className:"bg-white rounded-3xl p-10 text-center max-w-sm shadow-xl border border-slate-100",children:[r.jsx("div",{className:"w-16 h-16 bg-red-50 rounded-2xl flex items-center justify-center mx-auto mb-5",children:r.jsx(Os,{className:"w-8 h-8 text-red-500"})}),r.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-slate-900 mb-2",children:"Access Denied"}),r.jsx("p",{className:"text-slate-500 text-sm mb-6",children:"You need admin, moderator or superadmin privileges to access this panel."}),r.jsx("button",{onClick:()=>e(Xe("Home")),className:"bg-slate-900 text-white font-semibold tracking-tight px-6 py-3 rounded-xl hover:bg-black transition-colors",children:"Go Home"})]})});const a=s.role==="moderator";return r.jsxs(re.div,{initial:{opacity:0}
680,animate:{opacity:1},className:"min-h-screen bg-[#f4f6f8] pb-24 md:pb-8",children:[r.jsx("div",{className:"bg-white border-b border-slate-100 px-6 pt-10 pb-6 md:pt-14",children:r.jsx("div",{className:"max-w-5xl mx-auto",children:r.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[r.jsx("button",{onClick:()=>e(Xe("Home")),className:"p-2 -ml-2 hover:bg-slate-100 rounded-xl transition-colors",children:r.jsx(gr,{className:"w-5 h-5 text-slate-600"})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-9 h-9 bg-slate-900 rounded-xl flex items-center justify-center",children:r.jsx(Os,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-semibold tracking-tight tracking-tight text-slate-900",children:a?"Moderator Panel":"Admin Panel"}),r.jsx("p",{className:"text-xs text-slate-400 font-medium",children:"Manage users, trips, and approvals"})]})]})]})})}),r.jsx("div",{className:"bg-white border-b border-slate-100 px-6 sticky top-0 z-30",children:r.jsx("div",{className:"max-w-5xl mx-auto flex gap-1 overflow-x-auto",children:sY.filter(l=>!(a&&l.id==="users")).map(l=>{const u=l.icon;return r.jsxs("button",{onClick:()=>n(l.id),className:`flex items-center gap-2 px-5 py-3.5 text-sm font-semibold border-b-2 transition-all whitespace-nowrap ${t===l.id?"border-slate-900 text-slate-900":"border-transparent text-slate-400 hover:text-slate-600"}`,children:[r.jsx(u,{className:"w-4 h-4"})," ",l.label]},l.id)})})}),r.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-8",children:[t==="overview"&&r.jsx(ZG,{}),t==="users"&&!a&&r.jsx(QG,{currentUser:s}),t==="trips"&&r.jsx(XG,{currentUser:s}),t==="theme"&&r.jsx(eY,{}),t==="social"&&r.jsx(tY,{}),t==="contact"&&r.jsx(nY,{})]})]})}function rY({tripName:e,memberCount:t,coverUrl:n}){const s=Kn();return r.jsxs("header",{className:"bg-white border-b border-slate-100 px-2 py-2.5 flex items-center gap-1 z-20 shrink-0",children:[r.jsx("button",{onClick:()=>s(-1),className:"p-3 -ml-1 mr-1 rounded-full hover:bg-slate-50 transition-colors text-slate-600 shrink-0 flex items-center justify-center",children:r.jsx(gr,{className:"w-6 h-6"})}),r.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[r.jsx("div",{className:"w-10 h-10 rounded-full overflow-hidden bg-slate-100 shrink-0 ring-2 ring-white shadow-sm",children:n?r.jsx("img",{src:n,alt:"",className:"w-full h-full object-cover"}):r.jsx("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-blue-500 to-indigo-600 text-white font-bold text-sm",children:e.charAt(0)})}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("h1",{className:"font-semibold text-[15px] text-slate-900 leading-tight truncate",children:e}),r.jsxs("p",{className:"text-[11px] text-slate-400 font-medium truncate",children:[t," member",t!==1?"s":""," · tap for info"]})]})]}),r.jsx("div",{className:"flex items-center shrink-0",children:r.jsx("button",{onClick:()=>s("/Home"),className:"p-3 -mr-1 rounded-full hover:bg-slate-50 transition-colors text-slate-500 flex items-center justify-center",children:r.jsx(Ii,{className:"w-5 h-5"})})})]})}function iY({onSend:e,onCancel:t}){const[n,s]=w.useState(!0),[i,a]=w.useState(0),[l,u]=w.useState(!1),h=w.useRef(null),m=w.useRef([]),g=w.useRef(null),x=w.useRef(null);w.useEffect(()=>(_(),()=>{v(),clearInterval(g.current)}),[]);const v=()=>{x.current&&(x.current.getTracks().forEach(E=>E.stop()),x.current=null)},_=async()=>{m.current=[];const E=await navigator.mediaDevices.getUserMedia({audio:!0});x.current=E;const R=new MediaRecorder(E,{mimeType:"audio/webm"});h.current=R,R.ondataavailable=A=>{A.data.size>0&&m.current.push(A.data)},R.start(),s(!0),a(0),g.current=setInterval(()=>a(A=>A+1),1e3)},N=()=>new Promise(E=>{const R=h.current;if(!R||R.state==="inactive"){E(null);return}R.onstop=()=>{clearInterval(g.current),s(!1),v();const A=new Blob(m.current,{type:"audio/webm"});E(A)},R.stop()}),S=async()=>{u(!0);const E=await N();E&&E.size>0&&await e(E,i),u(!1)},j=async()=>{await N(),t()},P=E=>{const R=Math.floor(E/60),A=E%60;return`${R}:${A.toString().padStart(2,"0")}`};return r.jsxs(re.div,{initial:{opacity:0,y:10}
680,animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:"flex items-center gap-2 w-full",children:[r.jsx("button",{type:"button",onClick:j,className:"w-10 h-10 rounded-full flex items-center justify-center text-red-500 hover:bg-red-50 transition-colors shrink-0",children:r.jsx(us,{className:"w-[18px] h-[18px]"})}),r.jsxs("div",{className:"flex-1 bg-white rounded-3xl border border-slate-200/80 shadow-sm flex items-center gap-3 px-4 py-2.5 min-h-[40px]",children:[r.jsxs("div",{className:"relative flex items-center justify-center w-3 h-3",children:[r.jsx("span",{className:"absolute w-3 h-3 bg-red-500 rounded-full animate-ping opacity-50"}),r.jsx("span",{className:"w-2 h-2 bg-red-500 rounded-full relative"})]}),r.jsx("span",{className:"text-[14px] font-medium text-slate-700 tabular-nums",children:P(i)}),r.jsx("div",{className:"flex items-center gap-[3px] flex-1",children:Array.from({length:24}).map((E,R)=>r.jsx("div",{className:"w-[3px] rounded-full bg-blue-400/60",style:{height:n?`${8+Math.sin(Date.now()/200+R*.7)*8}px`:"4px",animation:n?`pulse 0.8s ease-in-out ${R*.05}s infinite alternate`:"none"}},R))})]}),r.jsx(re.button,{type:"button",onClick:S,disabled:l,whileTap:{scale:.85},className:"w-10 h-10 bg-blue-600 text-white rounded-full flex items-center justify-center shrink-0 shadow-sm transition-colors",children:l?r.jsx(gt,{className:"w-4 h-4 animate-spin"}):r.jsx(Zf,{className:"w-4 h-4 ml-0.5"})})]})}function aY({onSend:e,onSendVoice:t,isUploading:n,setIsUploading:s,onFileUpload:i,onShareLocation:a,attachment:l,setAttachment:u,locationError:h,setLocationError:m}){const[g,x]=w.useState(""),[v,_]=w.useState(!1),[N,S]=w.useState(!1),j=w.useRef(null),P=B=>{B.preventDefault(),!(!g.trim()&&!l||n)&&(e(g,l),x(""))},E=()=>{_(!1),setTimeout(()=>{var B;return(B=j.current)==null?void 0:B.click()},100)},R=async B=>{var z;const I=(z=B.target.files)==null?void 0:z[0];I&&(await i(I),j.current&&(j.current.value=""))},A=()=>{_(!1),a()};return r.jsxs(r.Fragment,{children:[v&&r.jsx("div",{className:"fixed inset-0 z-30",onClick:()=>_(!1)}),r.jsxs("div",{className:"bg-slate-50/80 backdrop-blur-sm border-t border-slate-100 px-3 py-2 pb-[max(0.5rem,env(safe-area-inset-bottom))] shrink-0 z-40 relative",children:[r.jsx(Lt,{children:l&&r.jsx(re.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mb-2 overflow-hidden",children:r.jsxs("div",{className:"flex items-center gap-2.5 bg-white p-2 rounded-xl border border-slate-200/80 shadow-sm",children:[r.jsx("div",{className:"w-10 h-10 rounded-lg overflow-hidden bg-slate-100 shrink-0",children:l.type==="image"?r.jsx("img",{src:l.url,alt:"",className:"w-full h-full object-cover"}):r.jsx("div",{className:"w-full h-full flex items-center justify-center bg-red-50 text-red-500",children:r.jsx(Dn,{className:"w-4 h-4"})})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-xs font-semibold text-slate-700 truncate",children:l.type==="image"?"Photo":"Location"}),r.jsx("p",{className:"text-[10px] text-slate-400",children:"Ready to send"})]}),r.jsx("button",{onClick:()=>u(null),className:"p-1.5 hover:bg-slate-100 rounded-full text-slate-400 transition-colors",children:r.jsx(hn,{className:"w-3.5 h-3.5"})})]})})}),r.jsx(Lt,{children:h&&r.jsx(re.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mb-2 overflow-hidden",children:r.jsxs("div",{className:"flex items-center gap-2 bg-red-50 text-red-600 px-3 py-2 rounded-xl text-xs font-medium border border-red-100",children:[r.jsx(Dn,{className:"w-3.5 h-3.5 shrink-0"}),r.jsx("span",{className:"flex-1",children:h}),r.jsx("button",{onClick:()=>m(null),className:"p-1 hover:bg-red-100 rounded-full",children:r.jsx(hn,{className:"w-3 h-3"})})]})})}),r.jsx(Lt,{mode:"wait",children:N?r.jsx(iY,{onSend:async(B,I)=>{S(!1),await t(B,I)},onCancel:()=>S(!1)},"recorder"):r.jsxs(re.form,{initial:{opacity:0}
680,animate:{opacity:1},exit:{opacity:0},onSubmit:P,className:"flex items-end gap-2",children:[r.jsxs("div",{className:"relative shrink-0",children:[r.jsx(Lt,{children:v&&r.jsxs(re.div,{initial:{opacity:0,y:8,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.9},transition:{duration:.15},className:"absolute bottom-12 left-0 bg-white rounded-2xl shadow-lg shadow-slate-200/60 border border-slate-100 p-1.5 z-50 min-w-[150px]",children:[r.jsxs("button",{type:"button",onClick:E,className:"flex items-center gap-2.5 w-full px-3 py-2 rounded-xl hover:bg-slate-50 text-slate-700 text-[13px] font-medium transition-colors",children:[r.jsx(Kf,{className:"w-4 h-4 text-blue-500"}),"Photo"]}),r.jsxs("button",{type:"button",onClick:A,className:"flex items-center gap-2.5 w-full px-3 py-2 rounded-xl hover:bg-slate-50 text-slate-700 text-[13px] font-medium transition-colors",children:[r.jsx(Dn,{className:"w-4 h-4 text-emerald-500"}),"Location"]})]})}),r.jsx("button",{type:"button",onClick:()=>_(!v),className:`w-10 h-10 rounded-full flex items-center justify-center transition-all ${v?"bg-slate-200 text-slate-700 rotate-45":"text-slate-400 hover:bg-slate-100 hover:text-slate-600"}`,children:r.jsx(G6,{className:"w-[18px] h-[18px]"})})]}),r.jsx("div",{className:"flex-1 bg-white rounded-3xl border border-slate-200/80 shadow-sm flex items-end overflow-hidden transition-colors focus-within:border-slate-300",children:r.jsx("textarea",{value:g,onChange:B=>x(B.target.value),onKeyDown:B=>{B.key==="Enter"&&!B.shiftKey&&(B.preventDefault(),P(B))},placeholder:"Type a message",className:"flex-1 max-h-28 min-h-[40px] text-[14.5px] font-normal placeholder:text-slate-400 py-2.5 px-4 bg-transparent outline-none resize-none leading-[20px]",rows:1})}),g.trim()||l?r.jsx(re.button,{type:"submit",disabled:n,whileTap:{scale:.85},className:"w-10 h-10 bg-blue-600 disabled:bg-slate-200 text-white disabled:text-slate-400 rounded-full flex items-center justify-center shrink-0 shadow-sm transition-colors",children:n?r.jsx(gt,{className:"w-4 h-4 animate-spin"}):r.jsx(Zf,{className:"w-4 h-4 ml-0.5"})}):r.jsx(re.button,{type:"button",whileTap:{scale:.85},onClick:()=>S(!0),className:"w-10 h-10 bg-blue-600 text-white rounded-full flex items-center justify-center shrink-0 shadow-sm transition-colors",children:r.jsx(I6,{className:"w-4 h-4"})})]},"input")}),r.jsx("input",{ref:j,type:"file",accept:"image/*",onChange:R,className:"hidden"})]})]})}function oY({url:e,isMe:t}){const[n,s]=w.useState(!1),[i,a]=w.useState(0),[l,u]=w.useState(0),h=w.useRef(null);w.useEffect(()=>{const v=new Audio(e);return h.current=v,v.addEventListener("loadedmetadata",()=>{u(v.duration)}),v.addEventListener("timeupdate",()=>{v.duration&&a(v.currentTime/v.duration)}),v.addEventListener("ended",()=>{s(!1),a(0)}),()=>{v.pause(),v.removeEventListener("loadedmetadata",()=>{}),v.removeEventListener("timeupdate",()=>{}),v.removeEventListener("ended",()=>{})}},[e]);const m=()=>{const v=h.current;v&&(n?v.pause():v.play(),s(!n))},g=v=>{if(!v||!isFinite(v))return"0:00";const _=Math.floor(v/60),N=Math.floor(v%60);return`${_}:${N.toString().padStart(2,"0")}`},x=h.current?h.current.currentTime:0;return r.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2 min-w-[200px]",children:[r.jsx("button",{onClick:m,className:`w-8 h-8 rounded-full flex items-center justify-center shrink-0 transition-colors ${t?"bg-white/20 hover:bg-white/30 text-white":"bg-blue-100 hover:bg-blue-200 text-blue-600"}`,children:n?r.jsx(K6,{className:"w-3.5 h-3.5"}):r.jsx(tF,{className:"w-3.5 h-3.5 ml-0.5"})}),r.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[r.jsx("div",{className:"flex items-center gap-[2px] h-5",children:Array.from({length:32}).map((v,_)=>{const N=4+Math.abs(Math.sin(_*.8))*14,S=_/32<=i;return r.jsx("div",{className:`w-[2.5px] rounded-full transition-colors ${S?t?"bg-white":"bg-blue-500":t?"bg-white/30":"bg-slate-300"}`,style:{height:`${N}px`}},_)})}),r.jsx("span",{className:`text-[10px] font-medium ${t?"text-blue-200":"text-slate-400"}`,children:g(n?x:l)})]})]})}function CA({msg:e,isMe:t,isFirstInGroup:n,isLastInGroup:s,showName:i}){const a=e.created_date?$n(new Date(e.created_date),"h:mm a"):"Now",l=s?"rounded-2xl rounded-br-[4px]":"rounded-2xl",u=s?"rounded-2xl rounded-bl-[4px]":"rounded-2xl";return r.jsx("div",{className:`flex ${t?"justify-end":"justify-start"} ${n?"mt-3":"mt-[3px]"}`,children:r.jsxs("div",{className:`flex items-end gap-1.5 ${t?"flex-row-reverse":"flex-row"} max-w-[82%] md:max-w-[55%]`,children:[!t&&r.jsx("div",{className:"w-7 shrink-0 self-end",children:s?r.jsx(Js,{email:e.user_email,className:"w-7 h-7 rounded-full bg-slate-100"}):r.jsx("div",{className:"w-7"})}),r.jsxs("div",{className:`flex flex-col ${t?"items-end":"items-start"} min-w-0`,children:[!t&&i&&n&&r.jsx("span",{className:"text-[11px] font-semibold text-blue-600 mb-0.5 ml-1 tracking-wide",children:e.user_name||"Unknown"}),r.jsxs("div",{className:`relative overflow-hidden ${t?`bg-blue-600 text-white ${l}`:`bg-white text-slate-800 ${u} border border-slate-100/80`} shadow-[0_1px_2px_rgba(0,0,0,0.04)]`,children:[e.attachment_url&&e.attachment_type==="image"&&r.jsx("div",{className:"cursor-pointer",onClick:()=>window.open(e.attachment_url,"_blank"),children:r.jsx("img",{src:e.attachment_url,className:"w-full max-w-[280px] max-h-[220px] object-cover",alt:"Shared"})}),e.attachment_url&&e.attachment_type==="voice"&&r.jsx(oY,{url:e.attachment_url,isMe:t}),e.attachment_url&&e.attachment_type==="location"&&r.jsxs("div",{className:"cursor-pointer w-[260px]",onClick:()=>{var h;return window.open(`https://maps.google.com/?q=${(h=e.attachment_url.split("q=")[1])==null?void 0:h.split("&")[0]}`,"_blank")},children:[r.jsx("div",{className:"h-[120px] relative",children:r.jsx("iframe",{src:e.attachment_url,className:"w-full h-full border-0 pointer-events-none",title:"Location"})}),r.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 ${t?"border-t border-white/10":"border-t border-slate-100"}`,children:[r.jsx(Dn,{className:`w-3.5 h-3.5 shrink-0 ${t?"text-blue-200":"text-red-500"}`}),r.jsx("span",{className:`text-xs font-medium ${t?"text-blue-100":"text-slate-600"}`,children:"Shared Location · Tap to view"})]})]}),e.text&&r.jsxs("div",{className:"px-3 py-[7px]",children:[r.jsxs("p",{className:"text-[14.5px] leading-[20px] whitespace-pre-wrap break-words",children:[e.text,r.jsx("span",{className:"inline-block w-[70px]"})]}),r.jsxs("div",{className:`float-right -mt-[18px] flex items-center gap-1 ${t?"text-blue-200":"text-slate-400"}`,children:[r.jsx("span",{className:"text-[10px] font-medium whitespace-nowrap",children:a}),t&&r.jsx(aS,{className:"w-3.5 h-3.5"})]})]}),!e.text&&e.attachment_url&&r.jsxs("div",{className:`flex items-center justify-end gap-1 px-3 py-1.5 ${t?"text-blue-200":"text-slate-400"}`,children:[r.jsx("span",{className:"text-[10px] font-medium",children:a}),t&&r.jsx(aS,{className:"w-3.5 h-3.5"})]})]})]})]})})}function lY({label:e}){return r.jsx("div",{className:"flex justify-center my-3",children:r.jsx("span",{className:"bg-white/90 backdrop-blur-sm text-slate-500 text-[11px] font-medium px-3 py-1 rounded-lg shadow-sm border border-slate-100/60",children:e})})}const cY=[{id:"1",trip_id:"1",text:"Has everyone arrived at the base camp yet? The signal is a bit spott
680y near the entrance.",user_name:"Alex",user_email:"[email protected]",created_date:new Date(Date.now()-72e5).toISOString()},{id:"2",trip_id:"1",text:"Just pulled up! The view is absolutely incredible from the ridge.",user_name:"Me",user_email:"[email protected]",created_date:new Date(Date.now()-6e6).toISOString()},{id:"3",trip_id:"1",text:"Same here, looks amazing",user_name:"Me",user_email:"[email protected]",created_date:new Date(Date.now()-59e5).toISOString()},{id:"4",trip_id:"1",text:"Check out the trail map I found at the visitor center!",user_name:"Jordan",user_email:"[email protected]",created_date:new Date(Date.now()-36e5).toISOString(),attachment_url:"https://images.unsplash.com/photo-1524661135-423995f22d0b?w=400",attachment_type:"image"},{id:"5",trip_id:"1",text:"Perfect, that helps a lot. Let's regroup at noon?",user_name:"Alex",user_email:"[email protected]",created_date:new Date(Date.now()-18e5).toISOString()},{id:"6",trip_id:"1",text:"Sounds good! See you all there ð",user_name:"Me",user_email:"[email protected]",created_date:new Date(Date.now()-6e5).toISOString()}];function dY(){var be;Kn();const e=tn(),n=new URLSearchParams(window.location.search).get("trip_id")||"1",[s,i]=w.useState(!1),[a,l]=w.useState(null),[u,h]=w.useState(null),[m,g]=w.useState([]),x=w.useRef(null),v=w.useRef(null),{data:_}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),{data:N}=Re({queryKey:["trip",n],queryFn:()=>ne.entities.Trip.get(n).catch(()=>null)}),{data:S}=Re({queryKey:["members",n],queryFn:()=>ne.entities.TripMember.filter({trip_id:n}).catch(()=>[])}),j=50,{data:P,fetchNextPage:E,hasNextPage:R,isFetchingNextPage:A}=SB({queryKey:["messages",n],queryFn:async({pageParam:W=0})=>await ne.entities.ChatMessage.filter({trip_id:n},"-created_date",j,W).catch(()=>[]),getNextPageParam:(W,Z)=>{if(!(W.length<j))return Z.length*j},initialPageParam:0});w.useEffect(()=>ne.entities.ChatMessage.subscribe(Z=>{var D;((D=Z.data)==null?void 0:D.trip_id)===n&&Z.type==="create"&&e.setQueryData(["messages",n],O=>{if(!O)return O;const U=O.pages[0]||[];if(U.some(le=>le.id===Z.data.id))return O;const ie=[[Z.data,...U],...O.pages.slice(1)];return{...O,pages:ie}})}),[n,e]);const B=pt({mutationFn:W=>ne.entities.ChatMessage.create(W),onMutate:async W=>{await e.cancelQueries({queryKey:["messages",n]}),e.setQueryData(["messages",n],Z=>{if(!Z)return{pages:[[{...W,_optimistic:!0}]],pageParams:[0]};const D=Z.pages[0]||[],O=[[{...W,_optimistic:!0},...D],...Z.pages.slice(1)];return{...Z,pages:O}})},onSuccess:W=>{e.setQueryData(["messages",n],Z=>{if(!Z)return Z;const O=(Z.pages[0]||[]).filter(ie=>!ie._optimistic);O.some(ie=>ie.id===W.id)||O.unshift(W),O.sort((ie,le)=>new Date(le.created_date)-new Date(ie.created_date));const U=[O,...Z.pages.slice(1)];return{...Z,pages:U}})}}),z=[...((be=P==null?void 0:P.pages)==null?void 0:be.length)>0?[...P.pages.flat()].reverse():cY.filter(W=>W.trip_id===n),...m].sort((W,Z)=>new Date(W.created_date||0)-new Date(Z.created_date||0)),V=(W=!0)=>{var Z,D;W?(Z=x.current)==null||Z.scrollIntoView({behavior:"smooth"}):(D=x.current)==null||D.scrollIntoView()},te=W=>{if(W.target.scrollTop===0&&R&&!A){const Z=W.target.scrollHeight;E().then(()=>{setTimeout(()=>{if(v.current){const D=v.current.scrollHeight;v.current.scrollTop=D-Z}},0)})}},H=w.useRef(!1);w.useEffect(()=>{z.length>0&&!H.current&&(H.current=!0,setTimeout(()=>V(!1),50))},[z.length]),w.useEffect(()=>{H.current&&V(!0)},[z.length,a]);const Y=w.useMemo(()=>{const W=[];let Z="";return z.forEach((D,O)=>{const U=D.created_date?new Date(D.created_date):new Date,ie=new Date,le=new Date(ie);le.setDate(le.getDate()-1);let fe;U.toDateString()===ie.toDateString()?fe="Today":U.toDateString()===le.toDateString()?fe="Yesterday":fe=$n(U,"MMMM d, yyyy"),fe!==Z&&(Z=fe,W.push({type:"date",label:fe,key:`date-${O}`}));const me=O>0?z[O-1]:null,oe=O<z.length-1?z[O+1]:null,Q=me&&me.user_email===D.user_email,Ne=oe&&oe.user_email===D.user_email,Ce=me&&new Date(me.created_date).toDateString()===U.toDateString(),De=oe&&new Date(oe.created_date).toDateString()===U.toDateString();W.push({type:"message",msg:D,key:D.id||`msg-${O}`,isFirstInGroup:!Q||!Ce,isLastInGroup:!Ne||!De})}),W},[z]),ce=(W,Z)=>{const D={trip_id:n,text:W.trim(),user_email:(_==null?void 0:_.email)||"[email protected]",user_name:(_==null?void 0:_.full_name)||"Me",created_date:new Date().toISOString(),id:Math.random().toString(),attachment_url:(Z==null?void 0:Z.url)||null,attachment_type:(Z==null?void 0:Z.type)||null};n.length>5?B.mutate(D):g(O=>[...O,D]),l(null)},K=async W=>{i(!0);const Z=await ne.integrations.Core.UploadFile({file:W});Z!=null&&Z.file_url&&l({url:Z.file_url,type:"image"}),i(!1)},q=async(W,Z)=>{i(!0);const D=new File([W],`voice-${Date.now()}.webm`,{type:"audio/webm"}),O=await ne.integrations.Core.UploadFile({file:D});i(!1),O!=null&&O.file_url&&ce("",{url:O.file_url,type:"voice"})},ge=()=>{if(h(null),i(!0),!("geolocation"in navigator)){i(!1),h("Geolocation is not supported by your browser.");return}navigator.geolocation.getCurrentPosition(W=>{const Z=W.coords.latitude,D=W.coords.longitude,O=`https://maps.google.com/maps?q=${Z},${D}&t=&z=15&ie=UTF8&iwloc=&output=embed`;l({url:O,type:"location",lat:Z,lng:D}),i(!1)},W=>{i(!1),W.code===W.PERMISSION_DENIED?h("Location permission denied. Allow access in browser settings."):W.code===W.POSITION_UNAVAILABLE?h("Location unavailable. Enable location services."):h("Could not get your location.")},{enableHighAccuracy:!0,timeout:1e4,maximumAge:0})},he=(_==null?void 0:_.email)||"[email protected]";return r.jsxs("div",{className:"h-[100dvh] bg-[#efeae2] flex flex-col font-sans relative overflow-hidden",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none z-0",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='60' height='60' viewB
680ox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`}}),r.jsx(rY,{tripName:(N==null?void 0:N.title)||"Trip Chat",memberCount:(S==null?void 0:S.length)||1,coverUrl:N==null?void 0:N.cover_image_url}),r.jsxs("div",{ref:v,onScroll:te,className:"flex-1 overflow-y-auto px-3 md:px-4 py-2 z-10 relative",children:[r.jsx("div",{className:"flex justify-center my-4 mb-6",children:r.jsxs("div",{className:"bg-[#fef3c7]/90 backdrop-blur-sm text-amber-800 text-[11px] font-medium px-4 py-2 rounded-lg shadow-sm text-center max-w-[280px] leading-relaxed flex items-center justify-center gap-1.5",children:["Messages are shared with all trip members. Plan your adventure! ",r.jsx(da,{className:"w-3.5 h-3.5 inline text-amber-600"})]})}),A&&r.jsx("div",{className:"flex justify-center my-2",children:r.jsxs("div",{className:"bg-white/80 backdrop-blur-sm text-slate-500 text-xs font-medium px-3 py-1.5 rounded-full shadow-sm flex items-center gap-2",children:[r.jsx("div",{className:"w-3.5 h-3.5 border-2 border-slate-300 border-t-slate-500 rounded-full animate-spin"}),"Loading older messages..."]})}),Y.map(W=>{if(W.type==="date")return r.jsx(lY,{label:W.label},W.key);const{msg:Z,isFirstInGroup:D,isLastInGroup:O}=W,U=Z.user_email===he;return r.jsx(CA,{msg:Z,isMe:U,isFirstInGroup:D,isLastInGroup:O,showName:!U},W.key)}),s&&r.jsx("div",{className:"flex justify-end mt-1",children:r.jsxs("div",{className:"bg-blue-50 text-blue-500 text-xs font-medium px-3 py-2 rounded-xl flex items-center gap-2 border border-blue-100",children:[r.jsx("div",{className:"w-3.5 h-3.5 border-2 border-blue-400 border-t-transparent rounded-full animate-spin"}),"Preparingâ¦"]})}),r.jsx("div",{ref:x,className:"h-2"})]}),r.jsx(aY,{onSend:ce,onSendVoice:q,isUploading:s,setIsUploading:i,onFileUpload:K,onShareLocation:ge,attachment:a,setAttachment:l,locationError:u,setLocationError:h})]})}const vf=[{id:"blank",name:"Blank Trip",icon:r6,defaultCover:"https://images.unsplash.com/photo-1464822759023-fed622ff2c3b"},{id:"camping",name:"Camping Weekend",icon:da,defaultCover:"https://images.unsplash.com/photo-1504280390227-361099d3e421"},{id:"overlanding",name:"Overland Expedition",icon:vL,defaultCover:"https://images.unsplash.com/photo-1533560904424-a0c61dc306fc"}],uY={blank:["https://images.unsplash.com/photo-1464822759023-fed622ff2c3b","https://images.unsplash.com/photo-1501555088652-021faa106b9b","https://images.unsplash.com/photo-1469474968028-56623f02e42e"],camping:["https://images.unsplash.com/photo-1504280390227-361099d3e421","https://images.unsplash.com/photo-1523987355523-c7b5b0dd90a7","https://images.unsplash.com/photo-1478131143081-80f7f84ca84d"],overlanding:["https://images.unsplash.com/photo-1533560904424-a0c61dc306fc","https://images.unsplash.com/photo-1517021897933-0e0319cfbc28","https://images.unsplash.com/photo-1629837920786-fb7c9c22880c"]};function hY(){var D,O;const e=Kn(),t=tn(),s=new URLSearchParams(window.location.search).get("id"),[i,a]=w.useState(""),[l,u]=w.useState(""),[h,m]=w.useState(""),[g,x]=w.useState(""),[v,_]=w.useState(""),[N,S]=w.useState(""),[j,P]=w.useState(""),[E,R]=w.useState("public"),[A,B]=w.useState("blank"),[I,z]=w.useState(""),[V,te]=w.useState(!1),[H,Y]=w.useState("Moderate"),[ce,K]=w.useState(""),{data:q}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),{data:ge}=Re({queryKey:["trip",s],queryFn:()=>s?ne.entities.Trip.get(s).catch(()=>null):null,enabled:!!s}),he=(q==null?void 0:q.role)==="admin"||(q==null?void 0:q.role)==="moderator"||(q==null?void 0:q.role)==="superadmin";w.useEffect(()=>{ge&&(a(ge.title||""),u(ge.location||""),m(ge.lat||""),x(ge.lng||""),_(ge.start_date||""),S(ge.duration_days||""),P(ge.max_people||""),R(ge.visibility||"public"),z(ge.cover_image_url||""),Y(ge.difficulty||"Moderate"),K(ge.description||""))},[ge]);const be=async U=>{var le;const ie=(le=U.target.files)==null?void 0:le[0];if(ie){te(!0);try{const fe=await ne.integrations.Core.UploadFile({file:ie});fe!=null&&fe.file_url&&z(fe.file_url),te(!1)}catch(fe){console.error(fe),te(!1)}}},W=()=>{e(s?Xe("TripDetails")+"?id="+s:Xe("Home"))},Z=async()=>{var ie;if(!i)return;let U=(ge==null?void 0:ge.end_date)||null;if(v&&N){const le=new Date(v);le.setDate(le.getDate()+parseInt(N)-1),U=le.toISOString().split("T")[0]}try{if(s)await ne.entities.Trip.update(s,{title:i,description:ce,location:l,lat:h?parseFloat(h):null,lng:g?parseFloat(g):null,start_date:v,end_date:U,duration_days:N?parseInt(N):null,max_people:j?parseInt(j):null,visibility:E,difficulty:H,cover_image_url:I||((ie=vf.f
680ind(le=>le.id===A))==null?void 0:ie.defaultCover)}),t.invalidateQueries(["trip",s]),t.invalidateQueries(["trips"]),W();else{const le=vf.find(oe=>oe.id===A),fe=I||le.defaultCover,me=await ne.entities.Trip.create({title:i,description:ce,location:l,lat:h?parseFloat(h):null,lng:g?parseFloat(g):null,start_date:v,end_date:U,duration_days:N?parseInt(N):null,max_people:j?parseInt(j):null,visibility:he?E:"private",difficulty:H,status:"upcoming",approval_status:he?"approved":"pending_approval",cover_image_url:fe});A==="camping"?await ne.entities.GearItem.bulkCreate([{trip_id:me.id,name:"Tent",category:"SHELTER",quantity_needed:1},{trip_id:me.id,name:"Sleeping Bags",category:"SHELTER",quantity_needed:2},{trip_id:me.id,name:"Camp Stove",category:"COOKING",quantity_needed:1},{trip_id:me.id,name:"First Aid Kit",category:"SAFETY",quantity_needed:1}]):A==="overlanding"&&await ne.entities.GearItem.bulkCreate([{trip_id:me.id,name:"Traction Boards",category:"SAFETY",quantity_needed:2},{trip_id:me.id,name:"Air Compressor",category:"OTHER",quantity_needed:1},{trip_id:me.id,name:"Recovery Rope",category:"SAFETY",quantity_needed:1},{trip_id:me.id,name:"GPS Communicator",category:"NAVIGATION",quantity_needed:1}]),t.invalidateQueries(["trips"]),W()}}catch(le){console.error(le),W()}};return r.jsxs(re.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.4},className:"min-h-screen flex flex-col bg-white",children:[r.jsxs("header",{className:"bg-white border-b border-slate-100 p-4 flex items-center justify-between",children:[r.jsx("button",{onClick:W,className:"p-2 -ml-2 rounded-full hover:bg-slate-100",children:r.jsx(gr,{className:"w-6 h-6"})}),r.jsx("h1",{className:"font-semibold tracking-tight text-lg",children:s?"Edit Trip":"New Trip"}),r.jsx("button",{onClick:()=>e(Xe("Home")),className:"p-2 -mr-2 rounded-full hover:bg-slate-100 text-slate-600",children:r.jsx(Ii,{className:"w-6 h-6"})})]}),r.jsxs("div",{className:"p-6",children:[r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700 mb-2",children:"Trip Title"}),r.jsx("input",{type:"text",value:i,onChange:U=>a(U.target.value),className:"w-full bg-[#f9fafb] border border-slate-200 rounded-2xl p-4 font-semibold tracking-tight mb-6 focus:ring-2 focus:ring-blue-600 focus:border-transparent outline-none transition-all",placeholder:"e.g. Alpine Explorer"}),r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700 mb-2",children:"Description"}),r.jsx("textarea",{value:ce,onChange:U=>K(U.target.value),className:"w-full bg-[#f9fafb] border border-slate-200 rounded-2xl p-4 font-medium tracking-tight mb-6 focus:ring-2 focus:ring-blue-600 focus:border-transparent outline-none transition-all resize-none h-24 text-sm",placeholder:"What's this trip about?"}),r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700 mb-2",children:"Location Area"}),r.jsx("input",{type:"text",value:l,onChange:U=>u(U.target.value),className:"w-full bg-[#f9fafb] border border-slate-200 rounded-2xl p-4 font-semibold tracking-tight mb-4 focus:ring-2 focus:ring-blue-600 focus:border-transparent outline-none transition-all",placeholder:"e.g. Swiss Alps"}),r.jsxs("div",{className:"flex gap-4 mb-6",children:[r.jsxs("div",{className:"flex-1",children:[r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700 mb-2",children:"Latitude"}),r.jsx("input",{type:"number",step:"any",value:h,onChange:U=>m(U.target.value),className:"w-full bg-[#f9fafb] border border-slate-200 rounded-2xl p-4 font-semibold tracking-tight focus:ring-2 focus:ring-blue-600 focus:border-transparent outline-none transition-all",placeholder:"e.g. 46.8182"})]}),r.jsxs("div",{className:"flex-1",children:[r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700 mb-2",children:"Longitude"}),r.jsx("input",{type:"number",step:"any",value:g,onChange:U=>x(U.target.value),className:"w-full bg-[#f9fafb] border border-slate-200 rounded-2xl p-4 font-semibold tracking-tight focus:ring-2 focus:ring-blue-600 focus:border-transparent outline-none transition-all",placeholder:"e.g. 8.2275"})]})]}),r.jsx("div",{className:"flex gap-4 mb-6",children:r.jsxs("div",{className:"flex-1",children:[r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700 mb-2",children:"Start Date"}
680),r.jsx("input",{type:"date",value:v,onChange:U=>_(U.target.value),className:"w-full bg-[#f9fafb] border border-slate-200 rounded-2xl p-4 font-semibold tracking-tight focus:ring-2 focus:ring-blue-600 focus:border-transparent outline-none transition-all text-slate-700"})]})}),r.jsxs("div",{className:"flex gap-4 mb-6",children:[r.jsxs("div",{className:"flex-1",children:[r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700 mb-2",children:"Duration (Days)"}),r.jsx("input",{type:"number",min:"1",value:N,onChange:U=>S(U.target.value),className:"w-full bg-[#f9fafb] border border-slate-200 rounded-2xl p-4 font-semibold tracking-tight focus:ring-2 focus:ring-blue-600 focus:border-transparent outline-none transition-all text-slate-700",placeholder:"e.g. 5"})]}),r.jsxs("div",{className:"flex-1",children:[r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700 mb-2",children:"Max People"}),r.jsx("input",{type:"number",min:"1",value:j,onChange:U=>P(U.target.value),className:"w-full bg-[#f9fafb] border border-slate-200 rounded-2xl p-4 font-semibold tracking-tight focus:ring-2 focus:ring-blue-600 focus:border-transparent outline-none transition-all text-slate-700",placeholder:"e.g. 10"})]})]}),r.jsxs("div",{className:"mb-6",children:[r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700 mb-2",children:"Trail Difficulty"}),r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:["Easy","Moderate","Hard","Expert"].map(U=>r.jsx("button",{type:"button",onClick:()=>Y(U),className:`py-3 px-2 rounded-xl border font-semibold tracking-tight text-sm transition-all text-center ${H===U?"bg-slate-900 border-slate-900 text-white shadow-md":"bg-white border-slate-200 text-slate-600 hover:bg-slate-50"}`,children:U},U))})]}),(he||s)&&r.jsxs("div",{className:"mb-6 bg-slate-50 p-4 rounded-2xl border border-slate-200",children:[r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-900 mb-3",children:"Trip Visibility"}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs("button",{type:"button",onClick:()=>R("public"),className:`flex-1 py-3 px-4 rounded-xl border font-semibold tracking-tight text-sm transition-all flex items-center justify-center gap-2 ${E==="public"?"bg-blue-600 border-blue-600 text-white shadow-md":"bg-white border-slate-200 text-slate-600 hover:bg-slate-50"}`,children:[r.jsx(Ku,{className:"w-4 h-4"})," Public Event"]}),r.jsxs("button",{type:"button",onClick:()=>R("private"),className:`flex-1 py-3 px-4 rounded-xl border font-semibold tracking-tight text-sm transition-all flex items-center justify-center gap-2 ${E==="private"?"bg-blue-600 border-blue-600 text-white shadow-md":"bg-white border-slate-200 text-slate-600 hover:bg-slate-50"}`,children:[r.jsx(i5,{className:"w-4 h-4"})," Private (Invite Only)"]})]}),r.jsx("p",{className:"text-xs text-slate-500 mt-3 font-medium",children:E==="public"?"Anyone can see this trip on their dashboard.":"Only invited members can see this trip."})]}),!s&&r.jsxs(r.Fragment,{children:[r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700 mb-2",children:"Smart Template"}),r.jsx("div",{className:"grid grid-cols-3 gap-3 mb-6",children:vf.map((U,ie)=>r.jsxs(re.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.2+ie*.1},whileTap:{scale:.95},onClick:()=>B(U.id),className:`p-3 rounded-2xl border text-center cursor-pointer transition-all ${A===U.id?"border-blue-600 bg-blue-50/50":"border-slate-200 bg-[#f9fafb]"}`,children:[r.jsx("div",{className:"flex justify-center mb-2",children:r.jsx(U.icon,{className:"w-7 h-7"})}),r.jsx("div",{className:`text-xs font-semibold tracking-tight ${A===U.id?"text-blue-700":"text-slate-500"}`,children:U.name})]},U.id))})]}),r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700",children:"Cover Photo (Optional)"}),I&&r.jsx("button",{onClick:()=>z(""),className:"text-xs font-semibold tracking-tight text-red-500 hover:text-red-700 transition-colors px-2 py-1 rounded-md hover:bg-red-50",children:"Remove Photo"})]}),r.jsxs("div",{className:"relative mb-4 h-32 w-full rounded-2xl flex flex-col items-center justify-center overflow-hidden border border-slate-200",children:[r.jsx("img",{src:I||((D=vf.find(U=>U.id===A))==null?void 0:D.defaultCover),alt:"Cover Preview",className:"w-full h-full object-cover absolute inset-0"}),r.jsxs("div",{className:"absolute inset-0 bg-black/40 flex flex-col items-center justify-center transition-colors hover:bg-black/50",children:[r.jsx(Qs,{className:"w-8 h-8 text-white mb-2"}),r.jsx("span",{className:"text-xs font-semibold tracking-tight text-white",children:V?"Uploading...":I?"Tap to change photo":"Tap to upload custom cover"})]}),r.jsx("input",{type:"file",accept:"image/*",onChange:be,disabled:V,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10"})]}),!s&&r.jsxs("div",{className:"mb-8",children:[r.jsx("label",{className:"block text-xs font-semibold tracking-tight text-slate-500 mb-2",children:"Suggested Covers"}),r.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2 scrollbar-hide",children:(O=uY[A])==null?void 0:O.map((U,ie)=>{var le;return r.jsx("button",{onClick:()=>
680z(U),className:`relative w-20 h-14 rounded-lg overflow-hidden shrink-0 border-2 transition-all ${I===U||!I&&((le=vf.find(fe=>fe.id===A))==null?void 0:le.defaultCover)===U?"border-blue-600":"border-transparent hover:opacity-80"}`,children:r.jsx("img",{src:U,alt:`Suggestion ${ie+1}`,className:"w-full h-full object-cover"})},ie)})})]}),!he&&!s&&r.jsxs("div",{className:"mb-4 p-4 bg-amber-50 border border-amber-200 rounded-2xl flex items-start gap-3",children:[r.jsx(Lu,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-semibold tracking-tight text-amber-800",children:"Approval Required"}),r.jsx("p",{className:"text-xs text-amber-600 mt-0.5",children:"Your trip will need admin or moderator approval before it becomes visible to others. You can still add locations, gear, and details."})]})]}),r.jsxs("button",{onClick:Z,className:"w-full bg-blue-600 text-white font-semibold tracking-tight rounded-2xl p-4 flex justify-center items-center active:scale-95 transition-transform",children:[r.jsx(Cm,{className:"w-5 h-5 mr-2"}),s?"Update Trip":he?"Create Trip":"Submit for Approval"]})]})]})}function fY(){const e=Kn(),t=tn(),n=w.useRef(null),s=w.useRef(null),[i,a]=w.useState(""),[l,u]=w.useState(null),[h,m]=w.useState(!1),x=new URLSearchParams(window.location.search).get("id"),{data:v}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),{data:_}=Re({queryKey:["conversation",x],queryFn:()=>ne.entities.Conversation.filter({id:x}).then(z=>z[0]||null).catch(()=>null),enabled:!!x}),{data:N,isLoading:S}=Re({queryKey:["directMessages",x],queryFn:()=>ne.entities.DirectMessage.filter({conversation_id:x},"created_date",200).catch(()=>[]),enabled:!!x,refetchInterval:3e3});w.useEffect(()=>{n.current&&(n.current.scrollTop=n.current.scrollHeight)},[N]);const j=pt({mutationFn:async z=>{await ne.entities.DirectMessage.create(z),await ne.entities.Conversation.update(x,{last_message:z.text||(z.attachment_type==="image"?"Photo":"Attachment"),last_message_date:new Date().toISOString(),last_message_by:v.email})},onSuccess:()=>{t.invalidateQueries({queryKey:["directMessages",x]}),t.invalidateQueries({queryKey:["conversations"]})}}),P=z=>{z==null||z.preventDefault(),!(!i.trim()&&!l||h)&&(j.mutate({conversation_id:x,sender_email:v.email,sender_name:v.full_name||v.email.split("@")[0],text:i.trim(),attachment_url:(l==null?void 0:l.url)||"",attachment_type:(l==null?void 0:l.type)||""}),a(""),u(null))},E=async z=>{var H;const V=(H=z.target.files)==null?void 0:H[0];if(!V)return;m(!0);const te=await ne.integrations.Core.UploadFile({file:V});te!=null&&te.file_url&&u({url:te.file_url,type:"image"}),m(!1),s.current&&(s.current.value="")},R=(_==null?void 0:_.participant_1)===(v==null?void 0:v.email),A=R?_==null?void 0:_.participant_2_name:_==null?void 0:_.participant_1_name,B=R?_==null?void 0:_.participant_2:_==null?void 0:_.participant_1,I=N||[];return r.jsxs("div",{className:"flex flex-col h-screen bg-[#f0f2f5]",children:[r.jsxs("div",{className:"bg-white border-b border-slate-100 px-4 py-3 flex items-center gap-3 shrink-0 z-20 shadow-sm",children:[r.jsx("button",{onClick:()=>e(Xe("Messages")),className:"p-2 -ml-2 text-slate-500 hover:text-slate-800 rounded-xl transition-colors",children:r.jsx(gr,{className:"w-5 h-5"})}),r.jsxs("button",{onClick:()=>e(Xe("Profile")+"?email="+B),className:"flex items-center gap-3 flex-1 min-w-0",children:[r.jsx(Js,{email:B,alt:A,className:"w-10 h-10 rounded-full bg-slate-100 object-cover shrink-0"}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("h2",{className:"font-semibold tracking-tight text-slate-900 text-[15px] tracking-tight truncate",children:A||(B==null?void 0:B.split("@")[0])||"User"}),r.jsx("p",{className:"text-xs text-slate-400 font-medium truncate",children:B})]})]})]}),r.jsx("div",{ref:n,className:"flex-1 overflow-y-auto px-4 py-4 space-y-0.5",children:S?r.jsx("div",{className:"flex items-center justify-center py-20",children:r.jsx(gt,{className:"w-6 h-6 animate-spin text-blue-500"})}):I.length===0?r.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[r.jsx("div",{className:"w-14 h-14 bg-blue-50 rounded-full flex items-center justify-center mb-3",children:r.jsx(Zf,{className:"w-6 h-6 text-blue-400"})}),r.jsx("p",{className:"text-sm font-semibold text-slate-500",children:"Send the first message!"})]}):I.map((z,V)=>{const te=z.sender_email===(v==null?void 0:v.email),H=I[V-1],Y=I[V+1],ce=!H||H.sender_email!==z.sender_email,K=!Y||Y.sender_email!==z.sender_email,q={...z,user_name:z.sender_name,user_email:z.sender_email};return r.jsx(CA,{msg:q,isMe:te,isFirstInGroup:ce,isLastInGroup:K,showName:!1},z.id)})}),r.jsxs("div",{className:"bg-white border-t border-slate-100 px-3 py-2 pb-[max(0.5rem,env(safe-area-inset-bottom))] shrink-0 z-20",children:[r.jsx(Lt,{children:l&&r.jsx(re.div,{initial:{opacity:0,height:0}
vendor: 17,037 bytes, line 680
680,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mb-2 overflow-hidden",children:r.jsxs("div",{className:"flex items-center gap-2.5 bg-slate-50 p-2 rounded-xl border border-slate-200/80",children:[r.jsx("img",{src:l.url,alt:"",className:"w-10 h-10 rounded-lg object-cover bg-slate-100"}),r.jsx("span",{className:"text-xs font-semibold text-slate-700 flex-1",children:"Photo ready"}),r.jsx("button",{onClick:()=>u(null),className:"p-1.5 hover:bg-slate-200 rounded-full text-slate-400",children:r.jsx(hn,{className:"w-3.5 h-3.5"})})]})})}),r.jsxs("form",{onSubmit:P,className:"flex items-end gap-2",children:[r.jsx("button",{type:"button",onClick:()=>{var z;return(z=s.current)==null?void 0:z.click()},className:"w-10 h-10 rounded-full flex items-center justify-center text-slate-400 hover:bg-slate-100 hover:text-slate-600 transition-colors shrink-0",children:r.jsx(Kf,{className:"w-[18px] h-[18px]"})}),r.jsx("div",{className:"flex-1 bg-slate-50 rounded-3xl border border-slate-200/80 flex items-end overflow-hidden focus-within:border-slate-300 transition-colors",children:r.jsx("textarea",{value:i,onChange:z=>a(z.target.value),onKeyDown:z=>{z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),P())},placeholder:"Type a message",className:"flex-1 max-h-28 min-h-[40px] text-[14.5px] py-2.5 px-4 bg-transparent outline-none resize-none leading-[20px] placeholder:text-slate-400",rows:1})}),r.jsx(re.button,{type:"submit",disabled:!i.trim()&&!l||h,whileTap:{scale:.85},className:"w-10 h-10 bg-blue-600 disabled:bg-slate-200 text-white disabled:text-slate-400 rounded-full flex items-center justify-center shrink-0 shadow-sm transition-colors",children:h?r.jsx(gt,{className:"w-4 h-4 animate-spin"}):r.jsx(Zf,{className:"w-4 h-4 ml-0.5"})})]}),r.jsx("input",{ref:s,type:"file",accept:"image/*",onChange:E,className:"hidden"})]})]})}function Ke(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function GC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ca(...e){return t=>{let n=!1;const s=e.map(i=>{const a=GC(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():GC(e[i],null)}}}}function qt(...e){return w.useCallback(Ca(...e),e)}function mY(e,t){const n=w.createContext(t),s=a=>{const{children:l,...u}=a,h=w.useMemo(()=>u,Object.values(u));return r.jsx(n.Provider,{value:h,children:l})};s.displayName=e+"Provider";function i(a){const l=w.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[s,i]}function No(e,t=[]){let n=[];function s(a,l){const u=w.createContext(l),h=n.length;n=[...n,l];const m=x=>{var P;const{scope:v,children:_,...N}=x,S=((P=v==null?void 0:v[e])==null?void 0:P[h])||u,j=w.useMemo(()=>N,Object.values(N));return r.jsx(S.Provider,{value:j,children:_})};m.displayName=a+"Provider";function g(x,v){var S;const _=((S=v==null?void 0:v[e])==null?void 0:S[h])||u,N=w.useContext(_);if(N)return N;if(l!==void 0)return l;throw new Error(`\`${x}\` must be used within \`${a}\``)}return[m,g]}const i=()=>{const a=n.map(l=>w.createContext(l));return function(u){const h=(u==null?void 0:u[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...u,[e]:h}}),[u,h])}};return i.scopeName=e,[s,pY(i,...t)]}function pY(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const l=s.reduce((u,{useScope:h,scopeName:m})=>{const x=h(a)[`__scope${m}`];return{...u,...x}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Fs=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},gY=J0[" useInsertionEffect ".trim().toString()]||Fs;function Zc({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[i,a,l]=xY({defaultProp:t,onChange:n}),u=e!==void 0,h=u?e:i;{const g=w.useRef(e!==void 0);w.useEffect(()=>{const x=g.current;x!==u&&console.warn(`${s} is changing from ${x?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=u},[u,s])}const m=w.useCallback(g=>{var x;if(u){const v=vY(g)?g(e):g;v!==e&&((x=l.current)==null||x.call(l,v))}else a(g)},[u,e,a,l]);return[h,m]}function xY({defaultProp:e,onChange:t}){const[n,s]=w.useState(e),i=w.useRef(n),a=w.useRef(t);return gY(()=>{a.current=t},[t]),w.useEffect(()=>{var l;i.current!==n&&((l=a.current)==null||l.call(a,n),i.current=n)},[n,i]),[n,s,a]}function vY(e){return typeof e=="function"}function yY(e){const t=bY(e),n=w.forwardRef((s,i)=>{const{children:a,...l}=s,u=w.Children.toArray(a),h=u.find(_Y);if(h){const m=h.props.children,g=u.map(x=>x===h?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:x);return r.jsx(t,{...l,ref:i,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return r.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function bY(e){const t=w.forwardRef((n,s)=>{const{children:i,...a}=n;if(w.isValidElement(i)){const l=jY(i),u=NY(a,i.props);return i.type!==w.Fragment&&(u.ref=s?Ca(s,l):l),w.cloneElement(i,u)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wY=Symbol("radix.slottable");function _Y(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wY}function NY(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...u)=>{const h=a(...u);return i(...u),h}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function jY(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var SY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pt=SY.reduce((e,t)=>{const n=yY(`Primitive.${t}`),s=w.forwardRef((i,a)=>{const{asChild:l,...u}=i,h=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(h,{...u,ref:a})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function PA(e,t){e&&zl.flushSync(()=>e.dispatchEvent(t))}function YC(e){const t=kY(e),n=w.forwardRef((s,i)=>{const{children:a,...l}=s,u=w.Children.toArray(a),h=u.find(PY);if(h){const m=h.props.children,g=u.map(x=>x===h?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:x);return r.jsx(t,{...l,ref:i,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return r.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function kY(e){const t=w.forwardRef((n,s)=>{const{children:i,...a}=n;if(w.isValidElement(i)){const l=EY(i),u=TY(a,i.props);return i.type!==w.Fragment&&(u.ref=s?Ca(s,l):l),w.cloneElement(i,u)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var CY=Symbol("radix.slottable");function PY(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===CY}function TY(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...u)=>{const h=a(...u);return i(...u),h}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function EY(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Z_(e){const t=e+"CollectionProvider",[n,s]=No(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:j,children:P}=S,E=dt.useRef(null),R=dt.useRef(new Map).current;return r.jsx(i,{scope:j,itemMap:R,collectionRef:E,children:P})};l.displayName=t;const u=e+"CollectionSlot",h=YC(u),m=dt.forwardRef((S,j)=>{const{scope:P,children:E}=S,R=a(u,P),A=qt(j,R.collectionRef);return r.jsx(h,{ref:A,children:E})});m.displayName=u;const g=e+"CollectionItemSlot",x="data-radix-collection-item",v=YC(g),_=dt.forwardRef((S,j)=>{const{scope:P,children:E,...R}=S,A=dt.useRef(null),B=qt(j,A),I=a(g,P);return dt.useEffect(()=>(I.itemMap.set(A,{ref:A,...R}),()=>void I.itemMap.delete(A))),r.jsx(v,{[x]:"",ref:B,children:E})});_.displayName=g;function N(S){const j=a(e+"CollectionConsumer",S);return dt.useCallback(()=>{const E=j.collectionRef.current;if(!E)return[];const R=Array.from(E.querySelectorAll(`[${x}]`));return Array.from(j.itemMap.values()).sort((I,z)=>R.indexOf(I.ref.current)-R.indexOf(z.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:l,Slot:m,ItemSlot:_},N,s]}var AY=w.createContext(void 0);function Q_(e){const t=w.useContext(AY);return e||t||"ltr"}function ja(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}function MY(e,t=globalThis==null?void 0:globalThis.document){const n=ja(e);w.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var RY="DismissableLayer",a1="dismissableLayer.update",OY="dismissableLayer.pointerDownOutside",DY="dismissableLayer.focusOutside",KC,TA=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bm=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...h}=e,m=w.useContext(TA),[g,x]=w.useState(null),v=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,_]=w.useState({}),N=qt(t,z=>x(z)),S=Array.from(m.layers),[j]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),P=S.indexOf(j),E=g?S.indexOf(g):-1,R=m.layersWithOutsidePointerEventsDisabled.size>0,A=E>=P,B=FY(z=>{const V=z.target,te=[...m.branches].some(H=>H.contains(V));!A||te||(i==null||i(z),l==null||l(z),z.defaultPrevented||u==null||u())},v),I=BY(z=>{const V=z.target;[...m.branches].some(H=>H.contains(V))||(a==null||a(z),l==null||l(z),z.defaultPrevented||u==null||u())},v);return MY(z=>{E===m.layers.size-1&&(s==null||s(z),!z.defaultPrevented&&u&&(z.preventDefault(),u()))},v),w.useEffect(()=>{if(g)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(KC=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),ZC(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=KC)}},[g,v,n,m]),w.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),ZC())},[g,m]),w.useEffect(()=>{const z=()=>_({});return document.addEventListener(a1,z),()=>document.removeEventListener(a1,z)},[]),r.jsx(Pt.div,{...h,ref:N,style:{pointerEvents:R?A?"auto":"none":void 0,...e.style},onFocusCapture:Ke(e.onFocusCapture,I.onFocusCapture),onBlurCapture:Ke(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Ke(e.onPointerDownCapture,B.onPointerDownCapture)})});Bm.displayName=RY;var IY="DismissableLayerBranch",LY=w.forwardRef((e,t)=>{const n=w.useContext(TA),s=w.useRef(null),i=qt(t,s);return w.useEffect(()=>{const a=s.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),r.jsx(Pt.div,{...e,ref:i})});LY.displayName=IY;function FY(e,t=globalThis==null?void 0:globalThis.document){const n=ja(e),s=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=u=>{if(u.target&&!s.current){let h=function(){EA(OY,n,m,{discrete:!0})};const m={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=h,t.addEventListener("click",i.current,{once:!0})):h()}else t.removeEventListener("click",i.current);s.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function BY(e,t=globalThis==null?void 0:globalThis.document){const n=ja(e),s=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!s.current&&EA(DY,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function ZC(){const e=new CustomEvent(a1);document.dispatchEvent(e)}function EA(e,t,n,{discrete:s}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),s?PA(i,a):i.dispatchEvent(a)}var bb=0;function Nx(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??QC()),document.body.insertAdjacentElement("beforeend",e[1]??QC()),bb++,()=>{bb===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),bb--}},[])}function QC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var wb="focusScope.autoFocusOnMount",_b="focusScope.autoFocusOnUnmount",XC={bubbles:!1,cancelable:!0},zY="FocusScope",zm=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=e,[u,h]=w.useState(null),m=ja(i),g=ja(a),x=w.useRef(null),v=qt(t,S=>h(S)),_=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(s){let S=function(R){if(_.paused||!u)return;const A=R.target;u.contains(A)?x.current=A:hl(x.current,{select:!0})},j=function(R){if(_.paused||!u)return;const A=R.relatedTarget;A!==null&&(u.contains(A)||hl(x.current,{select:!0}))},P=function(R){if(document.activeElement===document.body)for(const B of R)B.removedNodes.length>0&&hl(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",j);const E=new MutationObserver(P);return u&&E.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",j),E.disconnect()}}},[s,u,_.paused]),w.useEffect(()=>{if(u){eP.add(_);const S=document.activeElement;if(!u.contains(S)){const P=new CustomEvent(wb,XC);u.addEventListener(wb,m),u.dispatchEvent(P),P.defaultPrevented||($Y(qY(AA(u)),{select:!0}),document.activeElement===S&&hl(u))}return()=>{u.removeEventListener(wb,m),setTimeout(()=>{const P=new CustomEvent(_b,XC);u.addEventListener(_b,g),u.dispatchEvent(P),P.defaultPrevented||hl(S??document.body,{select:!0}),u.removeEventListener(_b,g),eP.remove(_)},0)}}},[u,m,g,_]);const N=w.useCallback(S=>{if(!n&&!s||_.paused)return;const j=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,P=document.activeElement;if(j&&P){const E=S.currentTarget,[R,A]=UY(E);R&&A?!S.shiftKey&&P===A?(S.preventDefault(),n&&hl(R,{select:!0})):S.shiftKey&&P===R&&(S.preventDefault(),n&&hl(A,{select:!0})):P===E&&S.preventDefault()}},[n,s,_.paused]);return r.jsx(Pt.div,{tabIndex:-1,...l,ref:v,onKeyDown:N})});zm.displayName=zY;function $Y(e,{select:t=!1}={}){const n=document.activeElement;for(const s of e)if(hl(s,{select:t}),document.activeElement!==n)return}function UY(e){const t=AA(e),n=JC(t,e),s=JC(t.reverse(),e);return[n,s]}function AA(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function JC(e,t){for(const n of e)if(!VY(n,{upTo:t}))return n}function VY(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function WY(e){return e instanceof HTMLInputElement&&"select"in e}function hl(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&WY(e)&&t&&e.select()}}var eP=HY();function HY(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=tP(e,t),e.unshift(t)},remove(t){var n;e=tP(e,t),(n=e[0])==null||n.resume()}}}function tP(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}function qY(e){return e.filter(t=>t.tagName!=="A")}var GY=J0[" useId ".trim().toString()]||(()=>{}),YY=0;function ya(e){const[t,n]=w.useState(GY());return Fs(()=>{n(s=>s??String(YY++))},[e]),t?`radix-${t}`:""}const KY=["top","right","bottom","left"],Ol=Math.min,Pr=Math.max,T0=Math.round,Sg=Math.floor,ba=e=>({x:e,y:e}
vendor: 11,990 bytes, line 680
680),ZY={left:"right",right:"left",bottom:"top",top:"bottom"},QY={start:"end",end:"start"};function o1(e,t,n){return Pr(e,Ol(t,n))}function bo(e,t){return typeof e=="function"?e(t):e}function wo(e){return e.split("-")[0]}function ih(e){return e.split("-")[1]}function X_(e){return e==="x"?"y":"x"}function J_(e){return e==="y"?"height":"width"}const XY=new Set(["top","bottom"]);function ma(e){return XY.has(wo(e))?"y":"x"}function eN(e){return X_(ma(e))}function JY(e,t,n){n===void 0&&(n=!1);const s=ih(e),i=eN(e),a=J_(i);let l=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=E0(l)),[l,E0(l)]}function eK(e){const t=E0(e);return[l1(e),t,l1(t)]}function l1(e){return e.replace(/start|end/g,t=>QY[t])}const nP=["left","right"],sP=["right","left"],tK=["top","bottom"],nK=["bottom","top"];function sK(e,t,n){switch(e){case"top":case"bottom":return n?t?sP:nP:t?nP:sP;case"left":case"right":return t?tK:nK;default:return[]}}function rK(e,t,n,s){const i=ih(e);let a=sK(wo(e),n==="start",s);return i&&(a=a.map(l=>l+"-"+i),t&&(a=a.concat(a.map(l1)))),a}function E0(e){return e.replace(/left|right|bottom|top/g,t=>ZY[t])}function iK(e){return{top:0,right:0,bottom:0,left:0,...e}}function MA(e){return typeof e!="number"?iK(e):{top:e,right:e,bottom:e,left:e}}function A0(e){const{x:t,y:n,width:s,height:i}=e;return{width:s,height:i,top:n,left:t,right:t+s,bottom:n+i,x:t,y:n}}function rP(e,t,n){let{reference:s,floating:i}=e;const a=ma(t),l=eN(t),u=J_(l),h=wo(t),m=a==="y",g=s.x+s.width/2-i.width/2,x=s.y+s.height/2-i.height/2,v=s[u]/2-i[u]/2;let _;switch(h){case"top":_={x:g,y:s.y-i.height};break;case"bottom":_={x:g,y:s.y+s.height};break;case"right":_={x:s.x+s.width,y:x};break;case"left":_={x:s.x-i.width,y:x};break;default:_={x:s.x,y:s.y}}switch(ih(t)){case"start":_[l]-=v*(n&&m?-1:1);break;case"end":_[l]+=v*(n&&m?-1:1);break}return _}async function aK(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:a,rects:l,elements:u,strategy:h}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:x="floating",altBoundary:v=!1,padding:_=0}=bo(t,e),N=MA(_),j=u[v?x==="floating"?"reference":"floating":x],P=A0(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(j)))==null||n?j:j.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:m,rootBoundary:g,strategy:h})),E=x==="floating"?{x:s,y:i,width:l.floating.width,height:l.floating.height}:l.reference,R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),A=await(a.isElement==null?void 0:a.isElement(R))?await(a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},B=A0(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:E,offsetParent:R,strategy:h}):E);return{top:(P.top-B.top+N.top)/A.y,bottom:(B.bottom-P.bottom+N.bottom)/A.y,left:(P.left-B.left+N.left)/A.x,right:(B.right-P.right+N.right)/A.x}}const oK=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:a=[],platform:l}=n,u=a.filter(Boolean),h=await(l.isRTL==null?void 0:l.isRTL(t));let m=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:g,y:x}=rP(m,s,h),v=s,_={},N=0;for(let j=0;j<u.length;j++){var S;const{name:P,fn:E}=u[j],{x:R,y:A,data:B,reset:I}=await E({x:g,y:x,initialPlacement:s,placement:v,strategy:i,middlewareData:_,rects:m,platform:{...l,detectOverflow:(S=l.detectOverflow)!=null?S:aK},elements:{reference:e,floating:t}});g=R??g,x=A??x,_={..._,[P]:{..._[P],...B}},I&&N<=50&&(N++,typeof I=="object"&&(I.placement&&(v=I.placement),I.rects&&(m=I.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:g,y:x}=rP(m,v,h)),j=-1)}return{x:g,y:x,placement:v,strategy:i,middlewareData:_}},lK=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:i,rects:a,platform:l,elements:u,middlewareData:h}=t,{element:m,padding:g=0}=bo(e,t)||{};if(m==null)return{};const x=MA(g),v={x:n,y:s},_=eN(i),N=J_(_),S=await l.getDimensions(m),j=_==="y",P=j?"top":"left",E=j?"bottom":"right",R=j?"clientHeight":"clientWidth",A=a.reference[N]+a.reference[_]-v[_]-a.floating[N],B=v[_]-a.reference[_],I=await(l.getOffsetParent==null?void 0:l.getOffsetParent(m));let z=I?I[R]:0;(!z||!await(l.isElement==null?void 0:l.isElement(I)))&&(z=u.floating[R]||a.floating[N]);const V=A/2-B/2,te=z/2-S[N]/2-1,H=Ol(x[P],te),Y=Ol(x[E],te),ce=H,K=z-S[N]-Y,q=z/2-S[N]/2+V,ge=o1(ce,q,K),he=!h.arrow&&ih(i)!=null&&q!==ge&&a.reference[N]/2-(q<ce?H:Y)-S[N]/2<0,be=he?q<ce?q-ce:q-K:0;return{[_]:v[_]+be,data:{[_]:ge,centerOffset:q-ge-be,...he&&{alignmentOffset:be}},reset:he}}}),cK=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:i,middlewareData:a,rects:l,initialPlacement:u,platform:h,elements:m}=t,{mainAxis:g=!0,crossAxis:x=!0,fallbackPlacements:v,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:S=!0,...j}=bo(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const P=wo(i),E=ma(u),R=wo(u)===u,A=await(h.isRTL==null?void 0:h.isRTL(m.floating)),B=v||(R||!S?[E0(u)]:eK(u)),I=N!=="none";!v&&I&&B.push(...rK(u,S,N,A));const z=[u,...B],V=await h.detectOverflow(t,j),te=[];let H=((s=a.flip)==null?void 0:s.overflows)||[];if(g&&te.push(V[P]),x){const q=JY(i,l,A);te.push(V[q[0]],V[q[1]])}if(H=[...H,{placement:i,overflows:te}],!te.every(q=>q<=0)){var Y,ce;const q=(((Y=a.flip)==null?void 0:Y.index)||0)+1,ge=z[q];if(ge&&(!(x==="alignment"?E!==ma(ge):!1)||H.every(W=>ma(W.placement)===E?W.overflows[0]>0:!0)))return{data:{index:q,overflows:H},reset:{placement:ge}};let he=(ce=H.filter(be=>be.overflows[0]<=0).sort((be,W)=>be.overflows[1]-W.overflows[1])[0])==null?void 0:ce.placement;if(!he)switch(_){case"bestFit":{var K;const be=(K=H.filter(W=>{if(I){const Z=ma(W.placement);return Z===E||Z==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(Z=>Z>0).reduce((Z,D)=>Z+D,0)]).sort((W,Z)=>W[1]-Z[1])[0])==null?void 0:K[0];be&&(he=be);break}case"initialPlacement":he=u;break}if(i!==he)return{reset:{placement:he}}}return{}}}};function iP(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function aP(e){return KY.some(t=>e[t]>=0)}const dK=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:i="referenceHidden",...a}=bo(e,t);switch(i){case"referenceHidden":{const l=await s.detectOverflow(t,{...a,elementContext:"reference"}),u=iP(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:aP(u)}}}case"escaped":{const l=await s.detectOverflow(t,{...a,altBoundary:!0}),u=iP(l,n.floating);return{data:{escapedOffsets:u,escaped:aP(u)}}}default:return{}}}}},RA=new Set(["left","top"]);async function uK(e,t){const{placement:n,platform:s,elements:i}=e,a=await(s.isRTL==null?void 0:s.isRTL(i.floating)),l=wo(n),u=ih(n),h=ma(n)==="y",m=RA.has(l)?-1:1,g=a&&h?-1:1,x=bo(t,e);let{mainAxis:v,crossAxis:_,alignmentAxis:N}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return u&&typeof N=="number"&&(_=u==="end"?N*-1:N),h?{x:_*g,y:v*m}:{x:v*m,y:_*g}}const hK=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:i,y:a,placement:l,middlewareData:u}=t,h=await uK(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(s=u.arrow)!=null&&s.alignmentOffset?{}:{x:i+h.x,y:a+h.y,data:{...h,placement:l}}}}},fK=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:i,platform:a}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:h={fn:P=>{let{x:E,y:R}=P;return{x:E,y:R}}},...m}=bo(e,t),g={x:n,y:s},x=await a.detectOverflow(t,m),v=ma(wo(i)),_=X_(v);let N=g[_],S=g[v];if(l){const P=_==="y"?"top":"left",E=_==="y"?"bottom":"right",R=N+x[P],A=N-x[E];N=o1(R,N,A)}if(u){const P=v==="y"?"top":"left",E=v==="y"?"bottom":"right",R=S+x[P],A=S-x[E];S=o1(R,S,A)}const j=h.fn({...t,[_]:N,[v]:S});return{...j,data:{x:j.x-n,y:j.y-s,enabled:{[_]:l,[v]:u}}}}}},mK=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:i,rects:a,middlewareData:l}=t,{offset:u=0,mainAxis:h=!0,crossAxis:m=!0}=bo(e,t),g={x:n,y:s},x=ma(i),v=X_(x);let _=g[v],N=g[x];const S=bo(u,t),j=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(h){const R=v==="y"?"height":"width",A=a.reference[v]-a.floating[R]+j.mainAxis,B=a.reference[v]+a.reference[R]-j.mainAxis;_<A?_=A:_>B&&(_=B)}if(m){var P,E;const R=v==="y"?"width":"height",A=RA.has(wo(i)),B=a.reference[x]-a.floating[R]+(A&&((P=l.offset)==null?void 0:P[x])||0)+(A?0:j.crossAxis),I=a.reference[x]+a.reference[R]+(A?0:((E=l.offset)==null?void 0:E[x])||0)-(A?j.crossAxis:0);N<B?N=B:N>I&&(N=I)}return{[v]:_,[x]:N}}}},pK=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:i,rects:a,platform:l,elements:u}=t,{apply:h=()=>{},...m}=bo(e,t),g=await l.detectOverflow(t,m),x=wo(i),v=ih(i),_=ma(i)==="y",{width:N,height:S}=a.floating;let j,P;x==="top"||x==="bottom"?(j=x,P=v===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(P=x,j=v==="end"?"top":"bottom");const E=S-g.top-g.bottom,R=N-g.left-g.right,A=Ol(S-g[j],E),B=Ol(N-g[P],R),I=!t.middlewareData.shift;let z=A,V=B;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(V=R),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(z=E),I&&!v){const H=Pr(g.left,0),Y=Pr(g.right,0),ce=Pr(g.top,0),K=Pr(g.bottom,0);_?V=N-2*(H!==0||Y!==0?H+Y:Pr(g.left,g.right)):z=S-2*(ce!==0||K!==0?ce+K:Pr(g.top,g.bottom))}await h({...t,availableWidth:V,availableHeight:z});const te=await l.getDimensions(u.floating);return N!==te.width||S!==te.height?{reset:{rects:!0}}:{}}}};function jx(){return typeof window<"u"}function ah(e){return OA(e)?(e.nodeName||"").toLowerCase():"#document"}function Er(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pa(e){var t;return(t=(OA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function OA(e){return jx()?e instanceof Node||e instanceof Er(e).Node:!1}function Bi(e){return jx()?e instanceof Element||e instanceof Er(e).Element:!1}function Sa(e){return jx()?e instanceof HTMLElement||e instanceof Er(e).HTMLElement:!1}function oP(e){return!jx()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Er(e).ShadowRoot}const gK=new Set(["inline","contents"]);function $m(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=zi(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!gK.has(i)}const xK=new Set(["table","td","th"]);function vK(e){return xK.has(ah(e))}const yK=[":popover-open",":modal"];function Sx(e){return yK.some(t=>{try{return e.matches(t)}catch{return!1}})}const bK=["transform","translate","scale","rotate","perspective"],wK=["transform","translate","scale","rotate","perspective","filter"],_K=["paint","layout","strict","content"];function tN(e){const t=nN(),n=Bi(e)?zi(e):e;return bK.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||wK.some(s=>(n.willChange||"").includes(s))||_K.some(s=>(n.contain||"").includes(s))}function NK(e){let t=Dl(e);for(;Sa(t)&&!Uu(t);){if(tN(t))return t;if(Sx(t))return null;t=Dl(t)}return null}function nN(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const jK=new Set(["html","body","#document"]);function Uu(e){return jK.has(ah(e))}function zi(e){return Er(e).getComputedStyle(e)}function kx(e){return Bi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Dl(e){if(ah(e)==="html")return e;const t=e.assignedSlot||e.parentNode||oP(e)&&e.host||Pa(e);return oP(t)?t.host:t}function DA(e){const t=Dl(e);return Uu(t)?e.ownerDocument?e.ownerDocument.body:e.body:Sa(t)&&$m(t)?t:DA(t)}function am(e,t,n){var s;
vendor: 14,363 bytes, line 680
680t===void 0&&(t=[]),n===void 0&&(n=!0);const i=DA(e),a=i===((s=e.ownerDocument)==null?void 0:s.body),l=Er(i);if(a){const u=c1(l);return t.concat(l,l.visualViewport||[],$m(i)?i:[],u&&n?am(u):[])}return t.concat(i,am(i,[],n))}function c1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function IA(e){const t=zi(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=Sa(e),a=i?e.offsetWidth:n,l=i?e.offsetHeight:s,u=T0(n)!==a||T0(s)!==l;return u&&(n=a,s=l),{width:n,height:s,$:u}}function sN(e){return Bi(e)?e:e.contextElement}function xu(e){const t=sN(e);if(!Sa(t))return ba(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:a}=IA(t);let l=(a?T0(n.width):n.width)/s,u=(a?T0(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const SK=ba(0);function LA(e){const t=Er(e);return!nN()||!t.visualViewport?SK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kK(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Er(e)?!1:t}function Qc(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=sN(e);let l=ba(1);t&&(s?Bi(s)&&(l=xu(s)):l=xu(e));const u=kK(a,n,s)?LA(a):ba(0);let h=(i.left+u.x)/l.x,m=(i.top+u.y)/l.y,g=i.width/l.x,x=i.height/l.y;if(a){const v=Er(a),_=s&&Bi(s)?Er(s):s;let N=v,S=c1(N);for(;S&&s&&_!==N;){const j=xu(S),P=S.getBoundingClientRect(),E=zi(S),R=P.left+(S.clientLeft+parseFloat(E.paddingLeft))*j.x,A=P.top+(S.clientTop+parseFloat(E.paddingTop))*j.y;h*=j.x,m*=j.y,g*=j.x,x*=j.y,h+=R,m+=A,N=Er(S),S=c1(N)}}return A0({width:g,height:x,x:h,y:m})}function Cx(e,t){const n=kx(e).scrollLeft;return t?t.left+n:Qc(Pa(e)).left+n}function FA(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-Cx(e,n),i=n.top+t.scrollTop;return{x:s,y:i}}function CK(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const a=i==="fixed",l=Pa(s),u=t?Sx(t.floating):!1;if(s===l||u&&a)return n;let h={scrollLeft:0,scrollTop:0},m=ba(1);const g=ba(0),x=Sa(s);if((x||!x&&!a)&&((ah(s)!=="body"||$m(l))&&(h=kx(s)),Sa(s))){const _=Qc(s);m=xu(s),g.x=_.x+s.clientLeft,g.y=_.y+s.clientTop}const v=l&&!x&&!a?FA(l,h):ba(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-h.scrollLeft*m.x+g.x+v.x,y:n.y*m.y-h.scrollTop*m.y+g.y+v.y}}function PK(e){return Array.from(e.getClientRects())}function TK(e){const t=Pa(e),n=kx(e),s=e.ownerDocument.body,i=Pr(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),a=Pr(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let l=-n.scrollLeft+Cx(e);const u=-n.scrollTop;return zi(s).direction==="rtl"&&(l+=Pr(t.clientWidth,s.clientWidth)-i),{width:i,height:a,x:l,y:u}}const lP=25;function EK(e,t){const n=Er(e),s=Pa(e),i=n.visualViewport;let a=s.clientWidth,l=s.clientHeight,u=0,h=0;if(i){a=i.width,l=i.height;const g=nN();(!g||g&&t==="fixed")&&(u=i.offsetLeft,h=i.offsetTop)}const m=Cx(s);if(m<=0){const g=s.ownerDocument,x=g.body,v=getComputedStyle(x),_=g.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,N=Math.abs(s.clientWidth-x.clientWidth-_);N<=lP&&(a-=N)}else m<=lP&&(a+=m);return{width:a,height:l,x:u,y:h}}const AK=new Set(["absolute","fixed"]);function MK(e,t){const n=Qc(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,a=Sa(e)?xu(e):ba(1),l=e.clientWidth*a.x,u=e.clientHeight*a.y,h=i*a.x,m=s*a.y;return{width:l,height:u,x:h,y:m}}function cP(e,t,n){let s;if(t==="viewport")s=EK(e,n);else if(t==="document")s=TK(Pa(e));else if(Bi(t))s=MK(t,n);else{const i=LA(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return A0(s)}function BA(e,t){const n=Dl(e);return n===t||!Bi(n)||Uu(n)?!1:zi(n).position==="fixed"||BA(n,t)}function RK(e,t){const n=t.get(e);if(n)return n;let s=am(e,[],!1).filter(u=>Bi(u)&&ah(u)!=="body"),i=null;const a=zi(e).position==="fixed";let l=a?Dl(e):e;for(;Bi(l)&&!Uu(l);){const u=zi(l),h=tN(l);!h&&u.position==="fixed"&&(i=null),(a?!h&&!i:!h&&u.position==="static"&&!!i&&AK.has(i.position)||$m(l)&&!h&&BA(e,l))?s=s.filter(g=>g!==l):i=u,l=Dl(l)}return t.set(e,s),s}function OK(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const l=[...n==="clippingAncestors"?Sx(t)?[]:RK(t,this._c):[].concat(n),s],u=l[0],h=l.reduce((m,g)=>{const x=cP(t,g,i);return m.top=Pr(x.top,m.top),m.right=Ol(x.right,m.right),m.bottom=Ol(x.bottom,m.bottom),m.left=Pr(x.left,m.left),m},cP(t,u,i));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function DK(e){const{width:t,height:n}=IA(e);return{width:t,height:n}}function IK(e,t,n){const s=Sa(t),i=Pa(t),a=n==="fixed",l=Qc(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const h=ba(0);function m(){h.x=Cx(i)}if(s||!s&&!a)if((ah(t)!=="body"||$m(i))&&(u=kx(t)),s){const _=Qc(t,!0,a,t);h.x=_.x+t.clientLeft,h.y=_.y+t.clientTop}else i&&m();a&&!s&&i&&m();const g=i&&!s&&!a?FA(i,u):ba(0),x=l.left+u.scrollLeft-h.x-g.x,v=l.top+u.scrollTop-h.y-g.y;return{x,y:v,width:l.width,height:l.height}}function Nb(e){return zi(e).position==="static"}function dP(e,t){if(!Sa(e)||zi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pa(e)===n&&(n=n.ownerDocument.body),n}function zA(e,t){const n=Er(e);if(Sx(e))return n;if(!Sa(e)){let i=Dl(e);for(;i&&!Uu(i);){if(Bi(i)&&!Nb(i))return i;i=Dl(i)}return n}let s=dP(e,t);for(;s&&vK(s)&&Nb(s);)s=dP(s,t);return s&&Uu(s)&&Nb(s)&&!tN(s)?n:s||NK(e)||n}const LK=async function(e){const t=this.getOffsetParent||zA,n=this.getDimensions,s=await n(e.floating);return{reference:IK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function FK(e){return zi(e).direction==="rtl"}const BK={convertOffsetParentRelativeRectToViewportRelativeRect:CK,getDocumentElement:Pa,getClippingRect:OK,getOffsetParent:zA,getElementRects:LK,getClientRects:PK,getDimensions:DK,getScale:xu,isElement:Bi,isRTL:FK};function $A(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zK(e,t){let n=null,s;const i=Pa(e);function a(){var u;clearTimeout(s),(u=n)==null||u.disconnect(),n=null}function l(u,h){u===void 0&&(u=!1),h===void 0&&(h=1),a();const m=e.getBoundingClientRect(),{left:g,top:x,width:v,height:_}=m;if(u||t(),!v||!_)return;const N=Sg(x),S=Sg(i.clientWidth-(g+v)),j=Sg(i.clientHeight-(x+_)),P=Sg(g),R={rootMargin:-N+"px "+-S+"px "+-j+"px "+-P+"px",threshold:Pr(0,Ol(1,h))||1};let A=!0;function B(I){const z=I[0].intersectionRatio;if(z!==h){if(!A)return l();z?l(!1,z):s=setTimeout(()=>{l(!1,1e-7)},1e3)}z===1&&!$A(m,e.getBoundingClientRect())&&l(),A=!1}try{n=new IntersectionObserver(B,{...R,root:i.ownerDocument})}catch{n=new IntersectionObserver(B,R)}n.observe(e)}return l(!0),a}function $K(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,m=sN(e),g=i||a?[...m?am(m):[],...am(t)]:[];g.forEach(P=>{i&&P.addEventListener("scroll",n,{passive:!0}),a&&P.addEventListener("resize",n)});const x=m&&u?zK(m,n):null;let v=-1,_=null;l&&(_=new ResizeObserver(P=>{let[E]=P;E&&E.target===m&&_&&(_.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var R;(R=_)==null||R.observe(t)})),n()}),m&&!h&&_.observe(m),_.observe(t));let N,S=h?Qc(e):null;h&&j();function j(){const P=Qc(e);S&&!$A(S,P)&&n(),S=P,N=requestAnimationFrame(j)}return n(),()=>{var P;g.forEach(E=>{i&&E.removeEventListener("scroll",n),a&&E.removeEventListener("resize",n)}),x==null||x(),(P=_)==null||P.disconnect(),_=null,h&&cancelAnimationFrame(N)}}const UK=hK,VK=fK,WK=cK,HK=pK,qK=dK,uP=lK,GK=mK,YK=(e,t,n)=>{const s=new Map,i={platform:BK,...n},a={...i.platform,_c:s};return oK(e,t,{...i,platform:a})};var KK=typeof document<"u",ZK=function(){},s0=KK?w.useLayoutEffect:ZK;function M0(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!M0(e[s],t[s]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){const a=i[s];if(!(a==="_owner"&&e.$$typeof)&&!M0(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function UA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hP(e,t){const n=UA(e);return Math.round(t*n)/n}function jb(e){const t=w.useRef(e);return s0(()=>{t.current=e}),t}function QK(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:i,elements:{reference:a,floating:l}={},transform:u=!0,whileElementsMounted:h,open:m}=e,[g,x]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,_]=w.useState(s);M0(v,s)||_(s);const[N,S]=w.useState(null),[j,P]=w.useState(null),E=w.useCallback(W=>{W!==I.current&&(I.current=W,S(W))},[]),R=w.useCallback(W=>{W!==z.current&&(z.current=W,P(W))},[]),A=a||N,B=l||j,I=w.useRef(null),z=w.useRef(null),V=w.useRef(g),te=h!=null,H=jb(h),Y=jb(i),ce=jb(m),K=w.useCallback(()=>{if(!I.current||!z.current)return;const W={placement:t,strategy:n,middleware:v};Y.current&&(W.platform=Y.current),YK(I.current,z.current,W).then(Z=>{const D={...Z,isPositioned:ce.current!==!1};q.current&&!M0(V.current,D)&&(V.current=D,zl.flushSync(()=>{x(D)}))})},[v,t,n,Y,ce]);s0(()=>{m===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,x(W=>({...W,isPositioned:!1})))},[m]);const q=w.useRef(!1);s0(()=>(q.current=!0,()=>{q.current=!1}),[]),s0(()=>{if(A&&(I.current=A),B&&(z.current=B),A&&B){if(H.current)return H.current(A,B,K);K()}},[A,B,K,H,te]);const ge=w.useMemo(()=>({reference:I,floating:z,setReference:E,setFloating:R}),[E,R]),he=w.useMemo(()=>({reference:A,floating:B}),[A,B]),be=w.useMemo(()=>{const W={position:n,left:0,top:0};if(!he.floating)return W;const Z=hP(he.floating,g.x),D=hP(he.floating,g.y);return u?{...W,transform:"translate("+Z+"px, "+D+"px)",...UA(he.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Z,top:D}},[n,u,he.floating,g.x,g.y]);return w.useMemo(()=>({...g,update:K,refs:ge,elements:he,floatingStyles:be}),[g,K,ge,he,be])}const XK=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:i}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?uP({element:s.current,padding:i}).fn(n):{}:s?uP({element:s,padding:i}).fn(n):{}}}},JK=(e,t)=>({...UK(e),options:[e,t]}),eZ=(e,t)=>({...VK(e),options:[e,t]}),tZ=(e,t)=>({...GK(e),options:[e,t]}),nZ=(e,t)=>({...WK(e),options:[e,t]}),sZ=(e,t)=>({...HK(e),options:[e,t]}),rZ=(e,t)=>({...qK(e),options:[e,t]}),iZ=(e,t)=>({...XK(e),options:[e,t]});var aZ="Arrow",VA=w.forwardRef((e,t)=>{const{children:n,width:s=10,height:i=5,...a}=e;return r.jsx(Pt.svg,{...a,ref:t,width:s,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:r.jsx("polygon",{points:"0,0 30,0 15,10"})})});VA.displayName=aZ;var oZ=VA;function WA(e){const[t,n]=w.useState(void 0);return Fs(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let l,u;if("borderBoxSize"in a){const h=a.borderBoxSize,m=Array.isArray(h)?h[0]:h;l=m.inlineSize,u=m.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var rN="Popper",[HA,oh]=No(rN),[lZ,qA]=HA(rN),GA=e=>{const{__scopePopper:t,children:n}=e,[s,i]=w.useState(null);return r.jsx(lZ,{scope:t,anchor:s,onAnchorChange:i,children:n})};GA.displayName=rN;var YA="PopperAnchor",KA=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...i}=e,a=qA(YA,n),l=w.useRef(null),u=qt(t,l),h=w.useRef(null);return w.useEffect(()=>{const m=h.current;h.current=(s==null?void 0:s.current)||l.current,m!==h.current&&a.onAnchorChange(h.current)}),s?null:r.jsx(Pt.div,{...i,ref:u})});KA.displayName=YA;var iN="PopperContent",[cZ,dZ]=HA(iN),ZA=w.forwardRef((e,t)=>{var oe,Q,Ne,Ce,De,Te;const{__scopePopper:n,side:s="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:x="partial",hideWhenDetached:v=!1,updatePositionStrategy:_="optimized",onPlaced:N,...S}=e,j=qA(iN,n),[P,E]=w.useState(null),R=qt(t,We=>E(We)),[A,B]=w.useState(null),I=WA(A),z=(I==null?void 0:I.width)??0,V=(I==null?void 0:I.height)??0,te=s+(a!=="center"?"-"+a:""),H=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},Y=Array.isArray(m)?m:[m],ce=Y.length>0,K={padding:H,boundary:Y.filter(hZ),altBoundary:ce},{refs:q,floatingStyles:ge,placement:he,isPositioned:be,middlewareData:W}=QK({strategy:"fixed",placement:te,whileElementsMounted:(...We)=>$K(...We,{animationFrame:_==="always"}),elements:{reference:j.anchor},middleware:[JK({mainAxis:i+V,alignmentAxis:l}),h&&eZ({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?tZ():void 0,...K}),h&&nZ({...K}),sZ({...K,apply:({elements:We,rects:$e,availableWidth:Et,availableHeight:Xt})=>{const{width:Zt,height:Pn}=$e.reference,In=We.floating.style;In.setProperty("--radix-popper-available-width",`${Et}px`),In.setProperty("--radix-popper-available-height",`${Xt}px`),In.setProperty("--radix-popper-anchor-width",`${Zt}px`),In.setProperty("--radix-popper-anchor-height",`${Pn}px`)}}),A&&iZ({element:A,padding:u}),fZ({arrowWidth:z,arrowHeight:V}),v&&rZ({strategy:"referenceHidden",...K})]}),[Z,D]=JA(he),O=ja(N);Fs(()=>{be&&(O==null||O())},[be,O]);const U=(oe=W.arrow)==null?void 0:oe.x,ie=(Q=W.arrow)==null?void 0:Q.y,le=((Ne=W.arrow)==null?void 0:Ne.centerOffset)!==0,[fe,me]=w.useState();return Fs(()=>{P&&me(window.getComputedStyle(P).zIndex)},[P]),r.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...ge,transform:be?ge.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(Ce=W.transformOrigin)==null?void 0:Ce.x,(De=W.transformOrigin)==null?void 0:De.y].join(" "),...((Te=W.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:r.jsx(cZ,{scope:n,placedSide:Z,onArrowChange:B,arrowX:U,arrowY:ie,shouldHideArrow:le,children:r.jsx(Pt.div,{"data-side":Z,"data-align":D,...S,ref:R,style:{...S.style,animation:be?void 0:"none"}})})})});ZA.displayName=iN;var QA="PopperArrow",uZ={top:"bottom",right:"left",bottom:"top",left:"r
680ight"},XA=w.forwardRef(function(t,n){const{__scopePopper:s,...i}=t,a=dZ(QA,s),l=uZ[a.placedSide];return r.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:r.jsx(oZ,{...i,ref:n,style:{...i.style,display:"block"}})})});XA.displayName=QA;function hZ(e){return e!==null}var fZ=e=>({name:"transformOrigin",options:e,fn(t){var j,P,E;const{placement:n,rects:s,middlewareData:i}=t,l=((j=i.arrow)==null?void 0:j.centerOffset)!==0,u=l?0:e.arrowWidth,h=l?0:e.arrowHeight,[m,g]=JA(n),x={start:"0%",center:"50%",end:"100%"}[g],v=(((P=i.arrow)==null?void 0:P.x)??0)+u/2,_=(((E=i.arrow)==null?void 0:E.y)??0)+h/2;let N="",S="";return m==="bottom"?(N=l?x:`${v}px`,S=`${-h}px`):m==="top"?(N=l?x:`${v}px`,S=`${s.floating.height+h}px`):m==="right"?(N=`${-h}px`,S=l?x:`${_}px`):m==="left"&&(N=`${s.floating.width+h}px`,S=l?x:`${_}px`),{data:{x:N,y:S}}}});function JA(e){const[t,n="center"]=e.split("-");return[t,n]}var aN=GA,Px=KA,oN=ZA,lN=XA,mZ="Portal",Um=w.forwardRef((e,t)=>{var u;const{container:n,...s}=e,[i,a]=w.useState(!1);Fs(()=>a(!0),[]);const l=n||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?oA.createPortal(r.jsx(Pt.div,{...s,ref:t}),l):null});Um.displayName=mZ;function pZ(e,t){return w.useReducer((n,s)=>t[n][s]??n,e)}var Ta=e=>{const{present:t,children:n}=e,s=gZ(t),i=typeof n=="function"?n({present:s.isPresent}):w.Children.only(n),a=qt(s.ref,xZ(i));return typeof n=="function"||s.isPresent?w.cloneElement(i,{ref:a}):null};Ta.displayName="Presence";function gZ(e){const[t,n]=w.useState(),s=w.useRef(null),i=w.useRef(e),a=w.useRef("none"),l=e?"mounted":"unmounted",[u,h]=pZ(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const m=kg(s.current);a.current=u==="mounted"?m:"none"},[u]),Fs(()=>{const m=s.current,g=i.current;if(g!==e){const v=a.current,_=kg(m);e?h("MOUNT"):_==="none"||(m==null?void 0:m.display)==="none"?h("UNMOUNT"):h(g&&v!==_?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,h]),Fs(()=>{if(t){let m;const g=t.ownerDocument.defaultView??window,x=_=>{const S=kg(s.current).includes(CSS.escape(_.animationName));if(_.target===t&&S&&(h("ANIMATION_END"),!i.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",m=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},v=_=>{_.target===t&&(a.current=kg(s.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{g.clearTimeout(m),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:w.useCallback(m=>{s.current=m?getComputedStyle(m):null,n(m)},[])}}function kg(e){return(e==null?void 0:e.animationName)||"none"}function xZ(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sb="rovingFocusGroup.onEntryFocus",vZ={bubbles:!1,cancelable:!0},Vm="RovingFocusGroup",[d1,eM,yZ]=Z_(Vm),[bZ,tM]=No(Vm,[yZ]),[wZ,_Z]=bZ(Vm),nM=w.forwardRef((e,t)=>r.jsx(d1.Provider,{scope:e.__scopeRovingFocusGroup,children:r.jsx(d1.Slot,{scope:e.__scopeRovingFocusGroup,children:r.jsx(NZ,{...e,ref:t})})}));nM.displayName=Vm;var NZ=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:s,loop:i=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:h,onEntryFocus:m,preventScrollOnEntryFocus:g=!1,...x}=e,v=w.useRef(null),_=qt(t,v),N=Q_(a),[S,j]=Zc({prop:l,defaultProp:u??null,onChange:h,caller:Vm}),[P,E]=w.useState(!1),R=ja(m),A=eM(n),B=w.useRef(!1),[I,z]=w.useState(0);return w.useEffect(()=>{const V=v.current;if(V)return V.addEventListener(Sb,R),()=>V.removeEventListener(Sb,R)},[R]),r.jsx(wZ,{scope:n,orientation:s,dir:N,loop:i,currentTabStopId:S,onItemFocus:w.useCallback(V=>j(V),[j]),onItemShiftTab:w.useCallback(()=>E(!0),[]),onFocusableItemAdd:w.useCallback(()=>z(V=>V+1),[]),onFocusableItemRemove:w.useCallback(()=>z(V=>V-1),[]),children:r.jsx(Pt.div,{tabIndex:P||I===0?-1:0,"data-orientation":s,...x,ref:_,style:{outline:"none",...e.style},onMouseDown:Ke(e.onMouseDown,()=>
vendor: 4,173 bytes, line 680
680{B.current=!0}),onFocus:Ke(e.onFocus,V=>{const te=!B.current;if(V.target===V.currentTarget&&te&&!P){const H=new CustomEvent(Sb,vZ);if(V.currentTarget.dispatchEvent(H),!H.defaultPrevented){const Y=A().filter(he=>he.focusable),ce=Y.find(he=>he.active),K=Y.find(he=>he.id===S),ge=[ce,K,...Y].filter(Boolean).map(he=>he.ref.current);iM(ge,g)}}B.current=!1}),onBlur:Ke(e.onBlur,()=>E(!1))})})}),sM="RovingFocusGroupItem",rM=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:s=!0,active:i=!1,tabStopId:a,children:l,...u}=e,h=ya(),m=a||h,g=_Z(sM,n),x=g.currentTabStopId===m,v=eM(n),{onFocusableItemAdd:_,onFocusableItemRemove:N,currentTabStopId:S}=g;return w.useEffect(()=>{if(s)return _(),()=>N()},[s,_,N]),r.jsx(d1.ItemSlot,{scope:n,id:m,focusable:s,active:i,children:r.jsx(Pt.span,{tabIndex:x?0:-1,"data-orientation":g.orientation,...u,ref:t,onMouseDown:Ke(e.onMouseDown,j=>{s?g.onItemFocus(m):j.preventDefault()}),onFocus:Ke(e.onFocus,()=>g.onItemFocus(m)),onKeyDown:Ke(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){g.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const P=kZ(j,g.orientation,g.dir);if(P!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let R=v().filter(A=>A.focusable).map(A=>A.ref.current);if(P==="last")R.reverse();else if(P==="prev"||P==="next"){P==="prev"&&R.reverse();const A=R.indexOf(j.currentTarget);R=g.loop?CZ(R,A+1):R.slice(A+1)}setTimeout(()=>iM(R))}}),children:typeof l=="function"?l({isCurrentTabStop:x,hasTabStop:S!=null}):l})})});rM.displayName=sM;var jZ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function SZ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kZ(e,t,n){const s=SZ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return jZ[s]}function iM(e,t=!1){const n=document.activeElement;for(const s of e)if(s===n||(s.focus({preventScroll:t}),document.activeElement!==n))return}function CZ(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var PZ=nM,TZ=rM;function EZ(e){const t=AZ(e),n=w.forwardRef((s,i)=>{const{children:a,...l}=s,u=w.Children.toArray(a),h=u.find(RZ);if(h){const m=h.props.children,g=u.map(x=>x===h?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:x);return r.jsx(t,{...l,ref:i,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return r.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function AZ(e){const t=w.forwardRef((n,s)=>{const{children:i,...a}=n;if(w.isValidElement(i)){const l=DZ(i),u=OZ(a,i.props);return i.type!==w.Fragment&&(u.ref=s?Ca(s,l):l),w.cloneElement(i,u)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var MZ=Symbol("radix.slottable");function RZ(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MZ}function OZ(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...u)=>{const h=a(...u);return i(...u),h}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function DZ(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var IZ=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},eu=new WeakMap,Cg=new WeakMap,Pg={},kb=0,aM=function(e){return e&&(e.host||aM(e.parentNode))},LZ=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=aM(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},FZ=function(e,t,n,s){var i=LZ(t,Array.isArray(e)?e:[e]);Pg[n]||(Pg[n]=new WeakMap);var a=Pg[n],l=[],u=new Set,h=new Set(i),m=function(x){!x||u.has(x)||(u.add(x),m(x.parentNode))};
vendor: 6,470 bytes, lines 680-695
680i.forEach(m);var g=function(x){!x||h.has(x)||Array.prototype.forEach.call(x.children,function(v){if(u.has(v))g(v);else try{var _=v.getAttribute(s),N=_!==null&&_!=="false",S=(eu.get(v)||0)+1,j=(a.get(v)||0)+1;eu.set(v,S),a.set(v,j),l.push(v),S===1&&N&&Cg.set(v,!0),j===1&&v.setAttribute(n,"true"),N||v.setAttribute(s,"true")}catch(P){console.error("aria-hidden: cannot operate on ",v,P)}})};return g(t),u.clear(),kb++,function(){l.forEach(function(x){var v=eu.get(x)-1,_=a.get(x)-1;eu.set(x,v),a.set(x,_),v||(Cg.has(x)||x.removeAttribute(s),Cg.delete(x)),_||x.removeAttribute(n)}),kb--,kb||(eu=new WeakMap,eu=new WeakMap,Cg=new WeakMap,Pg={})}},Tx=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=IZ(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),FZ(s,i,n,"aria-hidden")):function(){return null}},ua=function(){return ua=Object.assign||function(t){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ua.apply(this,arguments)};function oM(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]]);return n}function BZ(e,t,n){if(n||arguments.length===2)for(var s=0,i=t.length,a;s<i;s++)(a||!(s in t))&&(a||(a=Array.prototype.slice.call(t,0,s)),a[s]=t[s]);return e.concat(a||Array.prototype.slice.call(t))}var r0="right-scroll-bar-position",i0="width-before-scroll-bar",zZ="with-scroll-bars-hidden",$Z="--removed-body-scroll-bar-size";function Cb(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function UZ(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(s){var i=n.value;i!==s&&(n.value=s,n.callback(s,i))}}}})[0];return n.callback=t,n.facade}var VZ=typeof window<"u"?w.useLayoutEffect:w.useEffect,fP=new WeakMap;function WZ(e,t){var n=UZ(null,function(s){return e.forEach(function(i){return Cb(i,s)})});return VZ(function(){var s=fP.get(n);if(s){var i=new Set(s),a=new Set(e),l=n.current;i.forEach(function(u){a.has(u)||Cb(u,null)}),a.forEach(function(u){i.has(u)||Cb(u,l)})}fP.set(n,e)},[e]),n}function HZ(e){return e}function qZ(e,t){t===void 0&&(t=HZ);var n=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var l=t(a,s);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(a){for(s=!0;n.length;){var l=n;n=[],l.forEach(a)}n={push:function(u){return a(u)},filter:function(){return n}}},assignMedium:function(a){s=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(a),l=n}var h=function(){var g=l;l=[],g.forEach(a)},m=function(){return Promise.resolve().then(h)};m(),n={push:function(g){l.push(g),m()},filter:function(g){return l=l.filter(g),n}}}};return i}function GZ(e){e===void 0&&(e={});var t=qZ(null);return t.options=ua({async:!0,ssr:!1},e),t}var lM=function(e){var t=e.sideCar,n=oM(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return w.createElement(s,ua({},n))};lM.isSideCarExport=!0;function YZ(e,t){return e.useMedium(t),lM}var cM=GZ(),Pb=function(){},Ex=w.forwardRef(function(e,t){var n=w.useRef(null),s=w.useState({onScrollCapture:Pb,onWheelCapture:Pb,onTouchMoveCapture:Pb}),i=s[0],a=s[1],l=e.forwardProps,u=e.children,h=e.className,m=e.removeScrollBar,g=e.enabled,x=e.shards,v=e.sideCar,_=e.noRelative,N=e.noIsolation,S=e.inert,j=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,R=e.gapMode,A=oM(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),B=v,I=WZ([n,t]),z=ua(ua({},A),i);return w.createElement(w.Fragment,null,g&&w.createElement(B,{sideCar:cM,removeScrollBar:m,shards:x,noRelative:_,noIsolation:N,inert:S,setCallbacks:a,allowPinchZoom:!!j,lockRef:n,gapMode:R}),l?w.cloneElement(w.Children.only(u),ua(ua({},z),{ref:I})):w.createElement(E,ua({},z,{className:h,ref:I}),u))});Ex.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ex.classNames={fullWidth:i0,zeroRight:r0};var KZ=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ZZ(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=KZ();return t&&e.setAttribute("nonce",t),e}function QZ(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function XZ(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var JZ=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ZZ())&&(QZ(t,n),XZ(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eQ=function(){var e=JZ();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dM=function(){var e=eQ(),t=function(n){var s=n.styles,i=n.dynamic;return e(s,i),null};return t},tQ={left:0,top:0,right:0,gap:0},Tb=function(e){return parseInt(e||"",10)||0},nQ=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Tb(n),Tb(s),Tb(i)]},sQ=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tQ;var t=nQ(e),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-n+t[2]-t[0])}},rQ=dM(),vu="data-scroll-locked",iQ=function(e,t,n,s){var i=e.left,a=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),` 681 .`.concat(zZ,` { 682 overflow: hidden `).concat(s,`; 683 padding-right: `).concat(u,"px ").concat(s,`; 684 } 685 body[`).concat(vu,`] { 686 overflow: hidden `).concat(s,`; 687 overscroll-behavior: contain; 688 `).concat([t&&"position: relative ".concat(s,";"),n==="margin"&&` 689 padding-left: `.concat(i,`px; 690 padding-top: `).concat(a,`px; 691 padding-right: `).concat(l,`px; 692 margin-left:0; 693 margin-top:0; 694 margin-right: `).concat(u,"px ").concat(s,`; 695 `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(s,";
695")].filter(Boolean).join(""),` 696 } 697 698 .`).concat(r0,` { 699 right: `).concat(u,"px ").concat(s,`; 700 } 701 702 .`).concat(i0,` { 703 margin-right: `).concat(u,"px ").concat(s,`; 704 } 705 706 .`).concat(r0," .").concat(r0,` { 707 right: 0 `).concat(s,`; 708 } 709 710 .`).concat(i0," .").concat(i0,` { 711 margin-right: 0 `).concat(s,`; 712 } 713 714 body[`).concat(vu,`] { 715 `).concat($Z,": ").concat(u,`px; 716 } 717`)},mP=function(){var e=parseInt(document.body.getAttribute(vu)||"0",10);return isFinite(e)?e:0},aQ=function(){w.useEffect(function(){return document.body.setAttribute(vu,(mP()+1).toString()),function(){var e=mP()-1;e<=0?document.body.removeAttribute(vu):document.body.setAttribute(vu,e.toString())}},[])},oQ=function(e){var t=e.noRelative,n=e.noImportant,s=e.gapMode,i=s===void 0?"margin":s;aQ();var a=w.useMemo(function(){return sQ(i)},[i]);return w.createElement(rQ,{styles:iQ(a,!t,i,n?"":"!important")})},u1=!1;if(typeof window<"u")try{var Tg=Object.defineProperty({},"passive",{get:function(){return u1=!0,!0}});window.addEventListener("test",Tg,Tg),window.removeEventListener("test",Tg,Tg)}catch{u1=!1}var tu=u1?{passive:!1}:!1,lQ=function(e){return e.tagName==="TEXTAREA"},uM=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lQ(e)&&n[t]==="visible")},cQ=function(e){return uM(e,"overflowY")},dQ=function(e){return uM(e,"overflowX")},pP=function(e,t){var n=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=hM(e,s);if(i){var a=fM(e,s),l=a[1],u=a[2];if(l>u)return!0}s=s.parentNode}while(s&&s!==n.body);return!1},uQ=function(e){var t=e.scrollTop,n=e.scrollHeight,s=e.clientHeight;return[t,n,s]},hQ=function(e){var t=e.scrollLeft,n=e.scrollWidth,s=e.clientWidth;return[t,n,s]},hM=function(e,t){return e==="v"?cQ(t):dQ(t)},fM=function(e,t){return e==="v"?uQ(t):hQ(t)},fQ=function(e,t){return e==="h"&&t==="rtl"?-1:1},mQ=function(e,t,n,s,i){var a=fQ(e,window.getComputedStyle(t).direction),l=a*s,u=n.target,h=t.contains(u),m=!1,g=l>0,x=0,v=0;do{if(!u)break;var _=fM(e,u),N=_[0],S=_[1],j=_[2],P=S-j-a*N;(N||P)&&hM(e,u)&&(x+=P,v+=N);var E=u.parentNode;u=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!h&&u!==document.body||h&&(t.contains(u)||t===u));return(g&&Math.abs(x)<1||!g&&Math.abs(v)<1)&&(m=!0),m},Eg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gP=function(e){return[e.deltaX,e.deltaY]},xP=function(e){return e&&"current"in e?e.current:e},pQ=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gQ=function(e){return` 718 .block-interactivity-`.concat(e,` {pointer-events: none;} 719 .allow-interactivity-`).concat(e,` {pointer-events: all;} 720`)},xQ=0,nu=[];function vQ(e){var t=w.useRef([]),n=w.useRef([0,0]),s=w.useRef(),i=w.useState(xQ++)[0],a=w.useState(dM)[0],l=w.useRef(e);w.useEffect(function(){l.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=BZ([e.lockRef.current],(e.shards||[]).map(xP),!0).filter(Boolean);return S.forEach(function(j){return j.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=w.useCallback(function(S,j){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var P=Eg(S),E=n.current,R="deltaX"in S?S.deltaX:E[0]-P[0],A="deltaY"in S?S.deltaY:E[1]-P[1],B,I=S.target,z=Math.abs(R)>Math.abs(A)?"h":"v";if("touches"in S&&z==="h"&&I.type==="range")return!1;var V=window.getSelection(),te=V&&V.anchorNode,H=te?te===I||te.contains(I):!1;if(H)return!1;var Y=pP(z,I);if(!Y)return!0;if(Y?B=z:(B=z==="v"?"h":"v",Y=pP(z,I)),!Y)return!1;if(!s.current&&"changedTouches"in S&&(R||A)&&(s.current=B),!B)return!0;var ce=s.current||B;return mQ(ce,j,S,ce==="h"?R:A)},[]),h=w.useCallback(function(S){var j=S;if(!(!nu.length||nu[nu.length-1]!==a)){var P="deltaY"in j?gP(j):Eg(j),E=t.current.filter(function(B){return B.name===j.type&&(B.target===j.target||j.target===B.shadowParent)&&pQ(B.delta,P)})[0];if(E&&E.should){j.cancelable&&j.preventDefault();return}
vendor: 4,532 bytes, line 720
720if(!E){var R=(l.current.shards||[]).map(xP).filter(Boolean).filter(function(B){return B.contains(j.target)}),A=R.length>0?u(j,R[0]):!l.current.noIsolation;A&&j.cancelable&&j.preventDefault()}}},[]),m=w.useCallback(function(S,j,P,E){var R={name:S,delta:j,target:P,should:E,shadowParent:yQ(P)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(A){return A!==R})},1)},[]),g=w.useCallback(function(S){n.current=Eg(S),s.current=void 0},[]),x=w.useCallback(function(S){m(S.type,gP(S),S.target,u(S,e.lockRef.current))},[]),v=w.useCallback(function(S){m(S.type,Eg(S),S.target,u(S,e.lockRef.current))},[]);w.useEffect(function(){return nu.push(a),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:v}),document.addEventListener("wheel",h,tu),document.addEventListener("touchmove",h,tu),document.addEventListener("touchstart",g,tu),function(){nu=nu.filter(function(S){return S!==a}),document.removeEventListener("wheel",h,tu),document.removeEventListener("touchmove",h,tu),document.removeEventListener("touchstart",g,tu)}},[]);var _=e.removeScrollBar,N=e.inert;return w.createElement(w.Fragment,null,N?w.createElement(a,{styles:gQ(i)}):null,_?w.createElement(oQ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function yQ(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bQ=YZ(cM,vQ);var Wm=w.forwardRef(function(e,t){return w.createElement(Ex,ua({},e,{ref:t,sideCar:bQ}))});Wm.classNames=Ex.classNames;var h1=["Enter"," "],wQ=["ArrowDown","PageUp","Home"],mM=["ArrowUp","PageDown","End"],_Q=[...wQ,...mM],NQ={ltr:[...h1,"ArrowRight"],rtl:[...h1,"ArrowLeft"]},jQ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Hm="Menu",[om,SQ,kQ]=Z_(Hm),[cd,pM]=No(Hm,[kQ,oh,tM]),Ax=oh(),gM=tM(),[CQ,dd]=cd(Hm),[PQ,qm]=cd(Hm),xM=e=>{const{__scopeMenu:t,open:n=!1,children:s,dir:i,onOpenChange:a,modal:l=!0}=e,u=Ax(t),[h,m]=w.useState(null),g=w.useRef(!1),x=ja(a),v=Q_(i);return w.useEffect(()=>{const _=()=>{g.current=!0,document.addEventListener("pointerdown",N,{capture:!0,once:!0}),document.addEventListener("pointermove",N,{capture:!0,once:!0})},N=()=>g.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",N,{capture:!0}),document.removeEventListener("pointermove",N,{capture:!0})}},[]),r.jsx(aN,{...u,children:r.jsx(CQ,{scope:t,open:n,onOpenChange:x,content:h,onContentChange:m,children:r.jsx(PQ,{scope:t,onClose:w.useCallback(()=>x(!1),[x]),isUsingKeyboardRef:g,dir:v,modal:l,children:s})})})};xM.displayName=Hm;var TQ="MenuAnchor",cN=w.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e,i=Ax(n);return r.jsx(Px,{...i,...s,ref:t})});cN.displayName=TQ;var dN="MenuPortal",[EQ,vM]=cd(dN,{forceMount:void 0}),yM=e=>{const{__scopeMenu:t,forceMount:n,children:s,container:i}=e,a=dd(dN,t);return r.jsx(EQ,{scope:t,forceMount:n,children:r.jsx(Ta,{present:n||a.open,children:r.jsx(Um,{asChild:!0,container:i,children:s})})})};yM.displayName=dN;var oi="MenuContent",[AQ,uN]=cd(oi),bM=w.forwardRef((e,t)=>{const n=vM(oi,e.__scopeMenu),{forceMount:s=n.forceMount,...i}=e,a=dd(oi,e.__scopeMenu),l=qm(oi,e.__scopeMenu);return r.jsx(om.Provider,{scope:e.__scopeMenu,children:r.jsx(Ta,{present:s||a.open,children:r.jsx(om.Slot,{scope:e.__scopeMenu,children:l.modal?r.jsx(MQ,{...i,ref:t}):r.jsx(RQ,{...i,ref:t})})})})}),MQ=w.forwardRef((e,t)=>{const n=dd(oi,e.__scopeMenu),s=w.useRef(null),i=qt(t,s);return w.useEffect(()=>{const a=s.current;if(a)return Tx(a)},[]),r.jsx(hN,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ke(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),RQ=w.forwardRef((e,t)=>{const n=dd(oi,e.__scopeMenu);return r.jsx(hN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),OQ=EZ("MenuContent.ScrollLock"),hN=w.forwardRef((e,t)=>{const{__scopeMenu:n,loop:s=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:h,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:x,onInteractOutside:v,onDismiss:_,disableOutsideScroll:N,...S}=e,j=dd(oi,n),P=qm(oi,n),E=Ax(n),R=gM(n),A=SQ(n),[B,I]=w.useState(null),z=w.useRef(null),V=qt(t,z,j.onContentChange),te=w.useRef(0),H=w.useRef(""),Y=w.useRef(0),ce=w.useRef(null),K=w.useRef("right"),q=w.useRef(0),ge=N?Wm:w.Fragment,he=N?{as:OQ,allowPinchZoom:!0}:void 0,be=Z=>{var oe,Q;
vendor: 14,985 bytes, line 720
720const D=H.current+Z,O=A().filter(Ne=>!Ne.disabled),U=document.activeElement,ie=(oe=O.find(Ne=>Ne.ref.current===U))==null?void 0:oe.textValue,le=O.map(Ne=>Ne.textValue),fe=qQ(le,D,ie),me=(Q=O.find(Ne=>Ne.textValue===fe))==null?void 0:Q.ref.current;(function Ne(Ce){H.current=Ce,window.clearTimeout(te.current),Ce!==""&&(te.current=window.setTimeout(()=>Ne(""),1e3))})(D),me&&setTimeout(()=>me.focus())};w.useEffect(()=>()=>window.clearTimeout(te.current),[]),Nx();const W=w.useCallback(Z=>{var O,U;return K.current===((O=ce.current)==null?void 0:O.side)&&YQ(Z,(U=ce.current)==null?void 0:U.area)},[]);return r.jsx(AQ,{scope:n,searchRef:H,onItemEnter:w.useCallback(Z=>{W(Z)&&Z.preventDefault()},[W]),onItemLeave:w.useCallback(Z=>{var D;W(Z)||((D=z.current)==null||D.focus(),I(null))},[W]),onTriggerLeave:w.useCallback(Z=>{W(Z)&&Z.preventDefault()},[W]),pointerGraceTimerRef:Y,onPointerGraceIntentChange:w.useCallback(Z=>{ce.current=Z},[]),children:r.jsx(ge,{...he,children:r.jsx(zm,{asChild:!0,trapped:i,onMountAutoFocus:Ke(a,Z=>{var D;Z.preventDefault(),(D=z.current)==null||D.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:r.jsx(Bm,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:x,onInteractOutside:v,onDismiss:_,children:r.jsx(PZ,{asChild:!0,...R,dir:P.dir,orientation:"vertical",loop:s,currentTabStopId:B,onCurrentTabStopIdChange:I,onEntryFocus:Ke(h,Z=>{P.isUsingKeyboardRef.current||Z.preventDefault()}),preventScrollOnEntryFocus:!0,children:r.jsx(oN,{role:"menu","aria-orientation":"vertical","data-state":IM(j.open),"data-radix-menu-content":"",dir:P.dir,...E,...S,ref:V,style:{outline:"none",...S.style},onKeyDown:Ke(S.onKeyDown,Z=>{const O=Z.target.closest("[data-radix-menu-content]")===Z.currentTarget,U=Z.ctrlKey||Z.altKey||Z.metaKey,ie=Z.key.length===1;O&&(Z.key==="Tab"&&Z.preventDefault(),!U&&ie&&be(Z.key));const le=z.current;if(Z.target!==le||!_Q.includes(Z.key))return;Z.preventDefault();const me=A().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);mM.includes(Z.key)&&me.reverse(),WQ(me)}),onBlur:Ke(e.onBlur,Z=>{Z.currentTarget.contains(Z.target)||(window.clearTimeout(te.current),H.current="")}),onPointerMove:Ke(e.onPointerMove,lm(Z=>{const D=Z.target,O=q.current!==Z.clientX;if(Z.currentTarget.contains(D)&&O){const U=Z.clientX>q.current?"right":"left";K.current=U,q.current=Z.clientX}}))})})})})})})});bM.displayName=oi;var DQ="MenuGroup",fN=w.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e;return r.jsx(Pt.div,{role:"group",...s,ref:t})});fN.displayName=DQ;var IQ="MenuLabel",wM=w.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e;return r.jsx(Pt.div,{...s,ref:t})});wM.displayName=IQ;var R0="MenuItem",vP="menu.itemSelect",Mx=w.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:s,...i}=e,a=w.useRef(null),l=qm(R0,e.__scopeMenu),u=uN(R0,e.__scopeMenu),h=qt(t,a),m=w.useRef(!1),g=()=>{const x=a.current;if(!n&&x){const v=new CustomEvent(vP,{bubbles:!0,cancelable:!0});x.addEventListener(vP,_=>s==null?void 0:s(_),{once:!0}),PA(x,v),v.defaultPrevented?m.current=!1:l.onClose()}};return r.jsx(_M,{...i,ref:h,disabled:n,onClick:Ke(e.onClick,g),onPointerDown:x=>{var v;(v=e.onPointerDown)==null||v.call(e,x),m.current=!0},onPointerUp:Ke(e.onPointerUp,x=>{var v;m.current||(v=x.currentTarget)==null||v.click()}),onKeyDown:Ke(e.onKeyDown,x=>{const v=u.searchRef.current!=="";n||v&&x.key===" "||h1.includes(x.key)&&(x.currentTarget.click(),x.preventDefault())})})});Mx.displayName=R0;var _M=w.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:s=!1,textValue:i,...a}=e,l=uN(R0,n),u=gM(n),h=w.useRef(null),m=qt(t,h),[g,x]=w.useState(!1),[v,_]=w.useState("");return w.useEffect(()=>{const N=h.current;N&&_((N.textContent??"").trim())},[a.children]),r.jsx(om.ItemSlot,{scope:n,disabled:s,textValue:i??v,children:r.jsx(TZ,{asChild:!0,...u,focusable:!s,children:r.jsx(Pt.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":s||void 0,"data-disabled":s?"":void 0,...a,ref:m,onPointerMove:Ke(e.onPointerMove,lm(N=>{s?l.onItemLeave(N):(l.onItemEnter(N),N.defaultPrevented||N.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ke(e.onPointerLeave,lm(N=>l.onItemLeave(N))),onFocus:Ke(e.onFocus,()=>x(!0)),onBlur:Ke(e.onBlur,()=>x(!1))})})})}),LQ="MenuCheckboxItem",NM=w.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:s,...i}=e;return r.jsx(PM,{scope:e.__scopeMenu,checked:n,children:r.jsx(Mx,{role:"menuitemcheckbox","aria-checked":O0(n)?"mixed":n,...i,ref:t,"data-state":pN(n),onSelect:Ke(i.onSelect,()=>s==null?void 0:s(O0(n)?!0:!n),{checkForDefaultPrevented:!1})})})});NM.displayName=LQ;var jM="MenuRadioGroup",[FQ,BQ]=cd(jM,{value:void 0,onValueChange:()=>{}}),SM=w.forwardRef((e,t)=>{const{value:n,onValueChange:s,...i}=e,a=ja(s);return r.jsx(FQ,{scope:e.__scopeMenu,value:n,onValueChange:a,children:r.jsx(fN,{...i,ref:t})})});SM.displayName=jM;var kM="MenuRadioItem",CM=w.forwardRef((e,t)=>{const{value:n,...s}=e,i=BQ(kM,e.__scopeMenu),a=n===i.value;return r.jsx(PM,{scope:e.__scopeMenu,checked:a,children:r.jsx(Mx,{role:"menuitemradio","aria-checked":a,...s,ref:t,"data-state":pN(a),onSelect:Ke(s.onSelect,()=>{var l;return(l=i.onValueChange)==null?void 0:l.call(i,n)},{checkForDefaultPrevented:!1})})})});CM.displayName=kM;var mN="MenuItemIndicator",[PM,zQ]=cd(mN,{checked:!1}),TM=w.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:s,...i}=e,a=zQ(mN,n);return r.jsx(Ta,{present:s||O0(a.checked)||a.checked===!0,children:r.jsx(Pt.span,{...i,ref:t,"data-state":pN(a.checked)})})});TM.displayName=mN;var $Q="MenuSeparator",EM=w.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e;return r.jsx(Pt.div,{role:"separator","aria-orientation":"horizontal",...s,ref:t})});EM.displayName=$Q;var UQ="MenuArrow",AM=w.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e,i=Ax(n);return r.jsx(lN,{...i,...s,ref:t})});AM.displayName=UQ;var VQ="MenuSub",[zhe,MM]=cd(VQ),Df="MenuSubTrigger",RM=w.forwardRef((e,t)=>{const n=dd(Df,e.__scopeMenu),s=qm(Df,e.__scopeMenu),i=MM(Df,e.__scopeMenu),a=uN(Df,e.__scopeMenu),l=w.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:h}=a,m={__scopeMenu:e.__scopeMenu},g=w.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return w.useEffect(()=>g,[g]),w.useEffect(()=>{const x=u.current;return()=>{window.clearTimeout(x),h(null)}},[u,h]),r.jsx(cN,{asChild:!0,...m,children:r.jsx(_M,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":IM(n.open),...e,ref:Ca(t,i.onTriggerChange),onClick:x=>{var v;(v=e.onClick)==null||v.call(e,x),!(e.disabled||x.defaultPrevented)&&(x.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ke(e.onPointerMove,lm(x=>{a.onItemEnter(x),!x.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(a.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:Ke(e.onPointerLeave,lm(x=>{var _,N;g();const v=(_=n.content)==null?void 0:_.getBoundingClientRect();if(v){const S=(N=n.content)==null?void 0:N.dataset.side,j=S==="right",P=j?-5:5,E=v[j?"left":"right"],R=v[j?"right":"left"];a.onPointerGraceIntentChange({area:[{x:x.clientX+P,y:x.clientY},{x:E,y:v.top},{x:R,y:v.top},{x:R,y:v.bottom},{x:E,y:v.bottom}],side:S}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(x),x.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Ke(e.onKeyDown,x=>{var _;const v=a.searchRef.current!=="";e.disabled||v&&x.key===" "||NQ[s.dir].includes(x.key)&&(n.onOpenChange(!0),(_=n.content)==null||_.focus(),x.preventDefault())})})})});RM.displayName=Df;var OM="MenuSubContent",DM=w.forwardRef((e,t)=>{const n=vM(oi,e.__scopeMenu),{forceMount:s=n.forceMount,...i}=e,a=dd(oi,e.__scopeMenu),l=qm(oi,e.__scopeMenu),u=MM(OM,e.__scopeMenu),h=w.useRef(null),m=qt(t,h);return r.jsx(om.Provider,{scope:e.__scopeMenu,children:r.jsx(Ta,{present:s||a.open,children:r.jsx(om.Slot,{scope:e.__scopeMenu,children:r.jsx(hN,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:m,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var x;l.isUsingKeyboardRef.current&&((x=h.current)==null||x.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:Ke(e.onFocusOutside,g=>{g.target!==u.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Ke(e.onEscapeKeyDown,g=>{l.onClose(),g.preventDefault()}),onKeyDown:Ke(e.onKeyDown,g=>{var _;const x=g.currentTarget.contains(g.target),v=jQ[l.dir].includes(g.key);x&&v&&(a.onOpenChange(!1),(_=u.trigger)==null||_.focus(),g.preventDefault())})})})})})});DM.displayName=OM;function IM(e){return e?"open":"closed"}function O0(e){return e==="indeterminate"}function pN(e){return O0(e)?"indeterminate":e?"checked":"unchecked"}function WQ(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function HQ(e,t){return e.map((n,s)=>e[(t+s)%e.length])}function qQ(e,t,n){const i=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let l=HQ(e,Math.max(a,0));i.length===1&&(l=l.filter(m=>m!==n));const h=l.find(m=>m.toLowerCase().startsWith(i.toLowerCase()));return h!==n?h:void 0}function GQ(e,t){const{x:n,y:s}=e;let i=!1;for(let a=0,l=t.length-1;a<t.length;l=a++){const u=t[a],h=t[l],m=u.x,g=u.y,x=h.x,v=h.y;g>s!=v>s&&n<(x-m)*(s-g)/(v-g)+m&&(i=!i)}return i}function YQ(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return GQ(n,t)}function lm(e){return t=>t.pointerType==="mouse"?e(t):void 0}var KQ=xM,ZQ=cN,QQ=yM,XQ=bM,JQ=fN,eX=wM,tX=Mx,nX=NM,sX=SM,rX=CM,iX=TM,aX=EM,oX=AM,lX=RM,cX=DM,Rx="DropdownMenu",[dX]=No(Rx,[pM]),er=pM(),[uX,LM]=dX(Rx),FM=e=>{const{__scopeDropdownMenu:t,children:n,dir:s,open:i,defaultOpen:a,onOpenChange:l,modal:u=!0}=e,h=er(t),m=w.useRef(null),[g,x]=Zc({prop:i,defaultProp:a??!1,onChange:l,caller:Rx});return r.jsx(uX,{scope:t,triggerId:ya(),triggerRef:m,contentId:ya(),open:g,onOpenChange:x,onOpenToggle:w.useCallback(()=>x(v=>!v),[x]),modal:u,children:r.jsx(KQ,{...h,open:g,onOpenChange:x,dir:s,modal:u,children:n})})};FM.displayName=Rx;var BM="DropdownMenuTrigger",zM=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:s=!1,...i}=e,a=LM(BM,n),l=er(n);return r.jsx(ZQ,{asChild:!0,...l,children:r.jsx(Pt.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":s?"":void 0,disabled:s,...i,ref:Ca(t,a.triggerRef),onPointerDown:Ke(e.onPointerDown,u=>{!s&&u.button===0&&u.ctrlKey===!1&&(a.onOpenToggle(),a.open||u.preventDefault())}),onKeyDown:Ke(e.onKeyDown,u=>{s||(["Enter"," "].includes(u.key)&&a.onOpenToggle(),u.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});zM.displayName=BM;var hX="DropdownMenuPortal",$M=e=>{const{__scopeDropdownMenu:t,...n}=e,s=er(t);return r.jsx(QQ,{...s,...n})};$M.displayName=hX;var UM="DropdownMenuContent",VM=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=LM(UM,n),a=er(n),l=w.useRef(!1);return r.jsx(XQ,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...s,ref:t,onCloseAutoFocus:Ke(e.onCloseAutoFocus,u=>{var h;l.current||(h=i.triggerRef.current)==null||h.focus(),l.current=!1,u.preventDefault()}),onInteractOutside:Ke(e.onInteractOutside,u=>{const h=u.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0,g=h.button===2||m;(!i.modal||g)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});VM.displayName=UM;var fX="DropdownMenuGroup",mX=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=er(n);return r.jsx(JQ,{...i,...s,ref:t})});mX.displayName=fX;var pX="DropdownMenuLabel",WM=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=er(n);return r.jsx(eX,{...i,...s,ref:t})});WM.displayName=pX;var gX="DropdownMenuItem",HM=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=er(n);return r.jsx(tX,{...i,...s,ref:t})});HM.displayName=gX;var xX="DropdownMenuCheckboxItem",qM=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=er(n);return r.jsx(nX,{...i,...s,ref:t})});qM.displayName=xX;var vX="DropdownMenuRadioGroup",yX=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=er(n);return r.jsx(sX,{...i,...s,ref:t})});yX.displayName=vX;var bX="DropdownMenuRadioItem",GM=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=er(n);return r.jsx(rX,{...i,...s,ref:t})});GM.displayName=bX;var wX="DropdownMenuItemIndicator",YM=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=er(n);return r.jsx(iX,{...i,...s,ref:t})});YM.displayName=wX;var _X="DropdownMenuSeparator",KM=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=er(n);return r.jsx(aX,{...i,...s,ref:t})});KM.displayName=_X;var NX="DropdownMenuArrow",jX=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=er(n);return r.jsx(oX,{...i,...s,ref:t})});jX.displayName=NX;var SX="DropdownMenuSubTrigger",ZM=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=er(n);return r.jsx(lX,{...i,...s,ref:t})});ZM.displayName=SX;var kX="DropdownMenuSubContent",QM=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,i=er(n);return r.jsx(cX,{...i,...s,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});QM.displayName=kX;var CX=FM,PX=zM,TX=$M,XM=VM,JM=WM,eR=HM,tR=qM,nR=GM,sR=YM,rR=KM,iR=ZM,aR=QM;const mu=CX,pu=PX,EX=w.forwardRef(({className:e,inset:t,children:n,...s},i)=>r.jsxs(iR,{ref:i,className:Ct("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...s,children:[n,r.jsx(uo,{className:"ml-auto"})]}));EX.displayName=iR.displayName;const AX=w.forwardRef(({className:e,...t},n)=>r.jsx(aR,{ref:n,className:Ct("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
720de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));AX.displayName=aR.displayName;const Ec=w.forwardRef(({className:e,sideOffset:t=4,...n},s)=>r.jsx(TX,{children:r.jsx(XM,{ref:s,sideOffset:t,className:Ct("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Ec.displayName=XM.displayName;const ln=w.forwardRef(({className:e,inset:t,...n},s)=>r.jsx(eR,{ref:s,className:Ct("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));ln.displayName=eR.displayName;const MX=w.forwardRef(({className:e,children:t,checked:n,...s},i)=>r.jsxs(tR,{ref:i,className:Ct("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...s,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(sR,{children:r.jsx(Cm,{className:"h-4 w-4"})})}),t]}));MX.displayName=tR.displayName;const RX=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(nR,{ref:s,className:Ct("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(sR,{children:r.jsx(FL,{className:"h-2 w-2 fill-current"})})}),t]}));RX.displayName=nR.displayName;const OX=w.forwardRef(({className:e,inset:t,...n},s)=>r.jsx(JM,{ref:s,className:Ct("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));OX.displayName=JM.displayName;const DX=w.forwardRef(({className:e,...t},n)=>r.jsx(rR,{ref:n,className:Ct("-mx-1 my-1 h-px bg-muted",e),...t}));DX.displayName=rR.displayName;function IX(e){const t=LX(e),n=w.forwardRef((s,i)=>{const{children:a,...l}=s,u=w.Children.toArray(a),h=u.find(BX);if(h){const m=h.props.children,g=u.map(x=>x===h?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:x);return r.jsx(t,{...l,ref:i,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return r.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function LX(e){const t=w.forwardRef((n,s)=>{const{children:i,...a}=n;if(w.isValidElement(i)){const l=$X(i),u=zX(a,i.props);return i.type!==w.Fragment&&(u.ref=s?Ca(s,l):l),w.cloneElement(i,u)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var FX=Symbol("radix.slottable");function BX(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===FX}function zX(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...u)=>{const h=a(...u);return i(...u),h}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function $X(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ox="Dialog",[oR]=No(Ox),[UX,Hi]=oR(Ox),lR=e=>{const{__scopeDialog:t,children:n,open:s,defaultOpen:i,onOpenChange:a,modal:l=!0}=e,u=w.useRef(null),h=w.useRef(null),[m,g]=Zc({prop:s,defaultProp:i??!1,onChange:a,caller:Ox});return r.jsx(UX,{scope:t,triggerRef:u,contentRef:h,contentId:ya(),titleId:ya(),descriptionId:ya(),open:m,onOpenChange:g,onOpenToggle:w.useCallback(()=>g(x=>!x),[g]),modal:l,children:n})};lR.displayName=Ox;var cR="DialogTrigger",dR=w.forwardRef((e,t)=>
vendor: 5,520 bytes, lines 720-724
720{const{__scopeDialog:n,...s}=e,i=Hi(cR,n),a=qt(t,i.triggerRef);return r.jsx(Pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":vN(i.open),...s,ref:a,onClick:Ke(e.onClick,i.onOpenToggle)})});dR.displayName=cR;var gN="DialogPortal",[VX,uR]=oR(gN,{forceMount:void 0}),hR=e=>{const{__scopeDialog:t,forceMount:n,children:s,container:i}=e,a=Hi(gN,t);return r.jsx(VX,{scope:t,forceMount:n,children:w.Children.map(s,l=>r.jsx(Ta,{present:n||a.open,children:r.jsx(Um,{asChild:!0,container:i,children:l})}))})};hR.displayName=gN;var D0="DialogOverlay",fR=w.forwardRef((e,t)=>{const n=uR(D0,e.__scopeDialog),{forceMount:s=n.forceMount,...i}=e,a=Hi(D0,e.__scopeDialog);return a.modal?r.jsx(Ta,{present:s||a.open,children:r.jsx(HX,{...i,ref:t})}):null});fR.displayName=D0;var WX=IX("DialogOverlay.RemoveScroll"),HX=w.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Hi(D0,n);return r.jsx(Wm,{as:WX,allowPinchZoom:!0,shards:[i.contentRef],children:r.jsx(Pt.div,{"data-state":vN(i.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),Xc="DialogContent",mR=w.forwardRef((e,t)=>{const n=uR(Xc,e.__scopeDialog),{forceMount:s=n.forceMount,...i}=e,a=Hi(Xc,e.__scopeDialog);return r.jsx(Ta,{present:s||a.open,children:a.modal?r.jsx(qX,{...i,ref:t}):r.jsx(GX,{...i,ref:t})})});mR.displayName=Xc;var qX=w.forwardRef((e,t)=>{const n=Hi(Xc,e.__scopeDialog),s=w.useRef(null),i=qt(t,n.contentRef,s);return w.useEffect(()=>{const a=s.current;if(a)return Tx(a)},[]),r.jsx(pR,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ke(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ke(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&a.preventDefault()}),onFocusOutside:Ke(e.onFocusOutside,a=>a.preventDefault())})}),GX=w.forwardRef((e,t)=>{const n=Hi(Xc,e.__scopeDialog),s=w.useRef(!1),i=w.useRef(!1);return r.jsx(pR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,a),a.defaultPrevented||(s.current||(u=n.triggerRef.current)==null||u.focus(),a.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:a=>{var h,m;(h=e.onInteractOutside)==null||h.call(e,a),a.defaultPrevented||(s.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=a.target;((m=n.triggerRef.current)==null?void 0:m.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),pR=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=e,u=Hi(Xc,n),h=w.useRef(null),m=qt(t,h);return Nx(),r.jsxs(r.Fragment,{children:[r.jsx(zm,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:a,children:r.jsx(Bm,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":vN(u.open),...l,ref:m,onDismiss:()=>u.onOpenChange(!1)})}),r.jsxs(r.Fragment,{children:[r.jsx(YX,{titleId:u.titleId}),r.jsx(ZX,{contentRef:h,descriptionId:u.descriptionId})]})]})}),xN="DialogTitle",gR=w.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Hi(xN,n);return r.jsx(Pt.h2,{id:i.titleId,...s,ref:t})});gR.displayName=xN;var xR="DialogDescription",vR=w.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Hi(xR,n);return r.jsx(Pt.p,{id:i.descriptionId,...s,ref:t})});vR.displayName=xR;var yR="DialogClose",bR=w.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,i=Hi(yR,n);return r.jsx(Pt.button,{type:"button",...s,ref:t,onClick:Ke(e.onClick,()=>i.onOpenChange(!1))})});bR.displayName=yR;function vN(e){return e?"open":"closed"}var wR="DialogTitleWarning",[$he,_R]=mY(wR,{contentName:Xc,titleName:xN,docsSlug:"dialog"}),YX=({titleId:e})=>{const t=_R(wR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 721 722If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 723 724For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},KX="DialogDescriptionWarning",ZX=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_R(KX).contentName}}.`;return w.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},NR=lR,QX=dR,jR=hR,Dx=fR,Ix=mR,Lx=gR,Fx=vR,SR=bR;const $i=NR,XX=jR,kR=w.forwardRef(({className:e,...t},n)=>r.jsx(Dx,{ref:n,className:Ct("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));kR.displayName=Dx.displayName;const ci=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(XX,{children:[r.jsx(kR,{}),r.jsxs(Ix,{ref:s,className:Ct("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
vendor: 32,337 bytes, lines 724-732
724nded-lg",e),...n,children:[t,r.jsxs(SR,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(hn,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ci.displayName=Ix.displayName;const di=({className:e,...t})=>r.jsx("div",{className:Ct("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});di.displayName="DialogHeader";const lh=({className:e,...t})=>r.jsx("div",{className:Ct("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});lh.displayName="DialogFooter";const ui=w.forwardRef(({className:e,...t},n)=>r.jsx(Lx,{ref:n,className:Ct("text-lg font-semibold leading-none tracking-tight",e),...t}));ui.displayName=Lx.displayName;const Vu=w.forwardRef(({className:e,...t},n)=>r.jsx(Fx,{ref:n,className:Ct("text-sm text-muted-foreground",e),...t}));Vu.displayName=Fx.displayName;//! moment.js 725//! version : 2.30.1 726//! authors : Tim Wood, Iskren Chernev, Moment.js contributors 727//! license : MIT 728//! momentjs.com 729var CR;function Fe(){return CR.apply(null,arguments)}function JX(e){CR=e}function Ui(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Vc(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Ut(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function yN(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Ut(e,t))return!1;return!0}function ur(e){return e===void 0}function _o(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Gm(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function PR(e,t){var n=[],s,i=e.length;for(s=0;s<i;++s)n.push(t(e[s],s));return n}function Nl(e,t){for(var n in t)Ut(t,n)&&(e[n]=t[n]);return Ut(t,"toString")&&(e.toString=t.toString),Ut(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Ea(e,t,n,s){return QR(e,t,n,s,!0).utc()}function eJ(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function bt(e){return e._pf==null&&(e._pf=eJ()),e._pf}var f1;Array.prototype.some?f1=Array.prototype.some:f1=function(e){var t=Object(this),n=t.length>>>0,s;for(s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};function bN(e){var t=null,n=!1,s=e._d&&!isNaN(e._d.getTime());if(s&&(t=bt(e),n=f1.call(t.parsedDateParts,function(i){return i!=null}),s=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(s=s&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=s;else return s;return e._isValid}function Bx(e){var t=Ea(NaN);return e!=null?Nl(bt(t),e):bt(t).userInvalidated=!0,t}var yP=Fe.momentProperties=[],Eb=!1;function wN(e,t){var n,s,i,a=yP.length;if(ur(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),ur(t._i)||(e._i=t._i),ur(t._f)||(e._f=t._f),ur(t._l)||(e._l=t._l),ur(t._strict)||(e._strict=t._strict),ur(t._tzm)||(e._tzm=t._tzm),ur(t._isUTC)||(e._isUTC=t._isUTC),ur(t._offset)||(e._offset=t._offset),ur(t._pf)||(e._pf=bt(t)),ur(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)s=yP[n],i=t[s],ur(i)||(e[s]=i);return e}function Ym(e){wN(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Eb===!1&&(Eb=!0,Fe.updateOffset(this),Eb=!1)}function Vi(e){return e instanceof Ym||e!=null&&e._isAMomentObject!=null}function TR(e){Fe.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function hi(e,t){var n=!0;return Nl(function(){if(Fe.deprecationHandler!=null&&Fe.deprecationHandler(null,e),n){var s=[],i,a,l,u=arguments.length;for(a=0;a<u;a++){if(i="",typeof arguments[a]=="object"){i+=` 730[`+a+"] ";for(l in arguments[0])Ut(arguments[0],l)&&(i+=l+": "+arguments[0][l]+", ");i=i.slice(0,-2)}else i=arguments[a];s.push(i)}TR(e+` 731Arguments: `+Array.prototype.slice.call(s).join("")+` 732`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var bP={};function ER(e,t){Fe.deprecationHandler!=null&&Fe.deprecationHandler(e,t),bP[e]||(TR(t),bP[e]=!0)}Fe.suppressDeprecationWarnings=!1;Fe.deprecationHandler=null;function Aa(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function tJ(e){var t,n;for(n in e)Ut(e,n)&&(t=e[n],Aa(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function m1(e,t){var n=Nl({},e),s;for(s in t)Ut(t,s)&&(Vc(e[s])&&Vc(t[s])?(n[s]={},Nl(n[s],e[s]),Nl(n[s],t[s])):t[s]!=null?n[s]=t[s]:delete n[s]);for(s in e)Ut(e,s)&&!Ut(t,s)&&Vc(e[s])&&(n[s]=Nl({},n[s]));return n}function _N(e){e!=null&&this.set(e)}var p1;Object.keys?p1=Object.keys:p1=function(e){var t,n=[];for(t in e)Ut(e,t)&&n.push(t);return n};var nJ={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function sJ(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return Aa(s)?s.call(t,n):s}function ka(e,t,n){var s=""+Math.abs(e),i=t-s.length,a=e>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var NN=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ag=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ab={},yu={};function nt(e,t,n,s){var i=s;typeof s=="string"&&(i=function(){return this[s]()}),e&&(yu[e]=i),t&&(yu[t[0]]=function(){return ka(i.apply(this,arguments),t[1],t[2])}),n&&(yu[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function rJ(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function iJ(e){var t=e.match(NN),n,s;for(n=0,s=t.length;n<s;n++)yu[t[n]]?t[n]=yu[t[n]]:t[n]=rJ(t[n]);return function(i){var a="",l;for(l=0;l<s;l++)a+=Aa(t[l])?t[l].call(i,e):t[l];return a}}function a0(e,t){return e.isValid()?(t=AR(t,e.localeData()),Ab[t]=Ab[t]||iJ(t),Ab[t](e)):e.localeData().invalidDate()}function AR(e,t){var n=5;function s(i){return t.longDateFormat(i)||i}for(Ag.lastIndex=0;n>=0&&Ag.test(e);)e=e.replace(Ag,s),Ag.lastIndex=0,n-=1;return e}var aJ={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function oJ(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(NN).map(function(s){return s==="MMMM"||s==="MM"||s==="DD"||s==="dddd"?s.slice(1):s}).join(""),this._longDateFormat[e])}var lJ="Invalid date";function cJ(){return this._invalidDate}var dJ="%d",uJ=/\d{1,2}/;function hJ(e){return this._ordinal.replace("%d",e)}var fJ={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function mJ(e,t,n,s){var i=this._relativeTime[n];return Aa(i)?i(e,t,n,s):i.replace(/%d/i,e)}function pJ(e,t){var n=this._relativeTime[e>0?"future":"past"];return Aa(n)?n(t):n.replace(/%s/i,t)}var wP={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function fi(e){return typeof e=="string"?wP[e]||wP[e.toLowerCase()]:void 0}function jN(e){var t={},n,s;for(s in e)Ut(e,s)&&(n=fi(s),n&&(t[n]=e[s]));return t}var gJ={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function xJ(e){var t=[],n;for(n in e)Ut(e,n)&&t.push({unit:n,priority:gJ[n]});return t.sort(function(s,i){return s.priority-i.priority}),t}var MR=/\d/,Dr=/\d\d/,RR=/\d{3}/,SN=/\d{4}/,zx=/[+-]?\d{6}/,mn=/\d\d?/,OR=/\d\d\d\d?/,DR=/\d\d\d\d\d\d?/,$x=/\d{1,3}/,kN=/\d{1,4}/,Ux=/[+-]?\d{1,6}/,ch=/\d+/,Vx=/[+-]?\d+/,vJ=/Z|[+-]\d\d:?\d\d/gi,Wx=/Z|[+-]\d\d(?::?\d\d)?/gi,yJ=/[+-]?\d+(\.\d{1,3})?/,Km=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,dh=/^[1-9]\d?/,CN=/^([1-9]\d|\d)/,I0;I0={};function ze(e,t,n){I0[e]=Aa(t)?t:function(s,i){return s&&n?n:t}}function bJ(e,t){return Ut(I0,e)?I0[e](t._strict,t._locale):new RegExp(wJ(e))}function wJ(e){return xo(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,s,i,a){return n||s||i||a}))}function xo(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function si(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function At(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=si(t)),n}var g1={};function nn(e,t){var n,s=t,i;for(typeof e=="string"&&(e=[e]),_o(t)&&(s=function(a,l){l[t]=At(a)}),i=e.length,n=0;n<i;n++)g1[e[n]]=s}function Zm(e,t){nn(e,function(n,s,i,a){i._w=i._w||{},t(n,i._w,i,a)})}function _J(e,t,n){t!=null&&Ut(g1,e)&&g1[e](t,n._a,n,e)}function Hx(e){return e%4===0&&e%100!==0||e%400===0}var Is=0,ho=1,ha=2,ns=3,Mi=4,fo=5,Ac=6,NJ=7,jJ=8;nt("Y",0,0,function(){var e=this.year();return e<=9999?ka(e,4):"+"+e});nt(0,["YY",2],0,function(){return this.year()%100});nt(0,["YYYY",4],0,"year");nt(0,["YYYYY",5],0,"year");nt(0,["YYYYYY",6,!0],0,"year");ze("Y",Vx);ze("YY",mn,Dr);ze("YYYY",kN,SN);ze("YYYYY",Ux,zx);ze("YYYYYY",Ux,zx);nn(["YYYYY","YYYYYY"],Is);nn("YYYY",function(e,t){t[Is]=e.length===2?Fe.parseTwoDigitYear(e):At(e)});nn("YY",function(e,t){t[Is]=Fe.parseTwoDigitYear(e)});nn("Y",function(e,t){t[Is]=parseInt(e,10)});function qf(e){return Hx(e)?366:365}Fe.parseTwoDigitYear=function(e){return At(e)+(At(e)>68?1900:2e3)};var IR=uh("FullYear",!0);function SJ(){return Hx(this.year())}function uh(e,t){return function(n){return n!=null?(LR(this,e,n),Fe.updateOffset(this,t),this):cm(this,e)}}function cm(e,t){if(!e.isValid())return NaN;var n=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return s?n.getUTCSeconds():n.getSeconds();case"Minutes":return s?n.getUTCMinutes():n.getMinutes();case"Hours":return s?n.getUTCHours():n.getHours();case"Date":return s?n.getUTCDate():n.getDate();case"Day":return s?n.getUTCDay():n.getDay();case"Month":return s?n.getUTCMonth():n.getMonth();case"FullYear":return s?n.getUTCFullYear():n.getFullYear();default:return NaN}}function LR(e,t,n){var s,i,a,l,u;if(!(!e.isValid()||isNaN(n))){switch(s=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?s.setUTCMilliseconds(n):s.setMilliseconds(n));case"Seconds":return void(i?s.setUTCSeconds(n):s.setSeconds(n));case"Minutes":return void(i?s.setUTCMinutes(n):s.setMinutes(n));case"Hours":return void(i?s.setUTCHours(n):s.setHours(n));case"Date":return void(i?s.setUTCDate(n):s.setDate(n));case"FullYear":break;default:return}a=n,l=e.month(),u=e.date(),u=u===29&&l===1&&!Hx(a)?28:u,i?s.setUTCFullYear(a,l,u):s.setFullYear(a,l,u)}}function kJ(e){return e=fi(e),Aa(this[e])?this[e]():this}function CJ(e,t){if(typeof e=="object"){e=jN(e);var n=xJ(e),s,i=n.length;for(s=0;s<i;s++)this[n[s].unit](e[n[s].unit])}else if(e=fi(e),Aa(this[e]))return this[e](t);return this}function PJ(e,t){return(e%t+t)%t}var Bn;Array.prototype.indexOf?Bn=Array.prototype.indexOf:Bn=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function PN(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=PJ(t,12);return e+=(t-n)/12,n===1?Hx(e)?29:28:31-n%7%2}nt("M",["MM",2],"Mo",function(){return this.month()+1});nt("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});nt("MMMM",0,0,function(e){return this.localeData().months(this,e)});ze("M",mn,dh);ze("MM",mn,Dr);ze("MMM",function(e,t){return t.monthsShortRegex(e)});ze("MMMM",function(e,t){return t.monthsRegex(e)});nn(["M","MM"],function(e,t){t[ho]=At(e)-1});nn(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);i!=null?t[ho]=i:bt(n).invalidMonth=e});var TJ="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),FR="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),BR=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,EJ=Km,AJ=Km;function MJ(e,t){return e?Ui(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||BR).test(t)?"format":"standalone"][e.month()]:Ui(this._months)?this._months:this._months.standalone}function RJ(e,t){return e?Ui(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[BR.test(t)?"format":"standalone"][e.month()]:Ui(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function OJ(e,t,n){var s,i,a,l=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)a=Ea([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(a,"").toLocaleLowerCase();return n?t==="MMM"?(i=Bn.call(this._shortMonthsParse,l),i!==-1?i:null):(i=Bn.call(this._longMonthsParse,l),i!==-1?i:null):t==="MMM"?(i=Bn.call(this._shortMonthsParse,l),i!==-1?i:(i=Bn.call(this._longMonthsParse,l),i!==-1?i:null)):(i=Bn.call(this._longMonthsParse,l),i!==-1?i:(i=Bn.call(this._shortMonthsParse,l),i!==-1?i:null))}function DJ(e,t,n){var s,i,a;if(this._monthsParseExact)return OJ.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=Ea([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[s]&&(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(a.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[s].test(e))return s;if(n&&t==="MMM"&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}}function zR(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=At(t);else if(t=e.localeData().monthsParse(t),!_o(t))return e}var n=t,s=e.date();return s=s<29?s:Math.min(s,PN(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,s):e._d.setMonth(n,s),e}function $R(e){return e!=null?(zR(this,e),Fe.updateOffset(this,!0),this):cm(this,"Month")}function IJ(){return PN(this.year(),this.month())}function LJ(e){return this._monthsParseExact?(Ut(this,"_monthsRegex")||UR.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Ut(this,"_monthsShortRegex")||(this._monthsShortRegex=EJ),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function FJ(e){return this._monthsParseExact?(Ut(this,"_monthsRegex")||UR.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Ut(this,"_monthsRegex")||(this._monthsRegex=AJ),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function UR(){function e(h,m){return m.length-h.length}var t=[],n=[],s=[],i,a,l,u;for(i=0;i<12;i++)a=Ea([2e3,i]),l=xo(this.monthsShort(a,"")),u=xo(this.months(a,"")),t.push(l),n.push(u),s.push(u),s.push(l);t.sort(e),n.sort(e),s.sort(e),this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function BJ(e,t,n,s,i,a,l){var u;return e<100&&e>=0?(u=new Date(e+400,t,n,s,i,a,l),isFinite(u.getFullYear())&&u.setFullYear(e)):u=new Date(e,t,n,s,i,a,l),u}function dm(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function L0(e,t,n){var s=7+t-n,i=(7+dm(e,0,s).getUTCDay()-t)%7;return-i+s-1}function VR(e,t,n,s,i){var a=(7+n-s)%7,l=L0(e,s,i),u=1+7*(t-1)+a+l,h,m;return u<=0?(h=e-1,m=qf(h)+u):u>qf(e)?(h=e+1,m=u-qf(e)):(h=e,m=u),{year:h,dayOfYear:m}}function um(e,t,n){var s=L0(e.year(),t,n),i=Math.floor((e.dayOfYear()-s-1)/7)+1,a,l;return i<1?(l=e.year()-1,a=i+vo(l,t,n)):i>vo(e.year(),t,n)?(a=i-vo(e.year(),t,n),l=e.year()+1):(l=e.year(),a=i),{week:a,year:l}}function vo(e,t,n){var s=L0(e,t,n),i=L0(e+1,t,n);return(qf(e)-s+i)/7}nt("w",["ww",2],"wo","week");nt("W",["WW",2],"Wo","isoWeek");ze("w",mn,dh);ze("ww",mn,Dr);ze("W",mn,dh);ze("WW",mn,Dr);Zm(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=At(e)});function zJ(e){return um(e,this._week.dow,this._week.doy).week}var $J={dow:0,doy:6};function UJ(){return this._week.dow}function VJ(){return this._week.doy}function WJ(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function HJ(e){var t=um(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}nt("d",0,"do","day");nt("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});nt("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});nt("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});nt("e",0,0,"weekday");nt("E",0,0,"isoWeekday");ze("d",mn);ze("e",mn);ze("E",mn);ze("dd",function(e,t){return t.weekdaysMinRegex(e)});ze("ddd",function(e,t){return t.weekdaysShortRegex(e)});ze("dddd",function(e,t){return t.weekdaysRegex(e)});Zm(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);i!=null?t.d=i:bt(n).invalidWeekday=e});Zm(["d","e","E"],function(e,t,n,s){t[s]=At(e)});function qJ(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function GJ(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function TN(e,t){return e.slice(t,7).concat(e.slice(0,t))}var YJ="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),WR="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),KJ="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ZJ=Km,QJ=Km,XJ=Km;function JJ(e,t){var n=Ui(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?TN(n,this._week.dow):e?n[e.day()]:n}function eee(e){return e===!0?TN(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function tee(e){return e===!0?TN(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function nee(e,t,n){var s,i,a,l=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)a=Ea([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(i=Bn.call(this._weekdaysParse,l),i!==-1?i:null):t==="ddd"?(i=Bn.call(this._shortWeekdaysParse,l),i!==-1?i:null):(i=Bn.call(this._minWeekdaysParse,l),i!==-1?i:null):t==="dddd"?(i=Bn.call(this._weekdaysParse,l),i!==-1||(i=Bn.call(this._shortWeekdaysParse,l),i!==-1)?i:(i=Bn.call(this._minWeekdaysParse,l),i!==-1?i:null)):t==="ddd"?(i=Bn.call(this._shortWeekdaysParse,l),i!==-1||(i=Bn.call(this._weekdaysParse,l),i!==-1)?i:(i=Bn.call(this._minWeekdaysParse,l),i!==-1?i:null)):(i=Bn.call(this._minWeekdaysParse,l),i!==-1||(i=Bn.call(this._weekdaysParse,l),i!==-1)?i:(i=Bn.call(this._shortWeekdaysParse,l),i!==-1?i:null))}function see(e,t,n){var s,i,a;if(this._weekdaysParseExact)return nee.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=Ea([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[s].test(e))return s;if(n&&t==="ddd"&&this._shortWeekdaysParse[s].test(e))return s;if(n&&t==="dd"&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}}function ree(e){if(!this.isValid())return e!=null?this:NaN;var t=cm(this,"Day");return e!=null?(e=qJ(e,this.localeData()),this.add(e-t,"d")):t}function iee(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function aee(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=GJ(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function oee(e){return this._weekdaysParseExact?(Ut(this,"_weekdaysRegex")||EN.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Ut(this,"_weekdaysRegex")||(this._weekdaysRegex=ZJ),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function lee(e){return this._weekdaysParseExact?(Ut(this,"_weekdaysRegex")||EN.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ut(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=QJ),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function cee(e){return this._weekdaysParseExact?(Ut(this,"_weekdaysRegex")||EN.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ut(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=XJ),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function EN(){function e(g,x){return x.length-g.length}var t=[],n=[],s=[],i=[],a,l,u,h,m;for(a=0;a<7;a++)l=Ea([2e3,1]).day(a),u=xo(this.weekdaysMin(l,"")),h=xo(this.weekdaysShort(l,"")),m=xo(this.weekdays(l,"")),t.push(u),n.push(h),s.push(m),i.push(u),i.push(h),i.push(m);t.sort(e),n.sort(e),s.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function AN(){return this.hours()%12||12}function dee(){return this.hours()||24}nt("H",["HH",2],0,"hour");nt("h",["hh",2],0,AN);nt("k",["kk",2],0,dee);nt("hmm",0,0,function(){return""+AN.apply(this)+ka(this.minutes(),2)});nt("hmmss",0,0,function(){return""+AN.apply(this)+ka(this.minutes(),2)+ka(this.seconds(),2)});nt("Hmm",0,0,function(){return""+this.hours()+ka(this.minutes(),2)});nt("Hmmss",0,0,function(){return""+this.hours()+ka(this.minutes(),2)+ka(this.seconds(),2)});function HR(e,t){nt(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}HR("a",!0);HR("A",!1);function qR(e,t){return t._meridiemParse}ze("a",qR);ze("A",qR);ze("H",mn,CN);ze("h",mn,dh);ze("k",mn,dh);ze("HH",mn,Dr);ze("hh",mn,Dr);ze("kk",mn,Dr);ze("hmm",OR);ze("hmmss",DR);ze("Hmm",OR);ze("Hmmss",DR);nn(["H","HH"],ns);nn(["k","kk"],function(e,t,n){var s=At(e);t[ns]=s===24?0:s});nn(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});nn(["h","hh"],function(e,t,n){t[ns]=At(e),bt(n).bigHour=!0});nn("hmm",function(e,t,n){var s=e.length-2;t[ns]=At(e.substr(0,s)),t[Mi]=At(e.substr(s)),bt(n).bigHour=!0});nn("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ns]=At(e.substr(0,s)),t[Mi]=At(e.substr(s,2)),t[fo]=At(e.substr(i)),bt(n).bigHour=!0});nn("Hmm",function(e,t,n){var s=e.length-2;t[ns]=At(e.substr(0,s)),t[Mi]=At(e.substr(s))});nn("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ns]=At(e.substr(0,s)),t[Mi]=At(e.substr(s,2)),t[fo]=At(e.substr(i))});function uee(e){return(e+"").toLowerCase().charAt(0)==="p"}var hee=/[ap]\.?m?\.?/i,fee=uh("Hours",!0);function mee(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var GR={calendar:nJ,longDateFormat:aJ,invalidDate:lJ,ordinal:dJ,dayOfMonthOrdinalParse:uJ,relativeTime:fJ,months:TJ,monthsShort:FR,week:$J,weekdays:YJ,weekdaysMin:KJ,weekdaysShort:WR,meridiemParse:hee},bn={},yf={},hm;function pee(e,t){var n,s=Math.min(e.length,t.length);for(n=0;n<s;n+=1)if(e[n]!==t[n])return n;return s}function _P(e){return e&&e.toLowerCase().replace("_","-")}function gee(e){for(var t=0,n,s,i,a;t<e.length;){for(a=_P(e[t]).split("-"),n=a.length,s=_P(e[t+1]),s=s?s.split("-"):null;n>0;){if(i=qx(a.slice(0,n).join("-")),i)return i;if(s&&s.length>=n&&pee(a,s)>=n-1)break;n--}t++}return hm}function xee(e){return!!(e&&e.match("^[^/\\\\]*$"))}function qx(e){var t=null,n;if(bn[e]===void 0&&typeof module<"u"&&module&&module.exports&&xee(e))try{t=hm._abbr,n=require,n("./locale/"+e),Pl(t)}catch{bn[e]=null}return bn[e]}function Pl(e,t){var n;return e&&(ur(t)?n=jo(e):n=MN(e,t),n?hm=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),hm._abbr}function MN(e,t){if(t!==null){var n,s=GR;if(t.abbr=e,bn[e]!=null)ER("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=bn[e]._config;else if(t.parentLocale!=null)if(bn[t.parentLocale]!=null)s=bn[t.parentLocale]._config;else if(n=qx(t.parentLocale),n!=null)s=n._config;else return yf[t.parentLocale]||(yf[t.parentLocale]=[]),yf[t.parentLocale].push({name:e,config:t}),null;return bn[e]=new _N(m1(s,t)),yf[e]&&yf[e].forEach(function(i){MN(i.name,i.config)}),Pl(e),bn[e]}else return delete bn[e],null}function vee(e,t){if(t!=null){var n,s,i=GR;bn[e]!=null&&bn[e].parentLocale!=null?bn[e].set(m1(bn[e]._config,t)):(s=qx(e),s!=null&&(i=s._config),t=m1(i,t),s==null&&(t.abbr=e),n=new _N(t),n.parentLocale=bn[e],bn[e]=n),Pl(e)}else bn[e]!=null&&(bn[e].parentLocale!=null?(bn[e]=bn[e].parentLocale,e===Pl()&&Pl(e)):bn[e]!=null&&delete bn[e]);return bn[e]}function jo(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return hm;if(!Ui(e)){if(t=qx(e),t)return t;e=[e]}return gee(e)}function yee(){return p1(bn)}function RN(e){var t,n=e._a;return n&&bt(e).overflow===-2&&(t=n[ho]<0||n[ho]>11?ho:n[ha]<1||n[ha]>PN(n[Is],n[ho])?ha:n[ns]<0||n[ns]>24||n[ns]===24&&(n[Mi]!==0||n[fo]!==0||n[Ac]!==0)?ns:n[Mi]<0||n[Mi]>59?Mi:n[fo]<0||n[fo]>59?fo:n[Ac]<0||n[Ac]>999?Ac:-1,bt(e)._overflowDayOfYear&&(t<Is||t>ha)&&(t=ha),bt(e)._overflowWeeks&&t===-1&&(t=NJ),bt(e)._overflowWeekday&&t===-1&&(t=jJ),bt(e).overflow=t),e}var bee=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wee=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_ee=/Z|[+-]\d\d(?::?\d\d)?/,Mg=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Mb=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Nee=/^\/?Date\((-?\d+)/i,jee=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,See={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function YR(e){var t,n,s=e._i,i=bee.exec(s)||wee.exec(s),a,l,u,h,m=Mg.length,g=Mb.length;if(i){for(bt(e).iso=!0,t=0,n=m;t<n;t++)if(Mg[t][1].exec(i[1])){l=Mg[t][0],a=Mg[t][2]!==!1;break}if(l==null){e._isValid=!1;return}if(i[3]){for(t=0,n=g;t<n;t++)if(Mb[t][1].exec(i[3])){u=(i[2]||" ")+Mb[t][0];break}if(u==null){e._isValid=!1;return}}if(!a&&u!=null){e._isValid=!1;return}if(i[4])if(_ee.exec(i[4]))h="Z";else{e._isValid=!1;return}e._f=l+(u||"")+(h||""),DN(e)}else e._isValid=!1}function kee(e,t,n,s,i,a){var l=[Cee(e),FR.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return a&&l.push(parseInt(a,10)),l}function Cee(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Pee(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Tee(e,t,n){if(e){var s=WR.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(s!==i)return bt(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Eee(e,t,n){if(e)return See[e];if(t)return 0;var s=parseInt(n,10),i=s%100,a=(s-i)/100;return a*60+i}function KR(e){var t=jee.exec(Pee(e._i)),n;if(t){if(n=kee(t[4],t[3],t[2],t[5],t[6],t[7]),!Tee(t[1],n,e))return;e._a=n,e._tzm=Eee(t[8],t[9],t[10]),e._d=dm.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),bt(e).rfc2822=!0}else e._isValid=!1}function Aee(e){var t=Nee.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(YR(e),e._isValid===!1)delete e._isValid;else return;if(KR(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:Fe.createFromInputFallback(e)}Fe.createFromInputFallback=hi("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function au(e,t,n){return e??t??n}function Mee(e){var t=new Date(Fe.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function ON(e){var t,n,s=[],i,a,l;if(!e._d){for(i=Mee(e),e._w&&e._a[ha]==null&&e._a[ho]==null&&Ree(e),e._dayOfYear!=null&&(l=au(e._a[Is],i[Is]),(e._dayOfYear>qf(l)||e._dayOfYear===0)&&(bt(e)._overflowDayOfYear=!0),n=dm(l,0,e._dayOfYear),e._a[ho]=n.getUTCMonth(),e._a[ha]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[ns]===24&&e._a[Mi]===0&&e._a[fo]===0&&e._a[Ac]===0&&(e._nextDay=!0,e._a[ns]=0),e._d=(e._useUTC?dm:BJ).apply(null,s),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ns]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(bt(e).weekdayMismatch=!0)}}function Ree(e){var t,n,s,i,a,l,u,h,m;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,l=4,n=au(t.GG,e._a[Is],um(fn(),1,4).year),s=au(t.W,1),i=au(t.E,1),(i<1||i>7)&&(h=!0)):(a=e._locale._week.dow,l=e._locale._week.doy,m=um(fn(),a,l),n=au(t.gg,e._a[Is],m.year),s=au(t.w,m.week),t.d!=null?(i=t.d,(i<0||i>6)&&(h=!0)):t.e!=null?(i=t.e+a,(t.e<0||t.e>6)&&(h=!0)):i=a),s<1||s>vo(n,a,l)?bt(e)._overflowWeeks=!0:h!=null?bt(e)._overflowWeekday=!0:(u=VR(n,s,i,a,l),e._a[Is]=u.year,e._dayOfYear=u.dayOfYear)}Fe.ISO_8601=function(){};Fe.RFC_2822=function(){};function DN(e){if(e._f===Fe.ISO_8601){YR(e);return}
vendor: 11,356 bytes, line 732
732if(e._f===Fe.RFC_2822){KR(e);return}e._a=[],bt(e).empty=!0;var t=""+e._i,n,s,i,a,l,u=t.length,h=0,m,g;for(i=AR(e._f,e._locale).match(NN)||[],g=i.length,n=0;n<g;n++)a=i[n],s=(t.match(bJ(a,e))||[])[0],s&&(l=t.substr(0,t.indexOf(s)),l.length>0&&bt(e).unusedInput.push(l),t=t.slice(t.indexOf(s)+s.length),h+=s.length),yu[a]?(s?bt(e).empty=!1:bt(e).unusedTokens.push(a),_J(a,s,e)):e._strict&&!s&&bt(e).unusedTokens.push(a);bt(e).charsLeftOver=u-h,t.length>0&&bt(e).unusedInput.push(t),e._a[ns]<=12&&bt(e).bigHour===!0&&e._a[ns]>0&&(bt(e).bigHour=void 0),bt(e).parsedDateParts=e._a.slice(0),bt(e).meridiem=e._meridiem,e._a[ns]=Oee(e._locale,e._a[ns],e._meridiem),m=bt(e).era,m!==null&&(e._a[Is]=e._locale.erasConvertYear(m,e._a[Is])),ON(e),RN(e)}function Oee(e,t,n){var s;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(s=e.isPM(n),s&&t<12&&(t+=12),!s&&t===12&&(t=0)),t)}function Dee(e){var t,n,s,i,a,l,u=!1,h=e._f.length;if(h===0){bt(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<h;i++)a=0,l=!1,t=wN({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],DN(t),bN(t)&&(l=!0),a+=bt(t).charsLeftOver,a+=bt(t).unusedTokens.length*10,bt(t).score=a,u?a<s&&(s=a,n=t):(s==null||a<s||l)&&(s=a,n=t,l&&(u=!0));Nl(e,n||t)}function Iee(e){if(!e._d){var t=jN(e._i),n=t.day===void 0?t.date:t.day;e._a=PR([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(s){return s&&parseInt(s,10)}),ON(e)}}function Lee(e){var t=new Ym(RN(ZR(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function ZR(e){var t=e._i,n=e._f;return e._locale=e._locale||jo(e._l),t===null||n===void 0&&t===""?Bx({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Vi(t)?new Ym(RN(t)):(Gm(t)?e._d=t:Ui(n)?Dee(e):n?DN(e):Fee(e),bN(e)||(e._d=null),e))}function Fee(e){var t=e._i;ur(t)?e._d=new Date(Fe.now()):Gm(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Aee(e):Ui(t)?(e._a=PR(t.slice(0),function(n){return parseInt(n,10)}),ON(e)):Vc(t)?Iee(e):_o(t)?e._d=new Date(t):Fe.createFromInputFallback(e)}function QR(e,t,n,s,i){var a={};return(t===!0||t===!1)&&(s=t,t=void 0),(n===!0||n===!1)&&(s=n,n=void 0),(Vc(e)&&yN(e)||Ui(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,Lee(a)}function fn(e,t,n,s){return QR(e,t,n,s,!1)}var Bee=hi("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=fn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Bx()}),zee=hi("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=fn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Bx()});function XR(e,t){var n,s;if(t.length===1&&Ui(t[0])&&(t=t[0]),!t.length)return fn();for(n=t[0],s=1;s<t.length;++s)(!t[s].isValid()||t[s][e](n))&&(n=t[s]);return n}function $ee(){var e=[].slice.call(arguments,0);return XR("isBefore",e)}function Uee(){var e=[].slice.call(arguments,0);return XR("isAfter",e)}var Vee=function(){return Date.now?Date.now():+new Date},bf=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Wee(e){var t,n=!1,s,i=bf.length;for(t in e)if(Ut(e,t)&&!(Bn.call(bf,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(s=0;s<i;++s)if(e[bf[s]]){if(n)return!1;parseFloat(e[bf[s]])!==At(e[bf[s]])&&(n=!0)}return!0}function Hee(){return this._isValid}function qee(){return qi(NaN)}function Gx(e){var t=jN(e),n=t.year||0,s=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,l=t.day||0,u=t.hour||0,h=t.minute||0,m=t.second||0,g=t.millisecond||0;this._isValid=Wee(t),this._milliseconds=+g+m*1e3+h*6e4+u*1e3*60*60,this._days=+l+a*7,this._months=+i+s*3+n*12,this._data={},this._locale=jo(),this._bubble()}function o0(e){return e instanceof Gx}function x1(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Gee(e,t,n){var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,l;for(l=0;l<s;l++)At(e[l])!==At(t[l])&&a++;return a+i}function JR(e,t){nt(e,0,0,function(){var n=this.utcOffset(),s="+";return n<0&&(n=-n,s="-"),s+ka(~~(n/60),2)+t+ka(~~n%60,2)})}JR("Z",":");JR("ZZ","");ze("Z",Wx);ze("ZZ",Wx);nn(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=IN(Wx,e)});var Yee=/([\+\-]|\d\d)/gi;function IN(e,t){var n=(t||"").match(e),s,i,a;return n===null?null:(s=n[n.length-1]||[],i=(s+"").match(Yee)||["-",0,0],a=+(i[1]*60)+At(i[2]),a===0?0:i[0]==="+"?a:-a)}function LN(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(Vi(e)||Gm(e)?e.valueOf():fn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),Fe.updateOffset(n,!1),n):fn(e).local()}function v1(e){return-Math.round(e._d.getTimezoneOffset())}Fe.updateOffset=function(){};function Kee(e,t,n){var s=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=IN(Wx,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(i=v1(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),s!==e&&(!t||this._changeInProgress?n3(this,qi(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Fe.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?s:v1(this)}function Zee(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Qee(e){return this.utcOffset(0,e)}function Xee(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(v1(this),"m")),this}function Jee(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=IN(vJ,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function ete(e){return this.isValid()?(e=e?fn(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function tte(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function nte(){if(!ur(this._isDSTShifted))return this._isDSTShifted;var e={},t;return wN(e,this),e=ZR(e),e._a?(t=e._isUTC?Ea(e._a):fn(e._a),this._isDSTShifted=this.isValid()&&Gee(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ste(){return this.isValid()?!this._isUTC:!1}function rte(){return this.isValid()?this._isUTC:!1}function e3(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ite=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ate=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function qi(e,t){var n=e,s=null,i,a,l;return o0(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:_o(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(s=ite.exec(e))?(i=s[1]==="-"?-1:1,n={y:0,d:At(s[ha])*i,h:At(s[ns])*i,m:At(s[Mi])*i,s:At(s[fo])*i,ms:At(x1(s[Ac]*1e3))*i}):(s=ate.exec(e))?(i=s[1]==="-"?-1:1,n={y:yc(s[2],i),M:yc(s[3],i),w:yc(s[4],i),d:yc(s[5],i),h:yc(s[6],i),m:yc(s[7],i),s:yc(s[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(l=ote(fn(n.from),fn(n.to)),n={},n.ms=l.milliseconds,n.M=l.months),a=new Gx(n),o0(e)&&Ut(e,"_locale")&&(a._locale=e._locale),o0(e)&&Ut(e,"_isValid")&&(a._isValid=e._isValid),a}qi.fn=Gx.prototype;qi.invalid=qee;function yc(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function NP(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function ote(e,t){var n;return e.isValid()&&t.isValid()?(t=LN(t,e),e.isBefore(t)?n=NP(e,t):(n=NP(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function t3(e,t){return function(n,s){var i,a;return s!==null&&!isNaN(+s)&&(ER(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=s,s=a),i=qi(n,s),n3(this,i,e),this}}function n3(e,t,n,s){var i=t._milliseconds,a=x1(t._days),l=x1(t._months);e.isValid()&&(s=s??!0,l&&zR(e,cm(e,"Month")+l*n),a&&LR(e,"Date",cm(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&Fe.updateOffset(e,a||l))}var lte=t3(1,"add"),cte=t3(-1,"subtract");function s3(e){return typeof e=="string"||e instanceof String}function dte(e){return Vi(e)||Gm(e)||s3(e)||_o(e)||hte(e)||ute(e)||e===null||e===void 0}function ute(e){var t=Vc(e)&&!yN(e),n=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,l=s.length;for(i=0;i<l;i+=1)a=s[i],n=n||Ut(e,a);return t&&n}function hte(e){var t=Ui(e),n=!1;return t&&(n=e.filter(function(s){return!_o(s)&&s3(e)}).length===0),t&&n}function fte(e){var t=Vc(e)&&!yN(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,a;for(i=0;i<s.length;i+=1)a=s[i],n=n||Ut(e,a);return t&&n}function mte(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function pte(e,t){arguments.length===1&&(arguments[0]?dte(arguments[0])?(e=arguments[0],t=void 0):fte(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||fn(),s=LN(n,this).startOf("day"),i=Fe.calendarFormat(this,s)||"sameElse",a=t&&(Aa(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,fn(n)))}function gte(){return new Ym(this)}function xte(e,t){var n=Vi(e)?e:fn(e);return this.isValid()&&n.isValid()?(t=fi(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function vte(e,t){var n=Vi(e)?e:fn(e);return this.isValid()&&n.isValid()?(t=fi(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function yte(e,t,n,s){var i=Vi(e)?e:fn(e),a=Vi(t)?t:fn(t);return this.isValid()&&i.isValid()&&a.isValid()?(s=s||"()",(s[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(s[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function bte(e,t){var n=Vi(e)?e:fn(e),s;return this.isValid()&&n.isValid()?(t=fi(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(s=n.valueOf(),this.clone().startOf(t).valueOf()<=s&&s<=this.clone().endOf(t).valueOf())):!1}function wte(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function _te(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Nte(e,t,n){var s,i,a;if(!this.isValid())return NaN;if(s=LN(e,this),!s.isValid())return NaN;switch(i=(s.utcOffset()-this.utcOffset())*6e4,t=fi(t),t){case"year":a=l0(this,s)/12;break;case"month":a=l0(this,s);break;case"quarter":a=l0(this,s)/3;break;case"second":a=(this-s)/1e3;break;case"minute":a=(this-s)/6e4;break;case"hour":a=(this-s)/36e5;break;case"day":a=(this-s-i)/864e5;break;case"week":a=(this-s-i)/6048e5;break;default:a=this-s}return n?a:si(a)}function l0(e,t){if(e.date()<t.date())return-l0(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),s=e.clone().add(n,"months"),i,a;return t-s<0?(i=e.clone().add(n-1,"months"),a=(t-s)/(s-i)):(i=e.clone().add(n+1,"months"),a=(t-s)/(i-s)),-(n+a)||0}Fe.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Fe.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function jte(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ste(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;
vendor: 10,636 bytes, line 732
732return n.year()<0||n.year()>9999?a0(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Aa(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",a0(n,"Z")):a0(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function kte(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,s,i,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+s+i+a)}function Cte(e){e||(e=this.isUtc()?Fe.defaultFormatUtc:Fe.defaultFormat);var t=a0(this,e);return this.localeData().postformat(t)}function Pte(e,t){return this.isValid()&&(Vi(e)&&e.isValid()||fn(e).isValid())?qi({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Tte(e){return this.from(fn(),e)}function Ete(e,t){return this.isValid()&&(Vi(e)&&e.isValid()||fn(e).isValid())?qi({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Ate(e){return this.to(fn(),e)}function r3(e){var t;return e===void 0?this._locale._abbr:(t=jo(e),t!=null&&(this._locale=t),this)}var i3=hi("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function a3(){return this._locale}var F0=1e3,bu=60*F0,B0=60*bu,o3=(365*400+97)*24*B0;function wu(e,t){return(e%t+t)%t}function l3(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-o3:new Date(e,t,n).valueOf()}function c3(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-o3:Date.UTC(e,t,n)}function Mte(e){var t,n;if(e=fi(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?c3:l3,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=wu(t+(this._isUTC?0:this.utcOffset()*bu),B0);break;case"minute":t=this._d.valueOf(),t-=wu(t,bu);break;case"second":t=this._d.valueOf(),t-=wu(t,F0);break}return this._d.setTime(t),Fe.updateOffset(this,!0),this}function Rte(e){var t,n;if(e=fi(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?c3:l3,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=B0-wu(t+(this._isUTC?0:this.utcOffset()*bu),B0)-1;break;case"minute":t=this._d.valueOf(),t+=bu-wu(t,bu)-1;break;case"second":t=this._d.valueOf(),t+=F0-wu(t,F0)-1;break}return this._d.setTime(t),Fe.updateOffset(this,!0),this}function Ote(){return this._d.valueOf()-(this._offset||0)*6e4}function Dte(){return Math.floor(this.valueOf()/1e3)}function Ite(){return new Date(this.valueOf())}function Lte(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Fte(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Bte(){return this.isValid()?this.toISOString():null}function zte(){return bN(this)}function $te(){return Nl({},bt(this))}function Ute(){return bt(this).overflow}function Vte(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}nt("N",0,0,"eraAbbr");nt("NN",0,0,"eraAbbr");nt("NNN",0,0,"eraAbbr");nt("NNNN",0,0,"eraName");nt("NNNNN",0,0,"eraNarrow");nt("y",["y",1],"yo","eraYear");nt("y",["yy",2],0,"eraYear");nt("y",["yyy",3],0,"eraYear");nt("y",["yyyy",4],0,"eraYear");ze("N",FN);ze("NN",FN);ze("NNN",FN);ze("NNNN",ene);ze("NNNNN",tne);nn(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){var i=n._locale.erasParse(e,s,n._strict);i?bt(n).era=i:bt(n).invalidEra=e});ze("y",ch);ze("yy",ch);ze("yyy",ch);ze("yyyy",ch);ze("yo",nne);nn(["y","yy","yyy","yyyy"],Is);nn(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Is]=n._locale.eraYearOrdinalParse(e,i):t[Is]=parseInt(e,10)});function Wte(e,t){var n,s,i,a=this._eras||jo("en")._eras;for(n=0,s=a.length;n<s;++n){switch(typeof a[n].since){case"string":i=Fe(a[n].since).startOf("day"),a[n].since=i.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=Fe(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf();break}}return a}function Hte(e,t,n){var s,i,a=this.eras(),l,u,h;for(e=e.toUpperCase(),s=0,i=a.length;s<i;++s)if(l=a[s].name.toUpperCase(),u=a[s].abbr.toUpperCase(),h=a[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(u===e)return a[s];break;case"NNNN":if(l===e)return a[s];break;case"NNNNN":if(h===e)return a[s];break}else if([l,u,h].indexOf(e)>=0)return a[s]}function qte(e,t){var n=e.since<=e.until?1:-1;return t===void 0?Fe(e.since).year():Fe(e.since).year()+(t-e.offset)*n}function Gte(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return s[e].name;return""}function Yte(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return s[e].narrow;return""}function Kte(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return s[e].abbr;return""}function Zte(){var e,t,n,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until||i[e].until<=s&&s<=i[e].since)return(this.year()-Fe(i[e].since).year())*n+i[e].offset;return this.year()}function Qte(e){return Ut(this,"_erasNameRegex")||BN.call(this),e?this._erasNameRegex:this._erasRegex}function Xte(e){return Ut(this,"_erasAbbrRegex")||BN.call(this),e?this._erasAbbrRegex:this._erasRegex}function Jte(e){return Ut(this,"_erasNarrowRegex")||BN.call(this),e?this._erasNarrowRegex:this._erasRegex}function FN(e,t){return t.erasAbbrRegex(e)}function ene(e,t){return t.erasNameRegex(e)}function tne(e,t){return t.erasNarrowRegex(e)}function nne(e,t){return t._eraYearOrdinalRegex||ch}function BN(){var e=[],t=[],n=[],s=[],i,a,l,u,h,m=this.eras();for(i=0,a=m.length;i<a;++i)l=xo(m[i].name),u=xo(m[i].abbr),h=xo(m[i].narrow),t.push(l),e.push(u),n.push(h),s.push(l),s.push(u),s.push(h);this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}nt(0,["gg",2],0,function(){return this.weekYear()%100});nt(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Yx(e,t){nt(0,[e,e.length],0,t)}Yx("gggg","weekYear");Yx("ggggg","weekYear");Yx("GGGG","isoWeekYear");Yx("GGGGG","isoWeekYear");ze("G",Vx);ze("g",Vx);ze("GG",mn,Dr);ze("gg",mn,Dr);ze("GGGG",kN,SN);ze("gggg",kN,SN);ze("GGGGG",Ux,zx);ze("ggggg",Ux,zx);Zm(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=At(e)});Zm(["gg","GG"],function(e,t,n,s){t[s]=Fe.parseTwoDigitYear(e)});function sne(e){return d3.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function rne(e){return d3.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function ine(){return vo(this.year(),1,4)}function ane(){return vo(this.isoWeekYear(),1,4)}function one(){var e=this.localeData()._week;return vo(this.year(),e.dow,e.doy)}function lne(){var e=this.localeData()._week;return vo(this.weekYear(),e.dow,e.doy)}function d3(e,t,n,s,i){var a;return e==null?um(this,s,i).year:(a=vo(e,s,i),t>a&&(t=a),cne.call(this,e,t,n,s,i))}function cne(e,t,n,s,i){var a=VR(e,t,n,s,i),l=dm(a.year,0,a.dayOfYear);return this.year(l.getUTCFullYear()),this.month(l.getUTCMonth()),this.date(l.getUTCDate()),this}nt("Q",0,"Qo","quarter");ze("Q",MR);nn("Q",function(e,t){t[ho]=(At(e)-1)*3});function dne(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}nt("D",["DD",2],"Do","date");ze("D",mn,dh);ze("DD",mn,Dr);ze("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});nn(["D","DD"],ha);nn("Do",function(e,t){t[ha]=At(e.match(mn)[0])});var u3=uh("Date",!0);nt("DDD",["DDDD",3],"DDDo","dayOfYear");ze("DDD",$x);ze("DDDD",RR);nn(["DDD","DDDD"],function(e,t,n){n._dayOfYear=At(e)});function une(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}nt("m",["mm",2],0,"minute");ze("m",mn,CN);ze("mm",mn,Dr);nn(["m","mm"],Mi);var hne=uh("Minutes",!1);nt("s",["ss",2],0,"second");ze("s",mn,CN);ze("ss",mn,Dr);nn(["s","ss"],fo);var fne=uh("Seconds",!1);nt("S",0,0,function(){return~~(this.millisecond()/100)});nt(0,["SS",2],0,function(){return~~(this.millisecond()/10)});nt(0,["SSS",3],0,"millisecond");nt(0,["SSSS",4],0,function(){return this.millisecond()*10});nt(0,["SSSSS",5],0,function(){return this.millisecond()*100});nt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});nt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});nt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});nt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});ze("S",$x,MR);ze("SS",$x,Dr);ze("SSS",$x,RR);var jl,h3;for(jl="SSSS";jl.length<=9;jl+="S")ze(jl,ch);function mne(e,t){t[Ac]=At(("0."+e)*1e3)}for(jl="S";jl.length<=9;jl+="S")nn(jl,mne);h3=uh("Milliseconds",!1);nt("z",0,0,"zoneAbbr");nt("zz",0,0,"zoneName");function pne(){return this._isUTC?"UTC":""}function gne(){return this._isUTC?"Coordinated Universal Time":""}var Ae=Ym.prototype;Ae.add=lte;Ae.calendar=pte;Ae.clone=gte;Ae.diff=Nte;Ae.endOf=Rte;Ae.format=Cte;Ae.from=Pte;Ae.fromNow=Tte;Ae.to=Ete;Ae.toNow=Ate;Ae.get=kJ;
vendor: 10,210 bytes, lines 732-733
732Ae.invalidAt=Ute;Ae.isAfter=xte;Ae.isBefore=vte;Ae.isBetween=yte;Ae.isSame=bte;Ae.isSameOrAfter=wte;Ae.isSameOrBefore=_te;Ae.isValid=zte;Ae.lang=i3;Ae.locale=r3;Ae.localeData=a3;Ae.max=zee;Ae.min=Bee;Ae.parsingFlags=$te;Ae.set=CJ;Ae.startOf=Mte;Ae.subtract=cte;Ae.toArray=Lte;Ae.toObject=Fte;Ae.toDate=Ite;Ae.toISOString=Ste;Ae.inspect=kte;typeof Symbol<"u"&&Symbol.for!=null&&(Ae[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Ae.toJSON=Bte;Ae.toString=jte;Ae.unix=Dte;Ae.valueOf=Ote;Ae.creationData=Vte;Ae.eraName=Gte;Ae.eraNarrow=Yte;Ae.eraAbbr=Kte;Ae.eraYear=Zte;Ae.year=IR;Ae.isLeapYear=SJ;Ae.weekYear=sne;Ae.isoWeekYear=rne;Ae.quarter=Ae.quarters=dne;Ae.month=$R;Ae.daysInMonth=IJ;Ae.week=Ae.weeks=WJ;Ae.isoWeek=Ae.isoWeeks=HJ;Ae.weeksInYear=one;Ae.weeksInWeekYear=lne;Ae.isoWeeksInYear=ine;Ae.isoWeeksInISOWeekYear=ane;Ae.date=u3;Ae.day=Ae.days=ree;Ae.weekday=iee;Ae.isoWeekday=aee;Ae.dayOfYear=une;Ae.hour=Ae.hours=fee;Ae.minute=Ae.minutes=hne;Ae.second=Ae.seconds=fne;Ae.millisecond=Ae.milliseconds=h3;Ae.utcOffset=Kee;Ae.utc=Qee;Ae.local=Xee;Ae.parseZone=Jee;Ae.hasAlignedHourOffset=ete;Ae.isDST=tte;Ae.isLocal=ste;Ae.isUtcOffset=rte;Ae.isUtc=e3;Ae.isUTC=e3;Ae.zoneAbbr=pne;Ae.zoneName=gne;Ae.dates=hi("dates accessor is deprecated. Use date instead.",u3);Ae.months=hi("months accessor is deprecated. Use month instead",$R);Ae.years=hi("years accessor is deprecated. Use year instead",IR);Ae.zone=hi("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Zee);Ae.isDSTShifted=hi("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",nte);function xne(e){return fn(e*1e3)}function vne(){return fn.apply(null,arguments).parseZone()}function f3(e){return e}var Vt=_N.prototype;Vt.calendar=sJ;Vt.longDateFormat=oJ;Vt.invalidDate=cJ;Vt.ordinal=hJ;Vt.preparse=f3;Vt.postformat=f3;Vt.relativeTime=mJ;Vt.pastFuture=pJ;Vt.set=tJ;Vt.eras=Wte;Vt.erasParse=Hte;Vt.erasConvertYear=qte;Vt.erasAbbrRegex=Xte;Vt.erasNameRegex=Qte;Vt.erasNarrowRegex=Jte;Vt.months=MJ;Vt.monthsShort=RJ;Vt.monthsParse=DJ;Vt.monthsRegex=FJ;Vt.monthsShortRegex=LJ;Vt.week=zJ;Vt.firstDayOfYear=VJ;Vt.firstDayOfWeek=UJ;Vt.weekdays=JJ;Vt.weekdaysMin=tee;Vt.weekdaysShort=eee;Vt.weekdaysParse=see;Vt.weekdaysRegex=oee;Vt.weekdaysShortRegex=lee;Vt.weekdaysMinRegex=cee;Vt.isPM=uee;Vt.meridiem=mee;function z0(e,t,n,s){var i=jo(),a=Ea().set(s,t);return i[n](a,e)}function m3(e,t,n){if(_o(e)&&(t=e,e=void 0),e=e||"",t!=null)return z0(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=z0(e,s,n,"month");return i}function zN(e,t,n,s){typeof e=="boolean"?(_o(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,_o(t)&&(n=t,t=void 0),t=t||"");var i=jo(),a=e?i._week.dow:0,l,u=[];if(n!=null)return z0(t,(n+a)%7,s,"day");for(l=0;l<7;l++)u[l]=z0(t,(l+a)%7,s,"day");return u}function yne(e,t){return m3(e,t,"months")}function bne(e,t){return m3(e,t,"monthsShort")}function wne(e,t,n){return zN(e,t,n,"weekdays")}function _ne(e,t,n){return zN(e,t,n,"weekdaysShort")}function Nne(e,t,n){return zN(e,t,n,"weekdaysMin")}Pl("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=At(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});Fe.lang=hi("moment.lang is deprecated. Use moment.locale instead.",Pl);Fe.langData=hi("moment.langData is deprecated. Use moment.localeData instead.",jo);var eo=Math.abs;function jne(){var e=this._data;return this._milliseconds=eo(this._milliseconds),this._days=eo(this._days),this._months=eo(this._months),e.milliseconds=eo(e.milliseconds),e.seconds=eo(e.seconds),e.minutes=eo(e.minutes),e.hours=eo(e.hours),e.months=eo(e.months),e.years=eo(e.years),this}function p3(e,t,n,s){var i=qi(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function Sne(e,t){return p3(this,e,t,1)}function kne(e,t){return p3(this,e,t,-1)}function jP(e){return e<0?Math.floor(e):Math.ceil(e)}function Cne(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data,i,a,l,u,h;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=jP(y1(n)+t)*864e5,t=0,n=0),s.milliseconds=e%1e3,i=si(e/1e3),s.seconds=i%60,a=si(i/60),s.minutes=a%60,l=si(a/60),s.hours=l%24,t+=si(l/24),h=si(g3(t)),n+=h,t-=jP(y1(h)),u=si(n/12),n%=12,s.days=t,s.months=n,s.years=u,this}function g3(e){return e*4800/146097}function y1(e){return e*146097/4800}function Pne(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if(e=fi(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+s/864e5,n=this._months+g3(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(y1(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return t*24+s/36e5;case"minute":return t*1440+s/6e4;case"second":return t*86400+s/1e3;case"millisecond":return Math.floor(t*864e5)+s;default:throw new Error("Unknown unit "+e)}}function So(e){return function(){return this.as(e)}}var x3=So("ms"),Tne=So("s"),Ene=So("m"),Ane=So("h"),Mne=So("d"),Rne=So("w"),One=So("M"),Dne=So("Q"),Ine=So("y"),Lne=x3;function Fne(){return qi(this)}function Bne(e){return e=fi(e),this.isValid()?this[e+"s"]():NaN}function ud(e){return function(){return this.isValid()?this._data[e]:NaN}}var zne=ud("milliseconds"),$ne=ud("seconds"),Une=ud("minutes"),Vne=ud("hours"),Wne=ud("days"),Hne=ud("months"),qne=ud("years");function Gne(){return si(this.days()/7)}var so=Math.round,gu={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Yne(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}function Kne(e,t,n,s){var i=qi(e).abs(),a=so(i.as("s")),l=so(i.as("m")),u=so(i.as("h")),h=so(i.as("d")),m=so(i.as("M")),g=so(i.as("w")),x=so(i.as("y")),v=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||l<=1&&["m"]||l<n.m&&["mm",l]||u<=1&&["h"]||u<n.h&&["hh",u]||h<=1&&["d"]||h<n.d&&["dd",h];return n.w!=null&&(v=v||g<=1&&["w"]||g<n.w&&["ww",g]),v=v||m<=1&&["M"]||m<n.M&&["MM",m]||x<=1&&["y"]||["yy",x],v[2]=t,v[3]=+e>0,v[4]=s,Yne.apply(null,v)}function Zne(e){return e===void 0?so:typeof e=="function"?(so=e,!0):!1}function Qne(e,t){return gu[e]===void 0?!1:t===void 0?gu[e]:(gu[e]=t,e==="s"&&(gu.ss=t-1),!0)}function Xne(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,s=gu,i,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(s=Object.assign({},gu,t),t.s!=null&&t.ss==null&&(s.ss=t.s-1)),i=this.localeData(),a=Kne(this,!n,s,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var Rb=Math.abs;function su(e){return(e>0)-(e<0)||+e}function Kx(){if(!this.isValid())return this.localeData().invalidDate();var e=Rb(this._milliseconds)/1e3,t=Rb(this._days),n=Rb(this._months),s,i,a,l,u=this.asSeconds(),h,m,g,x;return u?(s=si(e/60),i=si(s/60),e%=60,s%=60,a=si(n/12),n%=12,l=e?e.toFixed(3).replace(/\.?0+$/,""):"",h=u<0?"-":"",m=su(this._months)!==su(u)?"-":"",g=su(this._days)!==su(u)?"-":"",x=su(this._milliseconds)!==su(u)?"-":"",h+"P"+(a?m+a+"Y":"")+(n?m+n+"M":"")+(t?g+t+"D":"")+(i||s||e?"T":"")+(i?x+i+"H":"")+(s?x+s+"M":"")+(e?x+l+"S":"")):"P0D"}var Ft=Gx.prototype;Ft.isValid=Hee;Ft.abs=jne;Ft.add=Sne;Ft.subtract=kne;Ft.as=Pne;Ft.asMilliseconds=x3;Ft.asSeconds=Tne;Ft.asMinutes=Ene;Ft.asHours=Ane;Ft.asDays=Mne;Ft.asWeeks=Rne;Ft.asMonths=One;Ft.asQuarters=Dne;Ft.asYears=Ine;Ft.valueOf=Lne;Ft._bubble=Cne;Ft.clone=Fne;Ft.get=Bne;Ft.milliseconds=zne;Ft.seconds=$ne;Ft.minutes=Une;Ft.hours=Vne;Ft.days=Wne;Ft.weeks=Gne;Ft.months=Hne;Ft.years=qne;Ft.humanize=Xne;Ft.toISOString=Kx;Ft.toString=Kx;Ft.toJSON=Kx;Ft.locale=r3;Ft.localeData=a3;Ft.toIsoString=hi("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Kx);Ft.lang=i3;nt("X",0,0,"unix");nt("x",0,0,"valueOf");ze("x",Vx);ze("X",yJ);nn("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});nn("x",function(e,t,n){n._d=new Date(At(e))});//! moment.js 733Fe.version="2.30.1";JX(fn);Fe.fn=Ae;Fe.min=$ee;Fe.max=Uee;Fe.now=Vee;Fe.utc=Ea;Fe.unix=xne;Fe.months=yne;Fe.isDate=Gm;Fe.locale=Pl;Fe.invalid=Bx;Fe.duration=qi;Fe.isMoment=Vi;Fe.weekdays=wne;Fe.parseZone=vne;Fe.localeData=jo;Fe.isDuration=o0;Fe.monthsShort=bne;Fe.weekdaysMin=Nne;Fe.defineLocale=MN;Fe.updateLocale=vee;Fe.locales=yee;Fe.weekdaysShort=_ne;Fe.normalizeUnits=fi;Fe.relativeTimeRounding=Zne;Fe.relativeTimeThreshold=Qne;Fe.calendarFormat=mte;Fe.prototype=Ae;Fe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function SP({postId:e,user:t,post:n,fullHeight:s=!1}){const i=tn(),[a,l]=w.useState(""),u=w.useRef(null),{data:h,isLoading:m}=Re({queryKey:["comments",e],queryFn:()=>ne.entities.PostComment.filter({post_id:e},"-created_date"),initialData:[]}),g=pt({mutationFn:async _=>{await ne.entities.PostComment.create({post_id:e,user_email:t.email,user_name:t.full_name||t.email.split("@")[0],content:_}),await ne.entities.FeedPost.update(e,{comments_count:(n.comments_count||0)+1})},onSuccess:()=>{i.invalidateQueries({queryKey:["comments",e]}),i.invalidateQueries({queryKey:["feed-posts"]}),l("")}}),x=pt({mutationFn:async _=>{await ne.entities.PostComment.delete(_),await ne.entities.FeedPost.update(e,{comments_count:Math.max(0,(n.comments_count||0)-1)})},onSuccess:()=>{i.invalidateQueries({queryKey:["comments",e]}),i.invalidateQueries({queryKey:["feed-posts"]})}});w.useEffect(()=>{u.current&&(u.current.scrollTop=0)},[h.length]);const v=_=>{_.preventDefault(),!(!a.trim()||!(t!=null&&t.email))&&g.mutate(a.trim())};return r.jsxs("div",{className:`${s?"h-full flex flex-col min-h-0":"border-t border-slate-100/80"}`,children:[r.jsxs("div",{ref:u,className:`${s?"flex-1 overflow-y-auto":"max-h-[240px] overflow-y-auto"} px-4 py-3 space-y-3`,children:[m&&r.jsx("div",{className:"flex justify-center py-4",children:r.jsx(gt,{className:"w-4 h-4 animate-spin text-slate-300"})}),h.map((_,N)=>{var S;return r.jsxs(re.div,{initial:{opacity:0,x:-8}
733,animate:{opacity:1,x:0},transition:{delay:N*.03},className:"flex items-start gap-2.5 group",children:[r.jsx(Js,{user:_.user_email===(t==null?void 0:t.email)?t:void 0,email:_.user_email,className:"w-7 h-7 rounded-full bg-slate-100 object-cover mt-0.5 flex-shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("p",{className:"text-[13px] text-slate-800 leading-[1.4]",children:[r.jsx("span",{className:"font-semibold mr-1",children:_.user_name||((S=_.user_email)==null?void 0:S.split("@")[0])}),_.content]}),r.jsx("p",{className:"text-[11px] text-slate-400 mt-0.5 font-medium",children:Fe(_.created_date).fromNow(!0)})]}),_.user_email===(t==null?void 0:t.email)&&r.jsx("button",{onClick:()=>x.mutate(_.id),className:"opacity-0 group-hover:opacity-100 p-1 text-slate-300 hover:text-red-500 transition-all flex-shrink-0",children:r.jsx(us,{className:"w-3.5 h-3.5"})})]},_.id)}),!m&&h.length===0&&r.jsx("p",{className:"text-[13px] text-slate-400 text-center py-3",children:"No comments yet. Start the conversation!"})]}),r.jsxs("form",{onSubmit:v,className:"flex items-center gap-3 px-4 py-3 border-t border-slate-50",children:[r.jsx(Js,{user:t,className:"w-7 h-7 rounded-full bg-slate-100 object-cover flex-shrink-0"}),r.jsx("input",{value:a,onChange:_=>l(_.target.value),placeholder:"Add a comment...",className:"flex-1 text-[13px] border-0 outline-none py-1 text-slate-800 placeholder:text-slate-400 bg-transparent font-medium"}),r.jsx("button",{type:"submit",disabled:g.isPending||!a.trim(),className:"text-blue-600 font-semibold tracking-tight text-[13px] disabled:opacity-30 transition-opacity",children:g.isPending?r.jsx(gt,{className:"w-4 h-4 animate-spin"}):"Post"})]})]})}function v3({post:e,user:t,isLiked:n,likesCount:s,postLikes:i=[],forceOpenComments:a=!1,desktopSplit:l=!1}){var W;const u=tn(),h=Kn(),[m,g]=w.useState(a),[x,v]=w.useState(n),[_,N]=w.useState(s),[S,j]=w.useState(!1);w.useEffect(()=>{v(n),N(s)},[n,s]);const[P,E]=w.useState(!1),{data:R}=Re({queryKey:["public-users"],queryFn:async()=>{try{return(await ne.functions.invoke("getPublicUsers")).data.users||{}}catch{return{}}},staleTime:1e3*60*5}),A=w.useMemo(()=>{let Z=[...i];const D=Z.findIndex(O=>O.user_email===(t==null?void 0:t.email));return x&&D===-1&&(t!=null&&t.email)?Z.push({user_email:t.email,id:"temp"}):!x&&D!==-1&&Z.splice(D,1),Z},[i,x,t==null?void 0:t.email]),B=Z=>{var D,O;return Z===(t==null?void 0:t.email)?(t==null?void 0:t.full_name)||"You":((D=R==null?void 0:R[Z])==null?void 0:D.full_name)||((O=R==null?void 0:R[Z])==null?void 0:O.name)||Z.split("@")[0]},I=()=>{if(_===0)return null;const Z=A.slice(-2).reverse();if(Z.length>0){const D=Z.map(O=>B(O.user_email));return _===1?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"font-semibold",children:D[0]})," liked this"]}):_===2?r.jsxs(r.Fragment,{children:["Liked by ",r.jsx("span",{className:"font-semibold",children:D[0]})," and ",r.jsx("span",{className:"font-semibold",children:D[1]})]}):r.jsxs(r.Fragment,{children:["Liked by ",r.jsx("span",{className:"font-semibold",children:D[0]}),", ",r.jsx("span",{className:"font-semibold",children:D[1]})," and ",r.jsxs("span",{className:"font-semibold",children:[_-2," others"]})]})}return r.jsxs("span",{className:"font-semibold",children:[_.toLocaleString()," ",_===1?"like":"likes"]})},z=w.useRef(0),V=w.useRef(null),te=pt({mutationFn:async()=>{const Z=await ne.entities.PostLike.filter({post_id:e.id,user_email:t.email});Z.length>0?(await ne.entities.PostLike.delete(Z[0].id),await ne.entities.FeedPost.update(e.id,{likes_count:Math.max(0,(e.likes_count||0)-1)})):(await ne.entities.PostLike.create({post_id:e.id,user_email:t.email}),await ne.entities.FeedPost.update(e.id,{likes_count:(e.likes_count||0)+1}))},onMutate:()=>{v(!x),N(Z=>x?Z-1:Z+1)},onSettled:()=>{u.invalidateQueries({queryKey:["feed-posts"]}
733),u.invalidateQueries({queryKey:["post-likes"]})}}),H=pt({mutationFn:()=>ne.entities.FeedPost.delete(e.id),onSuccess:()=>u.invalidateQueries({queryKey:["feed-posts"]})}),Y=()=>{if(!(t!=null&&t.email))return;const Z=Date.now();Z-z.current<350?(V.current&&clearTimeout(V.current),x||te.mutate(),j(!0),setTimeout(()=>j(!1),900)):a||(V.current=setTimeout(()=>{h(Xe("Post")+"?id="+e.id)},350)),z.current=Z},ce=(t==null?void 0:t.email)===e.user_email,K=Fe(e.created_date).fromNow(!0),q=()=>{var Z;return r.jsxs("div",{className:`flex items-center justify-between px-4 py-3 ${a?"":"cursor-pointer"}`,onClick:D=>{!a&&!D.target.closest("button")&&h(Xe("Post")+"?id="+e.id)},children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-9 h-9 rounded-full bg-gradient-to-tr from-orange-400 via-pink-500 to-purple-600 p-[2px] flex-shrink-0 flex items-center justify-center",children:r.jsx(Js,{user:e.user_email===(t==null?void 0:t.email)?t:void 0,email:e.user_email,className:"w-full h-full rounded-full bg-white object-cover border border-white"})}),r.jsxs("div",{className:"min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("p",{className:"font-semibold text-[14px] text-slate-900 truncate",children:e.user_name||((Z=e.user_email)==null?void 0:Z.split("@")[0])}),r.jsx("span",{className:"text-slate-300 text-[13px]",children:"·"}),r.jsx("span",{className:"text-[13px] text-slate-400 font-normal flex-shrink-0",children:K})]}),e.trip_title&&r.jsxs("button",{onClick:()=>h(Xe("TripDetails")+"?id="+e.trip_id),className:"text-[12px] text-blue-600 font-medium flex items-center gap-0.5 hover:underline leading-tight",children:[r.jsx(Dn,{className:"w-3 h-3"})," ",e.trip_title]})]})]}),ce&&r.jsxs(mu,{children:[r.jsx(pu,{asChild:!0,children:r.jsx("button",{className:"p-1.5 -mr-1 hover:bg-slate-50 rounded-full transition-colors",children:r.jsx(XL,{className:"w-5 h-5 text-slate-400"})})}),r.jsx(Ec,{align:"end",className:"rounded-xl shadow-xl border-slate-100 min-w-[140px] p-1",children:r.jsxs(ln,{onClick:()=>{window.confirm("Delete this post?")&&H.mutate()},className:"text-red-600 rounded-lg cursor-pointer font-semibold text-[13px]",children:[H.isPending?r.jsx(gt,{className:"w-4 h-4 mr-2 animate-spin"}):r.jsx(us,{className:"w-4 h-4 mr-2"})," Delete post"]})})]})]})},ge=(Z=!1)=>{var O;const D=((O=e.media)==null?void 0:O.length)>0?e.media:e.image_url?[{url:e.image_url,type:"image"}]:[];return D.length===0?null:r.jsxs("div",{className:`relative w-full bg-black select-none overflow-hidden group ${Z?"h-full flex items-center":""}`,children:[r.jsx("div",{className:"flex overflow-x-auto snap-x snap-mandatory w-full h-full [&::-webkit-scrollbar]:hidden",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:D.map((U,ie)=>r.jsxs("div",{className:`w-full flex-shrink-0 snap-center flex items-center justify-center relative bg-black ${Z?"h-full":""}`,onClick:U.type==="video"?void 0:Y,children:[U.type==="video"?r.jsx("video",{src:U.url,controls:!0,playsInline:!0,className:`w-full object-contain ${Z?"max-h-full h-full":"max-h-[75vh]"}`}):r.jsx("img",{src:U.url,alt:"",className:`w-full object-contain cursor-pointer ${Z?"max-h-full h-full":"max-h-[75vh]"}`,draggable:!1}),D.length>1&&r.jsxs("div",{className:"absolute top-3 right-3 bg-black/60 backdrop-blur-md text-white text-[11px] font-semibold px-2.5 py-1 rounded-full pointer-events-none shadow-sm z-10",children:[ie+1," / ",D.length]})]},ie))}),r.jsx(Lt,{children:S&&r.jsx(re.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:1.4,opacity:0},transition:{duration:.4,ease:"easeOut"},className:"absolute inset-0 flex items-center justify-center pointer-events-none z-20",children:r.jsx(dS,{className:"w-28 h-28 text-white fill-white drop-shadow-2xl"})})})]})},he=(Z=!1)=>{var D;return r.jsxs("div",{className:"px-4 pt-3 pb-2.5",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsxs("div",{className:"flex items-center gap-3.5",children:[r.jsx(re.button,{whileTap:{scale:.75},onClick:()=>{t!=null&&t.email&&te.mutate()},children:r.jsx(dS,{className:`w-[26px] h-[26px] transition-all duration-200 ${x?"text-red-500 fill-red-500":"text-slate-800 hover:text-slate-500"}`})}),r.jsx(re.button,{whileTap:{scale:.85},onClick:()=>g(!m),children:r.jsx(sd,{className:"w-[25px] h-[25px] text-slate-800 hover:text-slate-500 transition-colors"})}),r.jsx(re.button,{whileTap:{scale:.85},onClick:async()=>{const O={title:e.user_name?`${e.user_name}'s post`:"Check out this post",text:e.content||"Check out this post on BATA Base!",url:window.location.origin+"/Explore"};
733navigator.share?await navigator.share(O).catch(()=>{}):await navigator.clipboard.writeText(O.url)},children:r.jsx(Zu,{className:"w-[22px] h-[22px] text-slate-800 hover:text-slate-500 transition-colors"})})]}),r.jsx(re.button,{whileTap:{scale:.85},children:r.jsx(mL,{className:"w-[24px] h-[24px] text-slate-800 hover:text-slate-500 transition-colors"})})]}),_>0&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:()=>E(!0),className:"text-[14px] tracking-tight text-slate-900 mb-1 leading-tight text-left hover:underline flex items-center flex-wrap",children:I()}),r.jsx($i,{open:P,onOpenChange:E,children:r.jsxs(ci,{className:"sm:max-w-md max-h-[80vh] flex flex-col p-0 overflow-hidden rounded-2xl border-0",children:[r.jsx(di,{className:"px-4 py-3 border-b border-slate-100 flex-shrink-0 mt-3",children:r.jsx(ui,{className:"text-center text-[16px]",children:"Likes"})}),r.jsx("div",{className:"overflow-y-auto p-2 pb-4",children:A.map(O=>r.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 hover:bg-slate-50 rounded-xl transition-colors",children:[r.jsx(Js,{email:O.user_email,className:"w-10 h-10 rounded-full flex-shrink-0"}),r.jsx("span",{className:"text-[14px] font-semibold text-slate-900",children:B(O.user_email)})]},O.id||O.user_email))})]})})]}),!Z&&e.content&&r.jsxs("p",{className:`text-[14px] text-slate-800 leading-[1.45] mb-1 ${a?"":"cursor-pointer"}`,onClick:()=>!a&&h(Xe("Post")+"?id="+e.id),children:[r.jsx("span",{className:"font-semibold mr-1.5",children:e.user_name||((D=e.user_email)==null?void 0:D.split("@")[0])}),e.content]}),!Z&&e.comments_count>0&&!m&&r.jsxs("button",{onClick:()=>g(!0),className:"text-[14px] text-slate-400 font-normal mt-0.5 hover:text-slate-500 transition-colors",children:["View ",e.comments_count>1?`all ${e.comments_count} comments`:"1 comment"]})]})},be=()=>r.jsx(Lt,{children:m&&r.jsx(re.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:r.jsx(SP,{postId:e.id,user:t,post:e})})});return l?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"md:hidden bg-white sm:rounded-2xl sm:border sm:border-slate-100/80 sm:shadow-[0_1px_3px_rgba(0,0,0,0.04)] overflow-hidden",children:[q(),ge(),he(),be()]}),r.jsxs("div",{className:"hidden md:flex bg-white rounded-2xl border border-slate-200/60 shadow-2xl overflow-hidden h-[85vh] min-h-[500px]",children:[r.jsx("div",{className:"flex-1 bg-black flex items-center justify-center relative min-w-0 border-r border-slate-100/20",children:ge(!0)}),r.jsxs("div",{className:"w-[350px] lg:w-[400px] flex flex-col flex-shrink-0 bg-white",children:[r.jsx("div",{className:"border-b border-slate-100 shrink-0",children:q()}),r.jsxs("div",{className:"flex-1 overflow-hidden relative flex flex-col",children:[e.content&&r.jsxs("div",{className:"px-4 py-4 border-b border-slate-50 flex gap-3 shrink-0",children:[r.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-100 flex-shrink-0 mt-0.5 overflow-hidden",children:r.jsx(Js,{user:e.user_email===(t==null?void 0:t.email)?t:void 0,email:e.user_email,className:"w-full h-full object-cover"})}),r.jsxs("div",{children:[r.jsxs("p",{className:"text-[14px] text-slate-800 leading-[1.45]",children:[r.jsx("span",{className:"font-semibold mr-1.5",children:e.user_name||((W=e.user_email)==null?void 0:W.split("@")[0])}),e.content]}),r.jsx("span",{className:"text-[12px] text-slate-400 mt-1 block",children:K})]})]}),r.jsx("div",{className:"flex-1 flex flex-col min-h-0",children:r.jsx(SP,{postId:e.id,user:t,post:e,fullHeight:!0})})]}),r.jsx("div",{className:"border-t border-slate-100 bg-white z-10 shrink-0",children:he(!0)})]})]})]}):r.jsxs("div",{className:"bg-white sm:rounded-2xl sm:border sm:border-slate-100/80 sm:shadow-[0_1px_3px_rgba(0,0,0,0.04)] overflow-hidden",children:[q(),ge(),he(),be()]})}function Jne({user:e,onClose:t}){var j;const n=tn(),[s,i]=w.useState(""),[a,l]=w.useState([]),[u,h]=w.useState(!1),[m,g]=w.useState(""),{data:x}=Re({queryKey:["my-trips"],queryFn:()=>ne.entities.Trip.filter({created_by:e==null?void 0:e.email}),enabled:!!(e!=null&&e.email),initialData:[]}),v=pt({mutationFn:P=>ne.entities.FeedPost.create(P),onSuccess:()=>{n.invalidateQueries({queryKey:["feed-posts"]}),t()}}),_=async P=>{const E=Array.from(P.target.files||[]);if(E.length===0)return;const R=10-a.length,A=E.slice(0,R);h(!0);try{const B=await Promise.all(A.map(async I=>{const z=await ne.integrations.Core.UploadFile({file:I});return z!=null&&z.file_url?{url:z.file_url,type:I.type.startsWith("video/")?"video":"image"}:null}));l(I=>
733[...I,...B.filter(Boolean)])}catch(B){console.error(B)}finally{h(!1)}},N=()=>{var E;if(!s.trim()&&a.length===0)return;const P=x.find(R=>R.id===m);v.mutate({user_email:e.email,user_name:e.full_name||e.email.split("@")[0],content:s.trim(),image_url:((E=a[0])==null?void 0:E.type)==="image"?a[0].url:void 0,media:a,trip_id:m||void 0,trip_title:(P==null?void 0:P.title)||void 0,likes_count:0,comments_count:0})},S=(s.trim()||a.length>0)&&!v.isPending;return r.jsx(re.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-end sm:items-center justify-center bg-black/60 backdrop-blur-sm",onClick:t,children:r.jsxs(re.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:28,stiffness:300},className:"bg-white w-full sm:max-w-lg rounded-t-[28px] sm:rounded-[28px] overflow-hidden shadow-2xl max-h-[92vh]",onClick:P=>P.stopPropagation(),children:[r.jsx("div",{className:"flex justify-center pt-2.5 pb-0 sm:hidden",children:r.jsx("div",{className:"w-9 h-1 rounded-full bg-slate-200"})}),r.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[r.jsx("button",{onClick:t,className:"w-8 h-8 flex items-center justify-center hover:bg-slate-100 rounded-full transition-colors",children:r.jsx(hn,{className:"w-5 h-5 text-slate-600"})}),r.jsx("h3",{className:"font-semibold tracking-tight text-[16px] text-slate-900",children:"New Post"}),r.jsx("button",{onClick:N,disabled:!S,className:`font-semibold tracking-tight text-[14px] px-4 py-1.5 rounded-full transition-all ${S?"bg-blue-600 text-white active:scale-95 shadow-sm":"bg-slate-100 text-slate-400"}`,children:v.isPending?r.jsx(gt,{className:"w-4 h-4 animate-spin"}):"Share"})]}),r.jsx("div",{className:"border-t border-slate-100"}),r.jsxs("div",{className:"p-4",children:[r.jsxs("div",{className:"flex gap-3",children:[r.jsx("div",{className:"flex-shrink-0",children:r.jsx("img",{src:_x(e),alt:"",className:"w-10 h-10 rounded-full bg-slate-100 object-cover border border-slate-200"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-[14px] font-semibold text-slate-900 mb-1.5",children:e.full_name||((j=e.email)==null?void 0:j.split("@")[0])}),r.jsx("textarea",{autoFocus:!0,placeholder:"What's on your mind?",value:s,onChange:P=>i(P.target.value),className:"w-full resize-none border-0 outline-none text-[15px] text-slate-800 placeholder:text-slate-400 leading-relaxed min-h-[80px] bg-transparent"})]})]}),a.length>0&&r.jsx("div",{className:"mt-3 flex gap-2 overflow-x-auto pb-2 [&::-webkit-scrollbar]:hidden",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:a.map((P,E)=>r.jsxs("div",{className:"relative flex-shrink-0 w-32 h-32 rounded-xl overflow-hidden bg-slate-100 border border-slate-200",children:[P.type==="video"?r.jsx("video",{src:P.url,className:"w-full h-full object-cover"}):r.jsx("img",{src:P.url,alt:"",className:"w-full h-full object-cover"}),r.jsx("button",{onClick:()=>l(R=>R.filter((A,B)=>B!==E)),className:"absolute top-1.5 right-1.5 w-6 h-6 bg-black/60 backdrop-blur-sm rounded-full flex items-center justify-center text-white hover:bg-black/80 transition-colors z-10",children:r.jsx(hn,{className:"w-3.5 h-3.5"})})]},E))})]}),r.jsxs("div",{className:"border-t border-slate-100 px-4 py-3 flex items-center gap-2 flex-wrap",children:[r.jsxs("label",{className:"flex items-center gap-2 px-3.5 py-2 bg-slate-50 hover:bg-slate-100 rounded-xl cursor-pointer transition-colors border border-slate-100",children:[u?r.jsx(gt,{className:"w-4.5 h-4.5 animate-spin text-slate-400"}):r.jsx(Qs,{className:"w-4.5 h-4.5 text-emerald-600"}),r.jsx("span",{className:"text-[13px] font-semibold text-slate-700",children:u?"Uploading...":"Photo/Video"}),r.jsx("input",{type:"file",accept:"image/*,video/*",multiple:!0,onChange:_,disabled:u||a.length>=10,className:"hidden"})]}),x.length>0&&r.jsxs("div",{className:"relative",children:[r.jsxs("select",{value:m,onChange:P=>g(P.target.value),className:"appearance-none pl-3.5 pr-8 py-2 bg-slate-50 hover:bg-slate-100 border border-slate-100 rounded-xl text-[13px] font-semibold text-slate-700 cursor-pointer transition-colors outline-none",children:[r.jsx("option",{value:"",children:"Tag trip"}),x.map(P=>r.jsx("option",{value:P.id,children:P.title},P.id))]}),r.jsx(Yu,{className:"w-3.5 h-3.5 text-slate-400 absolute right-2.5 top-1/2 -translate-y-1/2 pointer-events-none"})]})]})]})})}function kP(){const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"}function Wc({placementName:e,page:t,role:n,className:s=""}){const[i,a]=w.useState(kP);w.useEffect(()=>{const x=()=>a(kP());return window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]);const{data:l}=Re({queryKey:["ad",e,t,n,i],queryFn:async()=>(await ne.functions.invoke("getAdsForPlacement",{placement_name:e,page:t,role:n,device:i})).data,staleTime:1e3*60*2,retry:!1}),u=l==null?void 0:l.ad;if(!u)return null;const h=u.media_type==="image"&&u.media_url?r.jsx("img",{src:u.media_url,alt:u.alt_text||u.title||"Ad",className:"w-full h-full object-cover",loading:"lazy"}):u.media_type==="video"&&u.media_url?r.jsx("video",{src:u.media_url,autoPlay:!0,muted:!0,loop:!0,playsInl
733ine:!0,className:"w-full h-full object-cover"}):u.media_type==="html"&&u.html_content?r.jsx("div",{dangerouslySetInnerHTML:{__html:u.html_content},className:"w-full h-full"}):null;if(!h)return null;const m=u.destination_url?"a":"div",g=u.destination_url?{href:u.destination_url,target:"_blank",rel:"noopener noreferrer sponsored"}:{};return r.jsxs(m,{...g,className:`block overflow-hidden rounded-2xl relative group ${s}`,children:[h,r.jsx("span",{className:"absolute top-1.5 right-1.5 bg-black/40 text-white text-[9px] font-medium px-1.5 py-0.5 rounded opacity-60 pointer-events-none",children:"Ad"})]})}function y3(){var z;const e=Kn(),[t,n]=w.useState(!1),[s,i]=w.useState(""),[a,l]=w.useState(!1),[u,h]=w.useState("all"),[m,g]=w.useState(()=>{try{return JSON.parse(localStorage.getItem("explore_recent_searches")||"[]")}catch{return[]}}),x=V=>{if(!V.trim())return;const te=[V.trim(),...m.filter(H=>H.toLowerCase()!==V.trim().toLowerCase())].slice(0,5);g(te),localStorage.setItem("explore_recent_searches",JSON.stringify(te))},v=V=>{V.key==="Enter"&&(x(s),l(!1),V.target.blur())},{data:_}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),{data:N,isLoading:S}=Re({queryKey:["feed-posts"],queryFn:()=>ne.entities.FeedPost.list("-created_date",50),initialData:[]}),{data:j}=Re({queryKey:["post-likes"],queryFn:()=>ne.entities.PostLike.list(void 0,5e3),initialData:[]}),{data:P,isLoading:E}=Re({queryKey:["trending-trips"],queryFn:()=>ne.entities.Trip.list(void 0,10).then(V=>V.filter(te=>te.visibility!=="private").sort((te,H)=>(H.participants_count||0)-(te.participants_count||0)).slice(0,4)),initialData:[]}),R=N.filter(V=>{if(s.trim()){const te=s.toLowerCase();if(!((V.content||"").toLowerCase().includes(te)||(V.user_name||"").toLowerCase().includes(te)||(V.trip_title||"").toLowerCase().includes(te)))return!1}return!(u==="media"&&!V.image_url&&(!V.media||V.media.length===0))}),A=s.trim().toLowerCase(),B=A?Array.from(new Map(N.filter(V=>{var te,H;return((te=V.user_name)==null?void 0:te.toLowerCase().includes(A))||((H=V.user_email)==null?void 0:H.toLowerCase().includes(A))}).map(V=>[V.user_email,{email:V.user_email,name:V.user_name}])).values()).slice(0,3):[],I=A?Array.from(new Map(N.filter(V=>{var te;return V.trip_id&&((te=V.trip_title)==null?void 0:te.toLowerCase().includes(A))}).map(V=>[V.trip_id,{id:V.trip_id,title:V.trip_title}])).values()).slice(0,3):[];return r.jsxs("div",{className:"min-h-screen bg-[#fafcff] pb-24 md:pb-12 font-sans selection:bg-blue-200",children:[r.jsxs("div",{className:"bg-slate-900 px-6 pt-12 pb-32 md:pt-20 md:pb-36 rounded-b-[48px] relative overflow-hidden text-white shadow-2xl shadow-slate-900/20",children:[r.jsx("div",{className:"absolute inset-0 bg-[url('https://images.unsplash.com/photo-1469474968028-56623f02e42e?q=80&w=2000&auto=format&fit=crop')] bg-cover bg-center opacity-20 mix-blend-overlay pointer-events-none"}),r.jsx("div",{className:"absolute top-0 right-0 -mr-20 -mt-20 w-96 h-96 bg-blue-500/30 rounded-full blur-3xl pointer-events-none"}),r.jsx("div",{className:"absolute bottom-0 left-0 -ml-20 -mb-20 w-80 h-80 bg-indigo-500/30 rounded-full blur-3xl pointer-events-none"}),r.jsx("div",{className:"max-w-6xl mx-auto relative z-10 flex flex-col md:flex-row md:items-end justify-between gap-8",children:r.jsxs("div",{className:"max-w-2xl",children:[r.jsxs(re.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-4xl md:text-6xl font-semibold tracking-tight mb-4",children:["Community ",r.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-indigo-400",children:"Feed"})]}),r.jsx(re.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"text-slate-300 font-medium text-lg",children:"See what other explorers are up to. Share your moments, photos, and stories from the wild."})]})})]}),r.jsx("div",{className:"max-w-6xl mx-auto px-4 md:px-8 -mt-20 relative z-20",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8",children:[r.jsxs("div",{className:"lg:col-span-8 space-y-6",children:[r.jsxs(re.div,{initial:{opacity:0,y:20}
733,animate:{opacity:1,y:0},transition:{delay:.2},className:"bg-white p-2 md:p-3 rounded-[28px] shadow-xl shadow-slate-200/50 border border-slate-100 flex items-center relative z-40",children:[r.jsxs("div",{className:"flex-1 flex items-center bg-slate-50 rounded-2xl px-4 py-3 relative transition-colors focus-within:bg-slate-100",children:[r.jsx(ai,{className:"w-5 h-5 text-slate-400 mr-3 shrink-0"}),r.jsx("input",{value:s,onChange:V=>i(V.target.value),onFocus:()=>l(!0),onBlur:()=>setTimeout(()=>l(!1),200),onKeyDown:v,placeholder:"Search posts, people, trips...",className:"flex-1 bg-transparent text-[15px] font-medium text-slate-900 placeholder:text-slate-400 outline-none w-full"}),s&&r.jsx("button",{onClick:()=>{i(""),l(!0)},className:"p-1 hover:bg-slate-200 rounded-full transition-colors ml-2",children:r.jsx(hn,{className:"w-4 h-4 text-slate-500"})})]}),r.jsx("div",{className:"pl-3 hidden md:block",children:r.jsxs("button",{onClick:()=>n(!0),className:"bg-slate-900 hover:bg-slate-800 text-white px-6 py-3 rounded-2xl font-semibold text-sm transition-colors flex items-center gap-2",children:[r.jsx(Cn,{className:"w-4 h-4"})," Create Post"]})}),r.jsx(Lt,{children:a&&r.jsx(re.div,{initial:{opacity:0,y:10,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.98},className:"absolute top-[110%] left-0 right-0 md:w-[500px] bg-white rounded-[24px] shadow-2xl shadow-slate-900/10 border border-slate-100 overflow-hidden z-50 max-h-[60vh] overflow-y-auto",children:A?r.jsxs("div",{className:"p-3 space-y-2",children:[B.length>0&&r.jsxs("div",{children:[r.jsx("div",{className:"px-4 py-2 text-[11px] font-bold text-slate-400 uppercase tracking-widest",children:"People"}),B.map(V=>r.jsxs("button",{onClick:()=>{i(V.name||V.email),x(V.name||V.email),l(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 rounded-2xl transition-colors text-left",children:[r.jsx(Js,{email:V.email,className:"w-10 h-10 rounded-full flex-shrink-0 border border-slate-100"}),r.jsx("span",{className:"text-[14px] font-semibold text-slate-800",children:V.name||V.email.split("@")[0]})]},V.email))]}),I.length>0&&r.jsxs("div",{children:[r.jsx("div",{className:"px-4 py-2 text-[11px] font-bold text-slate-400 uppercase tracking-widest",children:"Trips"}),I.map(V=>r.jsxs("button",{onClick:()=>e(Xe("TripDetails")+"?id="+V.id),className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 rounded-2xl transition-colors text-left",children:[r.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-50 flex items-center justify-center flex-shrink-0 border border-blue-100/50",children:r.jsx(Dn,{className:"w-5 h-5 text-blue-500"})}),r.jsx("span",{className:"text-[14px] font-semibold text-slate-800 truncate",children:V.title})]},V.id))]}),r.jsxs("button",{onClick:()=>{x(s),l(!1)},className:"w-full flex items-center gap-3 px-4 py-4 hover:bg-blue-50 rounded-2xl transition-colors text-left mt-2 bg-slate-50/50 border border-slate-100",children:[r.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center flex-shrink-0",children:r.jsx(ai,{className:"w-4 h-4 text-blue-600"})}),r.jsxs("span",{className:"text-[14px] font-semibold text-blue-600",children:['See all results for "',s,'"']})]})]}):r.jsx("div",{className:"p-3",children:m.length>0?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"px-4 py-2 text-[11px] font-bold text-slate-400 uppercase tracking-widest",children:"Recent Searches"}),m.map((V,te)=>r.jsxs("button",{onClick:()=>{i(V),x(V),l(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-slate-50 rounded-2xl transition-colors text-left group",children:[r.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-50 group-hover:bg-white flex items-center justify-center border border-slate-100",children:r.jsx(zn,{className:"w-4 h-4 text-slate-400"})}),r.jsx("span",{className:"text-[14px] font-medium text-slate-700",children:V})]},te))]}):r.jsx("div",{className:"px-4 py-8 text-center text-slate-400 text-[14px] font-medium",children:"Try searching for trips, users, or keywords."})})})})]}),r.jsx("div",{className:"md:hidden",children:r.jsxs("button",{onClick:()=>n(!0),className:"w-full bg-slate-900 hover:bg-slate-800 text-white px-6 py-4 rounded-2xl font-semibold text-sm transition-colors flex items-center justify-center gap-2 shadow-lg shadow-slate-900/20",children:[r.jsx(Cn,{className:"w-5 h-5"})," Share an update"]})}),_&&r.jsxs(re.div,{initial:{opacity:0,y:20}
733,animate:{opacity:1,y:0},transition:{delay:.3},className:"hidden md:flex bg-white rounded-[32px] p-5 shadow-sm border border-slate-100 items-center gap-4 cursor-text hover:border-blue-200 hover:shadow-md transition-all group",onClick:()=>n(!0),children:[r.jsxs("div",{className:"relative",children:[r.jsx(Js,{user:_,className:"w-14 h-14 rounded-full flex-shrink-0 border-2 border-white shadow-sm"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-4 h-4 bg-emerald-500 border-2 border-white rounded-full"})]}),r.jsxs("div",{className:"flex-1 bg-slate-50 group-hover:bg-slate-100 transition-colors rounded-2xl px-5 py-4 text-slate-400 font-medium text-[15px] border border-slate-100/50",children:["What's on your mind, ",((z=_.full_name)==null?void 0:z.split(" ")[0])||"Explorer","?"]}),r.jsx("div",{className:"flex items-center gap-2",children:r.jsx("div",{className:"w-12 h-12 rounded-2xl bg-blue-50 text-blue-500 flex items-center justify-center hover:bg-blue-100 transition-colors",children:r.jsx(Qs,{className:"w-5 h-5"})})})]}),r.jsxs(re.div,{initial:{opacity:0}
733,animate:{opacity:1},transition:{delay:.4},className:"flex items-center gap-2 overflow-x-auto hide-scrollbar",children:[r.jsx("button",{onClick:()=>h("all"),className:`px-6 py-2.5 rounded-2xl text-sm font-semibold transition-all ${u==="all"?"bg-slate-900 shadow-md shadow-slate-900/10 text-white":"bg-white text-slate-500 border border-slate-200 hover:bg-slate-50"}`,children:"All Posts"}),r.jsxs("button",{onClick:()=>h("media"),className:`px-6 py-2.5 rounded-2xl text-sm font-semibold transition-all flex items-center gap-2.5 ${u==="media"?"bg-slate-900 shadow-md shadow-slate-900/10 text-white":"bg-white text-slate-500 border border-slate-200 hover:bg-slate-50"}`,children:[r.jsx(Qs,{className:"w-4 h-4"})," Media Only"]})]}),r.jsx("div",{className:"space-y-6 pb-12",children:S?r.jsxs("div",{className:"flex flex-col items-center justify-center py-20 gap-4",children:[r.jsx(gt,{className:"w-8 h-8 text-blue-500 animate-spin"}),r.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Loading the feed..."})]}):R.length===0?r.jsxs("div",{className:"bg-white rounded-[32px] border border-slate-200/60 shadow-sm flex flex-col items-center justify-center p-12 text-center",children:[r.jsx("div",{className:"w-24 h-24 bg-slate-50 text-slate-400 rounded-full flex items-center justify-center mb-6 shadow-inner border-4 border-white",children:r.jsx(ai,{className:"w-10 h-10"})}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight text-slate-900 mb-2",children:s?"No results found":"No posts yet"}),r.jsx("p",{className:"text-slate-500 font-medium max-w-sm mb-8 text-[15px]",children:s?`We couldn't find anything matching "${s}". Try a different keyword.`:"Be the first to share an update with the community!"}),!s&&r.jsxs("button",{onClick:()=>n(!0),className:"bg-blue-600 text-white font-semibold text-[15px] px-8 py-3.5 rounded-full hover:bg-blue-700 active:scale-95 transition-all shadow-lg shadow-blue-600/25 flex items-center gap-2",children:[r.jsx(Cn,{className:"w-5 h-5"})," Share something"]})]}):R.map((V,te)=>{const H=te===2,Y=j.filter(K=>K.post_id===V.id),ce=_!=null&&_.email?Y.some(K=>K.user_email===_.email):!1;return r.jsxs(dt.Fragment,{children:[H&&r.jsx("div",{className:"mb-6",children:r.jsx(Wc,{placementName:"inline_content",page:"Explore",role:_==null?void 0:_.role,className:"rounded-[32px] overflow-hidden shadow-sm border border-slate-100"})}),r.jsx(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:Math.min(te*.05,.3),duration:.5},children:r.jsx(v3,{post:V,user:_,isLiked:ce,likesCount:Y.length,postLikes:Y})})]},V.id)})})]}),r.jsxs("div",{className:"lg:col-span-4 space-y-6 hidden lg:block",children:[r.jsx(Wc,{placementName:"top_banner",page:"Explore",role:_==null?void 0:_.role,className:"rounded-[32px] overflow-hidden shadow-sm border border-slate-100"}),r.jsxs(re.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.4},className:"bg-white rounded-[32px] p-6 shadow-sm border border-slate-100 relative overflow-hidden",children:[r.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-orange-500/5 rounded-full blur-2xl pointer-events-none -mr-10 -mt-10"}),r.jsxs("div",{className:"flex items-center justify-between mb-6 relative z-10",children:[r.jsxs("h3",{className:"font-semibold text-slate-900 text-[17px] tracking-tight flex items-center gap-2",children:[r.jsx("div",{className:"w-8 h-8 rounded-full bg-orange-50 flex items-center justify-center text-orange-500",children:r.jsx(Vg,{className:"w-4 h-4"})}),"Popular Trips"]}),r.jsx("button",{onClick:()=>e(Xe("Trips")),className:"text-sm font-semibold text-blue-600 hover:text-blue-700 bg-blue-50 px-3 py-1.5 rounded-full transition-colors",children:"View All"})]}),r.jsx("div",{className:"flex flex-col gap-5 relative z-10",children:E?[1,2,3].map(V=>r.jsx("div",{className:"h-20 bg-slate-50 animate-pulse rounded-[24px] border border-slate-100"},V)):P.length===0?r.jsx("div",{className:"text-center py-6 text-slate-500 text-sm font-medium",children:"No public trips right now"}):P.map(V=>r.jsxs("div",{onClick:()=>e(Xe("TripDetails")+"?id="+V.id),className:"group flex gap-4 cursor-pointer p-2 -m-2 rounded-[24px] hover:bg-slate-50 hover:shadow-sm border border-transparent hover:border-slate-100 transition-all",children:[r.jsxs("div",{className:"w-20 h-20 rounded-[18px] overflow-hidden shrink-0 relative shadow-sm",children:[r.jsx("img",{src:V.cover_image_url||"https://images.unsplash.com/photo-1501555088652-021faa106b9b",className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-700"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/20 to-transparent"})]}),r.jsxs("div",{className:"flex flex-col justify-center min-w-0 flex-1 py-1",children:[r.jsx("h4",{className:"font-semibold tracking-tight text-slate-900 text-[15px] truncate group-hover:text-blue-600 transition-colors mb-1.5",children:V.title}),r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsxs("div",{className:"flex items-center text-xs text-slate-500 font-medium",children:[r.jsx(Li,{className:"w-3.5 h-3.5 mr-1.5 text-slate-400"}),V.participants_count||1," joined"]}),r.jsxs("div",{className:"flex items-center text-xs text-slate-500 font-medium",children:[r.jsx(Dn,{className:"w-3.5 h-3.5 mr-1.5 text-slate-400"}),r.jsx("span",{className:"truncate",children:V.location||"Location TBA"})]})]})]}),r.jsx("div",{className:"self-center pr-2",children:r.jsx("div",{className:"w-8 h-8 rounded-full bg-white border border-slate-200 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all shadow-sm -translate-x-2 group-hover:translate-x-0",children:r.jsx(wa,{className:"w-4 h-4 text-blue-600"})})})]},V.id))})]}),r.jsx("div",{className:"sticky top-28",children:r.jsx(Wc,{placementName:"sidebar",page:"Explore",role:_==null?void 0:_.role,className:"rounded-[32px] overflow-hidden shadow-sm border border-slate-100"})})]})]})}),r.jsx(Lt,{children:t&&_&&r.jsx(Jne,{user:_,onClose:()=>n(!1)})})]})}function ese({trip:e,onClose:t}){const n=tn(),[s,i]=w.useState(!1),[a,l]=w.useState(null),[u,h]=w.useState("Summer"),[m,g]=w.useState((e==null?void 0:e.difficulty)||"Moderate"),[x,v]=w.useState(""),_=pt
733({mutationFn:async()=>(await ne.functions.invoke("generateTripItems",{location:(e==null?void 0:e.location)||"Unknown",duration:(e==null?void 0:e.duration_days)||3,participants:(e==null?void 0:e.max_people)||(e==null?void 0:e.participants_count)||4,type:m,season:u,context:x})).data,onSuccess:P=>{const E=(P.gear||[]).map((A,B)=>({...A,id:`g_${B}`,selected:!0})),R=(P.food||[]).map((A,B)=>({...A,id:`f_${B}`,selected:!0}));l({gear:E,food:R}),i(!1)},onError:P=>{console.error(P),i(!1),alert("Failed to generate suggestions. Please check your network and try again.")}}),N=()=>{i(!0),_.mutate()},S=(P,E)=>{l(R=>({...R,[P]:R[P].map(A=>A.id===E?{...A,selected:!A.selected}:A)}))},j=pt({mutationFn:async()=>{const P=a.gear.filter(A=>A.selected).map(A=>({trip_id:e.id,item_type:"gear",name:A.name,category:A.category||"OTHER",quantity_needed:A.quantity_needed||A.quantity||1,notes:A.notes||A.description||"",claims:[]})),E=a.food.filter(A=>A.selected).map(A=>({trip_id:e.id,item_type:"food",name:A.name,category:A.category||"Snacks",quantity_needed:A.quantity_needed||A.quantity||1,notes:A.notes||A.description||"",claims:[]})),R=[...P,...E];R.length>0&&await ne.entities.GearItem.bulkCreate(R)},onSuccess:()=>{n.invalidateQueries(["gear",e.id]),t()}});return r.jsx(re.div,{initial:{opacity:0}
733,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-50 flex items-center justify-center p-4 md:p-6",onClick:t,children:r.jsxs(re.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},onClick:P=>P.stopPropagation(),className:"bg-white rounded-3xl w-full max-w-2xl max-h-[90vh] overflow-hidden flex flex-col shadow-2xl",children:[r.jsxs("div",{className:"p-6 border-b border-slate-100 flex items-center justify-between bg-gradient-to-r from-blue-600 to-indigo-600 text-white",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"p-2 bg-white/20 rounded-xl backdrop-blur-md",children:r.jsx(mo,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{children:[r.jsx("h2",{className:"font-bold text-xl tracking-tight",children:"AI Trip Planner"}),r.jsx("p",{className:"text-blue-100 text-sm font-medium",children:"Generate gear & food lists magically"})]})]}),r.jsx("button",{onClick:t,className:"p-2 bg-black/10 hover:bg-black/20 rounded-full transition-colors",children:r.jsx(hn,{className:"w-5 h-5"})})]}),r.jsxs("div",{className:"flex-1 overflow-y-auto p-6 bg-slate-50/50",children:[!a&&!s&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"bg-white p-5 rounded-2xl border border-slate-200 shadow-sm",children:[r.jsx("h3",{className:"font-semibold tracking-tight text-slate-800 mb-4",children:"Trip Details"}),r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-semibold text-slate-500 uppercase tracking-wider mb-2",children:"Season"}),r.jsx("select",{value:u,onChange:P=>h(P.target.value),className:"w-full bg-slate-50 border border-slate-200 rounded-xl p-3 text-sm font-semibold tracking-tight text-slate-700 focus:outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-400",children:["Spring","Summer","Fall","Winter"].map(P=>r.jsx("option",{value:P,children:P},P))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-semibold text-slate-500 uppercase tracking-wider mb-2",children:"Trip Style"}),r.jsx("select",{value:m,onChange:P=>g(P.target.value),className:"w-full bg-slate-50 border border-slate-200 rounded-xl p-3 text-sm font-semibold tracking-tight text-slate-700 focus:outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-400",children:["Easy","Moderate","Hard","Expert","Overlanding","Backpacking","Car Camping"].map(P=>r.jsx("option",{value:P,children:P},P))})]})]}),r.jsxs("div",{className:"mt-4 text-sm text-slate-500 bg-slate-50 p-3 rounded-xl border border-slate-100",children:[r.jsx("span",{className:"font-semibold text-slate-700",children:"Trip Info:"})," Location: ",(e==null?void 0:e.location)||"Unknown",", Duration: ",(e==null?void 0:e.duration_days)||3," days, People: ",(e==null?void 0:e.max_people)||(e==null?void 0:e.participants_count)||4]}),r.jsxs("div",{className:"mt-4",children:[r.jsx("label",{className:"block text-xs font-semibold text-slate-500 uppercase tracking-wider mb-2",children:"Additional Context (Optional)"}),r.jsx("textarea",{value:x,onChange:P=>v(P.target.value),placeholder:"e.g. We have two vegans, someone with a peanut allergy, and we want to travel ultralight...",className:"w-full bg-slate-50 border border-slate-200 rounded-xl p-3 text-sm font-medium tracking-tight text-slate-700 focus:outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-400 resize-none h-20"})]})]}),r.jsxs("button",{onClick:N,className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-4 rounded-2xl flex items-center justify-center gap-2 transition-all shadow-lg shadow-blue-600/20 active:scale-[0.98]",children:[r.jsx(mo,{className:"w-5 h-5"})," Generate Suggestions"]})]}),s&&r.jsxs("div",{className:"py-20 flex flex-col items-center justify-center text-center",children:[r.jsxs("div",{className:"relative w-20 h-20 mb-6",children:[r.jsx("div",{className:"absolute inset-0 border-4 border-blue-100 rounded-full"}),r.jsx("div",{className:"absolute inset-0 border-4 border-blue-600 rounded-full border-t-transparent animate-spin"}),r.jsx(mo,{className:"absolute inset-0 m-auto w-8 h-8 text-blue-600 animate-pulse"})]}),r.jsx("h3",{className:"font-bold text-xl tracking-tight text-slate-800 mb-2",children:"Thinking..."}),r.jsx("p",{className:"text-slate-500 font-medium max-w-[250px]",children:"Analyzing the location, duration, and group size to build the perfect packing list."})]}),a&&!s&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"bg-green-50 border border-green-200 text-green-800 px-4 py-3 rounded-xl text-sm font-medium flex items-center gap-2",children:[r.jsx(u0,{className:"w-5 h-5 text-green-600"}),"Review the suggestions and uncheck anything you don't need."]}),["gear","food"].map(P=>{const E=a[P];return!E||E.length===0?null:r.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden",children:[r.jsxs("div",{className:"bg-slate-50 px-4 py-3 border-b border-slate-200 flex justify-between items-center",children:[r.jsxs("h3",{className:"font-bold text-slate-800 capitalize tracking-tight",children:[P," Suggestions"]}),r.jsxs("span",{className:"text-xs font-semibold text-slate-500 bg-slate-200 px-2.5 py-1 rounded-full",children:[E.filter(R=>R.selected).length," selected"]})]}),r.jsx("div",{className:"divide-y divide-slate-100",children:E.map(R=>r.jsxs("div",{onClick:()=>
733S(P,R.id),className:`flex items-start gap-3 p-4 cursor-pointer transition-colors ${R.selected?"bg-white hover:bg-slate-50":"bg-slate-50 opacity-60"}`,children:[r.jsx("div",{className:"mt-0.5",children:R.selected?r.jsx(u0,{className:"w-5 h-5 text-blue-600"}):r.jsx(hw,{className:"w-5 h-5 text-slate-400"})}),r.jsxs("div",{children:[r.jsx("p",{className:`font-semibold tracking-tight text-sm ${R.selected?"text-slate-900":"text-slate-500 line-through"}`,children:R.name}),r.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r.jsx("span",{className:"text-[10px] font-bold text-slate-500 bg-slate-100 px-2 py-0.5 rounded-md",children:R.category}),r.jsxs("span",{className:"text-[10px] font-bold text-slate-500",children:["Qty: ",R.quantity_needed||R.quantity||1]})]}),R.notes&&r.jsx("p",{className:"text-xs text-slate-500 mt-1",children:R.notes})]})]},R.id))})]},P)})]})]}),a&&!s&&r.jsx("div",{className:"p-6 border-t border-slate-100 bg-white",children:r.jsx("button",{onClick:()=>j.mutate(),disabled:j.isPending,className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-4 rounded-2xl flex items-center justify-center gap-2 transition-all shadow-lg shadow-blue-600/20 active:scale-[0.98] disabled:opacity-70 disabled:active:scale-100",children:j.isPending?r.jsxs(r.Fragment,{children:[r.jsx(gt,{className:"w-5 h-5 animate-spin"})," Adding to Trip..."]}):r.jsxs(r.Fragment,{children:["Add Selected Items ",r.jsx(wa,{className:"w-5 h-5"})]})})})]})})}const CP=[{id:"1",title:"Mojave Overlander"},{id:"2",title:"Desert Dunes"}],tse=[{id:"1",trip_id:"1",name:"Roof Top Tent",category:"SHELTER",claimed_by:"[email protected]",claimed_by_name:"Alex"},{id:"2",trip_id:"1",name:"Traction Boards",category:"SAFETY",claimed_by:"[email protected]",claimed_by_name:"Jordan"},{id:"3",trip_id:"1",name:"Heavy Duty Tarp",category:"SHELTER"},{id:"4",trip_id:"1",name:"Jetboil Genesis System",category:"COOKING",claimed_by:"[email protected]",claimed_by_name:"Sarah"},{id:"5",trip_id:"1",name:"Propane Tanks (x2)",category:"COOKING"},{id:"6",trip_id:"1",name:"45L Rotomolded Cooler",category:"COOKING",claimed_by:"[email protected]",claimed_by_name:"Alex"},{id:"7",trip_id:"1",name:"Recovery Rope",category:"SAFETY",claimed_by:"[email protected]",claimed_by_name:"Jordan"},{id:"8",trip_id:"1",name:"Air Compressor",category:"OTHER",claimed_by:"[email protected]",claimed_by_name:"Sarah"}];function nse(){const e=Kn(),t=tn(),s=new URLSearchParams(window.location.search).get("trip_id")||"1",{data:i}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),a=(i==null?void 0:i.email)||"[email protected]",{data:l}=Re({queryKey:["trip",s],queryFn:()=>ne.entities.Trip.get(s).catch(()=>null)}),u=l||CP.find(we=>we.id===s)||CP[0],{data:h}=Re({queryKey:["gear",s],queryFn:()=>ne.entities.GearItem.filter({trip_id:s}).catch(()=>[])}),m=pt({mutationFn:({id:we,data:st})=>ne.entities.GearItem.update(we,st),onSuccess:()=>t.invalidateQueries(["gear",s])}),[g,x]=w.useState("Group Gear"),{data:v}=Re({queryKey:["personalGear",s,a],queryFn:()=>ne.entities.PersonalGearItem.filter({trip_id:s,user_email:a}).catch(()=>[]),enabled:!0}),{data:_}=Re({queryKey:["myMembership",s,i==null?void 0:i.email],queryFn:()=>i!=null&&i.email?ne.entities.TripMember.filter({trip_id:s,user_email:i.email}).then(we=>we[0]||null).catch(()=>null):null,enabled:!!(i!=null&&i.email)}),N=(_==null?void 0:_.rsvp_status)==="maybe",S=(u==null?void 0:u.created_by)===(i==null?void 0:i.email),j=(_==null?void 0:_.role)==="admin"||(i==null?void 0:i.role)==="admin"||S,[P,E]=w.useState(!1),[R,A]=w.useState(!1),B=pt({mutationFn:we=>ne.entities.PersonalGearItem.create(we),onSuccess:()=>{t.invalidateQueries(["personalGear",s,a]),ce(!1),he(""),U(1)}}),I=pt({mutationFn:({id:we,data:st})=>ne.entities.PersonalGearItem.update(we,st),onSuccess:()=>t.invalidateQueries(["personalGear",s,a])}),[z,V]=w.useState(null),te=z||((h==null?void 0:h.length)>0?h:tse.filter(we=>we.trip_id===u.id)),H=we=>{const st=Array.isArray(we.claims)?[...we.claims]:[],Wt=st.findIndex(cn=>cn.user_email===(i==null?void 0:i.email));if(Wt>-1){st.splice(Wt,1),m.mutate({id:we.id,data:{claims:st}});return}if(N){alert("Please update your RSVP to 'Going' to claim items for the group.");return}const ss=st.reduce((cn,ps)=>cn+(ps.quantity||1),0),Je=Math.max(0,(we.quantity_needed||1)-ss);if(Je===0)return;let Wn=Je;if(Je>1){const cn=window.prompt(`How many are you bringing? (Need ${Je} more)`,Je);if(!cn)return;Wn=parseInt(cn)||1,Wn=Math.min(Wn,Je)}if(we.id.length<5){alert("Action not supported on mock data. Please create a real trip.");return}st.push({user_email:(i==null?void 0:i.email)||"[email protected]",user_name:(i==null?void 0:i.full_name)||"Guest",quantity:Wn}),m.mutate({id:we.id,data:{claims:st}})},[Y,ce]=w.useState(!1),[K,q]=w.useState(null),[ge,he]=w.useState(""),[be,W]=w.useState("SHELTER"),[Z,D]=w.useState(""),[O,U]=w.useState(1),[ie,le]=w.useState(""),fe=we=>{q(we),he(we.name||we.item_name||"");const st=g==="Group Food"?Te:g==="Personal"?We:De,Wt=we.category||(g==="Group Food"?"Snacks":"SHELTER");st.includes(Wt)?(W(Wt),D("")):(W("custom"),D(Wt)),U(we.quantity_needed||1),le(we.notes||""),ce(!0)},me=we=>{window.confirm("Are you sure you want to delete this item?")&&(g==="Personal"?ne.entities.PersonalGearItem.delete(we.id).then(()=>
733t.invalidateQueries(["personalGear",s,a])):ne.entities.GearItem.delete(we.id).then(()=>t.invalidateQueries(["gear",s])))},oe=()=>{q(null),he(""),U(1),le(""),W(g==="Group Food"?"Snacks":"SHELTER"),D(""),ce(!0)},Q=pt({mutationFn:we=>ne.entities.GearItem.create(we),onSuccess:()=>{t.invalidateQueries(["gear",s]),ce(!1),he(""),U(1),le("")}}),Ne=()=>{if(!ge.trim())return;const we=be==="custom"?Z.trim()||"OTHER":be;if(K){g==="Personal"?I.mutate({id:K.id,data:{item_name:ge,category:we,notes:ie}},{onSuccess:()=>{ce(!1),q(null),he(""),D(""),U(1),le("")}}):m.mutate({id:K.id,data:{name:ge,category:we,quantity_needed:O,notes:ie}},{onSuccess:()=>{ce(!1),q(null),he(""),D(""),U(1),le("")}});return}if(g==="Personal")B.mutate({trip_id:s,user_email:a,item_name:ge,category:we,is_packed:!1,notes:ie});else{const st=g==="Group Food"?"food":"gear";Q.mutate({trip_id:s,name:ge,category:we,quantity_needed:O,item_type:st,notes:ie,claims:[]})}},Ce=we=>{I.mutate({id:we.id,data:{is_packed:!we.is_packed}})},De=["SHELTER","COOKING","SAFETY","NAVIGATION","CLOTHING","HYGIENE","OTHER"],Te=["Breakfast","Lunch","Dinner","Snacks","Drinks"],We=[...De,...Te],$e=(te==null?void 0:te.filter(we=>we.item_type!=="food"))||[],Et=(te==null?void 0:te.filter(we=>we.item_type==="food"))||[],Xt=De.filter(we=>$e.some(st=>st.category===we)),Zt=[...new Set($e.map(we=>we.category).filter(we=>!De.includes(we)&&we))],Pn=[...Xt,...Zt],In=Te.filter(we=>Et.some(st=>st.category===we)),pn=[...new Set(Et.map(we=>we.category).filter(we=>!Te.includes(we)&&we))],Tn=[...In,...pn],ms=v||[],ae=We.filter(we=>ms.some(st=>st.category===we)),Se=[...new Set(ms.map(we=>we.category).filter(we=>!We.includes(we)&&we))],Ve=[...ae,...Se],Nt=$e.reduce((we,st)=>we+(st.quantity_needed||1),0),gn=$e.reduce((we,st)=>{const Wt=Array.isArray(st.claims)?st.claims:[];return we+Wt.reduce((ss,Je)=>ss+(Je.quantity||1),0)},0),Mt=Nt>0?Math.min(100,Math.round(gn/Nt*100)):0,En=Et.reduce((we,st)=>we+(st.quantity_needed||1),0),Rt=Et.reduce((we,st)=>{const Wt=Array.isArray(st.claims)?st.claims:[];return we+Wt.reduce((ss,Je)=>ss+(Je.quantity||1),0)},0),xn=En>0?Math.min(100,Math.round(Rt/En*100)):0,Vn=ms.length,Ir=ms.filter(we=>we.is_packed).length,mi=Vn>0?Math.round(Ir/Vn*100):0,Ma=[...$e,...Et].reduce((we,st)=>{const ss=(Array.isArray(st.claims)?st.claims:[]).find(Je=>Je.user_email===(i==null?void 0:i.email));return ss&&we.push({...st,myQuantity:ss.quantity}),we},[]);return r.jsxs("div",{className:"min-h-screen flex flex-col",children:[r.jsxs("header",{className:"bg-white/90 backdrop-blur-md border-b border-slate-100 p-4 px-6 flex items-center justify-between z-20 sticky top-0",children:[r.jsx("button",{onClick:()=>e(-1),className:"p-2 -ml-2 rounded-full hover:bg-slate-100",children:r.jsx(gr,{className:"w-6 h-6"})}),r.jsx("h1",{className:"font-semibold tracking-tight text-lg",children:(u==null?void 0:u.title)||"Trip"}),r.jsxs("div",{className:"flex space-x-2",children:[r.jsx("button",{onClick:()=>e("/Home"),className:"p-2 rounded-full hover:bg-slate-100",children:r.jsx(Ii,{className:"w-5 h-5 text-slate-600"})}),r.jsx("button",{onClick:()=>{navigator.clipboard.writeText(window.location.href),alert("Link copied to clipboard!")},className:"p-2 rounded-full hover:bg-slate-100",children:r.jsx(Zu,{className:"w-5 h-5 text-slate-600"})}),r.jsxs(mu,{children:[r.jsx(pu,{asChild:!0,children:r.jsx("button",{className:"p-2 -mr-2 rounded-full hover:bg-slate-100",children:r.jsx(r5,{className:"w-5 h-5 text-slate-600"})})}),r.jsxs(Ec,{align:"end",className:"w-56 p-2 rounded-2xl shadow-xl border-slate-100",children:[r.jsx(ln,{onClick:()=>e(Xe("TripDetails")+"?id="+u.id),className:"rounded-xl cursor-pointer p-3 font-semibold mb-1",children:"Back to Trip Details"}),r.jsx(ln,{onClick:()=>e(Xe("Chat")+"?trip_id="+u.id),className:"rounded-xl cursor-pointer p-3 font-semibold mb-1",children:"Trip Chat"}),j&&r.jsxs(ln,{onClick:()=>E(!0),className:"rounded-xl cursor-pointer p-3 font-semibold text-indigo-600",children:[r.jsx(mo,{className:"w-4 h-4 mr-2"})," AI Planner"]})]})]})]})]}),r.jsxs("div",{className:"p-4 pt-6 flex-1 pb-24",children:[r.jsx("div",{className:"flex border-b border-slate-200 mb-6 font-semibold tracking-tight overflow-x-auto scrollbar-hide",children:["Group Gear","Group Food","Personal"].map(we=>r.jsx("button",{onClick:()=>x(we),className:`flex-1 min-w-[120px] pb-3 text-center transition-colors whitespace-nowrap px-4 ${g===we?"text-blue-600 border-b-2 border-blue-600":"text-slate-400"}`,children:we==="Personal"?"My Checklist":we},we))}),(g==="Group Gear"||g==="Group Food")&&r.jsxs(r.Fragment,{children:[r.jsx(Lt,{children:N&&r.jsxs(re.div,{initial:{opacity:0,height:0,marginBottom:0}
733,animate:{opacity:1,height:"auto",marginBottom:24},className:"p-4 bg-amber-50 border border-amber-200 rounded-2xl flex items-start gap-3 overflow-hidden",children:[r.jsx(Lu,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-semibold tracking-tight text-amber-800",children:"Update your RSVP to claim items"}),r.jsx("p",{className:"text-xs text-amber-600 mt-0.5",children:`You're marked as "Maybe". To ensure the group isn't left without essential items, change your status to "Going" before claiming.`})]})]})}),r.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`${g==="Group Food"?"bg-orange-50 border-orange-100":"bg-blue-50 border-blue-100"} border rounded-2xl p-5 mb-8 shadow-sm`,children:[r.jsxs("div",{className:"flex justify-between items-end mb-3",children:[r.jsxs("div",{children:[r.jsxs("h2",{className:`text-3xl font-semibold tracking-tight ${g==="Group Food"?"text-orange-600":"text-blue-600"} mb-1`,children:[g==="Group Gear"?Mt:xn,"%"]}),r.jsx("p",{className:"text-xs font-semibold tracking-tight text-slate-500 uppercase tracking-wider",children:g==="Group Gear"?"Gear Covered":"Food Covered"})]}),r.jsxs("div",{className:"text-sm font-semibold tracking-tight text-slate-700",children:[g==="Group Gear"?`${gn} / ${Nt}`:`${Rt} / ${En}`," items"]})]}),r.jsx("div",{className:`h-2.5 w-full ${g==="Group Food"?"bg-orange-200/50":"bg-blue-200/50"} rounded-full overflow-hidden`,children:r.jsx("div",{className:`h-full ${g==="Group Food"?"bg-orange-600":"bg-blue-600"} rounded-full transition-all duration-500 ease-out`,style:{width:`${g==="Group Gear"?Mt:xn}%`}})})]}),Ma.length>0&&g==="Group Gear"&&r.jsxs("div",{className:"mb-8",children:[r.jsx("h3",{className:"font-bold text-slate-800 mb-3 tracking-tight",children:"My Contributions"}),r.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2 scrollbar-hide",children:Ma.map((we,st)=>r.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl px-4 py-3 min-w-[140px] shrink-0 shadow-sm flex flex-col justify-between",children:[r.jsx("p",{className:"font-semibold text-sm text-slate-800 line-clamp-1",children:we.name}),r.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Bringing: ",r.jsx("span",{className:"font-bold text-slate-700",children:we.myQuantity})]})]},st))})]}),r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[j?r.jsxs("button",{onClick:()=>E(!0),className:"bg-indigo-50 text-indigo-700 hover:bg-indigo-100 font-semibold text-xs px-4 py-2 rounded-xl flex items-center gap-2 transition-colors border border-indigo-100",children:[r.jsx(mo,{className:"w-4 h-4"})," AI Planner"]}):r.jsx("div",{}),r.jsxs("button",{onClick:()=>A(!R),className:`text-xs font-semibold px-3 py-1.5 rounded-xl flex items-center gap-2 transition-colors ${R?"bg-slate-800 text-white":"bg-slate-100 text-slate-600 hover:bg-slate-200"}`,children:[r.jsx(a6,{className:"w-3.5 h-3.5"}),R?"Show All":"Hide Completed"]})]}),r.jsx("div",{className:"space-y-8",children:(g==="Group Gear"?Pn:Tn).map((we,st)=>{let Wt=(g==="Group Gear"?$e:Et).filter(Je=>Je.category===we)||[];if(R&&(Wt=Wt.filter(Je=>(Array.isArray(Je.claims)?Je.claims:[]).reduce((ps,tr)=>ps+(tr.quantity||1),0)<(Je.quantity_needed||1))),Wt.length===0)return null;const ss=Wt.filter(Je=>(Array.isArray(Je.claims)?Je.claims:[]).reduce((ps,tr)=>ps+(tr.quantity||1),0)>=(Je.quantity_needed||1)).length;return r.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:st*.12},children:[r.jsxs("div",{className:"flex justify-between items-center mb-4 bg-[#f9fafb] sticky top-[72px] z-10 py-2",children:[r.jsx("h3",{className:"font-semibold tracking-tight tracking-widest text-slate-800 uppercase text-sm",children:we}),r.jsxs("span",{className:"bg-slate-200 text-slate-700 text-xs font-semibold tracking-tight px-2.5 py-1 rounded-full",children:[ss,"/",Wt.length]})]}),r.jsx("div",{className:"bg-white rounded-3xl border border-slate-100 overflow-hidden shadow-sm",children:Wt.map((Je,Wn)=>{const cn=Array.isArray(Je.claims)?Je.claims:[],ps=cn.reduce((Bs,Gi)=>Bs+(Gi.quantity||1),0),tr=ps>=(Je.quantity_needed||1),ko=!!cn.find(Bs=>Bs.user_email===(i==null?void 0:i.email)),pi=g==="Group Food"?"orange":"blue";return r.jsxs("div",{className:`flex items-center justify-between p-4 ${Wn!==Wt.length-1?"border-b border-slate-50":""}`,children:[r.jsxs("div",{className:"flex items-start space-x-4 flex-1",children:[r.jsx("div",{className:"pt-0.5 cursor-pointer",onClick:()=>H(Je),children:tr||ko?r.jsx("div",{className:`text-${pi}-600 bg-${pi}-50 rounded-md p-0.5`,children:r.jsx(u0,{className:"w-6 h-6"})}):r.jsx("div",{className:"text-slate-200 hover:text-slate-300 transition-colors",children:r.jsx(hw,{className:"w-6 h-6"})})}),r.jsxs("div",{className:"flex-1 pr-4",children:[r.jsx("p",{className:`font-semibold tracking-tight ${tr?"text-slate-900":"text-slate-700"}`,children:Je.name}),Je.notes&&r.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:Je.notes}),r.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:cn.map((Bs,Gi)=>{var Yi;return r.jsxs("span",{className:`text-[10px] font-semibold tracking-tight px-2 py-0.5 rounded-md ${Bs.user_email===(i==null?void 0:i.email)?`bg-${pi}-100 text-${pi}-800`:"bg-slate-100 text-slate-600"}
733`,children:[Bs.user_email===(i==null?void 0:i.email)?"You":(Yi=Bs.user_name)==null?void 0:Yi.split(" ")[0]," ",Bs.quantity>1?`(${Bs.quantity})`:""]},Gi)})})]})]}),!tr&&r.jsxs("div",{className:"flex flex-col items-end pl-2",children:[r.jsx("button",{onClick:()=>H(Je),className:`text-xs font-semibold tracking-tight px-4 py-2 rounded-xl active:scale-95 transition-transform uppercase tracking-wider ${N?"text-slate-400 bg-slate-100 cursor-not-allowed":`text-${pi}-600 bg-${pi}-50`}`,children:"Claim"}),r.jsxs("span",{className:"text-[10px] text-slate-400 mt-1 font-semibold tracking-tight whitespace-nowrap",children:["Need ",(Je.quantity_needed||1)-ps," more"]})]}),tr&&!ko&&r.jsx("div",{className:"flex flex-col items-end pl-2 opacity-60",children:r.jsx("span",{className:"text-xs font-bold text-slate-400 uppercase",children:"Covered"})}),tr&&ko&&r.jsx("div",{className:"flex flex-col items-end pl-2",children:r.jsx("button",{onClick:()=>H(Je),className:"text-[10px] font-semibold tracking-tight px-3 py-1.5 rounded-xl hover:bg-slate-100 text-slate-400 transition-colors uppercase",children:"Unclaim"})}),j&&r.jsxs("div",{className:"flex items-center gap-1 pl-2 border-l border-slate-100 ml-2",children:[r.jsx("button",{onClick:()=>fe(Je),className:"p-1.5 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors",children:r.jsx(lu,{className:"w-3.5 h-3.5"})}),r.jsx("button",{onClick:()=>me(Je),className:"p-1.5 text-slate-400 hover:text-red-600 hover:bg-red-50 rounded-lg transition-colors",children:r.jsx(us,{className:"w-3.5 h-3.5"})})]})]},Je.id)})})]},we)})})]}),g==="Personal"&&r.jsxs(r.Fragment,{children:[r.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"bg-emerald-50 border border-emerald-100 rounded-2xl p-5 mb-8 shadow-sm",children:[r.jsxs("div",{className:"flex justify-between items-end mb-3",children:[r.jsxs("div",{children:[r.jsxs("h2",{className:"text-3xl font-semibold tracking-tight text-emerald-600 mb-1",children:[mi,"%"]}),r.jsx("p",{className:"text-xs font-semibold tracking-tight text-slate-500 uppercase tracking-wider",children:"Items Packed"})]}),r.jsxs("div",{className:"text-sm font-semibold tracking-tight text-slate-700",children:[Ir," of ",Vn," items"]})]}),r.jsx("div",{className:"h-2.5 w-full bg-emerald-200/50 rounded-full overflow-hidden",children:r.jsx("div",{className:"h-full bg-emerald-600 rounded-full transition-all duration-500 ease-out",style:{width:`${mi}%`}})})]}),r.jsxs("div",{className:"space-y-8",children:[Ve.length===0&&r.jsxs("div",{className:"text-center py-12 text-slate-400 font-medium",children:[r.jsx("p",{children:"Your checklist is empty."}),r.jsx("p",{className:"text-sm mt-1",children:"Tap + to add personal gear."})]}),Ve.map((we,st)=>{const Wt=ms.filter(Je=>Je.category===we)||[];if(Wt.length===0)return null;const ss=Wt.filter(Je=>Je.is_packed).length;return r.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:st*.12},children:[r.jsxs("div",{className:"flex justify-between items-center mb-4 bg-[#f9fafb] sticky top-[72px] z-10 py-2",children:[r.jsx("h3",{className:"font-semibold tracking-tight tracking-widest text-slate-800 uppercase text-sm",children:we}),r.jsxs("span",{className:"bg-slate-200 text-slate-700 text-xs font-semibold tracking-tight px-2.5 py-1 rounded-full",children:[ss,"/",Wt.length]})]}),r.jsx("div",{className:"bg-white rounded-3xl border border-slate-100 overflow-hidden shadow-sm",children:Wt.map((Je,Wn)=>{const cn=Je.is_packed;return r.jsxs("div",{className:`flex items-center justify-between p-4 ${Wn!==Wt.length-1?"border-b border-slate-50":""}`,children:[r.jsxs("div",{className:"flex items-center space-x-4 cursor-pointer flex-1",onClick:()=>Ce(Je),children:[cn?r.jsx("div",{className:"text-emerald-600 bg-emerald-50 rounded-md p-0.5",children:r.jsx(u0,{className:"w-6 h-6"})}):r.jsx("div",{className:"text-slate-200 hover:text-slate-300 transition-colors",children:r.jsx(hw,{className:"w-6 h-6"})}),r.jsxs("div",{children:[r.jsx("p",{className:`font-semibold tracking-tight ${cn?"text-slate-400 line-through":"text-slate-900"}`,children:Je.item_name||Je.name}),Je.notes&&r.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:Je.notes})]})]}),r.jsxs("div",{className:"flex items-center gap-1 pl-2 border-l border-slate-100 ml-2",children:[r.jsx("button",{onClick:ps=>{ps.stopPropagation(),fe(Je)},className:"p-1.5 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors",children:r.jsx(lu,{className:"w-3.5 h-3.5"})}),r.jsx("button",{onClick:ps=>{ps.stopPropagation(),me(Je)},className:"p-1.5 text-slate-400 hover:text-red-600 hover:bg-red-50 rounded-lg transition-colors",children:r.jsx(us,{className:"w-3.5 h-3.5"})})]})]},Je.id)})})]},we)})]})]})]}),r.jsx(Lt,{children:Y&&r.jsx(re.div,{initial:{opacity:0}
733,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/30 backdrop-blur-sm z-50 flex items-end justify-center",onClick:()=>ce(!1),children:r.jsxs(re.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:25,stiffness:300},className:"bg-white w-full max-w-lg rounded-t-3xl p-6 pb-10",onClick:we=>we.stopPropagation(),children:[r.jsx("div",{className:"w-10 h-1 bg-slate-200 rounded-full mx-auto mb-6"}),r.jsxs("h3",{className:"font-semibold tracking-tight text-lg mb-4",children:[K?"Edit":"Add"," ",g==="Group Food"?"Food":g==="Personal"?"Personal":"Gear"," Item"]}),r.jsx("input",{type:"text",placeholder:"Item name",value:ge,onChange:we=>he(we.target.value),className:"w-full bg-[#f9fafb] border border-slate-200 rounded-xl p-3 text-sm font-semibold tracking-tight mb-3 focus:outline-none focus:ring-2 focus:ring-blue-600 focus:border-transparent transition-all"}),r.jsx("input",{type:"text",placeholder:"Notes (optional, e.g. Brand, size)",value:ie,onChange:we=>le(we.target.value),className:"w-full bg-[#f9fafb] border border-slate-200 rounded-xl p-3 text-sm font-semibold tracking-tight mb-3 focus:outline-none focus:ring-2 focus:ring-blue-600 focus:border-transparent transition-all"}),r.jsxs("div",{className:"flex flex-col gap-3 mb-4",children:[r.jsxs("div",{className:"flex space-x-2",children:[r.jsxs("select",{value:be,onChange:we=>W(we.target.value),className:"flex-1 bg-[#f9fafb] border border-slate-200 rounded-xl p-3 text-sm font-semibold tracking-tight focus:outline-none focus:ring-2 focus:ring-blue-600 focus:border-transparent transition-all",children:[(g==="Group Food"?Te:g==="Personal"?We:De).map(we=>r.jsx("option",{value:we,children:we},we)),r.jsx("option",{value:"custom",children:"Custom..."})]}),g!=="Personal"&&r.jsx("input",{type:"number",min:"1",value:O,onChange:we=>U(parseInt(we.target.value)||1),placeholder:"Qty",className:"w-20 bg-[#f9fafb] border border-slate-200 rounded-xl p-3 text-sm font-semibold tracking-tight text-center focus:outline-none focus:ring-2 focus:ring-blue-600 focus:border-transparent transition-all"})]}),be==="custom"&&r.jsx("input",{type:"text",placeholder:"Enter custom category name",value:Z,onChange:we=>D(we.target.value),className:"w-full bg-[#f9fafb] border border-slate-200 rounded-xl p-3 text-sm font-semibold tracking-tight focus:outline-none focus:ring-2 focus:ring-blue-600 focus:border-transparent transition-all"})]}),r.jsx("button",{onClick:Ne,disabled:Q.isPending||B.isPending||m.isPending||I.isPending,className:`w-full ${g==="Group Food"?"bg-orange-600":"bg-blue-600"} text-white font-semibold tracking-tight py-3 rounded-xl active:scale-95 transition-transform`,children:Q.isPending||B.isPending||m.isPending||I.isPending?"Saving...":K?"Save Changes":"Add Item"})]})})}),r.jsx(re.button,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:260,damping:20,delay:.3},whileHover:{scale:1.1},whileTap:{scale:.9},onClick:oe,className:"fixed bottom-6 right-6 w-14 h-14 bg-blue-600 text-white rounded-full flex items-center justify-center shadow-[0_8px_20px_rgba(37,99,235,0.4)] z-40",children:r.jsx(Cn,{className:"w-8 h-8"})}),r.jsx(Lt,{children:P&&r.jsx(ese,{trip:u,onClose:()=>E(!1)})})]})}function b3(){const{data:e=[]}=Re({queryKey:["app-settings"],queryFn:()=>ne.entities.AppSettings.list(),staleTime:6e4}),t=e.find(n=>n.key==="social_links");return t!=null&&t.value?JSON.parse(t.value):[]}function sse(){const e=b3();return e.length===0?null:r.jsxs("div",{className:"pt-4 border-t border-slate-100 mt-4",children:[r.jsx("p",{className:"text-[11px] font-semibold text-slate-400 uppercase tracking-widest px-4 mb-2",children:"Community"}),r.jsx("div",{className:"space-y-1",children:e.map((t,n)=>r.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 px-4 py-2.5 rounded-2xl text-slate-500 hover:text-slate-900 hover:bg-slate-50 transition-all group",children:[r.jsx("span",{className:"text-lg",children:t.icon}),r.jsx("span",{className:"text-[14px] font-semibold tracking-tight flex-1 truncate",children:t.label}),r.jsx(Iu,{className:"w-3.5 h-3.5 text-slate-300 group-hover:text-slate-400 shrink-0"})]},n))})]})}function rse(){const e=b3();return e.length===0?null:r.jsxs("div",{className:"px-6 md:px-0 mb-10 relative z-10",children:[r.jsx("h2",{className:"text-lg font-semibold tracking-tight tracking-tight text-slate-900 mb-3",children:"Community Links"}),r.jsx("div",{className:"flex gap-3 overflow-x-auto pb-2 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",children:e.map((t,n)=>r.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 bg-white border border-slate-100 rounded-2xl px-4 py-3 shadow-[0_4px_20px_rgb(0,0,0,0.03)] hover:shadow-md transition-all shrink-0 group",children:[r.jsx("span",{className:"text-xl",children:t.icon}),r.jsx("span",{className:"text-sm font-semibold text-slate-700 whitespace-nowrap",children:t.label}),r.jsx(Iu,{className:"w-3.5 h-3.5 text-slate-300 group-hover:text-slate-500"})]},n))})]})}function ise(){var A,B;const e=Kn(),[t,n]=w.useState(""),[s,i]=w.useState(h0);w.useEffect(()=>{const I=new Date().getHours();I<12?(n("Good morning"),i(PF)):I<18?(n("Good afternoon"),i(h0)):(n("Good evening"),i(B6))},[]);const{data:a}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),{data:l}=Re({queryKey:["trips"],queryFn:()=>ne.entities.Trip.list("-start_date").catch(()=>[])}),{data:u}=Re({queryKey:["myMemberships",a==null?void 0:a.email],queryFn:()=>a!=null&&a.email?ne.entities.TripMember.filter({user_email:a.email}).catch(()=>[]):[],enabled:!!(a!=null&&a.email)}),h=(u==null?void 0:u.map(I=>I.trip_id))||[],m=(a==null?void 0:a.role)==="admin"||(a==null?void 0:a.role)==="moderator",x=(l||[]).filter(I=>!m&&I.approval_status==="pending_approval"&&I.created_by!==(a==null?void 0:a.email)||!m&&I.approval_status==="rejected"&&I.created_by!==(a==null?void 0:a.email)?!1:I.visibility!=="private"||I.created_by===(a==null?void 0:a.email)||h.includes(I.id)),v=x.filter(I=>I.status==="ongoing"),_=x.filter(I=>I.status==="upcoming").sort((I,z)=>new Date(I.start_date)-new Date(z.start_date)),N=x.filter(I=>I.status==="completed"),S=v.length>0?v[0]:_.length>0?_[0]:null,j=_.filter(I=>I.id!==(S==null?void 0:S.id)).slice(0,4),P=((A=a==null?void 0:a.full_name)==null?void 0:A.split(" ")[0])||((B=a==null?void 0:a.email)==null?void 0:B.split("@")[0])||"Explorer",E={hidden:{opacity:0}
733,show:{opacity:1,transition:{staggerChildren:.1}}},R={hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:{type:"spring",stiffness:300,damping:24}}};return r.jsxs(re.div,{className:"min-h-screen pb-32 md:pb-10 bg-[#f4f6f8] text-slate-900 font-sans overflow-x-hidden selection:bg-indigo-100",initial:"hidden",animate:"show",variants:E,children:[r.jsx("div",{className:"fixed top-0 left-0 w-full h-[50vh] bg-gradient-to-br from-indigo-50/50 via-white/50 to-[#f4f6f8] pointer-events-none z-0"}),r.jsx("div",{className:"fixed -top-40 -right-40 w-96 h-96 bg-indigo-200/40 rounded-full blur-[100px] pointer-events-none z-0"}),r.jsx("div",{className:"fixed top-40 -left-40 w-96 h-96 bg-blue-200/40 rounded-full blur-[100px] pointer-events-none z-0"}),r.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-8 relative z-10",children:[r.jsxs(re.header,{variants:R,className:"flex justify-between items-center mb-8",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("div",{onClick:()=>e(Xe("Profile")),className:"relative w-12 h-12 rounded-full p-0.5 bg-gradient-to-tr from-indigo-500 to-blue-400 cursor-pointer hover:scale-105 transition-transform shadow-lg shadow-indigo-200",children:r.jsx("div",{className:"w-full h-full rounded-full overflow-hidden border-2 border-white bg-white",children:r.jsx("img",{src:_x(a),alt:"User avatar",className:"w-full h-full object-cover"})})}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 text-slate-500 mb-0.5",children:[r.jsx(s,{className:"w-3.5 h-3.5 text-indigo-500"}),r.jsx("span",{className:"text-[11px] font-semibold tracking-tight uppercase tracking-wider text-indigo-600/80",children:t})]}),r.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-slate-800",children:P})]})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("div",{className:"hidden md:flex items-center bg-white/80 backdrop-blur-md border border-slate-200/50 px-4 py-2.5 rounded-full shadow-sm group focus-within:ring-2 focus-within:ring-indigo-500/20 focus-within:bg-white transition-all w-64",children:[r.jsx(ai,{className:"w-4 h-4 text-slate-400 group-focus-within:text-indigo-500 transition-colors"}),r.jsx("input",{type:"text",placeholder:"Search trips...",className:"bg-transparent border-none outline-none ml-2 text-sm font-semibold tracking-tight text-slate-700 placeholder:text-slate-400 w-full"})]}),r.jsxs("button",{onClick:()=>e(Xe("Notifications")),className:"relative w-12 h-12 bg-white/80 backdrop-blur-md border border-slate-200/50 rounded-full flex items-center justify-center text-slate-600 hover:text-indigo-600 hover:bg-white hover:shadow-md transition-all shadow-sm group",children:[r.jsx(Du,{className:"w-5 h-5 group-hover:animate-swing"}),r.jsx("span",{className:"absolute top-3 right-3 w-2.5 h-2.5 bg-red-500 rounded-full border-2 border-white"})]})]})]}),r.jsx(re.div,{variants:R,className:"md:hidden mb-6",children:r.jsxs("div",{className:"flex items-center bg-white/80 backdrop-blur-md border border-slate-200/50 px-4 py-3.5 rounded-2xl shadow-sm focus-within:ring-2 focus-within:ring-indigo-500/20 focus-within:bg-white transition-all",children:[r.jsx(ai,{className:"w-5 h-5 text-slate-400"}),r.jsx("input",{type:"text",placeholder:"Search adventures...",className:"bg-transparent border-none outline-none ml-3 text-sm font-semibold tracking-tight text-slate-700 placeholder:text-slate-400 w-full"})]})}),r.jsx(re.div,{variants:R,children:r.jsx(Wc,{placementName:"top_banner",page:"Home",role:a==null?void 0:a.role,className:"mb-8 rounded-2xl overflow-hidden shadow-sm"})}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8",children:[r.jsxs("div",{className:"lg:col-span-8 space-y-8",children:[r.jsxs(re.section,{variants:R,children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h2",{className:"text-xl font-semibold tracking-tight text-slate-800",children:(S==null?void 0:S.status)==="ongoing"?"Live Adventure":"Next Adventure"}),(S==null?void 0:S.status)==="ongoing"&&r.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-semibold tracking-tight uppercase tracking-widest bg-emerald-100 text-emerald-700 px-3 py-1.5 rounded-full shadow-sm",children:[r.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),"Happening Now"]}),(S==null?void 0:S.status)==="upcoming"&&r.jsx("span",{className:"text-[11px] font-semibold tracking-tight uppercase tracking-widest bg-indigo-100 text-indigo-700 px-3 py-1.5 rounded-full shadow-sm",children:"Coming Up"})]}),S?r.jsxs("div",{onClick:()=>e(Xe("TripDetails")+"?id="+S.id),className:"relative group cursor-pointer h-[380px] md:h-[460px] w-full rounded-[32px] overflow-hidden shadow-[0_8px_30px_rgb(0,0,0,0.08)] transition-all hover:shadow-[0_20px_40px_rgb(0,0,0,0.12)] border border-slate-200/50",children:[r.jsx("img",{src:S.cover_image_url||"https://images.unsplash.com/photo-1464822759023-fed622ff2c3b",alt:S.title,className:"absolute inset-0 w-full h-full object-cover transition-transform duration-1000 group-hover:scale-105"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-slate-900/90 via-slate-900/20 to-transparent opacity-90 transition-opacity group-hover:opacity-100"}),r.jsxs("div",{className:"absolute top-6 left-6 right-6 flex justify-between items-start",children:[r.jsxs("div",{className:"bg-white/20 backdrop-blur-md border border-white/20 text-white px-4 py-2 rounded-2xl flex items-center gap-2 shadow-lg",children:[r.jsx(Dn,{className:"w-4 h-4"}),r.jsx("span",{className:"text-sm font-semibold tracking-tight",children:S.location||"Location TBA"})]}),r.jsx("div",{className:"w-12 h-12 bg-white/20 backdrop-blur-md border border-white/20 rounded-full flex items-center justify-center text-white opacity-0 group-hover:opacity-100 transition-all duration-300 shadow-lg transform translate-x-4 group-hover:translate-x-0",children:r.jsx(lL,{className:"w-6 h-6"})})]}),r.jsxs("div",{className:"absolute bottom-6 left-6 right-6",children:[r.jsx("h3",{className:"text-3xl md:text-5xl font-semibold tracking-tight text-white tracking-tight leading-tight mb-5 drop-shadow-lg",children:S.title}),r.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[r.jsxs("div",{className:"bg-white/20 backdrop-blur-md border border-white/20 rounded-2xl px-4 py-2.5 flex items-center gap-2.5 shadow-lg",children:[r.jsx(pa,{className:"w-4 h-4 text-white/90"}),r.jsxs("span",{className:"text-sm font-semibold tracking-tight text-white tracking-wide",children:[S.start_date?$n(new Date(S.start_date),"MMM do"):"TBD",S.end_date?` - ${$n(new Date(S.end_date),"MMM do")}`:""]})]}),r.jsxs("div",{className:"bg-white/20 backdrop-blur-md border border-white/20 rounded-2xl px-4 py-2.5 flex items-center gap-2.5 shadow-lg",children:[r.jsx(Li,{className:"w-4 h-4 text-white/90"}),r.jsxs("span",{className:"text-sm font-semibold tracking-tight text-white tracking-wide",children:[S.participants_count||1," / ",S.max_people||"â"," going"]})]})]})]})]}):r.jsxs("div",{className:"h-[380px] md:h-[460px] w-full rounded-[32px] bg-white border border-slate-200/60 shadow-sm flex flex-col items-center justify-center p-8 text-center relative overflow-hidden",children:[r.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-indigo-50/50 to-white/50"}),r.jsxs("div",{className:"relative z-10 flex flex-col items-center",children:[r.jsx("div",{className:"w-24 h-24 bg-indigo-50 text-indigo-500 rounded-[28px] flex items-center justify-center mb-6 shadow-sm rotate-3 border border-indigo-100/50",children:r.jsx(ws,{className:"w-12 h-12 -rotate-3"})}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight text-slate-800 tracking-tight mb-3",children:"No trips planned yet"}),r.jsx("p",{className:"text-slate-500 font-medium max-w-sm mb-8 text-base",children:"Your dashboard is looking a little empty. Start planning your first epic adventure!"}),r.jsxs("button",{onClick:()=>e(Xe("CreateTrip")),className:"bg-slate-900 text-white px-8 py-4 rounded-2xl font-semibold tracking-tight shadow-xl shadow-slate-900/20 hover:bg-slate-800 hover:-translate-y-1 transition-all flex items-center gap-2 text-base",children:[r.jsx(Cn,{className:"w-5 h-5"}),"Create a Trip"]})]})]})]}),r.jsx(re.section,{variants:R,children:r.jsx("div",{className:"flex gap-3 overflow-x-auto pb-4 scrollbar-hide -mx-4 px-4 md:mx-0 md:px-0",children:[{label:"All Trips",active:!0},{label:"Upcoming",active:!1},{label:"Past",active:!1},{label:"Discover",icon:ws,active:!1}].map((I,z)=>r.jsxs("button",{className:`px-6 py-3 rounded-2xl font-semibold tracking-tight text-sm whitespace-nowrap transition-all shadow-sm flex items-center gap-2 ${I.active?"bg-slate-900 text-white shadow-slate-900/20":"bg-white text-slate-600 hover:bg-slate-50 border border-slate-200/60 hover:border-slate-300"}`,children:[I.icon&&r.jsx(I.icon,{className:`w-4 h-4 ${I.active?"text-white":"text-indigo-500"}`}),I.label]},z))})}),j.length>0&&r.jsxs(re.section,{variants:R,children:[r.jsxs("div",{className:"flex items-center justify-between mb-5",children:[r.jsx("h2",{className:"text-xl font-semibold tracking-tight text-slate-800",children:"More Upcoming"}),r.jsxs("button",{onClick:()=>e(Xe("Trips")),className:"text-sm font-semibold tracking-tight text-indigo-600 hover:text-indigo-700 flex items-center gap-1 transition-colors",children:["See All ",r.jsx(uo,{className:"w-4 h-4"})]})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:j.map(I=>r.jsxs("div",{onClick:()=>e(Xe("TripDetails")+"?id="+I.id),className:"bg-white rounded-[24px] p-3 border border-slate-200/60 shadow-sm hover:shadow-md transition-all cursor-pointer flex gap-4 group",children:[r.jsx("div",{className:"w-28 h-28 rounded-[18px] overflow-hidden shrink-0 relative",children:r.jsx("img",{src:I.cover_image_url||"https://images.unsplash.com/photo-1501555088652-021faa106b9b",alt:I.title,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-700"})}),r.jsxs("div",{className:"py-2 flex-1 min-w-0 pr-3 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsx("h4",{className:"font-semibold tracking-tight text-slate-800 truncate text-lg mb-1",children:I.title}),r.jsxs("div",{className:"flex items-center gap-1.5 text-slate-500 text-xs font-semibold tracking-tight",children:[r.jsx(Dn,{className:"w-3.5 h-3.5 shrink-0"}),r.jsx("span",{className:"truncate",children:I.location||"TBA"})]})]}),r.jsxs("div",{className:"flex items-center justify-between mt-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold tracking-tight text-indigo-600 bg-indigo-50 px-2.5 py-1.5 rounded-lg border border-indigo-100/50",children:[r.jsx(pa,{className:"w-3.5 h-3.5"}),I.start_date?$n(new Date(I.start_date),"MMM do"):"TBD"]}),r.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-50 flex items-center justify-center group-hover:bg-indigo-50 group-hover:text-indigo-600 transition-colors",children:r.jsx(wa,{className:"w-4 h-4 text-slate-400 group-hover:text-indigo-600"})})]})]})]},I.id))})]}),r.jsx(re.div,{variants:R,children:r.jsx(Wc,{placementName:"inline_content",page:"Home",role:a==null?void 0:a.role,className:"rounded-3xl overflow-hidden shadow-sm border border-slate-200/50"})})]}),r.jsxs("div",{className:"lg:col-span-4 space-y-6",children:[r.jsxs(re.div,{variants:R,className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{onClick:()=>e(Xe("CreateTrip")),className:"col-span-2 bg-gradient-to-br from-indigo-600 to-blue-500 rounded-[32px] p-8 text-white cursor-pointer hover:shadow-xl hover:shadow-indigo-500/30 transition-all group overflow-hidden relative",children:[r.jsx("div",{className:"absolute top-0 right-0 w-48 h-48 bg-white/10 rounded-full blur-3xl -mr-10 -mt-10"}),r.jsxs("div",{className:"relative z-10 flex flex-col items-center text-center",children:[r.jsx("div",{className:"w-16 h-16 bg-white/20 backdrop-blur-md rounded-[24px] flex items-center justify-center mb-5 group-hover:scale-110 group-hover:rotate-3 transition-transform border border-white/20 shadow-lg",children:r.jsx(Cn,{className:"w-8 h-8 text-white"})}),r.jsx("h3",{className:"font-semibold tracking-tight text-2xl tracking-tight",children:"Plan a Trip"}),r.jsx("p",{className:"text-indigo-100 text-sm font-semibold tracking-tight mt-1 tracking-wide",children:"Start a new adventure"})]})]}),r.jsxs("div",{onClick:()=>e(Xe("Explore")),className:"col-span-1 bg-white border border-slate-200/60 rounded-[32px] p-6 cursor-pointer hover:shadow-md transition-all group text-center flex flex-col items-center justify-center",children:[r.jsx("div",{className:"w-14 h-14 bg-emerald-50 text-emerald-600 rounded-[20px] flex items-center justify-center mb-4 group-hover:scale-110 transition-transform",children:r.jsx(Ku,{className:"w-7 h-7"})}),r.jsx("h4",{className:"font-semibold tracking-tight text-slate-800 text-base",children:"Explore"})]}),r.jsxs("div",{onClick:()=>e(Xe("MyGear")),className:"col-span-1 bg-white border border-slate-200/60 rounded-[32px] p-6 cursor-pointer hover:shadow-md transition-all group text-center flex flex-col items-center justify-center",children:[r.jsx("div",{className:"w-14 h-14 bg-orange-50 text-orange-600 rounded-[20px] flex items-center justify-center mb-4 group-hover:scale-110 transition-transform",children:r.jsx(ou,{className:"w-7 h-7"})}),r.jsx("h4",{className:"font-semibold tracking-tight text-slate-800 text-base",children:"My Gear"})]})]}),r.jsxs(re.div,{variants:R,className:"bg-white rounded-[32px] p-7 border border-slate-200/60 shadow-sm",children:[r.jsx("h3",{className:"font-semibold tracking-tight text-slate-800 text-lg tracking-tight mb-6",children:"Your Activity"}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between p-4 bg-[#f4f6f8] rounded-[24px] border border-slate-100",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-12 h-12 bg-indigo-100 text-indigo-600 rounded-[18px] flex items-center justify-center",children:r.jsx(ws,{className:"w-6 h-6"})}),r.jsx("span",{className:"font-semibold tracking-tight text-slate-700",children:"Total Trips"})]}),r.jsx("span",{className:"font-semibold tracking-tight text-2xl text-slate-900",children:N.length+v.length})]}),r.jsxs("div",{className:"flex items-center justify-between p-4 bg-[#f4f6f8] rounded-[24px] border border-slate-100",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-12 h-12 bg-blue-100 text-blue-600 rounded-[18px] flex items-center justify-center",children:r.jsx(pa,{className:"w-6 h-6"})}),r.jsx("span",{className:"font-semibold tracking-tight text-slate-700",children:"Upcoming"})]}),r.jsx("span",{className:"font-semibold tracking-tight text-2xl text-slate-900",children:_.length})]})]})]}),r.jsx(re.div,{variants:R,children:r.jsx(Wc,{placementName:"dashboard_card",page:"Home",role:a==null?void 0:a.role,className:"rounded-[32px] overflow-hidden shadow-sm border border-slate-200/50"})}),r.jsx("div",{className:"md:hidden",children:r.jsx(rse,{})})]})]})]})]})}function ase(){const e=Kn(),[t,n]=w.useState(""),[s,i]=w.useState(!1),[a,l]=w.useState(""),{data:u}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),{data:h,isLoading:m}=Re({queryKey:["conversations"],queryFn:()=>ne.entities.Conversation.list("-last_message_date").catch(()=>[])}),{data:g,isLoading:x}=Re({queryKey:["allUsers"],queryFn:()=>ne.entities.User.list().catch(()=>[]),enabled:s}),v=(h||[]).filter(P=>P.participant_1===(u==null?void 0:u.email)||P.participant_2===(u==null?void 0:u.email)),_=v.filter(P=>{var R,A,B,I,z;if(!t)return!0;const E=t.toLowerCase();return((R=P.participant_1_name)==null?void 0:R.toLowerCase().includes(E))||((A=P.participant_2_name)==null?void 0:A.toLowerCase().includes(E))||((B=P.participant_1)==null?void 0:B.toLowerCase().includes(E))||((I=P.participant_2)==null?void 0:I.toLowerCase().includes(E))||((z=P.last_message)==null?void 0:z.toLowerCase().includes(E))}),N=v.map(P=>P.participant_1===(u==null?void 0:u.email)?P.participant_2:P.participant_1),S=(g||[]).filter(P=>{var R,A;if(P.email===(u==null?void 0:u.email))return!1;if(!a)return!0;const E=a.toLowerCase();return((R=P.full_name)==null?void 0:R.toLowerCase().includes(E))||((A=P.email)==null?void 0:A.toLowerCase().includes(E))}),j=async P=>{const E=v.find(A=>A.part
733icipant_1===u.email&&A.participant_2===P.email||A.participant_1===P.email&&A.participant_2===u.email);if(E){e(Xe("DirectChat")+"?id="+E.id);return}const R=await ne.entities.Conversation.create({participant_1:u.email,participant_2:P.email,participant_1_name:u.full_name||u.email.split("@")[0],participant_2_name:P.full_name||P.email.split("@")[0]});e(Xe("DirectChat")+"?id="+R.id)};return r.jsxs("div",{className:"min-h-screen bg-[#fafcff] font-sans selection:bg-blue-200 pb-24 md:pb-8",children:[r.jsxs("div",{className:"bg-slate-900 px-6 pt-10 pb-28 md:pt-16 md:pb-32 rounded-b-[48px] relative overflow-hidden text-white shadow-2xl shadow-slate-900/20",children:[r.jsx("div",{className:"absolute inset-0 bg-[url('https://images.unsplash.com/photo-1516939884455-1445c8652f83?q=80&w=2000&auto=format&fit=crop')] bg-cover bg-center opacity-10 mix-blend-overlay pointer-events-none"}),r.jsx("div",{className:"absolute top-0 right-0 -mr-20 -mt-20 w-80 h-80 bg-blue-500/20 rounded-full blur-3xl pointer-events-none"}),r.jsx("div",{className:"absolute bottom-0 left-0 -ml-20 -mb-20 w-64 h-64 bg-indigo-500/20 rounded-full blur-3xl pointer-events-none"}),r.jsxs("div",{className:"max-w-4xl mx-auto relative z-10 flex flex-col md:flex-row md:items-end justify-between gap-6",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("button",{onClick:()=>e(-1),className:"md:hidden p-3 -ml-2 bg-white/10 hover:bg-white/20 backdrop-blur-md text-white rounded-2xl transition-colors border border-white/10",children:r.jsx(gr,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx(re.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-4xl md:text-5xl font-semibold tracking-tight mb-3 flex items-center gap-3",children:"Messages"}),r.jsx(re.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"text-slate-300 font-medium text-lg",children:"Connect and plan with your crew"})]})]}),r.jsx(re.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:.2},children:r.jsxs("button",{onClick:()=>i(!0),className:"bg-blue-600 hover:bg-blue-500 text-white px-7 py-4 rounded-2xl font-semibold text-[15px] transition-all shadow-xl shadow-blue-600/30 flex items-center justify-center gap-2 active:scale-95 w-full md:w-auto",children:[r.jsx(uS,{className:"w-5 h-5"})," New Message"]})})]})]}),r.jsxs("div",{className:"max-w-4xl mx-auto px-4 md:px-8 -mt-16 relative z-20",children:[r.jsx(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"bg-white p-2.5 rounded-[28px] shadow-xl shadow-slate-200/50 border border-slate-100 mb-8 flex items-center",children:r.jsxs("div",{className:"flex-1 flex items-center bg-slate-50 rounded-[20px] px-4 py-3.5 relative transition-colors focus-within:bg-slate-100 focus-within:ring-2 focus-within:ring-blue-500/20",children:[r.jsx(ai,{className:"w-5 h-5 text-slate-400 mr-3 shrink-0"}),r.jsx("input",{type:"text",placeholder:"Search conversations...",value:t,onChange:P=>n(P.target.value),className:"flex-1 bg-transparent text-[15px] font-medium text-slate-900 placeholder:text-slate-400 outline-none w-full"}),t&&r.jsx("button",{onClick:()=>n(""),className:"p-1.5 hover:bg-slate-200 rounded-full transition-colors ml-2",children:r.jsx(hn,{className:"w-4 h-4 text-slate-500"})})]})}),m?r.jsx("div",{className:"bg-white rounded-[32px] p-6 shadow-sm border border-slate-100 space-y-4",children:[1,2,3,4].map(P=>r.jsxs("div",{className:"flex items-center gap-4 animate-pulse p-2",children:[r.jsx("div",{className:"w-14 h-14 bg-slate-100 rounded-full shrink-0"}),r.jsxs("div",{className:"flex-1 space-y-3",children:[r.jsx("div",{className:"h-4 bg-slate-100 rounded w-1/3"}),r.jsx("div",{className:"h-3 bg-slate-100 rounded w-2/3"})]})]},P))}):_.length===0?r.jsxs(re.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"bg-white rounded-[40px] shadow-sm border border-slate-200/60 py-28 px-6 text-center flex flex-col items-center justify-center",children:[r.jsx("div",{className:"w-24 h-24 bg-slate-50 text-slate-300 rounded-full flex items-center justify-center mb-6 shadow-inner border-8 border-white",children:r.jsx(sd,{className:"w-10 h-10"})}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight text-slate-900 mb-3",children:t?"No matches found":"Your inbox is empty"}),r.jsx("p",{className:"text-slate-500 font-medium max-w-sm mx-auto mb-8 text-[15px] leading-relaxed",children:t?`We couldn't find any conversations matching "${t}".`:"Reach out to your friends or travel buddies. Your conversations will appear here."}),!t&&r.jsxs("button",{onClick:()=>i(!0),className:"bg-blue-600 hover:bg-blue-700 text-white font-semibold text-[15px] px-8 py-3.5 rounded-full flex items-center gap-2 shadow-xl shadow-blue-600/20 active:scale-95 transition-all",children:[r.jsx(uS,{className:"w-5 h-5"})," Start a Conversation"]})]}):r.jsx(re.div,{initial:{opacity:0,y:20}
733,animate:{opacity:1,y:0},transition:{delay:.4},className:"bg-white rounded-[32px] shadow-sm border border-slate-100 overflow-hidden",children:r.jsx("div",{className:"divide-y divide-slate-100/80",children:_.map((P,E)=>{const R=P.participant_1===(u==null?void 0:u.email),A=R?P.participant_2_name:P.participant_1_name,B=R?P.participant_2:P.participant_1,I=P.last_message_date?$n(new Date(P.last_message_date),"MMM d, h:mm a"):"",z=P.last_message_by===(u==null?void 0:u.email);return r.jsxs("button",{onClick:()=>e(Xe("DirectChat")+"?id="+P.id),className:"w-full flex items-center gap-4 p-5 hover:bg-slate-50/80 transition-colors text-left group",children:[r.jsx("div",{className:"relative",children:r.jsx(Js,{email:B,alt:A,className:"w-14 h-14 rounded-full bg-slate-100 object-cover shrink-0 shadow-sm border border-white"})}),r.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[r.jsxs("div",{className:"flex items-baseline justify-between mb-1",children:[r.jsx("span",{className:"font-semibold text-slate-900 text-[17px] tracking-tight truncate group-hover:text-blue-600 transition-colors",children:A||(B==null?void 0:B.split("@")[0])||"User"}),r.jsx("span",{className:"text-[12px] text-slate-400 font-medium shrink-0 ml-3 bg-slate-50 px-2 py-0.5 rounded-md border border-slate-100",children:I})]}),r.jsxs("p",{className:"text-[14px] text-slate-500 truncate font-medium flex items-center",children:[z&&r.jsx("span",{className:"text-slate-400 mr-1.5 text-[13px] font-semibold bg-slate-100 px-1.5 rounded",children:"You:"}),P.last_message||r.jsx("span",{className:"italic text-slate-400",children:"No messages yet"})]})]}),r.jsx("div",{className:"w-10 h-10 rounded-full bg-white border border-slate-200 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all shadow-sm -translate-x-2 group-hover:translate-x-0 ml-2 shrink-0",children:r.jsx(uo,{className:"w-5 h-5 text-slate-400 group-hover:text-blue-600"})})]},P.id)})})})]}),r.jsx(Lt,{children:s&&r.jsxs(r.Fragment,{children:[r.jsx(re.div,{initial:{opacity:0}
733,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-slate-900/40 backdrop-blur-sm z-50",onClick:()=>i(!1)}),r.jsxs(re.div,{initial:{y:"100%",opacity:0},animate:{y:0,opacity:1},exit:{y:"100%",opacity:0},transition:{type:"spring",damping:30,stiffness:300},className:"fixed bottom-0 left-0 right-0 md:top-1/2 md:left-1/2 md:right-auto md:bottom-auto md:-translate-x-1/2 md:-translate-y-1/2 bg-white w-full md:w-[500px] rounded-t-[40px] md:rounded-[40px] shadow-2xl z-[51] flex flex-col max-h-[85vh] md:max-h-[650px] overflow-hidden",children:[r.jsxs("div",{className:"p-6 md:p-8 pb-5 shrink-0 border-b border-slate-100 relative",children:[r.jsx("div",{className:"w-12 h-1.5 bg-slate-200 rounded-full mx-auto mb-6 md:hidden"}),r.jsxs("div",{className:"flex justify-between items-center mb-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-3xl font-semibold tracking-tight text-slate-900 tracking-tight",children:"New Message"}),r.jsx("p",{className:"text-[15px] text-slate-500 font-medium mt-1.5",children:"Find someone to chat with"})]}),r.jsx("button",{onClick:()=>i(!1),className:"p-3 bg-slate-50 hover:bg-slate-100 text-slate-500 rounded-full transition-colors self-start",children:r.jsx(hn,{className:"w-5 h-5"})})]}),r.jsxs("div",{className:"flex items-center bg-slate-50 rounded-2xl px-4 py-3.5 relative transition-colors focus-within:bg-slate-100 focus-within:ring-2 focus-within:ring-blue-500/20 border border-transparent focus-within:border-blue-100",children:[r.jsx(ai,{className:"w-5 h-5 text-slate-400 mr-3 shrink-0"}),r.jsx("input",{type:"text",placeholder:"Search people...",value:a,onChange:P=>l(P.target.value),className:"flex-1 bg-transparent border-none outline-none text-[15px] font-medium text-slate-900 placeholder:text-slate-400",autoFocus:!0}),a&&r.jsx("button",{onClick:()=>l(""),className:"p-1.5 hover:bg-slate-200 rounded-full transition-colors ml-2",children:r.jsx(hn,{className:"w-4 h-4 text-slate-400"})})]})]}),r.jsx("div",{className:"flex-1 overflow-y-auto p-2 pb-6",children:x?r.jsxs("div",{className:"flex flex-col items-center justify-center py-20 gap-4",children:[r.jsx(gt,{className:"w-8 h-8 animate-spin text-blue-500"}),r.jsx("span",{className:"text-[15px] font-medium text-slate-500",children:"Loading users..."})]}):S.length===0?r.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center px-6",children:[r.jsx("div",{className:"w-20 h-20 bg-slate-50 text-slate-300 rounded-[24px] flex items-center justify-center mb-5 shadow-sm border border-slate-100",children:r.jsx(Li,{className:"w-10 h-10"})}),r.jsx("p",{className:"text-[17px] text-slate-900 font-semibold tracking-tight mb-2",children:"No users found"}),r.jsx("p",{className:"text-[15px] text-slate-500 font-medium max-w-xs",children:"Try searching for a different name or email address."})]}):S.map(P=>{var R;const E=N.includes(P.email);return r.jsxs("button",{onClick:()=>j(P),className:"w-full flex items-center gap-4 px-4 sm:px-6 py-4 hover:bg-slate-50 rounded-[24px] transition-all text-left group border border-transparent hover:border-slate-100",children:[r.jsx(Js,{email:P.email,alt:P.full_name,className:"w-14 h-14 rounded-full bg-slate-100 object-cover shrink-0 border border-slate-200 shadow-sm"}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("p",{className:"font-semibold tracking-tight text-slate-900 text-[16px] tracking-tight truncate group-hover:text-blue-600 transition-colors mb-0.5",children:P.full_name||((R=P.email)==null?void 0:R.split("@")[0])}),r.jsx("p",{className:"text-[13px] text-slate-500 truncate font-medium",children:P.email})]}),E?r.jsx("span",{className:"ml-auto text-[11px] font-bold tracking-widest text-blue-600 bg-blue-50 px-3 py-1.5 rounded-lg shrink-0 uppercase border border-blue-100/50",children:"Message"}):r.jsx("div",{className:"w-10 h-10 rounded-full bg-white border border-slate-200 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all shadow-sm -translate-x-2 group-hover:translate-x-0 ml-2 shrink-0",children:r.jsx(Cn,{className:"w-5 h-5 text-blue-600"})})]},P.id)})})]})]})})]})}const ose=[{id:"1",title:"New Trip Invite",message:"Alex invited you to Coastal Trail Run.",type:"invite",created_date:new Date(Date.now()-36e5).toISOString(),is_read:!1},{id:"2",title:"Gear Claimed",message:'Jordan claimed "Heavy Duty Tarp" for Alpine Explorer.',type:"gear",created_date:new Date(Date.now()-864e5).toISOString(),is_read:!0},{id:"3",title:"RSVP Update",message:"Sarah is now Going to Desert Dunes.",type:"rsvp",created_date:new Date(Date.now()-1728e5).toISOString(),is_read:!0}];function lse(){const e=Kn(),{data:t}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),{data:n}=Re({queryKey:["notifications"],queryFn:()=>ne.entities.Notification.list("-created_date").catch(()=>[])}),s=(n==null?void 0:n.length)>0?n:ose,i=l=>{switch(l){case"invite":return r.jsx(pa,{className:"w-5 h-5 text-blue-600"});case"gear":return r.jsx(Du,{className:"w-5 h-5 text-emerald-600"});case"rsvp":return r.jsx(Li,{className:"w-5 h-5 text-amber-600"});default:return r.jsx(Du,{className:"w-5 h-5 text-slate-600"})}},a=l=>{switch(l){case"invite":return"bg-blue-100";case"gear":return"bg-emerald-100";case"rsvp":return"bg-amber-100";default:return"bg-slate-100"}};return r.jsxs("div",{className:"min-h-screen bg-[#f9fafb]",children:[r.jsxs("header",{className:"bg-white/90 backdrop-blur-md border-b border-slate-100 p-4 px-6 flex items-center z-20 sticky top-0",children:[r.jsx("button",{onClick:()=>e(-1),className:"p-2 -ml-2 mr-2 rounded-full hover:bg-slate-100",children:r.jsx(gr,{className:"w-6 h-6"})}),r.jsx("h1",{className:"font-semibold tracking-tight text-lg",children:"Notifications"})]}),r.jsx("div",{className:"p-4 space-y-3",children:s.map((l,u)=>r.jsxs(re.div,{initial:{opacity:0,y:15}
733,animate:{opacity:1,y:0},transition:{duration:.35,delay:u*.08},className:`bg-white rounded-2xl p-4 flex items-start space-x-4 border ${l.is_read?"border-slate-50":"border-blue-100 shadow-[0_2px_10px_rgba(37,99,235,0.05)]"}`,children:[r.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center shrink-0 ${a(l.type)}`,children:i(l.type)}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex justify-between items-start mb-1",children:[r.jsx("h4",{className:`text-sm tracking-tight ${l.is_read?"font-medium text-slate-700":"font-semibold text-slate-900"}`,children:l.title}),r.jsx("span",{className:"text-[10px] font-semibold tracking-tight text-slate-400",children:$n(new Date(l.created_date),"MMM d")})]}),r.jsx("p",{className:"text-xs text-slate-500 font-medium leading-relaxed",children:l.message})]}),!l.is_read&&r.jsx(re.div,{animate:{scale:[1,1.4,1]},transition:{repeat:1/0,duration:2,repeatDelay:1},className:"w-2 h-2 rounded-full bg-blue-600 shrink-0 mt-2"})]},l.id))})]})}function w3(){const e=tn(),t=Kn(),{data:n}=Re({queryKey:["user"],queryFn:()=>ne.auth.me()}),[s,i]=w.useState(1),[a,l]=w.useState(""),[u,h]=w.useState(""),[m,g]=w.useState(""),[x,v]=w.useState(!1),[_,N]=w.useState(!1),S=async E=>{var B;const R=(B=E.target.files)==null?void 0:B[0];if(!R)return;v(!0);const A=await ne.integrations.Core.UploadFile({file:R});A!=null&&A.file_url&&g(A.file_url),v(!1)},j=async()=>{if(!a.trim())return;N(!0);const E={full_name:a.trim(),onboarding_completed:!0,bio:u.trim()||void 0};m&&(E.profile_picture_url=m),await ne.auth.updateMe(E),e.invalidateQueries(["user"]),N(!1),t("/")},P=m||`https://api.dicebear.com/7.x/avataaars/svg?seed=${(n==null?void 0:n.email)||"guest"}`;return r.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-blue-50/30 to-slate-50 flex items-center justify-center p-4",children:r.jsxs(re.div,{initial:{opacity:0,y:30,scale:.95},animate:{opacity:1,y:0,scale:1},transition:{type:"spring",stiffness:300,damping:30},className:"w-full max-w-md",children:[r.jsxs("div",{className:"text-center mb-8",children:[r.jsx("div",{className:"w-16 h-16 bg-blue-600 rounded-2xl flex items-center justify-center mx-auto mb-4 shadow-lg shadow-blue-600/20 rotate-3",children:r.jsx(kc,{className:"w-8 h-8 text-white"})}),r.jsx("h1",{className:"text-3xl font-black tracking-tight text-slate-900",children:"Welcome to BATA Base"}),r.jsx("p",{className:"text-slate-500 font-medium mt-2",children:"Let's set up your profile so the crew knows who you are"})]}),r.jsxs("div",{className:"bg-white rounded-[32px] shadow-xl shadow-slate-200/50 border border-slate-100 overflow-hidden",children:[r.jsxs("div",{className:"flex gap-2 px-8 pt-6",children:[r.jsx("div",{className:`h-1.5 flex-1 rounded-full transition-colors ${s>=1?"bg-blue-600":"bg-slate-200"}`}),r.jsx("div",{className:`h-1.5 flex-1 rounded-full transition-colors ${s>=2?"bg-blue-600":"bg-slate-200"}`})]}),r.jsxs("div",{className:"p-8",children:[s===1&&r.jsxs(re.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700 mb-2",children:"Your Name *"}),r.jsx("input",{type:"text",value:a,onChange:E=>l(E.target.value),placeholder:"What should we call you?",className:"w-full bg-slate-50 border border-slate-200 rounded-2xl p-4 font-semibold text-lg focus:outline-none focus:ring-4 focus:ring-blue-500/20 focus:border-blue-500 transition-all placeholder:text-slate-400"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-semibold tracking-tight text-slate-700 mb-2",children:"Short Bio (optional)"}),r.jsx("textarea",{value:u,onChange:E=>h(E.target.value),placeholder:"Tell the group a bit about yourself...",rows:3,className:"w-full bg-slate-50 border border-slate-200 rounded-2xl p-4 font-medium focus:outline-none focus:ring-4 focus:ring-blue-500/20 focus:border-blue-500 transition-all placeholder:text-slate-400 resize-none"})]}),r.jsxs("button",{onClick:()=>a.trim()&&i(2),disabled:!a.trim(),className:"w-full bg-slate-900 text-white font-semibold tracking-tight py-4 rounded-2xl flex items-center justify-center gap-2 hover:bg-black active:scale-[0.98] transition-all shadow-lg shadow-slate-900/20 disabled:opacity-40 disabled:active:scale-100",children:["Next ",r.jsx(wa,{className:"w-5 h-5"})]})]}),s===2&&r.jsxs(re.div,{initial:{opacity:0,x:20}
733,animate:{opacity:1,x:0},className:"space-y-6",children:[r.jsxs("div",{className:"text-center",children:[r.jsx("p",{className:"text-sm font-semibold tracking-tight text-slate-700 mb-4",children:"Add a Profile Photo (optional)"}),r.jsxs("div",{className:"relative w-32 h-32 mx-auto",children:[r.jsx("div",{className:"w-32 h-32 rounded-[32px] overflow-hidden bg-slate-100 border-2 border-slate-200 shadow-md",children:r.jsx("img",{src:P,alt:"Avatar",className:"w-full h-full object-cover"})}),r.jsxs("label",{className:`absolute bottom-1 right-1 p-2.5 bg-blue-600 text-white rounded-xl shadow-lg cursor-pointer hover:bg-blue-700 active:scale-95 transition-all ${x?"opacity-50 pointer-events-none":""}`,children:[x?r.jsx(gt,{className:"w-4 h-4 animate-spin"}):r.jsx(Kf,{className:"w-4 h-4"}),r.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:S})]})]})]}),r.jsxs("div",{className:"bg-slate-50 rounded-2xl p-4 border border-slate-100",children:[r.jsx("p",{className:"text-xs font-semibold tracking-tight text-slate-400 uppercase tracking-widest mb-3",children:"Preview"}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("img",{src:P,alt:"",className:"w-12 h-12 rounded-xl bg-slate-200 object-cover"}),r.jsxs("div",{children:[r.jsx("p",{className:"font-black text-slate-900 tracking-tight",children:a}),u&&r.jsx("p",{className:"text-sm text-slate-500 line-clamp-1",children:u})]})]})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsx("button",{onClick:()=>i(1),className:"flex-1 bg-slate-100 text-slate-700 font-semibold tracking-tight py-4 rounded-2xl hover:bg-slate-200 active:scale-[0.98] transition-all",children:"Back"}),r.jsx("button",{onClick:j,disabled:_,className:"flex-[2] bg-blue-600 text-white font-semibold tracking-tight py-4 rounded-2xl flex items-center justify-center gap-2 hover:bg-blue-700 active:scale-[0.98] transition-all shadow-lg shadow-blue-600/25 disabled:opacity-50",children:_?r.jsx(gt,{className:"w-5 h-5 animate-spin"}):"Complete Setup"})]})]})]})]}),r.jsx("p",{className:"text-center text-xs text-slate-400 font-medium mt-6",children:"After completing setup, an admin will review and approve your account."})]})})}const PP=["https://images.unsplash.com/photo-1464822759023-fed622ff2c3b","https://images.unsplash.com/photo-1501555088652-021faa106b9b","https://images.unsplash.com/photo-1454496522488-7a8e488e8606","https://images.unsplash.com/photo-1532012197267-da84d127e765"];function cse(){var Z;const e=tn(),t=Kn(),{data:n,isLoading:s}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),[i,a]=w.useState(!1),[l,u]=w.useState(""),[h,m]=w.useState(!1),[g,x]=w.useState(""),v=w.useRef(null);w.useEffect(()=>{n!=null&&n.full_name?u(n.full_name):n&&!n.full_name&&!s&&m(!0)},[n,s]),w.useEffect(()=>{i&&v.current&&v.current.focus()},[i]);const _=pt({mutationFn:D=>ne.auth.updateMe({full_name:D}),onSuccess:()=>{e.invalidateQueries(["user"]),a(!1)}}),S=new URLSearchParams(window.location.search).get("email"),j=!S||(n==null?void 0:n.email)===S,P=S||(n==null?void 0:n.email),{data:E}=Re({queryKey:["userTrips",P],queryFn:()=>P?ne.entities.TripMember.filter({user_email:P}).catch(()=>[]):[]}),{data:R}=Re({queryKey:["userGear",P],queryFn:()=>P?ne.entities.GearItem.filter({claimed_by:P}).catch(()=>[]):[]}),A=(E==null?void 0:E.length)||0,B=(R==null?void 0:R.length)||0,I=async()=>{g.trim()&&(await ne.auth.updateMe({full_name:g}),e.invalidateQueries(["user"]),m(!1))},[z,V]=w.useState(!1),[te,H]=w.useState(!1),Y=async D=>{var U;const O=(U=D.target.files)==null?void 0:U[0];if(O){V(!0);try{const ie=await ne.integrations.Core.UploadFile({file:O});ie!=null&&ie.file_url&&(await ne.auth.updateMe({profile_picture_url:ie.file_url}),e.invalidateQueries(["user"]))}catch(ie){console.error(ie)}finally{V(!1)}}},ce=async D=>{var U;const O=(U=D.target.files)==null?void 0:U[0];if(O){H(!0);try{const ie=await ne.integrations.Core.UploadFile({file:O});ie!=null&&ie.file_url&&(await ne.auth.updateMe({cover_image_url:ie.file_url}),e.invalidateQueries(["user"]))}catch(ie){console.error(ie)}finally{H(!1)}}},K=P?P.length:0,q=j&&(n!=null&&n.cover_image_url)?n.cover_image_url:PP[K%PP.length],ge=j&&(n!=null&&n.profile_picture_url)?n.profile_picture_url:`https://api.dicebear.com/7.x/avataaars/svg?seed=${P||"guest"}`,he=j?(n==null?void 0:n.full_name)||"Adventurer":((Z=E==null?void 0:E[0])==null?void 0:Z.user_name)||(P==null?void 0:P.split("@")[0])||"Adventurer",be=()=>{const D=`${window.location.origin}/Profile?email=${P}`;navigator.clipboard.writeText(D),alert("Profile link copied to clipboard!")},W=({icon:D,label:O,colorClass:U,delay:ie=0,onClick:le})=>r.jsxs(re.button,{initial:{opacity:0,x:-20}
733,animate:{opacity:1,x:0},transition:{duration:.3,delay:ie},onClick:le,className:"w-full flex items-center justify-between p-4 bg-white hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsx("div",{className:`w-10 h-10 rounded-2xl flex items-center justify-center ${U}`,children:r.jsx(D,{className:"w-5 h-5"})}),r.jsx("span",{className:"font-semibold tracking-tight text-slate-700 tracking-tight",children:O})]}),r.jsx(uo,{className:"w-5 h-5 text-slate-300 group-hover:text-slate-500 transition-colors"})]});return r.jsxs("div",{className:"min-h-screen bg-[#f4f6f8] pb-24 md:pb-12 w-full overflow-x-hidden",children:[r.jsx(Lt,{children:h&&r.jsx(re.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-slate-900/40 backdrop-blur-md z-50 flex items-center justify-center p-4",children:r.jsxs(re.div,{initial:{scale:.9,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},exit:{scale:.9,opacity:0,y:20},transition:{type:"spring",stiffness:300,damping:25},className:"bg-white rounded-[32px] p-8 w-full max-w-sm shadow-2xl text-center relative overflow-hidden",children:[r.jsx("div",{className:"absolute top-0 left-0 w-full h-32 bg-gradient-to-br from-blue-500 to-indigo-600 opacity-10"}),r.jsx("div",{className:"w-24 h-24 bg-white rounded-full flex items-center justify-center mx-auto mb-6 shadow-lg shadow-blue-500/20 relative z-10",children:r.jsx(rd,{className:"w-10 h-10 text-blue-600"})}),r.jsx("h3",{className:"text-2xl font-black tracking-tight mb-2 text-slate-900",children:"Welcome to BATA Base"}),r.jsx("p",{className:"text-slate-500 font-medium tracking-tight mb-8",children:"What should we call you on the trail?"}),r.jsxs("div",{className:"space-y-4 relative z-10",children:[r.jsx("input",{type:"text",placeholder:"Your full name",value:g,onChange:D=>x(D.target.value),onKeyDown:D=>D.key==="Enter"&&I(),className:"w-full bg-slate-50 border border-slate-200/60 rounded-2xl p-4 text-center font-semibold tracking-tight tracking-tight text-lg focus:outline-none focus:ring-4 focus:ring-blue-500/20 focus:border-blue-500 transition-all placeholder:text-slate-400"}),r.jsx("button",{onClick:I,disabled:!g.trim(),className:"w-full bg-slate-900 text-white font-semibold tracking-tight tracking-tight py-4 rounded-2xl active:scale-[0.98] hover:bg-black transition-all shadow-xl shadow-slate-900/20 disabled:opacity-50 disabled:active:scale-100",children:"Start Exploring"})]})]})})}),r.jsxs("div",{className:"max-w-3xl mx-auto w-full",children:[r.jsxs("div",{className:"relative h-64 md:h-80 w-full md:rounded-b-[48px] overflow-hidden shadow-sm",children:[r.jsx("img",{src:q,alt:"Cover",className:"w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-slate-900/80 via-slate-900/20 to-transparent"}),j&&r.jsx("div",{className:"absolute top-6 right-6 md:top-8 md:right-8",children:r.jsxs("label",{className:`p-3 bg-white/20 backdrop-blur-md rounded-full text-white hover:bg-white/30 transition-colors shadow-sm cursor-pointer inline-flex items-center justify-center ${te?"opacity-50 pointer-events-none":""}`,children:[te?r.jsx(gt,{className:"w-5 h-5 animate-spin"}):r.jsx(Kf,{className:"w-5 h-5"}),r.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:ce,disabled:te})]})})]}),r.jsxs("div",{className:"px-4 md:px-8 -mt-20 relative z-10",children:[r.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"bg-white rounded-[32px] p-6 md:p-8 shadow-xl shadow-slate-200/50 border border-slate-100 mb-6 flex flex-col md:flex-row items-center md:items-start gap-6",children:[r.jsxs("div",{className:"relative -mt-16 md:-mt-20 group shrink-0",children:[r.jsx("div",{className:"w-32 h-32 md:w-40 md:h-40 bg-white rounded-[32px] md:rounded-[40px] p-1.5 shadow-xl shadow-slate-200/60 rotate-[-3deg] group-hover:rotate-0 transition-transform duration-300",children:r.jsx("div",{className:"w-full h-full rounded-[26px] md:rounded-[34px] overflow-hidden bg-slate-100 relative",children:r.jsx("img",{src:ge,alt:"Avatar",className:"w-full h-full object-cover"})})}),j&&r.jsxs("label",{className:`absolute bottom-2 right-2 p-2.5 bg-blue-600 text-white rounded-xl shadow-lg shadow-blue-600/30 hover:bg-blue-700 active:scale-95 transition-all cursor-pointer flex items-center justify-center ${z?"opacity-50 pointer-events-none":""}`,children:[z?r.jsx(gt,{className:"w-4 h-4 animate-spin"}):r.jsx(Kf,{className:"w-4 h-4"}),r.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:Y,disabled:z})]})]}),r.jsxs("div",{className:"flex-1 text-center md:text-left mt-2 md:mt-4 w-full",children:[i&&j?r.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-center md:justify-start gap-3 mb-3 w-full",children:[r.jsx("input",{ref:v,type:"text",value:l,onCh
733ange:D=>u(D.target.value),onKeyDown:D=>D.key==="Enter"&&_.mutate(l),className:"w-full md:max-w-[240px] bg-slate-50 border border-slate-200 rounded-xl p-3 px-4 font-black tracking-tight text-xl text-slate-900 focus:outline-none focus:ring-4 focus:ring-blue-500/20 focus:border-blue-500 transition-all text-center md:text-left"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{onClick:()=>_.mutate(l),disabled:_.isPending,className:"p-3 bg-slate-900 hover:bg-black text-white rounded-xl shadow-md transition-colors",children:_.isPending?r.jsx(gt,{className:"w-5 h-5 animate-spin"}):r.jsx(Cm,{className:"w-5 h-5"})}),r.jsx("button",{onClick:()=>a(!1),className:"p-3 bg-slate-100 hover:bg-slate-200 text-slate-600 rounded-xl transition-colors",children:r.jsx(hn,{className:"w-5 h-5"})})]})]}):r.jsxs("div",{className:"flex flex-col items-center md:items-start group/name",children:[r.jsxs("h1",{className:"text-3xl md:text-4xl font-black text-slate-900 tracking-tight flex items-center justify-center md:justify-start gap-3 mb-1 w-full",children:[he,j&&r.jsx("button",{onClick:()=>a(!0),className:"p-2 text-slate-300 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all opacity-100 md:opacity-0 md:group-hover/name:opacity-100",children:r.jsx(Pm,{className:"w-4 h-4"})})]}),r.jsx("p",{className:"text-slate-500 font-semibold tracking-wide text-sm",children:P||"[email protected]"})]}),!j&&n&&r.jsxs("button",{onClick:async()=>{const O=(await ne.entities.Conversation.list()).find(U=>U.participant_1===n.email&&U.participant_2===P||U.participant_1===P&&U.participant_2===n.email);if(O)t(Xe("DirectChat")+"?id="+O.id);else{const U=await ne.entities.Conversation.create({participant_1:n.email,participant_2:P,participant_1_name:n.full_name||n.email.split("@")[0],participant_2_name:he});t(Xe("DirectChat")+"?id="+U.id)}},className:"mt-4 bg-blue-600 hover:bg-blue-700 text-white font-semibold text-sm px-5 py-2.5 rounded-2xl flex items-center gap-2 shadow-md shadow-blue-600/20 active:scale-95 transition-all",children:[r.jsx(sd,{className:"w-4 h-4"})," Message"]}),r.jsxs("div",{className:"flex flex-wrap justify-center md:justify-start gap-2 mt-5",children:[r.jsxs("span",{className:"px-3 py-1.5 bg-gradient-to-r from-amber-100 to-amber-50 text-amber-600 rounded-xl text-[10px] font-black tracking-widest uppercase flex items-center border border-amber-200/50",children:[r.jsx(ZF,{className:"w-3 h-3 mr-1"})," Pro Member"]}),r.jsx("span",{className:"px-3 py-1.5 bg-blue-50 text-blue-600 rounded-xl text-[10px] font-black tracking-widest uppercase border border-blue-100/50",children:"Pioneer"})]})]})]}),r.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"grid grid-cols-3 gap-3 md:gap-4 mb-8",children:[r.jsxs("div",{className:"bg-white rounded-[24px] p-5 shadow-sm border border-slate-100 flex flex-col items-center justify-center relative overflow-hidden group hover:shadow-md transition-shadow",children:[r.jsx("div",{className:"absolute top-0 right-0 w-16 h-16 bg-blue-50 rounded-bl-[100px] opacity-50 group-hover:scale-110 transition-transform"}),r.jsx(Zs,{className:"w-6 h-6 text-blue-500 mb-2 relative z-10"}),r.jsx("p",{className:"text-2xl md:text-3xl font-black text-slate-900 tracking-tight relative z-10",children:A}),r.jsx("p",{className:"text-[10px] font-semibold tracking-tight tracking-widest text-slate-400 uppercase relative z-10",children:"Trips"})]}),r.jsxs("div",{className:"bg-white rounded-[24px] p-5 shadow-sm border border-slate-100 flex flex-col items-center justify-center relative overflow-hidden group hover:shadow-md transition-shadow",children:[r.jsx("div",{className:"absolute top-0 right-0 w-16 h-16 bg-purple-50 rounded-bl-[100px] opacity-50 group-hover:scale-110 transition-transform"}),r.jsx(ri,{className:"w-6 h-6 text-purple-500 mb-2 relative z-10"}),r.jsx("p",{className:"text-2xl md:text-3xl font-black text-slate-900 tracking-tight relative z-10",children:B}),r.jsx("p",{className:"text-[10px] font-semibold tracking-tight tracking-widest text-slate-400 uppercase relative z-10",children:"Gear Items"})]}),r.jsxs("button",{onClick:be,className:"bg-white rounded-[24px] p-5 shadow-sm border border-slate-100 flex flex-col items-center justify-center relative overflow-hidden group hover:shadow-md transition-shadow cursor-pointer active:scale-[0.98]",children:[r.jsx("div",{className:"absolute top-0 right-0 w-16 h-16 bg-sky-50 rounded-bl-[100px] opacity-50 group-hover:scale-110 transition-transform"}),r.jsx(Zu,{className:"w-6 h-6 text-sky-500 mb-2 relative z-10"}),r.jsx("p",{className:"text-lg md:text-xl font-black text-slate-900 tracking-tight relative z-10 mt-1.5",children:"Share"}),r.jsx("p",{className:"text-[10px] font-semibold tracking-tight tracking-widest text-slate-400 uppercase relative z-10",children:"Profile"})]})]}),j&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"bg-white rounded-[32px] overflow-hidden shadow-sm border border-slate-100",children:[r.jsx(W,{icon:d0,label:"Achievements & Badges",colorClass:"bg-amber-100 text-amber-600",delay:.2,onClick:()=>window.location.href="/Achievements"}),r.jsx(W,{icon:Zs,label:"My Public Map",colorClass:"bg-blue-100 text-blue-600",delay:.3})]}),r.jsxs("div",{className:"bg-white rounded-[32px] overflow-hidden shadow-sm border border-slate-100",children:[r.jsx(W,{icon:uF,label:"Account Settings",colorClass:"bg-slate-100 text-slate-600",delay:.4}),r.jsx(W,{icon:Du,label:"Notifications",colorClass:"bg-rose-100 text-rose-600",delay:.5}),r.jsx(W,{icon:Os,label:"Privacy & Security",colorClass:"bg-emerald-100 text-emerald-600",delay:.6}),r.jsx(W,{icon:OL,label:"Help & Support",colorClass:"bg-indigo-100 text-indigo-600",delay:.7})]}),r.jsxs(re.button,{initial:{opacity:0,y:20}
733,animate:{opacity:1,y:0},transition:{duration:.5,delay:.8},onClick:()=>ne.auth.logout(),className:"w-full bg-rose-50 hover:bg-rose-100 text-rose-600 font-semibold tracking-tight tracking-tight py-5 rounded-[24px] flex items-center justify-center active:scale-[0.98] transition-all",children:[r.jsx(H1,{className:"w-5 h-5 mr-2 stroke-[2.5]"}),"Sign Out"]})]}),r.jsxs("div",{className:"mt-12 text-center pb-8",children:[r.jsx("div",{className:"w-10 h-10 bg-slate-200/60 rounded-[14px] flex items-center justify-center text-slate-400 mx-auto mb-3 rotate-3",children:r.jsx(Zs,{className:"w-5 h-5"})}),r.jsx("p",{className:"text-[10px] font-black text-slate-400 tracking-widest uppercase",children:"BATA Base"})]})]})]})]})}const dse="modulepreload",use=function(e){return"/"+e},TP={},EP=function(t,n,s){let i=Promise.resolve();if(n&&n.length>0){let l=function(m){return Promise.all(m.map(g=>Promise.resolve(g).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),h=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=l(n.map(m=>{if(m=use(m),m in TP)return;TP[m]=!0;const g=m.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const v=document.createElement("link");if(v.rel=g?"stylesheet":dse,g||(v.as="script"),v.crossOrigin="",v.href=m,h&&v.setAttribute("nonce",h),document.head.appendChild(v),g)return new Promise((_,N)=>{v.addEventListener("load",_),v.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${m}`)))})}))}function a(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return i.then(l=>{for(const u of l||[])u.status==="rejected"&&a(u.reason);return t().catch(a)})};function qs(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var hse=typeof Symbol=="function"&&Symbol.observable||"@@observable",AP=hse,MP=()=>Math.random().toString(36).substring(7).split("").join("."),fse={INIT:`@@redux/INIT${MP()}`,REPLACE:`@@redux/REPLACE${MP()}`},RP=fse;function mse(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function _3(e,t,n){if(typeof e!="function")throw new Error(qs(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(qs(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(qs(1));return n(_3)(e,t)}let s=e,i=t,a=new Map,l=a,u=0,h=!1;function m(){l===a&&(l=new Map,a.forEach((j,P)=>{l.set(P,j)}))}function g(){if(h)throw new Error(qs(3));return i}function x(j){if(typeof j!="function")throw new Error(qs(4));if(h)throw new Error(qs(5));let P=!0;m();const E=u++;return l.set(E,j),function(){if(P){if(h)throw new Error(qs(6));P=!1,m(),l.delete(E),a=null}}}function v(j){if(!mse(j))throw new Error(qs(7));if(typeof j.type>"u")throw new Error(qs(8));if(typeof j.type!="string")throw new Error(qs(17));if(h)throw new Error(qs(9));try{h=!0,i=s(i,j)}finally{h=!1}return(a=l).forEach(E=>{E()}),j}function _(j){if(typeof j!="function")throw new Error(qs(10));s=j,v({type:RP.REPLACE})}function N(){const j=x;return{subscribe(P){if(typeof P!="object"||P===null)throw new Error(qs(11));function E(){const A=P;A.next&&A.next(g())}return E(),{unsubscribe:j(E)}},[AP](){return this}}}return v({type:RP.INIT}),{dispatch:v,subscribe:x,getState:g,replaceReducer:_,[AP]:N}}function OP(e,t){return function(...n){return t(e.apply(this,n))}}function DP(e,t){if(typeof e=="function")return OP(e,t);if(typeof e!="object"||e===null)throw new Error(qs(16));const n={};for(const s in e){const i=e[s];typeof i=="function"&&(n[s]=OP(i,t))}return n}function N3(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...s)=>t(n(...s)))}function pse(...e){return t=>(n,s)=>{const i=t(n,s);let a=()=>{throw new Error(qs(15))};const l={getState:i.getState,dispatch:(h,...m)=>a(h,...m)},u=e.map(h=>h(l));return a=N3(...u)(i.dispatch),{...i,dispatch:a}}}var Ob={exports:{}},Db={};/** 734 * @license React 735 * use-sync-external-store-with-selector.production.js 736 * 737 * Copyright (c) Meta Platforms, Inc. and affiliates. 738 * 739 * This source code is licensed under the MIT license found in the 740 * LICENSE file in the root directory of this source tree. 741 */var IP;function gse(){if(IP)return Db;IP=1;var e=km();function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:t,s=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,l=e.useMemo,u=e.useDebugValue;return Db.useSyncExternalStoreWithSelector=function(h,m,g,x,v){var _=i(null);if(_.current===null){var N={hasValue:!1,value:null};_.current=N}else N=_.current;_=l(function(){function j(B){if(!P){if(P=!0,E=B,B=x(B),v!==void 0&&N.hasValue){var I=N.value;if(v(I,B))return R=I}return R=B}if(I=R,n(E,B))return I;var z=x(B);return v!==void 0&&v(I,z)?(E=B,I):(E=B,R=z)}var P=!1,E,R,A=g===void 0?null:g;return[function(){return j(m())},A===null?void 0:function(){return j(A())}]},[m,g,x,v]);var S=s(h,_[0],_[1]);return a(function(){N.hasValue=!0,N.value=S},[S]),u(S),S},Db}var LP;function xse(){return LP||(LP=1,Ob.exports=gse()),Ob.exports}xse();var vse=w.version.startsWith("19"),yse=Symbol.for(vse?"react.transitional.element":"react.element"),bse=Symbol.for("react.portal"),wse=Symbol.for("react.fragment"),_se=Symbol.for("react.strict_mode"),Nse=Symbol.for("react.profiler"),jse=Symbol.for("react.consumer"),Sse=Symbol.for("react.context"),j3=Symbol.for("react.forward_ref"),kse=Symbol.for("react.suspense"),Cse=Symbol.for("react.suspense_list"),$N=Symbol.for("react.memo"),Pse=Symbol.for("react.lazy"),Tse=j3,Ese=$N;function Ase(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case yse:switch(e=e.type,e){case wse:case Nse:case _se:case kse:case Cse:return e;default:switch(e=e&&e.$$typeof,e){case Sse:case j3:case Pse:case $N:return e;case jse:return e;default:return t}}case bse:return t}}}function Mse(e){return Ase(e)===$N}function Rse(e,t,n,s,{areStatesEqual:i,areOwnPropsEqual:a,areStatePropsEqual:l}){let u=!1,h,m,g,x,v;function _(E,R){return h=E,m=R,g=e(h,m),x=t(s,m),v=n(g,x,m),u=!0,v}
vendor: 4,992 bytes, line 741
741function N(){return g=e(h,m),t.dependsOnOwnProps&&(x=t(s,m)),v=n(g,x,m),v}function S(){return e.dependsOnOwnProps&&(g=e(h,m)),t.dependsOnOwnProps&&(x=t(s,m)),v=n(g,x,m),v}function j(){const E=e(h,m),R=!l(E,g);return g=E,R&&(v=n(g,x,m)),v}function P(E,R){const A=!a(R,m),B=!i(E,h,R,m);return h=E,m=R,A&&B?N():A?S():B?j():v}return function(R,A){return u?P(R,A):_(R,A)}}function Ose(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:s,...i}){const a=t(e,i),l=n(e,i),u=s(e,i);return Rse(a,l,u,e,i)}function Dse(e,t){const n={};for(const s in e){const i=e[s];typeof i=="function"&&(n[s]=(...a)=>t(i(...a)))}return n}function b1(e){return function(n){const s=e(n);function i(){return s}return i.dependsOnOwnProps=!1,i}}function FP(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function S3(e,t){return function(s,{displayName:i}){const a=function(u,h){return a.dependsOnOwnProps?a.mapToProps(u,h):a.mapToProps(u,void 0)};return a.dependsOnOwnProps=!0,a.mapToProps=function(u,h){a.mapToProps=e,a.dependsOnOwnProps=FP(e);let m=a(u,h);return typeof m=="function"&&(a.mapToProps=m,a.dependsOnOwnProps=FP(m),m=a(u,h)),m},a}}function UN(e,t){return(n,s)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${s.wrappedComponentName}.`)}}function Ise(e){return e&&typeof e=="object"?b1(t=>Dse(e,t)):e?typeof e=="function"?S3(e):UN(e,"mapDispatchToProps"):b1(t=>({dispatch:t}))}function Lse(e){return e?typeof e=="function"?S3(e):UN(e,"mapStateToProps"):b1(()=>({}))}function Fse(e,t,n){return{...n,...e,...t}}function Bse(e){return function(n,{displayName:s,areMergedPropsEqual:i}){let a=!1,l;return function(h,m,g){const x=e(h,m,g);return a?i(x,l)||(l=x):(a=!0,l=x),l}}}function zse(e){return e?typeof e=="function"?Bse(e):UN(e,"mergeProps"):()=>Fse}function $se(e){e()}function Use(){let e=null,t=null;return{clear(){e=null,t=null},notify(){$se(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let s=e;for(;s;)n.push(s),s=s.next;return n},subscribe(n){let s=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!s||e===null||(s=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var BP={notify(){},get:()=>[]};function k3(e,t){let n,s=BP,i=0,a=!1;function l(S){g();const j=s.subscribe(S);let P=!1;return()=>{P||(P=!0,j(),x())}}function u(){s.notify()}function h(){N.onStateChange&&N.onStateChange()}function m(){return a}function g(){i++,n||(n=t?t.addNestedSub(h):e.subscribe(h),s=Use())}function x(){i--,n&&i===0&&(n(),n=void 0,s.clear(),s=BP)}function v(){a||(a=!0,g())}function _(){a&&(a=!1,x())}const N={addNestedSub:l,notifyNestedSubs:u,handleChangeWrapper:h,isSubscribed:m,trySubscribe:v,tryUnsubscribe:_,getListeners:()=>s};return N}var Vse=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Wse=Vse(),Hse=()=>typeof navigator<"u"&&navigator.product==="ReactNative",qse=Hse(),Gse=()=>Wse||qse?w.useLayoutEffect:w.useEffect,$0=Gse();function zP(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Ib(e,t){if(zP(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!zP(e[n[i]],t[n[i]]))return!1;return!0}var Yse={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Kse={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Zse={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},C3={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Qse={[Tse]:Zse,[Ese]:C3};function $P(e){return Mse(e)?C3:Qse[e.$$typeof]||Yse}var Xse=Object.defineProperty,Jse=Object.getOwnPropertyNames,UP=Object.getOwnPropertySymbols,ere=Object.getOwnPropertyDescriptor,tre=Object.getPrototypeOf,VP=Object.prototype;function w1(e,t){if(typeof t!="string"){if(VP){const a=tre(t);a&&a!==VP&&w1(e,a)}let n=Jse(t);UP&&(n=n.concat(UP(t)));const s=$P(e),i=$P(t);for(let a=0;a<n.length;++a){const l=n[a];if(!Kse[l]&&!(i&&i[l])&&!(s&&s[l])){const u=ere(t,l);try{Xse(e,l,u)}catch{}}}}return e}var Lb=Symbol.for("react-redux-context"),Fb=typeof globalThis<"u"?globalThis:{};function nre(){if(!w.createContext)return{};const e=Fb[Lb]??(Fb[Lb]=new Map);let t=e.get(w.createContext);return t||(t=w.createContext(null),e.set(w.createContext,t)),t}var P3=nre(),sre=[null,null];function rre(e,t,n){$0(()=>e(...t),n)}function ire(e,t,n,s,i,a){e.current=s,n.current=!1,i.current&&(i.current=null,a())}function are(e,t,n,s,i,a,l,u,h,m,g){if(!e)return()=>{};let x=!1,v=null;const _=()=>{if(x||!u.current)return;const S=t.getState();let j,P;try{j=s(S,i.current)}catch(E){P=E,v=E}P||(v=null),j===a.current?l.current||m():(a.current=j,h.current=j,l.current=!0,g())};
741return n.onStateChange=_,n.trySubscribe(),_(),()=>{if(x=!0,n.tryUnsubscribe(),n.onStateChange=null,v)throw v}}function ore(e,t){return e===t}function lre(e,t,n,{pure:s,areStatesEqual:i=ore,areOwnPropsEqual:a=Ib,areStatePropsEqual:l=Ib,areMergedPropsEqual:u=Ib,forwardRef:h=!1,context:m=P3}={}){const g=m,x=Lse(e),v=Ise(t),_=zse(n),N=!!e;return j=>{const P=j.displayName||j.name||"Component",E=`Connect(${P})`,R={shouldHandleStateChanges:N,displayName:E,wrappedComponentName:P,WrappedComponent:j,initMapStateToProps:x,initMapDispatchToProps:v,initMergeProps:_,areStatesEqual:i,areStatePropsEqual:l,areOwnPropsEqual:a,areMergedPropsEqual:u};function A(z){const[V,te,H]=w.useMemo(()=>{const{reactReduxForwardedRef:Te,...We}=z;return[z.context,Te,We]},[z]),Y=w.useMemo(()=>{let Te=g;return V!=null&&V.Consumer,Te},[V,g]),ce=w.useContext(Y),K=!!z.store&&!!z.store.getState&&!!z.store.dispatch,q=!!ce&&!!ce.store,ge=K?z.store:ce.store,he=q?ce.getServerState:ge.getState,be=w.useMemo(()=>Ose(ge.dispatch,R),[ge]),[W,Z]=w.useMemo(()=>{if(!N)return sre;const Te=k3(ge,K?void 0:ce.subscription),We=Te.notifyNestedSubs.bind(Te);return[Te,We]},[ge,K,ce]),D=w.useMemo(()=>K?ce:{...ce,subscription:W},[K,ce,W]),O=w.useRef(void 0),U=w.useRef(H),ie=w.useRef(void 0),le=w.useRef(!1),fe=w.useRef(!1),me=w.useRef(void 0);$0(()=>(fe.current=!0,()=>{fe.current=!1}),[]);const oe=w.useMemo(()=>()=>ie.current&&H===U.current?ie.current:be(ge.getState(),H),[ge,H]),Q=w.useMemo(()=>We=>W?are(N,ge,W,be,U,O,le,fe,ie,Z,We):()=>{},[W]);rre(ire,[U,O,le,H,ie,Z]);let Ne;try{Ne=w.useSyncExternalStore(Q,oe,he?()=>be(he(),H):oe)}catch(Te){throw me.current&&(Te.message+=` 742The error may be correlated with this previous error: 743${me.current.stack} 744 745`),Te}$0(()=>{me.current=void 0,ie.current=void 0,O.current=Ne});const Ce=w.useMemo(()=>w.createElement(j,{...Ne,ref:te}),[te,j,Ne]);return w.useMemo(()=>N?w.createElement(Y.Provider,{value:D},Ce):Ce,[Y,Ce,D])}const I=w.memo(A);if(I.WrappedComponent=j,I.displayName=A.displayName=E,h){const V=w.forwardRef(function(H,Y){return w.createElement(I,{...H,reactReduxForwardedRef:Y})});return V.displayName=E,V.WrappedComponent=j,w1(V,j)}return w1(I,j)}}var T3=lre;function cre(e){const{children:t,context:n,serverState:s,store:i}=e,a=w.useMemo(()=>{const h=k3(i);return{store:i,subscription:h,getServerState:s?()=>s:void 0}},[i,s]),l=w.useMemo(()=>i.getState(),[i]);$0(()=>{const{subscription:h}=a;return h.onStateChange=h.notifyNestedSubs,h.trySubscribe(),l!==i.getState()&&h.notifyNestedSubs(),()=>{h.tryUnsubscribe(),h.onStateChange=void 0}},[a,l]);const u=n||P3;return w.createElement(u.Provider,{value:a},t)}var dre=cre;function ure(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function E3(e,t){var n=w.useState(function(){return{inputs:t,result:e()}})[0],s=w.useRef(!0),i=w.useRef(n),a=s.current||!!(t&&i.current.inputs&&ure(t,i.current.inputs)),l=a?i.current:{inputs:t,result:e()};return w.useEffect(function(){s.current=!1,i.current=l},[l]),l.result}function hre(e,t){return E3(function(){return e},t)}var zt=E3,et=hre,fre="Invariant failed";function mre(e,t){throw new Error(fre)}var Ri=function(t){var n=t.top,s=t.right,i=t.bottom,a=t.left,l=s-a,u=i-n,h={top:n,right:s,bottom:i,left:a,width:l,height:u,x:a,y:n,center:{x:(s+a)/2,y:(i+n)/2}};return h},VN=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}}
745,WP=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},pre=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Bb={top:0,right:0,bottom:0,left:0},WN=function(t){var n=t.borderBox,s=t.margin,i=s===void 0?Bb:s,a=t.border,l=a===void 0?Bb:a,u=t.padding,h=u===void 0?Bb:u,m=Ri(VN(n,i)),g=Ri(WP(n,l)),x=Ri(WP(g,h));return{marginBox:m,borderBox:Ri(n),paddingBox:g,contentBox:x,margin:i,border:l,padding:h}},Qr=function(t){var n=t.slice(0,-2),s=t.slice(-2);if(s!=="px")return 0;var i=Number(n);return isNaN(i)&&mre(),i},gre=function(){return{x:window.pageXOffset,y:window.pageYOffset}},U0=function(t,n){var s=t.borderBox,i=t.border,a=t.margin,l=t.padding,u=pre(s,n);return WN({borderBox:u,border:i,margin:a,padding:l})},V0=function(t,n){return n===void 0&&(n=gre()),U0(t,n)},A3=function(t,n){var s={top:Qr(n.marginTop),right:Qr(n.marginRight),bottom:Qr(n.marginBottom),left:Qr(n.marginLeft)},i={top:Qr(n.paddingTop),right:Qr(n.paddingRight),bottom:Qr(n.paddingBottom),left:Qr(n.paddingLeft)},a={top:Qr(n.borderTopWidth),right:Qr(n.borderRightWidth),bottom:Qr(n.borderBottomWidth),left:Qr(n.borderLeftWidth)};return WN({borderBox:t,margin:s,padding:i,border:a})},M3=function(t){var n=t.getBoundingClientRect(),s=window.getComputedStyle(t);return A3(n,s)},HP=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function xre(e,t){return!!(e===t||HP(e)&&HP(t))}function vre(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!xre(e[n],t[n]))return!1;return!0}function hs(e,t){t===void 0&&(t=vre);var n=null;function s(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var l=e.apply(this,i);return n={lastResult:l,lastArgs:i,lastThis:this},l}return s.clear=function(){n=null},s}var fm=function(t){var n=[],s=null,i=function(){for(var l=arguments.length,u=new Array(l),h=0;h<l;h++)u[h]=arguments[h];n=u,!s&&(s=requestAnimationFrame(function(){s=null,t.apply(void 0,n)}))};return i.cancel=function(){s&&(cancelAnimationFrame(s),s=null)},i};function W0(){return W0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},W0.apply(null,arguments)}function R3(e,t){}R3.bind(null,"warn");R3.bind(null,"error");function Tl(){}function yre(e,t){return{...e,...t}}function ii(e,t,n){const s=t.map(i=>{const a=yre(n,i.options);return e.addEventListener(i.eventName,i.fn,a),function(){e.removeEventListener(i.eventName,i.fn,a)}});return function(){s.forEach(a=>{a()})}}const bre="Invariant failed";
745class H0 extends Error{}H0.prototype.toString=function(){return this.message};function Oe(e,t){throw new H0(bre)}class wre extends dt.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=Tl,this.onWindowError=n=>{const s=this.getCallbacks();s.isDragging()&&s.tryAbort(),n.error instanceof H0&&n.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=ii(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof H0){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const _re=` 746 Press space bar to start a drag. 747 When dragging you can use the arrow keys to move the item around and escape to cancel. 748 Some screen readers may require you to be in focus mode or to use your pass through key 749`,q0=e=>e+1,Nre=e=>` 750 You have lifted an item in position ${q0(e.s
750ource.index)} 751`,O3=(e,t)=>{const n=e.droppableId===t.droppableId,s=q0(e.index),i=q0(t.index);return n?` 752 You have moved the item from position ${s} 753 to position ${i} 754 `:` 755 You have moved the item from position ${s} 756 in list ${e.droppableId} 757 to list ${t.droppableId} 758 in position ${i} 759 `},D3=(e,t,n)=>t.droppableId===n.droppableId?` 760 The item ${e} 761 has been combined with ${n.draggableId}`:` 762 The item ${e} 763 in list ${t.droppableId} 764 has been combined with ${n.draggableId} 765 in list ${n.droppableId} 766 `,jre=e=>{const t=e.destination;if(t)return O3(e.source,t);const n=e.combine;return n?D3(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},qP=e=>` 767 The item has returned to its starting position 768 of ${q0(e.index)} 769`,Sre=e=>{if(e.reason==="CANCEL")return` 770 Movement cancelled. 771 ${qP(e.source)} 772 `;const t=e.destination,n=e.combine;return t?` 773 You have dropped the item. 774 ${O3(e.source,t)} 775 `:n?` 776 You have dropped the item. 777 ${D3(e.draggableId,e.source,n)} 778 `:` 779 The item has been dropped while not over a drop area. 780 ${qP(e.source)} 781 `},c0={dragHandleUsageInstructions:_re,onDragStart:Nre,onDragUpdate:jre,onDragEnd:Sre},fs={x:0,y:0},_s=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),Tr=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),El=(e,t)=>e.x===t.x&&e.y===t.y,hh=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),Jc=(e,t,n=0)=>e==="x"?{x:t,y:n}:{x:n,y:t},mm=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),GP=(e,t)=>Math.min(...t.map(n=>mm(e,n))),I3=e=>t=>({x:e(t.x),y:e(t.y)});var kre=(e,t)=>{const n=Ri({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n};const Qm=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),YP=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],Cre={top:0,right:0,bottom:0,left:0},Pre=(e,t)=>t?Qm(e,t.scroll.diff.displacement):e,Tre=(e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,Ere=(e,t)=>
781t&&t.shouldClipSubject?kre(t.pageMarginBox,e):Ri(e);var Wu=({page:e,withPlaceholder:t,axis:n,frame:s})=>{const i=Pre(e.marginBox,s),a=Tre(i,n,t),l=Ere(a,s);return{page:e,withPlaceholder:t,active:l}},HN=(e,t)=>{e.frame||Oe();const n=e.frame,s=Tr(t,n.scroll.initial),i=hh(s),a={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:s,displacement:i},max:n.scroll.max}},l=Wu({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:a});return{...e,frame:a,subject:l}};const L3=hs(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),F3=hs(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),Zx=hs(e=>Object.values(e)),Are=hs(e=>Object.values(e));var fh=hs((e,t)=>Are(t).filter(s=>e===s.descriptor.droppableId).sort((s,i)=>s.descriptor.index-i.descriptor.index));function qN(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Qx(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var Xx=hs((e,t)=>t.filter(n=>n.descriptor.id!==e.descriptor.id)),Mre=({isMovingForward:e,draggable:t,destination:n,insideDestination:s,previousImpact:i})=>{if(!n.isCombineEnabled||!qN(i))return null;function l(_){const N={type:"COMBINE",combine:{draggableId:_,droppableId:n.descriptor.id}};return{...i,at:N}}const u=i.displaced.all,h=u.length?u[0]:null;if(e)return h?l(h):null;const m=Xx(t,s);if(!h){if(!m.length)return null;const _=m[m.length-1];return l(_.descriptor.id)}const g=m.findIndex(_=>_.descriptor.id===h);g===-1&&Oe();const x=g-1;if(x<0)return null;const v=m[x];return l(v.descriptor.id)},mh=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const B3={point:fs,value:0},pm={invisible:{},visible:{},all:[]},Rre={displaced:pm,displacedBy:B3,at:null};var li=(e,t)=>n=>e<=n&&n<=t,z3=e=>{const t=li(e.top,e.bottom),n=li(e.left,e.right);return s=>{if(t(s.top)&&t(s.bottom)&&n(s.left)&&n(s.right))return!0;const a=t(s.top)||t(s.bottom),l=n(s.left)||n(s.right);if(a&&l)return!0;const h=s.top<e.top&&s.bottom>e.bottom,m=s.left<e.left&&s.right>e.right;return h&&m?!0:h&&l||m&&a}},Ore=e=>{const t=li(e.top,e.bottom),n=li(e.left,e.right);return s=>t(s.top)&&t(s.bottom)&&n(s.left)&&n(s.right)};const GN={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},$3={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var Dre=e=>t=>{const n=li(t.top,t.bottom),s=li(t.left,t.right);return i=>e===GN?n(i.top)&&n(i.bottom):s(i.left)&&s(i.right)};const Ire=(e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:fs;return Qm(e,n)},Lre=(e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,Fre=(e,t,n)=>n(t)(e),YN=({target:e,destination:t,viewport:n,withDroppableDisplacement:s,isVisibleThroughFrameFn:i})=>{const a=s?Ire(e,t):e;return Lre(a,t,i)&&Fre(a,n,i)},Bre=e=>YN({...e,isVisibleThroughFrameFn:z3}),U3=e=>YN({...e,isVisibleThroughFrameFn:Ore}),zre=e=>YN({...e,isVisibleThroughFrameFn:Dre(e.destination.axis)}),$re=(e,t,n)=>{if(typeof n=="boolean")return n;if(!t)return!0;const{invisible:s,visible:i}=t;if(s[e])return!1;const a=i[e];return a?a.shouldAnimate:!0};function Ure(e,t){const n=e.page.marginBox,s={top:t.point.y,right:0,bottom:0,left:t.point.x};return Ri(VN(n,s))}function gm({afterDragging:e,destination:t,displacedBy:n,viewport:s,forceShouldAnimate:i,last:a}){return e.reduce(function(u,h){const m=Ure(h,n),g=h.descriptor.id;if(u.all.push(g),!Bre({target:m,destination:t,viewport:s,withDroppableDisplacement:!0}))return u.invisible[h.descriptor.id]=!0,u;const v=$re(g,a,i),_={draggableId:g,shouldAnimate:v};return u.visible[g]=_,u},{all:[],visible:{},invisible:{}})}function Vre(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function KP({insideDestination:e,inHomeList:t,displacedBy:n,destination:s}){const i=Vre(e,{inHomeList:t});return{displaced:pm,displacedBy:n,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:i}}}}function G0({draggable:e,insideDestination:t,destination:n,viewport:s,displacedBy:i,last:a,index:l,forceShouldAnimate:u}){const h=mh(e,n);if(l==null)return KP({insideDestination:t,inHomeList:h,displacedBy:i,destination:n});const m=t.find(N=>N.descriptor.index===l);if(!m)return KP({insideDestination:t,inHomeList:h,displacedBy:i,destination:n});const g=Xx(e,t),x=t.indexOf(m),v=g.slice(x);return{displaced:gm({afterDragging:v,destination:n,displacedBy:i,last:a,viewport:s.frame,forceShouldAnimate:u}),displacedBy:i,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:l}}}}function Il(e,t){return!!t.effected[e]}var Wre=({isMovingForward:e,destination:t,draggables:n,combine:s,afterCritical:i})=>
781{if(!t.isCombineEnabled)return null;const a=s.draggableId,u=n[a].descriptor.index;return Il(a,i)?e?u:u-1:e?u+1:u},Hre=({isMovingForward:e,isInHomeList:t,insideDestination:n,location:s})=>{if(!n.length)return null;const i=s.index,a=e?i+1:i-1,l=n[0].descriptor.index,u=n[n.length-1].descriptor.index,h=t?u:u+1;return a<l||a>h?null:a},qre=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:s,destination:i,insideDestination:a,previousImpact:l,viewport:u,afterCritical:h})=>{const m=l.at;if(m||Oe(),m.type==="REORDER"){const x=Hre({isMovingForward:e,isInHomeList:t,location:m.destination,insideDestination:a});return x==null?null:G0({draggable:n,insideDestination:a,destination:i,viewport:u,last:l.displaced,displacedBy:l.displacedBy,index:x})}const g=Wre({isMovingForward:e,destination:i,displaced:l.displaced,draggables:s,combine:m.combine,afterCritical:h});return g==null?null:G0({draggable:n,insideDestination:a,destination:i,viewport:u,last:l.displaced,displacedBy:l.displacedBy,index:g})},Gre=({displaced:e,afterCritical:t,combineWith:n,displacedBy:s})=>{const i=!!(e.visible[n]||e.invisible[n]);return Il(n,t)?i?fs:hh(s.point):i?s.point:fs},Yre=({afterCritical:e,impact:t,draggables:n})=>{const s=Qx(t);s||Oe();const i=s.draggableId,a=n[i].page.borderBox.center,l=Gre({displaced:t.displaced,afterCritical:e,combineWith:i,displacedBy:t.displacedBy});return _s(a,l)};const V3=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,Kre=(e,t)=>
781t.margin[e.end]+t.borderBox[e.size]/2,KN=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,ZP=({axis:e,moveRelativeTo:t,isMoving:n})=>Jc(e.line,t.marginBox[e.end]+V3(e,n),KN(e,t.marginBox,n)),QP=({axis:e,moveRelativeTo:t,isMoving:n})=>Jc(e.line,t.marginBox[e.start]-Kre(e,n),KN(e,t.marginBox,n)),Zre=({axis:e,moveInto:t,isMoving:n})=>Jc(e.line,t.contentBox[e.start]+V3(e,n),KN(e,t.contentBox,n));var Qre=({impact:e,draggable:t,draggables:n,droppable:s,afterCritical:i})=>{const a=fh(s.descriptor.id,n),l=t.page,u=s.axis;if(!a.length)return Zre({axis:u,moveInto:s.page,isMoving:l});const{displaced:h,displacedBy:m}=e,g=h.all[0];if(g){const v=n[g];if(Il(g,i))return QP({axis:u,moveRelativeTo:v.page,isMoving:l});const _=U0(v.page,m.point);return QP({axis:u,moveRelativeTo:_,isMoving:l})}const x=a[a.length-1];if(x.descriptor.id===t.descriptor.id)return l.borderBox.center;if(Il(x.descriptor.id,i)){const v=U0(x.page,hh(i.displacedBy.point));return ZP({axis:u,moveRelativeTo:v,isMoving:l})}return ZP({axis:u,moveRelativeTo:x.page,isMoving:l})},_1=(e,t)=>{const n=e.frame;return n?_s(t,n.scroll.diff.displacement):t};const Xre=({impact:e,draggable:t,droppable:n,draggables:s,afterCritical:i})=>{const a=t.page.borderBox.center,l=e.at;return!n||!l?a:l.type==="REORDER"?Qre({impact:e,draggable:t,draggables:s,droppable:n,afterCritical:i}):Yre({impact:e,draggables:s,afterCritical:i})};var Jx=e=>{const t=Xre(e),n=e.droppable;return n?_1(n,t):t},W3=(e,t)=>{const n=Tr(t,e.scroll.initial),s=hh(n);return{frame:Ri({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:s}}}};function XP(e,t){return e.map(n=>t[n])}function Jre(e,t){for(let n=0;n<t.length;n++){const s=t[n].visible[e];if(s)return s}return null}var eie=({impact:e,viewport:t,destination:n,draggables:s,maxScrollChange:i})=>{const a=W3(t,_s(t.scroll.current,i)),l=n.frame?HN(n,_s(n.frame.scroll.current,i)):n,u=e.displaced,h=gm({afterDragging:XP(u.all,s),destination:n,displacedBy:e.displacedBy,viewport:a.frame,last:u,forceShouldAnimate:!1}),m=gm({afterDragging:XP(u.all,s),destination:l,displacedBy:e.displacedBy,viewport:t.frame,last:u,forceShouldAnimate:!1}),g={},x={},v=[u,h,m];return u.all.forEach(N=>{const S=Jre(N,v);if(S){x[N]=S;return}g[N]=!0}),{...e,displaced:{all:u.all,invisible:g,visible:x}}},tie=(e,t)=>_s(e.scroll.diff.displacement,t),ZN=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const s=tie(n,e),i=Tr(s,t.page.borderBox.center);return _s(t.client.borderBox.center,i)},H3=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:s,withDroppableDisplacement:i,onlyOnMainAxis:a=!1})=>{const l=Tr(n,e.page.borderBox.center),h={target:Qm(e.page.borderBox,l),destination:t,withDroppableDisplacement:i,viewport:s};return a?zre(h):U3(h)},nie=({isMovingForward:e,draggable:t,destination:n,draggables:s,previousImpact:i,viewport:a,previousPageBorderBoxCenter:l,previousClientSelection:u,afterCritical:h})=>{if(!n.isEnabled)return null;const m=fh(n.descriptor.id,s),g=mh(t,n),x=Mre({isMovingForward:e,draggable:t,destination:n,insideDestination:m,previousImpact:i})||qre({isMovingForward:e,isInHomeList:g,draggable:t,draggables:s,destination:n,insideDestination:m,previousImpact:i,viewport:a,afterCritical:h});if(!x)return null;const v=Jx({impact:x,draggable:t,droppable:n,draggables:s,afterCritical:h});if(H3({draggable:t,destination:n,newPageBorderBoxCenter:v,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:ZN({pageBorderBoxCenter:v,draggable:t,viewport:a}),impact:x,scrollJumpRequest:null};const N=Tr(v,l),S=eie({impact:x,viewport:a,destination:n,draggables:s,maxScrollChange:N});return{clientSelection:u,impact:S,scrollJumpRequest:N}};const Hs=e=>{const t=e.subject.active;return t||Oe(),t};var sie=({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:s,viewport:i})=>{const a=n.subject.active;if(!a)return null;const l=n.axis,u=li(a[l.start],a[l.end]),h=Zx(s).filter(g=>g!==n).filter(g=>g.isEnabled).filter(g=>!!g.subject.active).filter(g=>z3(i.frame)(Hs(g))).filter(g=>{const x=Hs(g);return e?a[l.crossAxisEnd]<x[l.crossAxisEnd]:x[l.crossAxisStart]<a[l.crossAxisStart]}).filter(g=>{const x=Hs(g),v=li(x[l.start],x[l.end]);return u(x[l.start])||u(x[l.end])||v(a[l.start])||v(a[l.end])}).sort((g,x)=>{const v=Hs(g)[l.crossAxisStart],_=Hs(x)[l.crossAxisStart];return e?v-_:_-v}).filter((g,x,v)=>Hs(g)[l.crossAxisStart]===Hs(v[0])[l.crossAxisStart]);if(!h.length)return null;if(h.length===1)return h[0];const m=h.filter(g=>li(Hs(g)[l.start],Hs(g)[l.end])(t[l.line]));return m.length===1?m[0]:m.length>1?m.sort((g,x)=>Hs(g)[l.start]-Hs(x)[l.start])[0]:h.sort((g,x)=>{const v=GP(t,YP(Hs(g))),_=GP(t,YP(Hs(x)));return v!==_?v-_:Hs(g)[l.start]-Hs(x)[l.start]})[0]};const JP=(e,t)=>{const n=e.page.borderBox.center;return Il(e.descriptor.id,t)?Tr(n,t.displacedBy.point):n},rie=(e,t)=>{const n=e.page.borderBox;return Il(e.descriptor.id,t)?Qm(n,hh(t.displacedBy.point)):n};var iie=({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:s,afterCritical:i})=>s.filter(l=>U3({target:rie(l,i),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((l,u)=>{const h=mm(e,_1(n,JP(l,i))),m=mm(e,_1(n,JP(u,i)));return h<m?-1:m<h?1:l.descriptor.index-u.descriptor.index})[0]||null,Xm=hs(function(t,n){const s=n[t.line];return{value:s,point:Jc(t.line,s)}});const aie=(e,t,n)=>{const s=e.axis;
781if(e.descriptor.mode==="virtual")return Jc(s.line,t[s.line]);const i=e.subject.page.contentBox[s.size],h=fh(e.descriptor.id,n).reduce((m,g)=>m+g.client.marginBox[s.size],0)+t[s.line]-i;return h<=0?null:Jc(s.line,h)},q3=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),G3=(e,t,n)=>{const s=e.frame;mh(t,e)&&Oe(),e.subject.withPlaceholder&&Oe();const i=Xm(e.axis,t.displaceBy).point,a=aie(e,i,n),l={placeholderSize:i,increasedBy:a,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!s){const g=Wu({page:e.subject.page,withPlaceholder:l,axis:e.axis,frame:e.frame});return{...e,subject:g}}const u=a?_s(s.scroll.max,a):s.scroll.max,h=q3(s,u),m=Wu({page:e.subject.page,withPlaceholder:l,axis:e.axis,frame:h});return{...e,subject:m,frame:h}},oie=e=>{const t=e.subject.withPlaceholder;t||Oe();const n=e.frame;if(!n){const l=Wu({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:l}}const s=t.oldFrameMaxScroll;s||Oe();const i=q3(n,s),a=Wu({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null});return{...e,subject:a,frame:i}};var lie=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:s,draggables:i,destination:a,viewport:l,afterCritical:u})=>
781{if(!t){if(n.length)return null;const x={displaced:pm,displacedBy:B3,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},v=Jx({impact:x,draggable:s,droppable:a,draggables:i,afterCritical:u}),_=mh(s,a)?a:G3(a,s,i);return H3({draggable:s,destination:_,newPageBorderBoxCenter:v,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?x:null}const h=e[a.axis.line]<=t.page.borderBox.center[a.axis.line],m=(()=>{const x=t.descriptor.index;return t.descriptor.id===s.descriptor.id||h?x:x+1})(),g=Xm(a.axis,s.displaceBy);return G0({draggable:s,insideDestination:n,destination:a,viewport:l,displacedBy:g,last:pm,index:m})},cie=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:s,draggables:i,droppables:a,viewport:l,afterCritical:u})=>{const h=sie({isMovingForward:e,pageBorderBoxCenter:t,source:s,droppables:a,viewport:l});if(!h)return null;const m=fh(h.descriptor.id,i),g=iie({pageBorderBoxCenter:t,viewport:l,destination:h,insideDestination:m,afterCritical:u}),x=lie({previousPageBorderBoxCenter:t,destination:h,draggable:n,draggables:i,moveRelativeTo:g,insideDestination:m,viewport:l,afterCritical:u});if(!x)return null;const v=Jx({impact:x,draggable:n,droppable:h,draggables:i,afterCritical:u});return{clientSelection:ZN({pageBorderBoxCenter:v,draggable:n,viewport:l}),impact:x,scrollJumpRequest:null}},Ar=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const die=(e,t)=>{const n=Ar(e);return n?t[n]:null};var uie=({state:e,type:t})=>{const n=die(e.impact,e.dimensions.droppables),s=!!n,i=e.dimensions.droppables[e.critical.droppable.id],a=n||i,l=a.axis.direction,u=l==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||l==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(u&&!s)return null;const h=t==="MOVE_DOWN"||t==="MOVE_RIGHT",m=e.dimensions.draggables[e.critical.draggable.id],g=e.current.page.borderBoxCenter,{draggables:x,droppables:v}=e.dimensions;return u?nie({isMovingForward:h,previousPageBorderBoxCenter:g,draggable:m,destination:a,draggables:x,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):cie({isMovingForward:h,previousPageBorderBoxCenter:g,draggable:m,isOver:a,draggables:x,droppables:v,viewport:e.viewport,afterCritical:e.afterCritical})};function Sc(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Y3(e){const t=li(e.top,e.bottom),n=li(e.left,e.right);return function(i){return t(i.y)&&n(i.x)}}function hie(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function fie({pageBorderBox:e,draggable:t,candidates:n}){const s=t.page.borderBox.center,i=n.map(a=>{const l=a.axis,u=Jc(a.axis.line,e.center[l.line],a.page.borderBox.center[l.crossAxisLine]);return{id:a.descriptor.id,distance:mm(s,u)}}).sort((a,l)=>l.distance-a.distance);return i[0]?i[0].id:null}function mie({pageBorderBox:e,draggable:t,droppables:n}){const s=Zx(n).filter(i=>{if(!i.isEnabled)return!1;const a=i.subject.active;if(!a||!hie(e,a))return!1;if(Y3(a)(e.center))return!0;const l=i.axis,u=a.center[l.crossAxisLine],h=e[l.crossAxisStart],m=e[l.crossAxisEnd],g=li(a[l.crossAxisStart],a[l.crossAxisEnd]),x=g(h),v=g(m);return!x&&!v?!0:x?h<u:m>u});return s.length?s.length===1?s[0].descriptor.id:fie({pageBorderBox:e,draggable:t,candidates:s}):null}const K3=(e,t)=>Ri(Qm(e,t));var pie=(e,t)=>{const n=e.frame;return n?K3(t,n.scroll.diff.value):t};function Z3({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function gie({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var xie=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:s,last:i,viewport:a,afterCritical:l})=>{const u=n.axis,h=Xm(n.axis,t.displaceBy),m=h.value,g=e[u.start],x=e[u.end],_=Xx(t,s).find(S=>{const j=S.descriptor.id,P=S.page.borderBox.center[u.line],E=Il(j,l),R=Z3({displaced:i,id:j});return E?R?x<=P:g<P-m:R?x<=P+m:g<P})||null,N=gie({draggable:t,closest:_,inHomeList:mh(t,n)});return G0({draggable:t,insideDestination:s,destination:n,viewport:
781a,last:i,displacedBy:h,index:N})};const vie=4;var yie=({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:s,insideDestination:i,afterCritical:a})=>{if(!s.isCombineEnabled)return null;const l=s.axis,u=Xm(s.axis,e.displaceBy),h=u.value,m=t[l.start],g=t[l.end],v=Xx(e,i).find(N=>{const S=N.descriptor.id,j=N.page.borderBox,E=j[l.size]/vie,R=Il(S,a),A=Z3({displaced:n.displaced,id:S});return R?A?g>j[l.start]+E&&g<j[l.end]-E:m>j[l.start]-h+E&&m<j[l.end]-h-E:A?g>j[l.start]+h+E&&g<j[l.end]+h-E:m>j[l.start]+E&&m<j[l.end]-E});return v?{displacedBy:u,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:v.descriptor.id,droppableId:s.descriptor.id}}}:null},Q3=({pageOffset:e,draggable:t,draggables:n,droppables:s,previousImpact:i,viewport:a,afterCritical:l})=>{const u=K3(t.page.borderBox,e),h=mie({pageBorderBox:u,draggable:t,droppables:s});if(!h)return Rre;const m=s[h],g=fh(m.descriptor.id,n),x=pie(m,u);return yie({pageBorderBoxWithDroppableScroll:x,draggable:t,previousImpact:i,destination:m,insideDestination:g,afterCritical:l})||xie({pageBorderBoxWithDroppableScroll:x,draggable:t,destination:m,insideDestination:g,last:i.displaced,viewport:a,afterCritical:l})},QN=(e,t)=>({...e,[t.descriptor.id]:t});const bie=({previousImpact:e,impact:t,droppables:n})=>{const s=Ar(e),i=Ar(t);if(!s||s===i)return n;const a=n[s];if(!a.subject.withPlaceholder)return n;const l=oie(a);return QN(n,l)};var wie=({draggable:e,draggables:t,droppables:n,previousImpact:s,impact:i})=>{const a=bie({previousImpact:s,impact:i,droppables:n}),l=Ar(i);if(!l)return a;const u=n[l];if(mh(e,u)||u.subject.withPlaceholder)return a;const h=G3(u,e,t);return QN(a,h)},Gf=({state:e,clientSelection:t,dimensions:n,viewport:s,impact:i,scrollJumpRequest:a})=>{const l=s||e.viewport,u=n||e.dimensions,h=t||e.current.client.selection,m=Tr(h,e.initial.client.selection),g={offset:m,selection:h,borderBoxCenter:_s(e.initial.client.borderBoxCenter,m)},x={selection:_s(g.selection,l.scroll.current),borderBoxCenter:_s(g.borderBoxCenter,l.scroll.current),offset:_s(g.offset,l.scroll.diff.value)},v={client:g,page:x};if(e.phase==="COLLECTING")return{...e,dimensions:u,viewport:l,current:v};const _=u.draggables[e.critical.draggable.id],N=i||Q3({pageOffset:x.offset,draggable:_,draggables:u.draggables,droppables:u.droppables,previousImpact:e.impact,viewport:l,afterCritical:e.afterCritical}),S=wie({draggable:_,impact:N,previousImpact:e.impact,draggables:u.draggables,droppables:u.droppables});return{...e,current:v,dimensions:{draggables:u.draggables,droppables:S},impact:N,viewport:l,scrollJumpRequest:a||null,forceShouldAnimate:a?!1:null}};function _ie(e,t){return e.map(n=>t[n])}var X3=({impact:e,viewport:t,draggables:n,destination:s,forceShouldAnimate:i})=>{const a=e.displaced,l=_ie(a.all,n),u=gm({afterDragging:l,destination:s,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:i,last:a});return{...e,displaced:u}},J3=({impact:e,draggable:t,droppable:n,draggables:s,viewport:i,afterCritical:a})=>{const l=Jx({impact:e,draggable:t,draggables:s,droppable:n,afterCritical:a});return ZN({pageBorderBoxCenter:l,draggable:t,viewport:i})},eO=({state:e,dimensions:t,viewport:n})=>{e.movementMode!=="SNAP"&&Oe();const s=e.impact,i=n||e.viewport,a=t||e.dimensions,{draggables:l,droppables:u}=a,h=l[e.critical.draggable.id],m=Ar(s);m||Oe();const g=u[m],x=X3({impact:s,viewport:i,destination:g,draggables:l}),v=J3({impact:x,draggable:h,droppable:g,draggables:l,viewport:i,afterCritical:e.afterCritical});return Gf({impact:x,clientSelection:v,state:e,dimensions:a,viewport:i})},Nie=e=>({index:e.index,droppableId:e.droppableId}),tO=({draggable:e,home:t,draggables:n,viewport:s})=>{const i=Xm(t.axis,e.displaceBy),a=fh(t.descriptor.id,n),l=a.indexOf(e);l===-1&&Oe();const u=a.slice(l+1),h=u.reduce((v,_)=>(v[_.descriptor.id]=!0,v),{}),m={inVirtualList:t.descriptor.mode==="virtual",displacedBy:i,effected:h};return{impact:{displaced:gm({afterDragging:u,destination:t,displacedBy:i,last:null,viewport:s.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:"REORDER",destination:Nie(e.descriptor)}},afterCritical:m}},jie=(e,t)=>({draggables:e.draggables,droppables:QN(e.droppables,t)}),Sie=({draggable:e,offset:t,initialWindowScroll:n})=>{const s=U0(e.client,t),i=V0(s,n);return{...e,placeholder:{...e.placeholder,client:s},client:s,page:i}},kie=e=>{const t=e.frame;return t||Oe(),t},Cie=({additions:e,updatedDroppables:t,viewport:n})=>{const s=n.scroll.diff.value;return e.map(i=>{const a=i.descriptor.droppableId,l=t[a],h=kie(l).scroll.diff.value,m=_s(s,h);return Sie({draggable:i,offset:m,initialWindowScroll:n.scroll.initial})})},Pie=({state:e,published:t})=>{const n=t.modified.map(P=>{const E=e.dimensions.droppables[P.droppableId];return HN(E,P.scroll)}),s={...e.dimensions.droppables,...L3(n)},i=F3(Cie({additions:t.additions,updatedDroppables:s,viewport:e.viewport})),a={...e.dimensions.draggables,...i};
781t.removals.forEach(P=>{delete a[P]});const l={droppables:s,draggables:a},u=Ar(e.impact),h=u?l.droppables[u]:null,m=l.draggables[e.critical.draggable.id],g=l.droppables[e.critical.droppable.id],{impact:x,afterCritical:v}=tO({draggable:m,home:g,draggables:a,viewport:e.viewport}),_=h&&h.isCombineEnabled?e.impact:x,N=Q3({pageOffset:e.current.page.offset,draggable:l.draggables[e.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:_,viewport:e.viewport,afterCritical:v}),S={...e,phase:"DRAGGING",impact:N,onLiftImpact:x,dimensions:l,afterCritical:v,forceShouldAnimate:!1};return e.phase==="COLLECTING"?S:{...S,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const N1=e=>e.movementMode==="SNAP",zb=(e,t,n)=>{const s=jie(e.dimensions,t);return!N1(e)||n?Gf({state:e,dimensions:s}):eO({state:e,dimensions:s})};function $b(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const eT={phase:"IDLE",completed:null,shouldFlush:!1};var Tie=(e=eT,t)=>{if(t.type==="FLUSH")return{...eT,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&Oe();const{critical:n,clientSelection:s,viewport:i,dimensions:a,movementMode:l}=t.payload,u=a.draggables[n.draggable.id],h=a.droppables[n.droppable.id],m={selection:s,borderBoxCenter:u.client.borderBox.center,offset:fs},g={client:m,page:{selection:_s(m.selection,i.scroll.initial),borderBoxCenter:_s(m.selection,i.scroll.initial),offset:_s(m.selection,i.scroll.diff.value)}},x=Zx(a.droppables).every(S=>!S.isFixedOnPage),{impact:v,afterCritical:_}=tO({draggable:u,home:h,draggables:a.draggables,viewport:i});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:l,dimensions:a,initial:g,current:g,isWindowScrollAllowed:x,impact:v,afterCritical:_,onLiftImpact:v,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&Oe(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||Oe(),Pie({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Sc(e)||Oe();const{client:n}=t.payload;return El(n,e.current.client.selection)?e:Gf({state:e,clientSelection:n,impact:N1(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return $b(e);Sc(e)||Oe();const{id:n,newScroll:s}=t.payload,i=e.dimensions.droppables[n];if(!i)return e;const a=HN(i,s);return zb(e,a,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Sc(e)||Oe();const{id:n,isEnabled:s}=t.payload,i=e.dimensions.droppables[n];i||Oe(),i.isEnabled===s&&Oe();const a={...i,isEnabled:s};return zb(e,a,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Sc(e)||Oe();const{id:n,isCombineEnabled:s}=t.payload,i=e.dimensions.droppables[n];i||Oe(),i.isCombineEnabled===s&&Oe();const a={...i,isCombineEnabled:s};return zb(e,a,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Sc(e)||Oe(),e.isWindowScrollAllowed||Oe();const n=t.payload.newScroll;if(El(e.viewport.scroll.current,n))return $b(e);const s=W3(e.viewport,n);return N1(e)?eO({state:e,viewport:s}):Gf({state:e,viewport:s})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Sc(e))return e;const n=t.payload.maxScroll;if(El(n,e.viewport.scroll.max))return e;const s={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:s}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Oe();const n=uie({state:e,type:t.type});return n?Gf({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const n=t.payload.reason;return e.phase!=="COLLECTING"&&Oe(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(t.type==="DROP_ANIMATE"){const{completed:n,dropDuration:s,newHomeClientOffset:i}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||Oe(),{phase:"DROP_ANIMATING",completed:n,dropDuration:s,newHomeClientOffset:i,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:n}=t.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return e};function Yt(e,t){return e instanceof Object&&"type"in e&&e.type===t}const Eie=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),Aie=e=>({type:"LIFT",payload:e}),Mie=e=>({type:"INITIAL_PUBLISH",payload:e}),Rie=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),Oie=()=>({type:"COLLECTION_STARTING",payload:null}),Die=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Iie=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Lie=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),nO=e=>({type:"MOVE",payload:e}),Fie=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),Bie=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),zie=()=>({type:"MOVE_UP",payload:null}),$ie=()=>({type:"MOVE_DOWN",payload:null}),Uie=()=>({type:"MOVE_RIGHT",payload:null}),Vie=()=>({type:"MOVE_LEFT",payload:null}),XN=()=>({type:"FLUSH",payload:null}),Wie=e=>({type:"DROP_ANIMATE",payload:e}),JN=e=>({type:"DROP_COMPLETE",payload:e}),sO=e=>({type:"DROP",payload:e}),Hie=e=>({type:"DROP_PENDING",payload:e}),rO=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var qie=e=>({getState:t,dispatch:n})=>s=>i=>{if(!Yt(i,"LIFT")){s(i);return}const{id:a,clientSelection:l,movementMode:u}=i.payload,h=t();h.phase==="DROP_ANIMATING"&&n(JN({completed:h.completed})),t().phase!=="IDLE"&&Oe(),n(XN()),n(Eie({draggableId:a,movementMode:u}));const g={draggableId:a,scrollOptions:{shouldPublishImmediately:u==="SNAP"}},{critical:x,dimensions:v,viewport:_}=e.startPublishing(g);n(Mie({critical:x,dimensions:v,clientSelection:l,movementMode:u,viewport:_}))},Gie=e=>()=>t=>n=>{Yt(n,"INITIAL_PUBLISH")&&e.dragging(),Yt(n,"DROP_ANIMATE")&&e.dropping(n.payload.completed.result.reason),(Yt(n,"FLUSH")||Yt(n,"DROP_COMPLETE"))&&e.resting(),t(n)};const ej={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},xm={opacity:{drop:0,combining:.7},scale:{drop:.75}},iO={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},bc=`${iO.outOfTheWay}s ${ej.outOfTheWay}`,Yf={fluid:`opacity ${bc}`,snap:`transform ${bc}, opacity ${bc}`,drop:e=>{const t=`${e}s ${ej.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${bc}`,placeholder:`height ${bc}, width ${bc}, margin ${bc}`},tT=e=>El(e,fs)?void 0:`translate(${e.x}px, ${e.y}px)`,j1={moveTo:tT,drop:(e,t)=>{const n=tT(e);if(n)return t?`${n} scale(${xm.scale.drop})`:n}},{minDropTime:S1,maxDropTime:aO}=iO,Yie=aO-S1,nT=1500,Kie=.6;var Zie=({current:e,destination:t,reason:n})=>{const s=mm(e,t);if(s<=0)return S1;if(s>=nT)return aO;const i=s/nT,a=S1+Yie*i,l=n==="CANCEL"?a*Kie:a;return Number(l.toFixed(2))},Qie=({impact:e,draggable:t,dimensions:n,viewport:s,afterCritical:i})=>{const{draggables:a,droppables:l}=n,u=Ar(e),h=u?l[u]:null,m=l[t.descriptor.droppableId],g=J3({impact:e,draggable:t,draggables:a,afterCritical:i,droppable:h||m,viewport:s});return Tr(g,t.client.borderBox.center)},Xie=({draggables:e,reason:t,lastImpact:n,home:s,viewport:i,onLiftImpact:a})=>!n.at||t!=="DROP"?{impact:X3({draggables:e,impact:a,destination:s,viewport:i,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type==="REORDER"?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:pm},didDropInsideDroppable:!0};const Jie=({getState:e,dispatch:t})=>n=>s=>{if(!Yt(s,"DROP")){n(s);return}const i=e(),a=s.payload.reason;if(i.phase==="COLLECTING"){t(Hie({reason:a}));return}if(i.phase==="IDLE")return;i.phase==="DROP_PENDING"&&i.isWaiting&&Oe(),i.phase==="DRAGGING"||i.phase==="DROP_PENDING"||Oe();const u=i.critical,h=i.dimensions,m=h.draggables[i.critical.draggable.id],{impact:g,didDropInsideDroppable:x}=Xie({reason:a,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.
781id],viewport:i.viewport,draggables:i.dimensions.draggables}),v=x?qN(g):null,_=x?Qx(g):null,N={index:u.draggable.index,droppableId:u.droppable.id},S={draggableId:m.descriptor.id,type:m.descriptor.type,source:N,reason:a,mode:i.movementMode,destination:v,combine:_},j=Qie({impact:g,draggable:m,dimensions:h,viewport:i.viewport,afterCritical:i.afterCritical}),P={critical:i.critical,afterCritical:i.afterCritical,result:S,impact:g};if(!(!El(i.current.client.offset,j)||!!S.combine)){t(JN({completed:P}));return}const R=Zie({current:i.current.client.offset,destination:j,reason:a});t(Wie({newHomeClientOffset:j,dropDuration:R,completed:P}))};var oO=()=>({x:window.pageXOffset,y:window.pageYOffset});function eae(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function tae({onWindowScroll:e}){function t(){e(oO())}const n=fm(t),s=eae(n);let i=Tl;function a(){return i!==Tl}function l(){a()&&Oe(),i=ii(window,[s])}function u(){a()||Oe(),n.cancel(),i(),i=Tl}return{start:l,stop:u,isActive:a}}const nae=e=>Yt(e,"DROP_COMPLETE")||Yt(e,"DROP_ANIMATE")||Yt(e,"FLUSH"),sae=e=>{const t=tae({onWindowScroll:n=>{e.dispatch(Fie({newScroll:n}))}});return n=>s=>{!t.isActive()&&Yt(s,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&nae(s)&&t.stop(),n(s)}};var rae=e=>{let t=!1,n=!1;const s=setTimeout(()=>{n=!0}),i=a=>{t||n||(t=!0,e(a),clearTimeout(s))};return i.wasCalled=()=>t,i},iae=()=>{const e=[],t=i=>{const a=e.findIndex(u=>u.timerId===i);a===-1&&Oe();const[l]=e.splice(a,1);l.callback()};return{add:i=>{const a=setTimeout(()=>t(a)),l={timerId:a,callback:i};e.push(l)},flush:()=>
781{if(!e.length)return;const i=[...e];e.length=0,i.forEach(a=>{clearTimeout(a.timerId),a.callback()})}}};const aae=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,oae=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,lae=(e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,s=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&s},wf=(e,t)=>{t()},Rg=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function Ub(e,t,n,s){if(!e){n(s(t));return}const i=rae(n);e(t,{announce:i}),i.wasCalled()||n(s(t))}var cae=(e,t)=>{const n=iae();let s=null;const i=(x,v)=>{s&&Oe(),wf("onBeforeCapture",()=>{const _=e().onBeforeCapture;_&&_({draggableId:x,mode:v})})},a=(x,v)=>{s&&Oe(),wf("onBeforeDragStart",()=>{const _=e().onBeforeDragStart;_&&_(Rg(x,v))})},l=(x,v)=>{s&&Oe();const _=Rg(x,v);s={mode:v,lastCritical:x,lastLocation:_.source,lastCombine:null},n.add(()=>{wf("onDragStart",()=>Ub(e().onDragStart,_,t,c0.onDragStart))})},u=(x,v)=>{const _=qN(v),N=Qx(v);s||Oe();const S=!lae(x,s.lastCritical);S&&(s.lastCritical=x);const j=!aae(s.lastLocation,_);j&&(s.lastLocation=_);const P=!oae(s.lastCombine,N);if(P&&(s.lastCombine=N),!S&&!j&&!P)return;const E={...Rg(x,s.mode),combine:N,destination:_};n.add(()=>{wf("onDragUpdate",()=>Ub(e().onDragUpdate,E,t,c0.onDragUpdate))})},h=()=>{s||Oe(),n.flush()},m=x=>{s||Oe(),s=null,wf("onDragEnd",()=>Ub(e().onDragEnd,x,t,c0.onDragEnd))};return{beforeCapture:i,beforeStart:a,start:l,update:u,flush:h,drop:m,abort:()=>{if(!s)return;const x={...Rg(s.lastCritical,s.mode),combine:null,destination:null,reason:"CANCEL"};m(x)}}},dae=(e,t)=>{const n=cae(e,t);return s=>i=>a=>{if(Yt(a,"BEFORE_INITIAL_CAPTURE")){n.beforeCapture(a.payload.draggableId,a.payload.movementMode);return}if(Yt(a,"INITIAL_PUBLISH")){const u=a.payload.critical;n.beforeStart(u,a.payload.movementMode),i(a),n.start(u,a.payload.movementMode);return}if(Yt(a,"DROP_COMPLETE")){const u=a.payload.completed.result;n.flush(),i(a),n.drop(u);return}if(i(a),Yt(a,"FLUSH")){n.abort();return}const l=s.getState();l.phase==="DRAGGING"&&n.update(l.critical,l.impact)}};const uae=e=>t=>n=>{if(!Yt(n,"DROP_ANIMATION_FINISHED")){t(n);return}const s=e.getState();s.phase!=="DROP_ANIMATING"&&Oe(),e.dispatch(JN({completed:s.completed}))},hae=e=>{let t=null,n=null;function s(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return i=>a=>{if((Yt(a,"FLUSH")||Yt(a,"DROP_COMPLETE")||Yt(a,"DROP_ANIMATION_FINISHED"))&&s(),i(a),!Yt(a,"DROP_ANIMATE"))return;const l={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(rO())}};n=requestAnimationFrame(()=>{n=null,t=ii(window,[l])})}};var fae=e=>()=>t=>n=>{(Yt(n,"DROP_COMPLETE")||Yt(n,"FLUSH")||Yt(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)},mae=e=>{let t=!1;return()=>n=>s=>{if(Yt(s,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(s.payload.critical.draggable.id),n(s),e.tryRestoreFocusRecorded();return}if(n(s),!!t){if(Yt(s,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(Yt(s,"DROP_COMPLETE")){t=!1;const i=s.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const pae=e=>Yt(e,"DROP_COMPLETE")||Yt(e,"DROP_ANIMATE")||Yt(e,"FLUSH");var gae=e=>t=>n=>s=>{if(pae(s)){e.stop(),n(s);return}if(Yt(s,"INITIAL_PUBLISH")){n(s);const i=t.getState();i.phase!=="DRAGGING"&&Oe(),e.start(i);return}n(s),e.scroll(t.getState())};const xae=e=>t=>n=>{if(t(n),!Yt(n,"PUBLISH_WHILE_DRAGGING"))return;const s=e.getState();s.phase==="DROP_PENDING"&&(s.isWaiting||e.dispatch(sO({reason:s.reason})))},vae=N3;var yae=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:s,announce:i,autoScroller:a})=>_3(Tie,vae(pse(Gie(n),fae(e),qie(e),Jie,uae,hae,xae,gae(a),sae,mae(t),dae(s,i))));const Vb=()=>({additions:{},removals:{},modified:{}});function bae({registry:e,callbacks:t}){let n=Vb(),s=null;const i=()=>{s||(t.collectionStarting(),s=requestAnimationFrame(()=>{s=null;const{additions:h,removals:m,modified:g}=n,x=Object.keys(h).map(N=>e.draggable.getById(N).getDimension(fs)).sort((N,S)=>N.descriptor.index-S.descriptor.index),v=Object.keys(g).map(N=>{const j=e.droppable.getById(N).callbacks.getScrollWhileDragging();return{droppableId:N,scroll:j}}),_={additions:x,removals:Object.keys(m),modified:v};n=Vb(),t.publish(_)}))};return{add:h=>{const m=h.descriptor.id;n.additions[m]=h,n.modified[h.descriptor.droppableId]=!0,n.removals[m]&&delete n.removals[m],i()},remove:h=>{const m=h.descriptor;n.removals[m.id]=!0,n.modified[m.droppableId]=!0,n.additions[m.id]&&delete n.additions[m.id],i()},stop:()=>{s&&(cancelAnimationFrame(s),s=null,n=Vb())}}}var lO=({scrollHeight:e,scrollWidth:t,height:n,width:s})=>{const i=Tr({x:t,y:e},{x:s,y:n});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},cO=()=>{const e=document.documentElement;return e||Oe(),e},dO=()=>{const e=cO();return lO({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},wae=()=>{const e=oO(),t=dO(),n=e.y,s=e.x,i=cO(),a=i.clientWidth,l=i.clientHeight,u=s+a,h=n+l;return{frame:Ri({top:n,left:s,right:u,bottom:h}),scroll:{initial:e,current:e,max:t,diff:{value:fs,displacement:fs}}}},_ae=({critical:e,scrollOptions:t,registry:n})=>{const s=wae(),i=s.scroll.current,a=e.droppable,l=n.droppable.getAllByType(a.type).map(g=>g.callbacks.getDimensionAndWatchScroll(i,t)),u=n.draggable.getAllByType(e.draggable.type).map(g=>g.getDimension(i));return{dimensions:{draggables:F3(u),droppables:L3(l)},critical:e,viewport:s}};function sT(e,t,n){return!(n.descriptor.id===t.id||n.descriptor.type!==t.type||e.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual")}var Nae=(e,t)=>{let n=null;const s=bae({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=(v,_)=>{e.droppable.exists(v)||Oe(),n&&t.updateDroppableIsEnabled({id:v,isEnabled:_})},a=(v,_)=>
781{n&&(e.droppable.exists(v)||Oe(),t.updateDroppableIsCombineEnabled({id:v,isCombineEnabled:_}))},l=(v,_)=>{n&&(e.droppable.exists(v)||Oe(),t.updateDroppableScroll({id:v,newScroll:_}))},u=(v,_)=>{n&&e.droppable.getById(v).callbacks.scroll(_)},h=()=>{if(!n)return;s.stop();const v=n.critical.droppable;e.droppable.getAllByType(v.type).forEach(_=>_.callbacks.dragStopped()),n.unsubscribe(),n=null},m=v=>{n||Oe();const _=n.critical.draggable;v.type==="ADDITION"&&sT(e,_,v.value)&&s.add(v.value),v.type==="REMOVAL"&&sT(e,_,v.value)&&s.remove(v.value)};return{updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:a,scrollDroppable:u,updateDroppableScroll:l,startPublishing:v=>{n&&Oe();const _=e.draggable.getById(v.draggableId),N=e.droppable.getById(_.descriptor.droppableId),S={draggable:_.descriptor,droppable:N.descriptor},j=e.subscribe(m);return n={critical:S,unsubscribe:j},_ae({critical:S,registry:e,scrollOptions:v.scrollOptions})},stopPublishing:h}},uO=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",jae=e=>{window.scrollBy(e.x,e.y)};const Sae=hs(e=>Zx(e).filter(t=>!(!t.isEnabled||!t.frame))),kae=(e,t)=>Sae(t).find(s=>(s.frame||Oe(),Y3(s.frame.pageMarginBox)(e)))||null;var Cae=({center:e,destination:t,droppables:n})=>{if(t){const i=n[t];return i.frame?i:null}return kae(e,n)};const vm={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var Pae=(e,t,n=()=>vm)=>{const s=n(),i=e[t.size]*s.startFromPercentage,a=e[t.size]*s.maxScrollAtPercentage;return{startScrollingFrom:i,maxScrollValueAt:a}},hO=({startOfRange:e,endOfRange:t,current:n})=>{const s=t-e;return s===0?0:(n-e)/s},tj=1,Tae=(e,t,n=()=>vm)=>{const s=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return s.maxPixelScroll;if(e===t.startScrollingFrom)return tj;const a=1-hO({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),l=s.maxPixelScroll*s.ease(a);return Math.ceil(l)},Eae=(e,t,n)=>{const s=n(),i=s.durationDampening.accelerateAt,a=s.durationDampening.stopDampeningAt,l=t,u=a,m=Date.now()-l;if(m>=a)return e;if(m<i)return tj;const g=hO({startOfRange:i,endOfRange:u,current:m}),x=e*s.ease(g);return Math.ceil(x)},rT=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:s,getAutoScrollerOptions:i})=>{const a=Tae(e,t,i);return a===0?0:s?Math.max(Eae(a,n,i),tj):a},iT=({container:e,distanceToEdges:t,dragStartTime:n,axis:s,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const l=Pae(e,s,a);return t[s.end]<t[s.start]?rT({distanceToEdge:t[s.end],thresholds:l,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a}):-1*rT({distanceToEdge:t[s.start],thresholds:l,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a})},Aae=({container:e,subject:t,proposedScroll:n})=>{const s=t.height>e.height,i=t.width>e.width;return!i&&!s?n:i&&s?null:{x:i?0:n.x,y:s?0:n.y}};const Mae=I3(e=>e===0?0:e);var fO=({dragStartTime:e,container:t,subject:n,center:s,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const l={top:s.y-t.top,right:t.right-s.x,bottom:t.bottom-s.y,left:s.x-t.left},u=iT({container:t,distanceToEdges:l,dragStartTime:e,axis:GN,shouldUseTimeDampening:i,getAutoScrollerOptions:a}),h=iT({container:t,distanceToEdges:l,dragStartTime:e,axis:$3,shouldUseTimeDampening:i,getAutoScrollerOptions:a}),m=Mae({x:h,y:u});if(El(m,fs))return null;const g=Aae({container:t,subject:n,proposedScroll:m});return g?El(g,fs)?null:g:null};const Rae=I3(e=>e===0?0:e>0?1:-1),nj=(()=>{const e=(t,n)=>t<0?t:t>n?t-n:0;return({current:t,max:n,change:s})=>{const i=_s(t,s),a={x:e(i.x,n.x),y:e(i.y,n.y)};return El(a,fs)?null:a}})(),mO=({max:e,current:t,change:n})=>{const s={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},i=Rae(n),a=nj({max:s,current:t,change:i});return!a||i.x!==0&&a.x===0||i.y!==0&&a.y===0},sj=(e,t)=>mO({current:e.scroll.current,max:e.scroll.max,change:t}),Oae=(e,t)=>{if(!sj(e,t))return null;const n=e.scroll.max,s=e.scroll.current;return nj({current:s,max:n,change:t})},rj=(e,t)=>{const n=e.frame;return n?mO({current:n.scroll.current,max:n.scroll.max,change:t}):!1},Dae=(e,t)=>{const n=e.frame;return!n||!rj(e,t)?null:nj({current:n.scroll.current,max:n.scroll.max,change:t})};var Iae=({viewport:e,subject:t,center:n,dragStartTime:s,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const l=fO({dragStartTime:s,container:e.frame,subject:t,center:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a});return l&&sj(e,l)?l:null},Lae=({droppable:e,subject:t,center:n,dragStartTime:s,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const l=e.frame;if(!l)return null;const u=fO({dragStartTime:s,container:l.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a});return u&&rj(e,u)?u:null},aT=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:s,scrollDroppable:i,getAutoScrollerOptions:a})=>{const l=e.current.page.borderBoxCenter,h=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const x=e.viewport,v=Iae({dragStartTime:t,viewport:x,subject:h,center:l,shouldUseTimeDampening:n,getAutoScrollerOptions:a});if(v){s(v);return}}const m=Cae({center:l,destination:Ar(e.impact),droppables:e.dimensions.droppables});if(!m)return;const g=Lae({dragStartTime:t,droppable:m,subject:h,center:l,shouldUseTimeDampening:n,getAutoScrollerOptions:a});g&&i(m.descriptor.id,g)},Fae=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>vm})=>{const s=fm(e),i=fm(t);let a=null;const l=m=>{a||Oe();const{shouldUseTimeDampening:g,dragStartTime:x}=a;aT({state:m,scrollWindow:s,scrollDroppable:i,dragStartTime:x,shouldUseTimeDampening:g,getAutoScrollerOptions:n})};return{start:m=>{a&&Oe();const g=Date.now();let x=!1;const v=()=>{x=!0};aT({state:m,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:v,scrollDroppable:v,getAutoScrollerOptions:n}),a={dragStartTime:g,shouldUseTimeDampening:x},x&&l(m)},stop:()=>{a&&(s.cancel(),i.cancel(),a=null)},scroll:l}},Bae=({move:e,scrollDroppable:t,scrollWindow:n})=>{const s=(u,h)=>{const m=_s(u.current.client.selection,h);e({client:m})},i=(u,h)=>
781{if(!rj(u,h))return h;const m=Dae(u,h);if(!m)return t(u.descriptor.id,h),null;const g=Tr(h,m);return t(u.descriptor.id,g),Tr(h,g)},a=(u,h,m)=>{if(!u||!sj(h,m))return m;const g=Oae(h,m);if(!g)return n(m),null;const x=Tr(m,g);return n(x),Tr(m,x)};return u=>{const h=u.scrollJumpRequest;if(!h)return;const m=Ar(u.impact);m||Oe();const g=i(u.dimensions.droppables[m],h);if(!g)return;const x=u.viewport,v=a(u.isWindowScrollAllowed,x,g);v&&s(u,v)}},zae=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:s})=>{const i=Fae({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:s}),a=Bae({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:h=>{if(!(s().disabled||h.phase!=="DRAGGING")){if(h.movementMode==="FLUID"){i.scroll(h);return}h.scrollJumpRequest&&a(h)}},start:i.start,stop:i.stop}};const Hu="data-rfd",qu=(()=>{const e=`${Hu}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),k1=(()=>{const e=`${Hu}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),$ae=(()=>{const e=`${Hu}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),oT={contextId:`${Hu}-scroll-container-context-id`},Uae=e=>t=>`[${t}="${e}"]`,_f=(e,t)=>e.map(n=>{const s=n.styles[t];return s?`${n.selector} { ${s} }`:""}).join(" "),Vae="pointer-events: none;";var Wae=e=>{const t=Uae(e),n=(()=>{const u=` 782 cursor: -webkit-grab; 783 cursor: grab; 784 `;return{selector:t(qu.contextId),styles:{always:` 785 -webkit-touch-callout: none; 786 -webkit-tap-highlight-color: rgba(0,0,0,0); 787 touch-action: manipulation; 788 `,resting:u,dragging:Vae,dropAnimating:u}}})(),s=(()=>{const u=` 789 transition: ${Yf.outOfTheWay}; 790 `;return{selector:t(k1.contextId),styles:{dragging:u,dropAnimating:u,userCancel:u}}})(),i={selector:t($ae.contextId),styles:{always:"overflow-anchor: none;"}},l=[s,n,i,{selector:"body",styles:{dragging:` 791 cursor: grabbing; 792 cursor: -webkit-grabbing; 793 user-select: none; 794 -webkit-user-select: none; 795 -moz-user-select: none; 796 -ms-user-select: none; 797 overflow-anchor: none; 798 `}}];return{always:_f(l,"always"),resting:_f(l,"resting"),dragging:_f(l,"dragging"),dropAnimating:_f(l,"dropAnimating"),userCancel:_f(l,"userCancel")}};const Mr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?w.useLayoutEffect:w.useEffect,Wb=()=>{const e=document.querySelector("head");return e||Oe(),e},lT=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Hae(e,t){const n=zt(()=>Wae(e),[e]),s=w.useRef(null),i=w.useRef(null),a=et(hs(x=>{const v=i.current;v||Oe(),v.textContent=x}),[]),l=et(x=>{const v=s.current;v||Oe(),v.textContent=x},[]);Mr(()=>{!s.current&&!i.current||Oe();const x=lT(t),v=lT(t);return s.current=x,i.current=v,x.setAttribute(`${Hu}-always`,e),v.setAttribute(`${Hu}-dynamic`,e),Wb().appendChild(x),Wb().appendChild(v),l(n.always),a(n.resting),()=>{const _=N=>{const S=N.current;S||Oe(),Wb().removeChild(S),N.current=null};_(s),_(i)}},[t,l,a,n.always,n.resting,e]);const u=et(()=>a(n.dragging),[a,n.dragging]),h=et(x=>{if(x==="DROP"){a(n.dropAnimating);return}a(n.userCancel)},[a,n.dropAnimating,n.userCancel]),m=et(()=>{i.current&&a(n.resting)},[a,n.resting]);return zt(()=>({dragging:u,dropping:h,resting:m}),[u,h,m])}function pO(e,t){return Array.from(e.querySelectorAll(t))}var gO=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function ev(e){return e instanceof gO(e).HTMLElement}function qae(e,t){const n=`[${qu.contextId}="${e}"]`,s=pO(document,n);if(!s.length)return null;const i=s.find(a=>a.getAttribute(qu.draggableId)===t);return!i||!ev(i)?null:i}function Gae(e){const t=w.useRef({}),n=w.useRef(null),s=w.useRef(null),i=w.useRef(!1),a=et(function(v,_){const N={id:v,focus:_};return t.current[v]=N,function(){const j=t.current;j[v]!==N&&delete j[v]}},[]),l=et(function(v){const _=qae(e,v);_&&_!==document.activeElement&&_.focus()},[e]),u=et(function(v,_){n.current===v&&(n.current=_)},[]),h=et(function(){s.current||i.current&&(s.current=requestAnimationFrame(()=>{s.current=null;const v=n.current;v&&l(v)}))},[l]),m=et(function(v){n.current=null;const _=document.activeElement;_&&_.getAttribute(qu.draggableId)===v&&(n.current=v)},[]);return Mr(()=>(i.current=!0,function(){i.current=!1;const v=s.current;v&&cancelAnimationFrame(v)}),[]),zt(()=>({register:a,tryRecordFocus:m,tryRestoreFocusRecorded:h,tryShiftRecord:u}),[a,m,h,u])}function Yae(){const e={draggables:{},droppables:{}},t=[];function n(x){return t.push(x),function(){const _=t.indexOf(x);_!==-1&&t.splice(_,1)}}function s(x){t.length&&t.forEach(v=>v(x))}function i(x){return e.draggables[x]||null}function a(x){const v=i(x);return v||Oe(),v}const l={register:x=>{e.draggables[x.descriptor.id]=x,s({type:"ADDITION",value:x})},update:(x,v)=>{const _=e.draggables[v.descriptor.id];_&&_.uniqueId===x.uniqueId&&(delete e.draggables[v.descriptor.id],e.draggables[x.descriptor.id]=x)},unregister:x=>
798{const v=x.descriptor.id,_=i(v);_&&x.uniqueId===_.uniqueId&&(delete e.draggables[v],e.droppables[x.descriptor.droppableId]&&s({type:"REMOVAL",value:x}))},getById:a,findById:i,exists:x=>!!i(x),getAllByType:x=>Object.values(e.draggables).filter(v=>v.descriptor.type===x)};function u(x){return e.droppables[x]||null}function h(x){const v=u(x);return v||Oe(),v}const m={register:x=>{e.droppables[x.descriptor.id]=x},unregister:x=>{const v=u(x.descriptor.id);v&&x.uniqueId===v.uniqueId&&delete e.droppables[x.descriptor.id]},getById:h,findById:u,exists:x=>!!u(x),getAllByType:x=>Object.values(e.droppables).filter(v=>v.descriptor.type===x)};function g(){e.draggables={},e.droppables={},t.length=0}return{draggable:l,droppable:m,subscribe:n,clean:g}}function Kae(){const e=zt(Yae,[]);return w.useEffect(()=>function(){e.clean()},[e]),e}var ij=dt.createContext(null),Y0=()=>{const e=document.body;return e||Oe(),e};const Zae={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Qae=e=>`rfd-announcement-${e}`;function Xae(e){const t=zt(()=>Qae(e),[e]),n=w.useRef(null);return w.useEffect(function(){const a=document.createElement("div");return n.current=a,a.id=t,a.setAttribute("aria-live","assertive"),a.setAttribute("aria-atomic","true"),W0(a.style,Zae),Y0().appendChild(a),function(){setTimeout(function(){const h=Y0();h.contains(a)&&h.removeChild(a),a===n.current&&(n.current=null)})}},[t]),et(i=>{const a=n.current;if(a){a.textContent=i;return}},[])}const Jae={separator:"::"};function aj(e,t=Jae){const n=dt.useId();return zt(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function eoe({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function toe({contextId:e,text:t}){const n=aj("hidden-text",{separator:"-"}),s=zt(()=>eoe({contextId:e,uniqueId:n}),[n,e]);return w.useEffect(function(){const a=document.createElement("div");return a.id=s,a.textContent=t,a.style.display="none",Y0().appendChild(a),function(){const u=Y0();u.contains(a)&&u.removeChild(a)}},[s,t]),s}var tv=dt.createContext(null);function xO(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t}function noe(){let e=null;function t(){return!!e}function n(l){return l===e}function s(l){e&&Oe();const u={abandon:l};return e=u,u}function i(){e||Oe(),e=null}function a(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:s,release:i,tryAbandon:a}}function ym(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const soe=9,roe=13,oj=27,vO=32,ioe=33,aoe=34,ooe=35,loe=36,coe=37,doe=38,uoe=39,hoe=40,foe={[roe]:!0,[soe]:!0};var yO=e=>{foe[e.keyCode]&&e.preventDefault()};const nv=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(s=>`on${s}`in document)||e})(),bO=0,cT=5;function moe(e,t){return Math.abs(t.x-e.x)>=cT||Math.abs(t.y-e.y)>=cT}const dT={type:"IDLE"};function poe({cancel:e,completed:t,getPhase:n,setPhase:s}){return[{eventName:"mousemove",fn:i=>{const{button:a,clientX:l,clientY:u}=i;if(a!==bO)return;const h={x:l,y:u},m=n();if(m.type==="DRAGGING"){i.preventDefault(),m.actions.move(h);return}m.type!=="PENDING"&&Oe();const g=m.point;if(!moe(g,h))return;i.preventDefault();const x=m.actions.fluidLift(h);s({type:"DRAGGING",actions:x})}},{eventName:"mouseup",fn:i=>{const a=n();if(a.type!=="DRAGGING"){e();return}i.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:i=>{n().type==="DRAGGING"&&i.preventDefault(),e()}},{eventName:"keydown",fn:i=>{if(n().type==="PENDING"){e();return}if(i.keyCode===oj){i.preventDefault(),e();return}yO(i)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:i=>{const a=n();if(a.type==="IDLE"&&Oe(),a.actions.shouldRespectForcePress()){e();return}i.preventDefault()}},{eventName:nv,fn:e}]}function goe(e){const t=w.useRef(dT),n=w.useRef(Tl),s=zt(()=>({eventName:"mousedown",fn:function(x){if(x.defaultPrevented||x.button!==bO||x.ctrlKey||x.metaKey||x.shiftKey||x.altKey)return;const v=e.findClosestDraggableId(x);if(!v)return;const _=e.tryGetLock(v,l,{sourceEvent:x});if(!_)return;x.preventDefault();const N={x:x.clientX,y:x.clientY};n.current(),m(_,N)}}),[e]),i=zt(()=>({eventName:"webkitmouseforcewillbegin",fn:g=>{if(g.defaultPrevented)return;const x=e.findClosestDraggableId(g);
798if(!x)return;const v=e.findOptionsForDraggable(x);v&&(v.shouldRespectForcePress||e.canGetLock(x)&&g.preventDefault())}}),[e]),a=et(function(){const x={passive:!1,capture:!0};n.current=ii(window,[i,s],x)},[i,s]),l=et(()=>{t.current.type!=="IDLE"&&(t.current=dT,n.current(),a())},[a]),u=et(()=>{const g=t.current;l(),g.type==="DRAGGING"&&g.actions.cancel({shouldBlockNextClick:!0}),g.type==="PENDING"&&g.actions.abort()},[l]),h=et(function(){const x={capture:!0,passive:!1},v=poe({cancel:u,completed:l,getPhase:()=>t.current,setPhase:_=>{t.current=_}});n.current=ii(window,v,x)},[u,l]),m=et(function(x,v){t.current.type!=="IDLE"&&Oe(),t.current={type:"PENDING",point:v,actions:x},h()},[h]);Mr(function(){return a(),function(){n.current()}},[a])}function xoe(){}const voe={[aoe]:!0,[ioe]:!0,[loe]:!0,[ooe]:!0};function yoe(e,t){function n(){t(),e.cancel()}function s(){t(),e.drop()}return[{eventName:"keydown",fn:i=>{if(i.keyCode===oj){i.preventDefault(),n();return}if(i.keyCode===vO){i.preventDefault(),s();return}if(i.keyCode===hoe){i.preventDefault(),e.moveDown();return}if(i.keyCode===doe){i.preventDefault(),e.moveUp();return}if(i.keyCode===uoe){i.preventDefault(),e.moveRight();return}if(i.keyCode===coe){i.preventDefault(),e.moveLeft();return}if(voe[i.keyCode]){i.preventDefault();return}yO(i)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:nv,fn:n}]}function boe(e){const t=w.useRef(xoe),n=zt(()=>({eventName:"keydown",fn:function(a){if(a.defaultPrevented||a.keyCode!==vO)return;const l=e.findClosestDraggableId(a);if(!l)return;const u=e.tryGetLock(l,g,{sourceEvent:a});if(!u)return;a.preventDefault();let h=!0;const m=u.snapLift();t.current();function g(){h||Oe(),h=!1,t.current(),s()}t.current=ii(window,yoe(m,g),{capture:!0,passive:!1})}}),[e]),s=et(function(){const a={passive:!1,capture:!0};t.current=ii(window,[n],a)},[n]);Mr(function(){return s(),function(){t.current()}},[s])}const Hb={type:"IDLE"},woe=120,_oe=.15;function Noe({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(t().type!=="DRAGGING"){e();return}n.keyCode===oj&&n.preventDefault(),e()}},{eventName:nv,fn:e}]}function joe({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:s=>{const i=n();if(i.type!=="DRAGGING"){e();return}i.hasMoved=!0;const{clientX:a,clientY:l}=s.touches[0],u={x:a,y:l};s.preventDefault(),i.actions.move(u)}},{eventName:"touchend",fn:s=>{const i=n();if(i.type!=="DRAGGING"){e();return}s.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:s=>{if(n().type!=="DRAGGING"){e();return}s.preventDefault(),e()}},{eventName:"touchforcechange",fn:s=>{const i=n();i.type==="IDLE"&&Oe();const a=s.touches[0];if(!a||!(a.force>=_oe))return;const u=i.actions.shouldRespectForcePress();if(i.type==="PENDING"){u&&e();return}if(u){if(i.hasMoved){s.preventDefault();return}e();return}s.preventDefault()}},{eventName:nv,fn:e}]}function Soe(e){const t=w.useRef(Hb),n=w.useRef(Tl),s=et(function(){return t.current},[]),i=et(function(_){t.current=_},[]),a=zt(()=>({eventName:"touchstart",fn:function(_){if(_.defaultPrevented)return;const N=e.findClosestDraggableId(_);if(!N)return;const S=e.tryGetLock(N,u,{sourceEvent:_});if(!S)return;const j=_.touches[0],{clientX:P,clientY:E}=j,R={x:P,y:E};n.current(),x(S,R)}}),[e]),l=et(function(){const _={capture:!0,passive:!1};n.current=ii(window,[a],_)},[a]),u=et(()=>{const v=t.current;v.type!=="IDLE"&&(v.type==="PENDING"&&clearTimeout(v.longPressTimerId),i(Hb),n.current(),l())},[l,i]),h=et(()=>{const v=t.current;u(),v.type==="DRAGGING"&&v.actions.cancel({shouldBlockNextClick:!0}),v.type==="PENDING"&&v.actions.abort()},[u]),m=et(function(){const _={capture:!0,passive:!1},N={cancel:h,completed:u,getPhase:s},S=ii(window,joe(N),_),j=ii(window,Noe(N),_);n.current=function(){S(),j()}},[h,s,u]),g=et(function(){const _=s();
798_.type!=="PENDING"&&Oe();const N=_.actions.fluidLift(_.point);i({type:"DRAGGING",actions:N,hasMoved:!1})},[s,i]),x=et(function(_,N){s().type!=="IDLE"&&Oe();const S=setTimeout(g,woe);i({type:"PENDING",point:N,actions:_,longPressTimerId:S}),m()},[m,s,i,g]);Mr(function(){return l(),function(){n.current();const N=s();N.type==="PENDING"&&(clearTimeout(N.longPressTimerId),i(Hb))}},[s,l,i]),Mr(function(){return ii(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const koe=["input","button","textarea","select","option","optgroup","video","audio"];function wO(e,t){if(t==null)return!1;if(koe.includes(t.tagName.toLowerCase()))return!0;const s=t.getAttribute("contenteditable");return s==="true"||s===""?!0:t===e?!1:wO(e,t.parentElement)}function Coe(e,t){const n=t.target;return ev(n)?wO(e,n):!1}var Poe=e=>Ri(e.getBoundingClientRect()).center;function Toe(e){return e instanceof gO(e).Element}const Eoe=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(s=>s in Element.prototype)||e})();function _O(e,t){return e==null?null:e[Eoe](t)?e:_O(e.parentElement,t)}function Aoe(e,t){return e.closest?e.closest(t):_O(e,t)}function Moe(e){return`[${qu.contextId}="${e}"]`}function Roe(e,t){const n=t.target;if(!Toe(n))return null;const s=Moe(e),i=Aoe(n,s);return!i||!ev(i)?null:i}function Ooe(e,t){const n=Roe(e,t);return n?n.getAttribute(qu.draggableId):null}function Doe(e,t){const n=`[${k1.contextId}="${e}"]`,i=pO(document,n).find(a=>a.getAttribute(k1.id)===t);return!i||!ev(i)?null:i}function Ioe(e){e.preventDefault()}function Og({expected:e,phase:t,isLockActive:n,shouldWarn:s}){return!(!n()||e!==t)}function NO({lockAPI:e,store:t,registry:n,draggableId:s}){if(e.isClaimed())return!1;const i=n.draggable.findById(s);return!(!i||!i.options.isEnabled||!uO(t.getState(),s))}function Loe({lockAPI:e,contextId:t,store:n,registry:s,draggableId:i,forceSensorStop:a,sourceEvent:l}){if(!NO({lockAPI:e,store:n,registry:s,draggableId:i}))return null;const h=s.draggable.getById(i),m=Doe(t,h.descriptor.id);if(!m||l&&!h.options.canDragInteractiveElements&&Coe(m,l))return null;const g=e.claim(a||Tl);let x="PRE_DRAG";function v(){return h.options.shouldRespectForcePress}function _(){return e.isActive(g)}function N(B,I){Og({expected:B,phase:x,isLockActive:_,shouldWarn:!0})&&n.dispatch(I())}const S=N.bind(null,"DRAGGING");function j(B){function I(){e.release(),x="COMPLETED"}x!=="PRE_DRAG"&&(I(),Oe()),n.dispatch(Aie(B.liftActionArgs)),x="DRAGGING";function z(V,te={shouldBlockNextClick:!1}){if(B.cleanup(),te.shouldBlockNextClick){const H=ii(window,[{eventName:"click",fn:Ioe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(H)}I(),n.dispatch(sO({reason:V}))}return{isActive:()=>Og({expected:"DRAGGING",phase:x,isLockActive:_,shouldWarn:!1}),shouldRespectForcePress:v,drop:V=>z("DROP",V),cancel:V=>z("CANCEL",V),...B.actions}}function P(B){const I=fm(V=>{S(()=>nO({client:V}))});return{...j({liftActionArgs:{id:i,clientSelection:B,movementMode:"FLUID"},cleanup:()=>I.cancel(),actions:{move:I}}),move:I}}function E(){const B={moveUp:()=>S(zie),moveRight:()=>S(Uie),moveDown:()=>S($ie),moveLeft:()=>S(Vie)};return j({liftActionArgs:{id:i,clientSelection:Poe(m),movementMode:"SNAP"},cleanup:Tl,actions:B})}function R(){Og({expected:"PRE_DRAG",phase:x,isLockActive:_,shouldWarn:!0})&&e.release()}return{isActive:()=>Og({expected:"PRE_DRAG",phase:x,isLockActive:_,shouldWarn:!1}),shouldRespectForcePress:v,fluidLift:P,snapLift:E,abort:R}}const Foe=[goe,boe,Soe];function Boe({contextId:e,store:t,registry:n,customSensors:s,enableDefaultSensors:i}){const a=[...i?Foe:[],...s||[]],l=w.useState(()=>noe())[0],u=et(function(j,P){ym(j)&&!ym(P)&&l.tryAbandon()},[l]);Mr(function(){let j=t.getState();return t.subscribe(()=>{const E=t.getState();u(j,E),j=E})},[l,t,u]),Mr(()=>l.tryAbandon,[l.tryAbandon]);const h=et(S=>NO({lockAPI:l,registry:n,store:t,draggableId:S}),[l,n,t]),m=et((S,j,P)=>Loe({lockAPI:l,registry:n,contextId:e,store:t,draggableId:S,forceSensorStop:j||null,sourceEvent:P&&P.sourceEvent?P.sourceEvent:null}),[e,l,n,t]),g=et(S=>Ooe(e,S),[e]),x=et(S=>{const j=n.draggable.findById(S);return j?j.options:null},[n.draggable]),v=et(function(){l.isClaimed()&&(l.tryAbandon(),t.getState().phase!=="IDLE"&&t.dis
798patch(XN()))},[l,t]),_=et(()=>l.isClaimed(),[l]),N=zt(()=>({canGetLock:h,tryGetLock:m,findClosestDraggableId:g,findOptionsForDraggable:x,tryReleaseLock:v,isLockClaimed:_}),[h,m,g,x,v,_]);for(let S=0;S<a.length;S++)a[S](N)}const zoe=e=>({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};zl.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),$oe=e=>({...vm,...e.autoScrollerOptions,durationDampening:{...vm.durationDampening,...e.autoScrollerOptions}});function Nf(e){return e.current||Oe(),e.current}function Uoe(e){const{contextId:t,setCallbacks:n,sensors:s,nonce:i,dragHandleUsageInstructions:a}=e,l=w.useRef(null),u=xO(e),h=et(()=>zoe(u.current),[u]),m=et(()=>$oe(u.current),[u]),g=Xae(t),x=toe({contextId:t,text:a}),v=Hae(t,i),_=et(H=>{Nf(l).dispatch(H)},[]),N=zt(()=>DP({publishWhileDragging:Rie,updateDroppableScroll:Die,updateDroppableIsEnabled:Iie,updateDroppableIsCombineEnabled:Lie,collectionStarting:Oie},_),[_]),S=Kae(),j=zt(()=>Nae(S,N),[S,N]),P=zt(()=>zae({scrollWindow:jae,scrollDroppable:j.scrollDroppable,getAutoScrollerOptions:m,...DP({move:nO},_)}),[j.scrollDroppable,_,m]),E=Gae(t),R=zt(()=>yae({announce:g,autoScroller:P,dimensionMarshal:j,focusMarshal:E,getResponders:h,styleMarshal:v}),[g,P,j,E,h,v]);l.current=R;const A=et(()=>{const H=Nf(l);H.getState().phase!=="IDLE"&&H.dispatch(XN())},[]),B=et(()=>{const H=Nf(l).getState();return H.phase==="DROP_ANIMATING"?!0:H.phase==="IDLE"?!1:H.isDragging},[]),I=zt(()=>({isDragging:B,tryAbort:A}),[B,A]);n(I);const z=et(H=>uO(Nf(l).getState(),H),[]),V=et(()=>Sc(Nf(l).getState()),[]),te=zt(()=>({marshal:j,focus:E,contextId:t,canLift:z,isMovementAllowed:V,dragHandleUsageInstructionsId:x,registry:S}),[t,j,x,E,z,V,S]);return Boe({contextId:t,store:R,registry:S,customSensors:s||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),w.useEffect(()=>A,[A]),dt.createElement(tv.Provider,{value:te},dt.createElement(dre,{context:ij,store:R},e.children))}function Voe(){return dt.useId()}function Woe(e){const t=Voe(),n=e.dragHandleUsageInstructions||c0.dragHandleUsageInstructions;return dt.createElement(wre,null,s=>dt.createElement(Uoe,{nonce:e.nonce,contextId:t,setCallbacks:s,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const uT={dragging:5e3,dropAnimating:4500},Hoe=(e,t)=>t?Yf.drop(t.duration):e?Yf.snap:Yf.fluid,qoe=(e,t)=>{if(e)return t?xm.opacity.drop:xm.opacity.combining},Goe=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function Yoe(e){const n=e.dimension.client,{offset:s,combineWith:i,dropping:a}=e,l=!!i,u=Goe(e),h=!!a,m=h?j1.drop(s,l):j1.moveTo(s);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:Hoe(u,a),transform:m,opacity:qoe(l,h),zIndex:h?uT.dropAnimating:uT.dragging,pointerEvents:"none"}}function Koe(e){return{transform:j1.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function Zoe(e){return e.type==="DRAGGING"?Yoe(e):Koe(e)}function Qoe(e,t,n=fs){const s=window.getComputedStyle(t),i=t.getBoundingClientRect(),a=A3(i,s),l=V0(a,n),u={client:a,tagName:t.tagName.toLowerCase(),display:s.display},h={x:a.marginBox.width,y:a.marginBox.height};return{descriptor:e,placeholder:u,displaceBy:h,client:a,page:l}}function Xoe(e){const t=aj("draggable"),{descriptor:n,registry:s,getDraggableRef:i,canDragInteractiveElements:a,shouldRespectForcePress:l,isEnabled:u}=e,h=zt(()=>({canDragInteractiveElements:a,shouldRespectForcePress:l,isEnabled:u}),[a,u,l]),m=et(_=>{const N=i();return N||Oe(),Qoe(n,N,_)},[n,i]),g=zt(()=>({uniqueId:t,descriptor:n,options:h,getDimension:m}),[n,m,h,t]),x=w.useRef(g),v=w.useRef(!0);Mr(()=>(s.draggable.register(x.current),()=>s.draggable.unregister(x.current)),[s.draggable]),Mr(()=>{if(v.current){v.current=!1;return}const _=x.current;x.current=g,s.draggable.update(g,_)},[g,s.draggable])}var lj=dt.createContext(null);function K0(e){const t=w.useContext(e);return t||Oe(),t}function Joe(e){e.preventDefault()}const ele=e=>{const t=w.useRef(null),n=et((I=null)=>{t.current=I},[]),s=et(()=>t.current,[]),{contextId:i,dragHandleUsageInstructionsId:a,registry:l}=K0(tv),{type:u,droppableId:h}=K0(lj),m=zt(()=>({id:e.draggableId,index:e.index,type:u,droppableId:h}),[e.draggableId,e.index,u,h]),{children:g,draggableId:x,isEnabled:v,shouldRespectForcePress:_,canDragInteractiveElements:N,isClone:S,mapped:j,dropAnimationFinished:P}=e;if(!S){const I=zt(()=>({descriptor:m,registry:l,getDraggableRef:s,canDragInteractiveElements:N,shouldRespectForcePress:_,isEnabled:v}),[m,l,s,N,_,v]);Xoe(I)}const E=zt(()=>v?{tabIndex:0,role:"button","aria-describedby":a,"data-rfd-drag-handle-draggable-id":x,"data-rfd-drag-handle-context-id":i,draggable:!1,onDragStart:Joe}:null,[i,a,x,v]),R=et(I=>{j.type==="DRAGGING"&&j.dropping&&I.propertyName==="transform"&&zl.flushSync(P)},[P,j]),A=zt(()=>{const I=Zoe(j),z=j.type==="DRAGGING"&&j.dropping?R:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":i,"data-rfd-draggable-id":x,style:I,onTransitionEnd:z},dragHandleProps:E}},[i,E,x,j,R,n]),B=zt(()=>({draggableId:m.id,type:m.type,source:{index:m.index,droppableId:m.droppableId}}),[m.droppableId,m.id,m.index,m.type]);return dt.createElement(dt.Fragment,null,g(A,j.snapshot,B))};var jO=(e,t)=>
798e===t,SO=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};const tle=e=>e.combine?e.combine.draggableId:null,nle=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function sle(){const e=hs((i,a)=>({x:i,y:a})),t=hs((i,a,l=null,u=null,h=null)=>({isDragging:!0,isClone:a,isDropAnimating:!!h,dropAnimation:h,mode:i,draggingOver:l,combineWith:u,combineTargetFor:null})),n=hs((i,a,l,u,h=null,m=null,g=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:h,combineWith:m,mode:a,offset:i,dimension:l,forceShouldAnimate:g,snapshot:t(a,u,h,m,null)}}));return(i,a)=>{if(ym(i)){if(i.critical.draggable.id!==a.draggableId)return null;const l=i.current.client.offset,u=i.dimensions.draggables[a.draggableId],h=Ar(i.impact),m=nle(i.impact),g=i.forceShouldAnimate;return n(e(l.x,l.y),i.movementMode,u,a.isClone,h,m,g)}if(i.phase==="DROP_ANIMATING"){const l=i.completed;if(l.result.draggableId!==a.draggableId)return null;const u=a.isClone,h=i.dimensions.draggables[a.draggableId],m=l.result,g=m.mode,x=SO(m),v=tle(m),N={duration:i.dropDuration,curve:ej.drop,moveTo:i.newHomeClientOffset,opacity:v?xm.opacity.drop:null,scale:v?xm.scale.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:h,dropping:N,draggingOver:x,combineWith:v,mode:g,forceShouldAnimate:null,snapshot:t(g,u,x,v,N)}}}return null}}function kO(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const rle={mapped:{type:"SECONDARY",offset:fs,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:kO(null)}};function ile(){const e=hs((l,u)=>({x:l,y:u})),t=hs(kO),n=hs((l,u=null,h)=>({mapped:{type:"SECONDARY",offset:l,combineTargetFor:u,shouldAnimateDisplacement:h,snapshot:t(u)}})),s=l=>l?n(fs,l,!0):null,i=(l,u,h,m)=>{const g=h.displaced.visible[l],x=!!(m.inVirtualList&&m.effected[l]),v=Qx(h),_=v&&v.draggableId===l?u:null;if(!g){if(!x)return s(_);if(h.displaced.invisible[l])return null;const j=hh(m.displacedBy.point),P=e(j.x,j.y);return n(P,_,!0)}if(x)return s(_);const N=h.displacedBy.point,S=e(N.x,N.y);return n(S,_,g.shouldAnimate)};return(l,u)=>{if(ym(l))return l.critical.draggable.id===u.draggableId?null:i(u.draggableId,l.critical.draggable.id,l.impact,l.afterCritical);if(l.phase==="DROP_ANIMATING"){const h=l.completed;return h.result.draggableId===u.draggableId?null:i(u.draggableId,h.result.draggableId,h.impact,h.afterCritical)}return null}}const ale=()=>{const e=sle(),t=ile();return(s,i)=>e(s,i)||t(s,i)||rle},ole={dropAnimationFinished:rO},lle=T3(ale,ole,null,{context:ij,areStatePropsEqual:jO})(ele);function CO(e){return K0(lj).isUsingCloneFor===e.draggableId&&!e.isClone?null:dt.createElement(lle,e)}function cle(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,s=!!e.shouldRespectForcePress;return dt.createElement(CO,W0({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:s}))}const PO=e=>t=>e===t,dle=PO("scroll"),ule=PO("auto"),hT=(e,t)=>t(e.overflowX)||t(e.overflowY),hle=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return hT(n,dle)||hT(n,ule)},fle=()=>!1,TO=e=>e==null?null:e===document.body?fle()?e:null:e===document.documentElement?null:hle(e)?e:TO(e.parentElement);var C1=e=>({x:e.scrollLeft,y:e.scrollTop});const EO=e=>e?window.getComputedStyle(e).position==="fixed"?!0:EO(e.parentElement):!1;var mle=e=>{const t=TO(e),n=EO(e);return{closestScrollable:t,isFixedOnPage:n}},ple=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:s,direction:i,client:a,page:l,closest:u})=>{const h=(()=>
798{if(!u)return null;const{scrollSize:v,client:_}=u,N=lO({scrollHeight:v.scrollHeight,scrollWidth:v.scrollWidth,height:_.paddingBox.height,width:_.paddingBox.width});return{pageMarginBox:u.page.marginBox,frameClient:_,scrollSize:v,shouldClipSubject:u.shouldClipSubject,scroll:{initial:u.scroll,current:u.scroll,max:N,diff:{value:fs,displacement:fs}}}})(),m=i==="vertical"?GN:$3,g=Wu({page:l,withPlaceholder:null,axis:m,frame:h});return{descriptor:e,isCombineEnabled:n,isFixedOnPage:s,axis:m,isEnabled:t,client:a,page:l,frame:h,subject:g}};const gle=(e,t)=>{const n=M3(e);if(!t||e!==t)return n;const s=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,a=s+t.scrollHeight,l=i+t.scrollWidth,h=VN({top:s,right:l,bottom:a,left:i},n.border);return WN({borderBox:h,margin:n.margin,border:n.border,padding:n.padding})};var xle=({ref:e,descriptor:t,env:n,windowScroll:s,direction:i,isDropDisabled:a,isCombineEnabled:l,shouldClipSubject:u})=>{const h=n.closestScrollable,m=gle(e,h),g=V0(m,s),x=(()=>{if(!h)return null;const _=M3(h),N={scrollHeight:h.scrollHeight,scrollWidth:h.scrollWidth};return{client:_,page:V0(_,s),scroll:C1(h),scrollSize:N,shouldClipSubject:u}})();
798return ple({descriptor:t,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:n.isFixedOnPage,direction:i,client:m,page:g,closest:x})};const vle={passive:!1},yle={passive:!0};var fT=e=>e.shouldPublishImmediately?vle:yle;const Dg=e=>e&&e.env.closestScrollable||null;function ble(e){const t=w.useRef(null),n=K0(tv),s=aj("droppable"),{registry:i,marshal:a}=n,l=xO(e),u=zt(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),h=w.useRef(u),m=zt(()=>hs((A,B)=>{t.current||Oe();const I={x:A,y:B};a.updateDroppableScroll(u.id,I)}),[u.id,a]),g=et(()=>{const A=t.current;return!A||!A.env.closestScrollable?fs:C1(A.env.closestScrollable)},[]),x=et(()=>{const A=g();m(A.x,A.y)},[g,m]),v=zt(()=>fm(x),[x]),_=et(()=>{const A=t.current,B=Dg(A);if(A&&B||Oe(),A.scrollOptions.shouldPublishImmediately){x();return}v()},[v,x]),N=et((A,B)=>{t.current&&Oe();const I=l.current,z=I.getDroppableRef();z||Oe();const V=mle(z),te={ref:z,descriptor:u,env:V,scrollOptions:B};t.current=te;const H=xle({ref:z,descriptor:u,env:V,windowScroll:A,direction:I.direction,isDropDisabled:I.isDropDisabled,isCombineEnabled:I.isCombineEnabled,shouldClipSubject:!I.ignoreContainerClipping}),Y=V.closestScrollable;return Y&&(Y.setAttribute(oT.contextId,n.contextId),Y.addEventListener("scroll",_,fT(te.scrollOptions))),H},[n.contextId,u,_,l]),S=et(()=>{const A=t.current,B=Dg(A);return A&&B||Oe(),C1(B)},[]),j=et(()=>{const A=t.current;A||Oe();const B=Dg(A);t.current=null,B&&(v.cancel(),B.removeAttribute(oT.contextId),B.removeEventListener("scroll",_,fT(A.scrollOptions)))},[_,v]),P=et(A=>{const B=t.current;B||Oe();const I=Dg(B);I||Oe(),I.scrollTop+=A.y,I.scrollLeft+=A.x},[]),E=zt(()=>({getDimensionAndWatchScroll:N,getScrollWhileDragging:S,dragStopped:j,scroll:P}),[j,N,S,P]),R=zt(()=>({uniqueId:s,descriptor:u,callbacks:E}),[E,u,s]);Mr(()=>(h.current=R.descriptor,i.droppable.register(R),()=>{t.current&&j(),i.droppable.unregister(R)}),[E,u,j,R,a,i.droppable]),Mr(()=>{t.current&&a.updateDroppableIsEnabled(h.current.id,!e.isDropDisabled)},[e.isDropDisabled,a]),Mr(()=>{t.current&&a.updateDroppableIsCombineEnabled(h.current.id,e.isCombineEnabled)},[e.isCombineEnabled,a])}function qb(){}const mT={width:0,height:0,margin:Cre},wle=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n==="close"?mT:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},_le=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const s=wle({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:s.width,height:s.height,marginTop:s.margin.top,marginRight:s.margin.right,marginBottom:s.margin.bottom,marginLeft:s.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?Yf.placeholder:null}},Nle=e=>{const t=w.useRef(null),n=et(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:s,onTransitionEnd:i,onClose:a,contextId:l}=e,[u,h]=w.useState(e.animate==="open");w.useEffect(()=>u?s!=="open"?(n(),h(!1),qb):t.current?qb:(t.current=setTimeout(()=>{t.current=null,h(!1)}),n):qb,[s,u,n]);const m=et(x=>{x.propertyName==="height"&&(i(),s==="close"&&a())},[s,a,i]),g=_le({isAnimatingOpenOnMount:u,animate:e.animate,placeholder:e.placeholder});return dt.createElement(e.placeholder.tagName,{style:g,"data-rfd-placeholder-context-id":l,onTransitionEnd:m,ref:e.innerRef})};var jle=dt.memo(Nle);class Sle extends dt.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const kle=e=>{const t=w.useContext(tv);t||Oe();const{contextId:n,isMovementAllowed:s}=t,i=w.useRef(null),a=w.useRef(null),{children:l,droppableId:u,type:h,mode:m,direction:g,ignoreContainerClipping:x,isDropDisabled:v,isCombine
798Enabled:_,snapshot:N,useClone:S,updateViewportMaxScroll:j,getContainerForClone:P}=e,E=et(()=>i.current,[]),R=et((Y=null)=>{i.current=Y},[]);et(()=>a.current,[]);const A=et((Y=null)=>{a.current=Y},[]),B=et(()=>{s()&&j({maxScroll:dO()})},[s,j]);ble({droppableId:u,type:h,mode:m,direction:g,isDropDisabled:v,isCombineEnabled:_,ignoreContainerClipping:x,getDroppableRef:E});const I=zt(()=>dt.createElement(Sle,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:Y,data:ce,animate:K})=>dt.createElement(jle,{placeholder:ce,onClose:Y,innerRef:A,animate:K,contextId:n,onTransitionEnd:B})),[n,B,e.placeholder,e.shouldAnimatePlaceholder,A]),z=zt(()=>({innerRef:R,placeholder:I,droppableProps:{"data-rfd-droppable-id":u,"data-rfd-droppable-context-id":n}}),[n,u,I,R]),V=S?S.dragging.draggableId:null,te=zt(()=>({droppableId:u,type:h,isUsingCloneFor:V}),[u,V,h]);function H(){if(!S)return null;const{dragging:Y,render:ce}=S,K=dt.createElement(CO,{draggableId:Y.draggableId,index:Y.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(q,ge)=>ce(q,ge,Y));return oA.createPortal(K,P())}return dt.createElement(lj.Provider,{value:te},l(z,N),H())};function Cle(){return document.body||Oe(),document.body}const pT={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:Cle},AO=e=>{let t={...e},n;for(n in pT)e[n]===void 0&&(t={...t,[n]:pT[n]});return t},Gb=(e,t)=>e===t.droppable.type,gT=(e,t)=>t.draggables[e.draggable.id],Ple=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=hs(a=>({draggableId:a.id,type:a.type,source:{index:a.index,droppableId:a.droppableId}})),s=hs((a,l,u,h,m,g)=>{const x=m.descriptor.id;if(m.descriptor.droppableId===a){const N=g?{render:g,dragging:n(m.descriptor)}:null,S={isDraggingOver:u,draggingOverWith:u?x:null,draggingFromThisWith:x,isUsingPlaceholder:!0};return{placeholder:m.placeholder,shouldAnimatePlaceholder:!1,snapshot:S,useClone:N}}if(!l)return t;if(!h)return e;const _={isDraggingOver:u,draggingOverWith:x,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:m.placeholder,shouldAnimatePlaceholder:!0,snapshot:_,useClone:null}});return(a,l)=>{const u=AO(l),h=u.droppableId,m=u.type,g=!u.isDropDisabled,x=u.renderClone;if(ym(a)){const v=a.critical;if(!Gb(m,v))return t;const _=gT(v,a.dimensions),N=Ar(a.impact)===h;return s(h,g,N,N,_,x)}if(a.phase==="DROP_ANIMATING"){const v=a.completed;if(!Gb(m,v.critical))return t;const _=gT(v.critical,a.dimensions);return s(h,g,SO(v.result)===h,Ar(v.impact)===h,_,x)}if(a.phase==="IDLE"&&a.completed&&!a.shouldFlush){const v=a.completed;if(!Gb(m,v.critical))return t;const _=Ar(v.impact)===h,N=!!(v.impact.at&&v.impact.at.type==="COMBINE"),S=v.critical.droppable.id===h;return _?N?e:t:S?e:t}return t}},Tle={updateViewportMaxScroll:Bie},Ele=T3(Ple,Tle,(e,t,n)=>({...AO(n),...e,...t}),{context:ij,areStatePropsEqual:jO})(kle);var Ale=Ele;function Mle(){return r.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"bg-red-50 border-2 border-red-200 rounded-[28px] p-6 mb-8 flex items-center gap-4",children:[r.jsx("div",{className:"w-14 h-14 rounded-[20px] bg-red-100 flex items-center justify-center shrink-0",children:r.jsx(Ug,{className:"w-7 h-7 text-red-600"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"font-extrabold text-red-800 text-lg tracking-tight",children:"Trip Cancelled"}),r.jsx("p",{className:"text-red-600 text-sm font-medium mt-0.5",children:"This trip has been cancelled by the organizer. No further actions can be taken."})]})]})}function Rle({tripId:e,user:t,members:n}){const s=tn(),i=n==null?void 0:n.find(u=>u.user_email===(t==null?void 0:t.email)),a=(i==null?void 0:i.is_home)===!0,l=pt({mutationFn:async()=>{if(i)return ne.entities.TripMember.update(i.id,{is_home:!0})},onSuccess:()=>s.invalidateQueries(["members",e])});return!(t!=null&&t.email)||!i?null:r.jsx(re.div,{initial:{opacity:0,y:20}
798,animate:{opacity:1,y:0},transition:{delay:.2},className:"mb-8",children:a?r.jsxs("div",{className:"bg-emerald-50 border-2 border-emerald-200 rounded-[28px] p-6 flex items-center gap-4",children:[r.jsx("div",{className:"w-14 h-14 rounded-[20px] bg-emerald-100 flex items-center justify-center shrink-0",children:r.jsx(Al,{className:"w-7 h-7 text-emerald-600"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"font-extrabold text-emerald-800 text-lg tracking-tight",children:"You're Home Safe!"}),r.jsx("p",{className:"text-emerald-600 text-sm font-medium mt-0.5",children:"Great trip! Your crew knows you made it back safely."})]})]}):r.jsxs("button",{onClick:()=>l.mutate(),disabled:l.isPending,className:"w-full bg-emerald-600 hover:bg-emerald-700 text-white rounded-[28px] p-6 flex items-center gap-4 shadow-xl shadow-emerald-600/20 active:scale-[0.98] transition-all",children:[r.jsx("div",{className:"w-14 h-14 rounded-[20px] bg-white/20 flex items-center justify-center shrink-0",children:l.isPending?r.jsx(gt,{className:"w-7 h-7 text-white animate-spin"}):r.jsx(Al,{className:"w-7 h-7 text-white"})}),r.jsxs("div",{className:"text-left",children:[r.jsx("h3",{className:"font-extrabold text-white text-lg tracking-tight",children:"I'm Home Safe"}),r.jsx("p",{className:"text-emerald-100 text-sm font-medium mt-0.5",children:"Let your crew know you made it back safely"})]})]})})}function Ole({tripId:e,user:t}){var P;const n=tn(),[s,i]=w.useState(!1),[a,l]=w.useState(""),[u,h]=w.useState(null),[m,g]=w.useState(null),[x,v]=w.useState(null),{data:_=[]}=Re({queryKey:["trip-media",e],queryFn:()=>ne.entities.TripMedia.filter({trip_id:e})}),N=pt({mutationFn:E=>ne.entities.TripMedia.create(E),onSuccess:()=>{n.invalidateQueries(["trip-media",e]),l(""),h(null),g(null)}}),S=async E=>{var I;const R=(I=E.target.files)==null?void 0:I[0];if(!R)return;i(!0);const A=R.type.startsWith("video/")?"video":"image",B=await ne.integrations.Core.UploadFile({file:R});B!=null&&B.file_url&&(h(B.file_url),g(A)),i(!1)},j=()=>{u&&N.mutate({trip_id:e,user_email:t.email,user_name:t.full_name||t.email.split("@")[0],media_url:u,media_type:m,caption:a})};return r.jsxs("div",{className:"animate-in fade-in duration-300",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsx("h2",{className:"text-2xl font-extrabold text-slate-900 tracking-tight",children:"Trip Memories"}),r.jsxs("span",{className:"text-sm font-bold text-slate-400",children:[_.length," shared"]})]}),(t==null?void 0:t.email)&&r.jsx("div",{className:"bg-white rounded-[32px] border border-slate-100 shadow-sm p-5 mb-8",children:u?r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"relative rounded-[24px] overflow-hidden h-48 bg-slate-100",children:[m==="video"?r.jsx("video",{src:u,className:"w-full h-full object-cover",controls:!0}):r.jsx("img",{src:u,className:"w-full h-full object-cover",alt:"Preview"}),r.jsx("button",{onClick:()=>{h(null),g(null)},className:"absolute top-3 right-3 p-2 bg-black/40 text-white rounded-full backdrop-blur-md hover:bg-black/60",children:r.jsx(hn,{className:"w-4 h-4"})})]}),r.jsx("input",{type:"text",placeholder:"Add a caption...",value:a,onChange:E=>l(E.target.value),className:"w-full bg-slate-50 border border-slate-200/60 rounded-2xl p-4 text-sm font-bold text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-blue-500/30"}),r.jsx("button",{onClick:j,disabled:N.isPending,className:"w-full bg-slate-900 hover:bg-black text-white font-bold py-3.5 rounded-2xl flex items-center justify-center active:scale-[0.98] transition-all shadow-lg",children:N.isPending?r.jsx(gt,{className:"w-5 h-5 animate-spin"}):"Share Memory"})]}):r.jsxs("label",{className:"flex flex-col items-center justify-center h-40 rounded-[24px] border-2 border-dashed border-slate-200 bg-slate-50 hover:bg-slate-100 cursor-pointer transition-colors relative",children:[s?r.jsx(gt,{className:"w-8 h-8 text-slate-400 animate-spin"}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[r.jsx(Qs,{className:"w-6 h-6 text-slate-400"}),r.jsx(f0,{className:"w-6 h-6 text-slate-400"})]}),r.jsx("span",{className:"text-sm font-bold text-slate-500",children:"Upload photos or videos"}),r.jsx("span",{className:"text-xs text-slate-400 mt-1",children:"Share your favorite moments"})]}),r.jsx("input",{type:"file",accept:"image/*,video/*",onChange:S,disabled:s,className:"absolute inset-0 opacity-0 cursor-pointer"})]})}),_.length>0?r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:_.map(E=>
798{var R;return r.jsxs(re.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"relative rounded-[24px] overflow-hidden aspect-square bg-slate-100 group cursor-pointer border border-slate-100",onClick:()=>v(E),children:[E.media_type==="video"?r.jsxs("div",{className:"relative w-full h-full",children:[r.jsx("video",{src:E.media_url,className:"w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20",children:r.jsx("div",{className:"w-12 h-12 rounded-full bg-white/90 flex items-center justify-center shadow-lg",children:r.jsx(f0,{className:"w-5 h-5 text-slate-700 ml-0.5"})})})]}):r.jsx("img",{src:E.media_url,alt:E.caption||"Memory",className:"w-full h-full object-cover"}),r.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/60 to-transparent p-3 opacity-0 group-hover:opacity-100 transition-opacity",children:[r.jsx("p",{className:"text-white text-xs font-bold truncate",children:E.user_name||((R=E.user_email)==null?void 0:R.split("@")[0])}),E.caption&&r.jsx("p",{className:"text-white/80 text-[10px] truncate",children:E.caption})]})]},E.id)})}):r.jsxs("div",{className:"text-center py-16",children:[r.jsx(Qs,{className:"w-12 h-12 text-slate-300 mx-auto mb-3"}),r.jsx("p",{className:"text-slate-400 font-bold",children:"No memories shared yet"}),r.jsx("p",{className:"text-slate-300 text-sm mt-1",children:"Be the first to share a photo or video!"})]}),r.jsx(Lt,{children:x&&r.jsxs(re.div,{initial:{opacity:0}
798,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:()=>v(null),children:[r.jsx("button",{onClick:()=>v(null),className:"absolute top-6 right-6 p-3 bg-white/10 text-white rounded-full hover:bg-white/20 z-10",children:r.jsx(hn,{className:"w-6 h-6"})}),r.jsxs(re.div,{initial:{scale:.9},animate:{scale:1},exit:{scale:.9},className:"max-w-3xl w-full max-h-[85vh]",onClick:E=>E.stopPropagation(),children:[x.media_type==="video"?r.jsx("video",{src:x.media_url,className:"w-full max-h-[75vh] rounded-3xl",controls:!0,autoPlay:!0}):r.jsx("img",{src:x.media_url,alt:"",className:"w-full max-h-[75vh] object-contain rounded-3xl"}),r.jsxs("div",{className:"mt-4 text-center",children:[r.jsx("p",{className:"text-white font-bold",children:x.user_name||((P=x.user_email)==null?void 0:P.split("@")[0])}),x.caption&&r.jsx("p",{className:"text-white/70 text-sm mt-1",children:x.caption})]})]})]})})]})}function Dle({members:e,user:t,tripMaxPeople:n}){var a;const s=((a=e==null?void 0:e.filter(l=>l.is_home))==null?void 0:a.length)||0,i=(e==null?void 0:e.length)||0;return r.jsxs("div",{className:"animate-in fade-in duration-300",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsx("h3",{className:"text-2xl font-extrabold text-slate-900 tracking-tight",children:"The Crew"}),r.jsx("div",{className:"flex items-center gap-2",children:r.jsxs("span",{className:"bg-emerald-50 text-emerald-700 px-3 py-1 rounded-xl text-sm font-bold",children:[s,"/",i," safe"]})})]}),r.jsx("div",{className:"bg-slate-100 rounded-full h-2.5 mb-6 overflow-hidden",children:r.jsx("div",{className:"bg-emerald-500 h-full rounded-full transition-all duration-700",style:{width:i>0?`${s/i*100}%`:"0%"}})}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:e==null?void 0:e.map(l=>{const u=l.user_email===(t==null?void 0:t.email);return r.jsxs("div",{className:`bg-white p-5 rounded-[28px] border shadow-sm flex items-center justify-between ${l.is_home?"border-emerald-200":"border-slate-100"}`,children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsx("div",{className:`w-14 h-14 rounded-full overflow-hidden border-2 flex items-center justify-center ${l.is_home?"border-emerald-200 bg-emerald-50":"border-slate-50 bg-slate-100"}`,children:r.jsx(Js,{email:l.user_email,user:u?t:void 0,alt:l.user_name,className:"w-full h-full object-cover"})}),r.jsxs("div",{children:[r.jsx("p",{className:"font-extrabold text-slate-900 text-lg leading-tight",children:l.user_name||l.user_email.split("@")[0]}),r.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[l.role==="admin"&&r.jsx("span",{className:"text-[10px] font-black uppercase tracking-wider text-blue-600",children:"Admin"}),u&&r.jsx("span",{className:"text-[10px] font-black uppercase tracking-wider text-slate-400",children:"You"})]})]})]}),l.is_home?r.jsxs("span",{className:"px-3 py-1.5 rounded-xl text-xs font-bold text-emerald-600 bg-emerald-50 flex items-center gap-1.5",children:[r.jsx(Al,{className:"w-3.5 h-3.5"})," Home Safe"]}):r.jsxs("span",{className:"px-3 py-1.5 rounded-xl text-xs font-bold text-amber-600 bg-amber-50 flex items-center gap-1.5",children:[r.jsx(zn,{className:"w-3.5 h-3.5"})," En Route"]})]},l.id)})})]})}function Ile(e){const t=Lle(e),n=w.forwardRef((s,i)=>{const{children:a,...l}=s,u=w.Children.toArray(a),h=u.find(Ble);if(h){const m=h.props.children,g=u.map(x=>x===h?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:x);return r.jsx(t,{...l,ref:i,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return r.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function Lle(e){const t=w.forwardRef((n,s)=>{const{children:i,...a}=n;if(w.isValidElement(i)){const l=$le(i),u=zle(a,i.props);return i.type!==w.Fragment&&(u.ref=s?Ca(s,l):l),w.cloneElement(i,u)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fle=Symbol("radix.slottable");function Ble(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fle}function zle(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...u)=>{const h=a(...u);return i(...u),h}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}
vendor: 4,500 bytes, line 798
798:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function $le(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sv="Popover",[MO]=No(sv,[oh]),Jm=oh(),[Ule,$l]=MO(sv),RO=e=>{const{__scopePopover:t,children:n,open:s,defaultOpen:i,onOpenChange:a,modal:l=!1}=e,u=Jm(t),h=w.useRef(null),[m,g]=w.useState(!1),[x,v]=Zc({prop:s,defaultProp:i??!1,onChange:a,caller:sv});return r.jsx(aN,{...u,children:r.jsx(Ule,{scope:t,contentId:ya(),triggerRef:h,open:x,onOpenChange:v,onOpenToggle:w.useCallback(()=>v(_=>!_),[v]),hasCustomAnchor:m,onCustomAnchorAdd:w.useCallback(()=>g(!0),[]),onCustomAnchorRemove:w.useCallback(()=>g(!1),[]),modal:l,children:n})})};RO.displayName=sv;var OO="PopoverAnchor",Vle=w.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,i=$l(OO,n),a=Jm(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:u}=i;return w.useEffect(()=>(l(),()=>u()),[l,u]),r.jsx(Px,{...a,...s,ref:t})});Vle.displayName=OO;var DO="PopoverTrigger",IO=w.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,i=$l(DO,n),a=Jm(n),l=qt(t,i.triggerRef),u=r.jsx(Pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":$O(i.open),...s,ref:l,onClick:Ke(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:r.jsx(Px,{asChild:!0,...a,children:u})});IO.displayName=DO;var cj="PopoverPortal",[Wle,Hle]=MO(cj,{forceMount:void 0}),LO=e=>{const{__scopePopover:t,forceMount:n,children:s,container:i}=e,a=$l(cj,t);return r.jsx(Wle,{scope:t,forceMount:n,children:r.jsx(Ta,{present:n||a.open,children:r.jsx(Um,{asChild:!0,container:i,children:s})})})};LO.displayName=cj;var Gu="PopoverContent",FO=w.forwardRef((e,t)=>{const n=Hle(Gu,e.__scopePopover),{forceMount:s=n.forceMount,...i}=e,a=$l(Gu,e.__scopePopover);return r.jsx(Ta,{present:s||a.open,children:a.modal?r.jsx(Gle,{...i,ref:t}):r.jsx(Yle,{...i,ref:t})})});FO.displayName=Gu;var qle=Ile("PopoverContent.RemoveScroll"),Gle=w.forwardRef((e,t)=>{const n=$l(Gu,e.__scopePopover),s=w.useRef(null),i=qt(t,s),a=w.useRef(!1);return w.useEffect(()=>{const l=s.current;if(l)return Tx(l)},[]),r.jsx(Wm,{as:qle,allowPinchZoom:!0,children:r.jsx(BO,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ke(e.onCloseAutoFocus,l=>{var u;l.preventDefault(),a.current||(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Ke(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,h=u.button===0&&u.ctrlKey===!0,m=u.button===2||h;a.current=m},{checkForDefaultPrevented:!1}),onFocusOutside:Ke(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),Yle=w.forwardRef((e,t)=>{const n=$l(Gu,e.__scopePopover),s=w.useRef(!1),i=w.useRef(!1);return r.jsx(BO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,a),a.defaultPrevented||(s.current||(u=n.triggerRef.current)==null||u.focus(),a.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:a=>{var h,m;(h=e.onInteractOutside)==null||h.call(e,a),a.defaultPrevented||(s.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=a.target;((m=n.triggerRef.current)==null?void 0:m.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),BO=w.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:g,...x}=e,v=$l(Gu,n),_=Jm(n);return Nx(),r.jsx(zm,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:a,children:r.jsx(Bm,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:g,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:m,onDismiss:()=>v.onOpenChange(!1),children:r.jsx(oN,{"data-state":$O(v.open),role:"dialog",id:v.contentId,..._,...x,ref:t,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}
798),zO="PopoverClose",Kle=w.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,i=$l(zO,n);return r.jsx(Pt.button,{type:"button",...s,ref:t,onClick:Ke(e.onClick,()=>i.onOpenChange(!1))})});Kle.displayName=zO;var Zle="PopoverArrow",Qle=w.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,i=Jm(n);return r.jsx(lN,{...i,...s,ref:t})});Qle.displayName=Zle;function $O(e){return e?"open":"closed"}var Xle=RO,Jle=IO,ece=LO,UO=FO;const tce=Xle,nce=Jle,VO=w.forwardRef(({className:e,align:t="center",sideOffset:n=4,...s},i)=>r.jsx(ece,{children:r.jsx(UO,{ref:i,align:t,sideOffset:n,className:Ct("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));VO.displayName=UO.displayName;const sce=NR,rce=QX,ice=jR,WO=w.forwardRef(({className:e,...t},n)=>r.jsx(Dx,{className:Ct("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));WO.displayName=Dx.displayName;const ace=ex("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),HO=w.forwardRef(({side:e="right",className:t,children:n,...s},i)=>r.jsxs(ice,{children:[r.jsx(WO,{}),r.jsxs(Ix,{ref:i,className:Ct(ace({side:e}),t),...s,children:[r.jsxs(SR,{className:"absolute right-4 top-4 roun
798ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[r.jsx(hn,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));HO.displayName=Ix.displayName;const oce=w.forwardRef(({className:e,...t},n)=>r.jsx(Lx,{ref:n,className:Ct("text-lg font-semibold text-foreground",e),...t}));oce.displayName=Lx.displayName;const lce=w.forwardRef(({className:e,...t},n)=>r.jsx(Fx,{ref:n,className:Ct("text-sm text-muted-foreground",e),...t}));lce.displayName=Fx.displayName;function qO(e,t){const n=w.useRef(t);w.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const cce=1;function dce(e){return Object.freeze({__version:cce,map:e})}function GO(e,t){return Object.freeze({...e,...t})}const YO=w.createContext(null),KO=YO.Provider;function dj(){const e=w.useContext(YO);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}function ZO(e){function t(n,s){const{instance:i,context:a}=e(n).current;return w.useImperativeHandle(s,()=>i),n.children==null?null:dt.createElement(KO,{value:a},n.children)}return w.forwardRef(t)}function uce(e){function t(n,s){const[i,a]=w.useState(!1),{instance:l}=e(n,a).current;w.useImperativeHandle(s,()=>l),w.useEffect(function(){i&&l.update()},[l,i,n.children]);const u=l._contentNode;return u?zl.createPortal(n.children,u):null}return w.forwardRef(t)}function hce(e){function t(n,s){const{instance:i}=e(n).current;return w.useImperativeHandle(s,()=>i),null}return w.forwardRef(t)}function uj(e,t){const n=w.useRef();w.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function rv(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function fce(e,t){return function(s,i){const a=dj(),l=e(rv(s,a),a);return qO(a.map,s.attribution),uj(l.current,s.eventHandlers),t(l.current,a,s,i),l}}var If={exports:{}};/* @preserve 799 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com 800 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade 801 */var mce=If.exports,xT;function pce(){return xT||(xT=1,(function(e,t){(function(n,s){s(t)})(mce,(function(n){var s="1.9.4";function i(c){var f,y,k,M;for(y=1,k=arguments.length;y<k;y++){M=arguments[y];for(f in M)c[f]=M[f]}return c}var a=Object.create||(function(){function c(){}return function(f){return c.prototype=f,new c}})();function l(c,f){var y=Array.prototype.slice;if(c.bind)return c.bind.apply(c,y.call(arguments,1));var k=y.call(arguments,2);return function(){return c.apply(f,k.length?k.concat(y.call(arguments)):arguments)}}var u=0;function h(c){return"_leaflet_id"in c||(c._leaflet_id=++u),c._leaflet_id}function m(c,f,y){var k,M,$,X;return X=function(){k=!1,M&&($.apply(y,M),M=!1)},$=function(){k?M=arguments:(c.apply(y,arguments),setTimeout(X,f),k=!0)},$}function g(c,f,y){var k=f[1],M=f[0],$=k-M;return c===k&&y?c:((c-M)%$+$)%$+M}function x(){return!1}function v(c,f){if(f===!1)return c;var y=Math.pow(10,f===void 0?6:f);return Math.round(c*y)/y}function _(c){return c.trim?c.trim():c.replace(/^\s+|\s+$/g,"")}function N(c){return _(c).split(/\s+/)}function S(c,f){Object.prototype.hasOwnProperty.call(c,"options")||(c.options=c.options?a(c.options):{});for(var y in f)c.options[y]=f[y];return c.options}function j(c,f,y){var k=[];for(var M in c)k.push(encodeURIComponent(y?M.toUpperCase():M)+"="+encodeURIComponent(c[M]));return(!f||f.indexOf("?")===-1?"?":"&")+k.join("&")}var P=/\{ *([\w_ -]+) *\}/g;function E(c,f){return c.replace(P,function(y,k){var M=f[k];if(M===void 0)throw new Error("No value provided for variable "+y);return typeof M=="function"&&(M=M(f)),M})}var R=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function A(c,f){for(var y=0;y<c.length;y++)if(c[y]===f)return y;return-1}var B="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function I(c){return window["webkit"+c]||window["moz"+c]||window["ms"+c]}var z=0;function V(c){var f=+new Date,y=Math.max(0,16-(f-z));return z=f+y,window.setTimeout(c,y)}var te=window.requestAnimationFrame||I("RequestAnimationFrame")||V,H=window.cancelAnimationFrame||I("CancelAnimationFrame")||I("CancelRequestAnimationFrame")||function(c){window.clearTimeout(c)};function Y(c,f,y){if(y&&te===V)c.call(f);else return te.call(window,l(c,f))}function ce(c){c&&H.call(window,c)}var K={__proto__:null,extend:i,create:a,bind:l,get lastId(){return u},stamp:h,throttle:m,wrapNum:g,falseFn:x,formatNum:v,trim:_,splitWords:N,setOptions:S,getParamString:j,template:E,isArray:R,indexOf:A,emptyImageUrl:B,requestFn:te,cancelFn:H,requestAnimFrame:Y,cancelAnimFrame:ce};function q(){}q.extend=function(c){var f=function(){S(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},y=f.__super__=this.prototype,k=a(y);k.constructor=f,f.prototype=k;for(var M in this)Object.prototype.hasOwnProperty.call(this,M)&&M!=="prototype"&&M!=="__super__"&&(f[M]=this[M]);return c.statics&&i(f,c.statics),c.includes&&(ge(c.includes),i.apply(null,[k].concat(c.includes))),i(k,c),delete k.statics,delete k.includes,k.options&&(k.options=y.options?a(y.options):{},i(k.options,c.options)),k._initHooks=[],k.callInitHooks=function(){if(!this._initHooksCalled){y.callInitHooks&&y.callInitHooks.call(this),this._initHooksCalled=!0;for(var $=0,X=k._initHooks.length;$<X;$++)k._initHooks[$].call(this)}},f},q.include=function(c){var f=this.prototype.options;return i(this.prototype,c),c.options&&(this.prototype.options=f,this.mergeOptions(c.options)),this},q.mergeOptions=function(c){return i(this.prototype.options,c),this},q.addInitHook=function(c){var f=Array.prototype.slice.call(arguments,1
801),y=typeof c=="function"?c:function(){this[c].apply(this,f)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(y),this};function ge(c){if(!(typeof L>"u"||!L||!L.Mixin)){c=R(c)?c:[c];for(var f=0;f<c.length;f++)c[f]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var he={on:function(c,f,y){if(typeof c=="object")for(var k in c)this._on(k,c[k],f);else{c=N(c);for(var M=0,$=c.length;M<$;M++)this._on(c[M],f,y)}return this},off:function(c,f,y){if(!arguments.length)delete this._events;else if(typeof c=="object")for(var k in c)this._off(k,c[k],f);else{c=N(c);for(var M=arguments.length===1,$=0,X=c.length;$<X;$++)M?this._off(c[$]):this._off(c[$],f,y)}return this},_on:function(c,f,y,k){if(typeof f!="function"){console.warn("wrong listener type: "+typeof f);return}if(this._listens(c,f,y)===!1){y===this&&(y=void 0);var M={fn:f,ctx:y};k&&(M.once=!0),this._events=this._events||{},this._events[c]=this._events[c]||[],this._events[c].push(M)}},_off:function(c,f,y){var k,M,$;if(this._events&&(k=this._events[c],!!k)){if(arguments.length===1){if(this._firingCount)for(M=0,$=k.length;M<$;M++)k[M].fn=x;delete this._events[c];return}if(typeof f!="function"){console.warn("wrong listener type: "+typeof f);return}var X=this._listens(c,f,y);if(X!==!1){var de=k[X];this._firingCount&&(de.fn=x,this._events[c]=k=k.slice()),k.splice(X,1)}}},fire:function(c,f,y){if(!this.listens(c,y))return this;var k=i({},f,{type:c,target:this,sourceTarget:f&&f.sourceTarget||this});if(this._events){var M=this._events[c];if(M){this._firingCount=this._firingCount+1||1;for(var $=0,X=M.length;$<X;$++){var de=M[$],xe=de.fn;de.once&&this.off(c,xe,de.ctx),xe.call(de.ctx||this,k)}this._firingCount--}}return y&&this._propagateEvent(k),this},listens:function(c,f,y,k){typeof c!="string"&&console.warn('"string" type argument expected');var M=f;typeof f!="function"&&(k=!!f,M=void 0,y=void 0);var $=this._events&&this._events[c];if($&&$.length&&this._listens(c,M,y)!==!1)return!0;if(k){for(var X in this._eventParents)if(this._eventParents[X].listens(c,f,y,k))return!0}return!1},_listens:function(c,f,y){if(!this._events)return!1;var k=this._events[c]||[];if(!f)return!!k.length;y===this&&(y=void 0);for(var M=0,$=k.length;M<$;M++)if(k[M].fn===f&&k[M].ctx===y)return M;return!1},once:function(c,f,y){if(typeof c=="object")for(var k in c)this._on(k,c[k],f,!0);else{c=N(c);for(var M=0,$=c.length;M<$;M++)this._on(c[M],f,y,!0)}return this},addEventParent:function(c){return this._eventParents=this._eventParents||{},this._eventParents[h(c)]=c,this},removeEventParent:function(c){return this._eventParents&&delete this._eventParents[h(c)],this},_propagateEvent:function(c){for(var f in this._eventParents)this._eventParents[f].fire(c.type,i({layer:c.target,propagatedFrom:c.target},c),!0)}};he.addEventListener=he.on,he.removeEventListener=he.clearAllEventListeners=he.off,he.addOneTimeEventListener=he.once,he.fireEvent=he.fire,he.hasEventListeners=he.listens;var be=q.extend(he);function W(c,f,y){this.x=y?Math.round(c):c,this.y=y?Math.round(f):f}var Z=Math.trunc||function(c){return c>0?Math.floor(c):Math.ceil(c)};W.prototype={clone:function(){return new W(this.x,this.y)},add:function(c){return this.clone()._add(D(c))},_add:function(c){return this.x+=c.x,this.y+=c.y,this},subtract:function(c){return this.clone()._subtract(D(c))},_subtract:function(c){return this.x-=c.x,this.y-=c.y,this},divideBy:function(c){return this.clone()._divideBy(c)},_divideBy:function(c){return this.x/=c,this.y/=c,this},multiplyBy:function(c){return this.clone()._multiplyBy(c)},_multiplyBy:function(c){return this.x*=c,this.y*=c,this},scaleBy:function(c){return new W(this.x*c.x,this.y*c.y)},unscaleBy:function(c){return new W(this.x/c.x,this.y/c.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Z(this.x),this.y=Z(this.y),this},distanceTo:function(c){c=D(c);var f=c.x-this.x,y=c.y-this.y;return Math.sqrt(f*f+y*y)},equals:function(c){return c=D(c),c.x===this.x&&c.y===this.y},contains:function(c){return c=D(c),Math.abs(c.x)<=Math.abs(this.x)&&Math.abs(c.y)<=Math.abs(this.y)},toString:function(){return"Point("+v(this.x)+", "+v(this.y)+")"}};function D(c,f,y){return c instanceof W?c:R(c)?new W(c[0],c[1]):c==null?c:typeof c=="object"&&"x"in c&&"y"in c?new W(c.x,c.y):new W(c,f,
801y)}function O(c,f){if(c)for(var y=f?[c,f]:c,k=0,M=y.length;k<M;k++)this.extend(y[k])}O.prototype={extend:function(c){var f,y;if(!c)return this;if(c instanceof W||typeof c[0]=="number"||"x"in c)f=y=D(c);else if(c=U(c),f=c.min,y=c.max,!f||!y)return this;return!this.min&&!this.max?(this.min=f.clone(),this.max=y.clone()):(this.min.x=Math.min(f.x,this.min.x),this.max.x=Math.max(y.x,this.max.x),this.min.y=Math.min(f.y,this.min.y),this.max.y=Math.max(y.y,this.max.y)),this},getCenter:function(c){return D((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,c)},getBottomLeft:function(){return D(this.min.x,this.max.y)},getTopRight:function(){return D(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(c){var f,y;return typeof c[0]=="number"||c instanceof W?c=D(c):c=U(c),c instanceof O?(f=c.min,y=c.max):f=y=c,f.x>=this.min.x&&y.x<=this.max.x&&f.y>=this.min.y&&y.y<=this.max.y},intersects:function(c){c=U(c);var f=this.min,y=this.max,k=c.min,M=c.max,$=M.x>=f.x&&k.x<=y.x,X=M.y>=f.y&&k.y<=y.y;return $&&X},overlaps:function(c){c=U(c);var f=this.min,y=this.max,k=c.min,M=c.max,$=M.x>f.x&&k.x<y.x,X=M.y>f.y&&k.y<y.y;return $&&X},isValid:function(){return!!(this.min&&this.max)},pad:function(c){var f=this.min,y=this.max,k=Math.abs(f.x-y.x)*c,M=Math.abs(f.y-y.y)*c;return U(D(f.x-k,f.y-M),D(y.x+k,y.y+M))},equals:function(c){return c?(c=U(c),this.min.equals(c.getTopLeft())&&this.max.equals(c.getBottomRight())):!1}};function U(c,f){return!c||c instanceof O?c:new O(c,f)}function ie(c,f){if(c)for(var y=f?[c,f]:c,k=0,M=y.length;k<M;k++)this.extend(y[k])}ie.prototype={extend:function(c){var f=this._southWest,y=this._northEast,k,M;if(c instanceof fe)k=c,M=c;else if(c instanceof ie){if(k=c._southWest,M=c._northEast,!k||!M)return this}else return c?this.extend(me(c)||le(c)):this;return!f&&!y?(this._southWest=new fe(k.lat,k.lng),this._northEast=new fe(M.lat,M.lng)):(f.lat=Math.min(k.lat,f.lat),f.lng=Math.min(k.lng,f.lng),y.lat=Math.max(M.lat,y.lat),y.lng=Math.max(M.lng,y.lng)),this},pad:function(c){var f=this._southWest,y=this._northEast,k=Math.abs(f.lat-y.lat)*c,M=Math.abs(f.lng-y.lng)*c;return new ie(new fe(f.lat-k,f.lng-M),new fe(y.lat+k,y.lng+M))},getCenter:function(){return new fe((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new fe(this.getNorth(),this.getWest())},getSouthEast:function(){return new fe(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(c){typeof c[0]=="number"||c instanceof fe||"lat"in c?c=me(c):c=le(c);var f=this._southWest,y=this._northEast,k,M;
801return c instanceof ie?(k=c.getSouthWest(),M=c.getNorthEast()):k=M=c,k.lat>=f.lat&&M.lat<=y.lat&&k.lng>=f.lng&&M.lng<=y.lng},intersects:function(c){c=le(c);var f=this._southWest,y=this._northEast,k=c.getSouthWest(),M=c.getNorthEast(),$=M.lat>=f.lat&&k.lat<=y.lat,X=M.lng>=f.lng&&k.lng<=y.lng;return $&&X},overlaps:function(c){c=le(c);var f=this._southWest,y=this._northEast,k=c.getSouthWest(),M=c.getNorthEast(),$=M.lat>f.lat&&k.lat<y.lat,X=M.lng>f.lng&&k.lng<y.lng;return $&&X},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(c,f){return c?(c=le(c),this._southWest.equals(c.getSouthWest(),f)&&this._northEast.equals(c.getNorthEast(),f)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function le(c,f){return c instanceof ie?c:new ie(c,f)}function fe(c,f,y){if(isNaN(c)||isNaN(f))throw new Error("Invalid LatLng object: ("+c+", "+f+")");this.lat=+c,this.lng=+f,y!==void 0&&(this.alt=+y)}fe.prototype={equals:function(c,f){if(!c)return!1;c=me(c);var y=Math.max(Math.abs(this.lat-c.lat),Math.abs(this.lng-c.lng));return y<=(f===void 0?1e-9:f)},toString:function(c){return"LatLng("+v(this.lat,c)+", "+v(this.lng,c)+")"},distanceTo:function(c){return Q.distance(this,me(c))},wrap:function(){return Q.wrapLatLng(this)},toBounds:function(c){var f=180*c/40075017,y=f/Math.cos(Math.PI/180*this.lat);return le([this.lat-f,this.lng-y],[this.lat+f,this.lng+y])},clone:function(){return new fe(this.lat,this.lng,this.alt)}};function me(c,f,y){return c instanceof fe?c:R(c)&&typeof c[0]!="object"?c.length===3?new fe(c[0],c[1],c[2]):c.length===2?new fe(c[0],c[1]):null:c==null?c:typeof c=="object"&&"lat"in c?new fe(c.lat,"lng"in c?c.lng:c.lon,c.alt):f===void 0?null:new fe(c,f,y)}var oe={latLngToPoint:function(c,f){var y=this.projection.project(c),k=this.scale(f);return this.transformation._transform(y,k)},pointToLatLng:function(c,f){var y=this.scale(f),k=this.transformation.untransform(c,y);return this.projection.unproject(k)},project:function(c){return this.projection.project(c)},unproject:function(c){return this.projection.unproject(c)},scale:function(c){return 256*Math.pow(2,c)},zoom:function(c){return Math.log(c/256)/Math.LN2},getProjectedBounds:function(c){if(this.infinite)return null;var f=this.projection.bounds,y=this.scale(c),k=this.transformation.transform(f.min,y),M=this.transformation.transform(f.max,y);return new O(k,M)},infinite:!1,wrapLatLng:function(c){var f=this.wrapLng?g(c.lng,this.wrapLng,!0):c.lng,y=this.wrapLat?g(c.lat,this.wrapLat,!0):c.lat,k=c.alt;return new fe(y,f,k)},wrapLatLngBounds:function(c){var f=c.getCenter(),y=this.wrapLatLng(f),k=f.lat-y.lat,M=f.lng-y.lng;if(k===0&&M===0)return c;
801var $=c.getSouthWest(),X=c.getNorthEast(),de=new fe($.lat-k,$.lng-M),xe=new fe(X.lat-k,X.lng-M);return new ie(de,xe)}},Q=i({},oe,{wrapLng:[-180,180],R:6371e3,distance:function(c,f){var y=Math.PI/180,k=c.lat*y,M=f.lat*y,$=Math.sin((f.lat-c.lat)*y/2),X=Math.sin((f.lng-c.lng)*y/2),de=$*$+Math.cos(k)*Math.cos(M)*X*X,xe=2*Math.atan2(Math.sqrt(de),Math.sqrt(1-de));return this.R*xe}}),Ne=6378137,Ce={R:Ne,MAX_LATITUDE:85.0511287798,project:function(c){var f=Math.PI/180,y=this.MAX_LATITUDE,k=Math.max(Math.min(y,c.lat),-y),M=Math.sin(k*f);return new W(this.R*c.lng*f,this.R*Math.log((1+M)/(1-M))/2)},unproject:function(c){var f=180/Math.PI;return new fe((2*Math.atan(Math.exp(c.y/this.R))-Math.PI/2)*f,c.x*f/this.R)},bounds:(function(){var c=Ne*Math.PI;return new O([-c,-c],[c,c])})()};function De(c,f,y,k){if(R(c)){this._a=c[0],this._b=c[1],this._c=c[2],this._d=c[3];return}this._a=c,this._b=f,this._c=y,this._d=k}De.prototype={transform:function(c,f){return this._transform(c.clone(),f)},_transform:function(c,f){return f=f||1,c.x=f*(this._a*c.x+this._b),c.y=f*(this._c*c.y+this._d),c},untransform:function(c,f){return f=f||1,new W((c.x/f-this._b)/this._a,(c.y/f-this._d)/this._c)}};function Te(c,f,y,k){return new De(c,f,y,k)}var We=i({},Q,{code:"EPSG:3857",projection:Ce,transformation:(function(){var c=.5/(Math.PI*Ce.R);return Te(c,.5,-c,.5)})()}),$e=i({},We,{code:"EPSG:900913"});function Et(c){return document.createElementNS("http://www.w3.org/2000/svg",c)}function Xt(c,f){var y="",k,M,$,X,de,xe;for(k=0,$=c.length;k<$;k++){for(de=c[k],M=0,X=de.length;M<X;M++)xe=de[M],y+=(M?"L":"M")+xe.x+" "+xe.y;y+=f?Ze.svg?"z":"x":""}return y||"M0 0"}var Zt=document.documentElement.style,Pn="ActiveXObject"in window,In=Pn&&!document.addEventListener,pn="msLaunchUri"in navigator&&!("documentMode"in document),Tn=Ns("webkit"),ms=Ns("android"),ae=Ns("android 2")||Ns("android 3"),Se=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ve=ms&&Ns("Google")&&Se<537&&!("AudioNode"in window),Nt=!!window.opera,gn=!pn&&Ns("chrome"),Mt=Ns("gecko")&&!Tn&&!Nt&&!Pn,En=!gn&&Ns("safari"),Rt=Ns("phantom"),xn="OTransition"in Zt,Vn=navigator.platform.indexOf("Win")===0,Ir=Pn&&"transition"in Zt,mi="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!ae,Ma="MozPerspective"in Zt,we=!window.L_DISABLE_3D&&(Ir||mi||Ma)&&!xn&&!Rt,st=typeof orientation<"u"||Ns("mobile"),Wt=st&&Tn,ss=st&&mi,Je=!window.PointerEvent&&window.MSPointerEvent,Wn=!!(window.PointerEvent||Je),cn="ontouchstart"in window||!!window.TouchEvent,ps=!window.L_NO_TOUCH&&(cn||Wn),tr=st&&Nt,xh=st&&Mt,ko=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,pi=(function(){var c=!1;try{var f=Object.defineProperty({},"passive",{get:function(){c=!0}});window.addEventListener("testPassiveEventSupport",x,f),window.removeEventListener("testPassiveEventSupport",x,f)}catch{}return c})(),Bs=(function(){return!!document.createElement("canvas").getContext})(),Gi=!!(document.createElementNS&&Et("svg").createSVGRect),Yi=!!Gi&&(function(){var c=document.createElement("div");return c.innerHTML="<svg/>",(c.firstChild&&c.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),vh=!Gi&&(function(){try{var c=document.createElement("div");c.innerHTML='<v:shape adj="1"/>';var f=c.firstChild;return f.style.behavior="url(#default#VML)",f&&typeof f.adj=="object"}catch{return!1}})(),Wl=navigator.platform.indexOf("Mac")===0,uv=navigator.platform.indexOf("Linux")===0;function Ns(c){return navigator.userAgent.toLowerCase().indexOf(c)>=0}var Ze={ie:Pn,ielt9:In,edge:pn,webkit:Tn,android:ms,android23:ae,androidStock:Ve,opera:Nt,chrome:gn,gecko:Mt,safari:En,phantom:Rt,opera12:xn,win:Vn,ie3d:Ir,webkit3d:mi,gecko3d:Ma,any3d:we,mobile:st,mobileWebkit:Wt,mobileWebkit3d:ss,msPointer:Je,pointer:Wn,touch:ps,touchNative:cn,mobileOpera:tr,mobileGecko:xh,retina:ko,passiveEvents:pi,canvas:Bs,svg:Gi,vml:vh,inlineSvg:Yi,mac:Wl,linux:uv},Hl=Ze.msPointer?"MSPointerDown":"pointerdown",hd=Ze.msPointer?"MSPointerMove":"pointermove",ep=Ze.msPointer?"MSPointerUp":"pointerup",tp=Ze.msPointer?"MSPointerCancel":"pointercancel",
801yh={touchstart:Hl,touchmove:hd,touchend:ep,touchcancel:tp},Ki={touchstart:_n,touchmove:fd,touchend:fd,touchcancel:fd},Ra={},bh=!1;function hv(c,f,y){return f==="touchstart"&&fv(),Ki[f]?(y=Ki[f].bind(this,y),c.addEventListener(yh[f],y,!1),y):(console.warn("wrong event specified:",f),x)}function np(c,f,y){if(!yh[f]){console.warn("wrong event specified:",f);return}c.removeEventListener(yh[f],y,!1)}function sp(c){Ra[c.pointerId]=c}function rp(c){Ra[c.pointerId]&&(Ra[c.pointerId]=c)}function wh(c){delete Ra[c.pointerId]}function fv(){bh||(document.addEventListener(Hl,sp,!0),document.addEventListener(hd,rp,!0),document.addEventListener(ep,wh,!0),document.addEventListener(tp,wh,!0),bh=!0)}function fd(c,f){if(f.pointerType!==(f.MSPOINTER_TYPE_MOUSE||"mouse")){f.touches=[];for(var y in Ra)f.touches.push(Ra[y]);f.changedTouches=[f],c(f)}}function _n(c,f){f.MSPOINTER_TYPE_TOUCH&&f.pointerType===f.MSPOINTER_TYPE_TOUCH&&Nn(f),fd(c,f)}function mv(c){var f={},y,k;for(k in c)y=c[k],f[k]=y&&y.bind?y.bind(c):y;return c=f,f.type="dblclick",f.detail=2,f.isTrusted=!1,f._simulated=!0,f}var _h=200;function ip(c,f){c.addEventListener("dblclick",f);var y=0,k;function M($){if($.detail!==1){k=$.detail;return}if(!($.pointerType==="mouse"||$.sourceCapabilities&&!$.sourceCapabilities.firesTouchEvents)){var X=Ia($);if(!(X.some(function(xe){return xe instanceof HTMLLabelElement&&xe.attributes.for})&&!X.some(function(xe){return xe instanceof HTMLInputElement||xe instanceof HTMLSelectElement}))){var de=Date.now();de-y<=_h?(k++,k===2&&f(mv($))):k=1,y=de}}}return c.addEventListener("click",M),{dblclick:f,simDblclick:M}}function md(c,f){c.removeEventListener("dblclick",f.dblclick),c.removeEventListener("click",f.simDblclick)}var Nh=Eo(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Co=Eo(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ql=Co==="webkitTransition"||Co==="OTransition"?Co+"End":"transitionend";function xr(c){return typeof c=="string"?document.getElementById(c):c}function Gl(c,f){var y=c.style[f]||c.currentStyle&&c.currentStyle[f];if((!y||y==="auto")&&document.defaultView){var k=document.defaultView.getComputedStyle(c,null);y=k?k[f]:null}return y==="auto"?null:y}function xt(c,f,y){var k=document.createElement(c);return k.className=f||"",y&&y.appendChild(k),k}function dn(c){var f=c.parentNode;f&&f.removeChild(c)}function pd(c){for(;c.firstChild;)c.removeChild(c.firstChild)}function Po(c){var f=c.parentNode;f&&f.lastChild!==c&&f.appendChild(c)}function gi(c){var f=c.parentNode;f&&f.firstChild!==c&&f.insertBefore(c,f.firstChild)}function To(c,f){if(c.classList!==void 0)return c.classList.contains(f);var y=gd(c);return y.length>0&&new RegExp("(^|\\s)"+f+"(\\s|$)").test(y)}function ft(c,f){if(c.classList!==void 0)for(var y=N(f),k=0,M=y.length;k<M;k++)c.classList.add(y[k]);else if(!To(c,f)){var $=gd(c);jh(c,($?$+" ":"")+f)}}function an(c,f){c.classList!==void 0?c.classList.remove(f):jh(c,_((" "+gd(c)+" ").replace(" "+f+" "," ")))}function jh(c,f){c.className.baseVal===void 0?c.className=f:c.className.baseVal=f}function gd(c){return c.correspondingElement&&(c=c.correspondingElement),c.className.baseVal===void 0?c.className:c.className.baseVal}function js(c,f){"opacity"in c.style?c.style.opacity=f:"filter"in c.style&&ap(c,f)}function ap(c,f){var y=!1,k="DXImageTransform.Microsoft.Alpha";try{y=c.filters.item(k)}catch{if(f===1)return}f=Math.round(f*100),y?(y.Enabled=f!==100,y.Opacity=f):c.style.filter+=" progid:"+k+"(opacity="+f+")"}function Eo(c){for(var f=document.documentElement.style,y=0;y<c.length;y++)if(c[y]in f)return c[y];return!1}function vr(c,f,y){var k=f||new W(0,0);c.style[Nh]=(Ze.ie3d?"translate("+k.x+"px,"+k.y+"px)":"translate3d("+k.x+"px,"+k.y+"px,0)")+(y?" scale("+y+")":"")}function An(c,f){c._leaflet_pos=f,Ze.any3d?vr(c,f):(c.style.left=f.x+"px",c.style.top=f.y+"px")}function xi(c){return c._leaflet_pos||new W(0,0)}var Ot,Ao,xd;if("onselectstart"in document)Ot=function(){lt(window,"selectstart",Nn)},Ao=function(){Jt(window,"selectstart",Nn)};else{var Oa=Eo(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Ot=function(){if(Oa){var c=document.documentElement.style;xd=c[Oa],c[Oa]="none"}},Ao=function(){Oa&&(document.documentElement.style[Oa]=xd,xd=void 0)}}function vd(){lt(window,"dragstart",Nn)}function yd(){Jt(window,"dragstart",Nn)}var Yl,Kl;function Mo(c){for(;c.tabIndex===-1;)c=c.parentNode;c.style&&(yr(),Yl=c,Kl=c.style.outlineStyle,c.style.outlineStyle="none",lt(window,"keydown",yr))}function yr(){Yl&&(Yl.style.outlineStyle=Kl,Yl=void 0,Kl=void 0,Jt(window,"keydown",yr))}function vi(c){do c=c.parentNode;while((!c.offsetWidth||!c.offsetHeight)&&c!==document.body);return c}function Lr(c){var f=c.getBoundingClientRect();return{x:f.width/c.offsetWidth||1,y:f.height/c.offsetHeight||1,boundingClientRect:f}}var Zl={__proto__:null,TRANSFORM:Nh,TRANSITION:Co,TRANSITION_END:ql,get:xr,getStyle:Gl,create:xt,remove:dn,empty:pd,toFront:Po,toBack:gi,hasClass:To,addClass:ft,removeClass:an,setClass:jh,getClass:gd,setOpacity:js,testProp:Eo,setTransform:vr,setPosition:An,getPosition:xi,get disableTextSelection(){return Ot},get enableTextSelection(){return Ao},disableImageDrag:vd,enableImageDrag:yd,preventOutline:Mo,restoreOutline:yr,getSizedParentNode:vi,getScale:Lr};function lt(c,f,y,k){if(f&&typeof f=="object")for(var M in f)kh(c,M,f[M],y);else{f=N(f);for(var $=0,X=f.length;$<X;$++)kh(c,f[$],y,k)}return this}var Zn="_leaflet_events";function Jt(c,f,y,k){if(arguments.length===1)Sh(c),delete c[Zn];else if(f&&typeof f=="object")for(var M in f)bd(c,M,f[M],y);else if(f=N(f),arguments.length===2)Sh(c,function(de){return A(f,de)!==-1});else for(var $=0,X=f.length;$<X;$++)bd(c,f[$],y,k);return this}function Sh(c,f){for(var y in c[Zn]){var k=y.split(/\d/)[0];(!f||f(k))&&bd(c,k,null,null,y)}}
801var Da={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function kh(c,f,y,k){var M=f+h(y)+(k?"_"+h(k):"");if(c[Zn]&&c[Zn][M])return this;var $=function(de){return y.call(k||c,de||window.event)},X=$;!Ze.touchNative&&Ze.pointer&&f.indexOf("touch")===0?$=hv(c,f,$):Ze.touch&&f==="dblclick"?$=ip(c,$):"addEventListener"in c?f==="touchstart"||f==="touchmove"||f==="wheel"||f==="mousewheel"?c.addEventListener(Da[f]||f,$,Ze.passiveEvents?{passive:!1}:!1):f==="mouseenter"||f==="mouseleave"?($=function(de){de=de||window.event,Jl(c,de)&&X(de)},c.addEventListener(Da[f],$,!1)):c.addEventListener(f,X,!1):c.attachEvent("on"+f,$),c[Zn]=c[Zn]||{},c[Zn][M]=$}function bd(c,f,y,k,M){M=M||f+h(y)+(k?"_"+h(k):"");var $=c[Zn]&&c[Zn][M];if(!$)return this;!Ze.touchNative&&Ze.pointer&&f.indexOf("touch")===0?np(c,f,$):Ze.touch&&f==="dblclick"?md(c,$):"removeEventListener"in c?c.removeEventListener(Da[f]||f,$,!1):c.detachEvent("on"+f,$),c[Zn][M]=null}function Fr(c){return c.stopPropagation?c.stopPropagation():c.originalEvent?c.originalEvent._stopped=!0:c.cancelBubble=!0,this}function wd(c){return kh(c,"wheel",Fr),this}function Ql(c){return lt(c,"mousedown touchstart dblclick contextmenu",Fr),c._leaflet_disable_click=!0,this}function Nn(c){return c.preventDefault?c.preventDefault():c.returnValue=!1,this}function br(c){return Nn(c),Fr(c),this}function Ia(c){if(c.composedPath)return c.composedPath();for(var f=[],y=c.target;y;)f.push(y),y=y.parentNode;return f}function Xl(c,f){if(!f)return new W(c.clientX,c.clientY);var y=Lr(f),k=y.boundingClientRect;return new W((c.clientX-k.left)/y.x-f.clientLeft,(c.clientY-k.top)/y.y-f.clientTop)}var pv=Ze.linux&&Ze.chrome?window.devicePixelRatio:Ze.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function op(c){return Ze.edge?c.wheelDeltaY/2:c.deltaY&&c.deltaMode===0?-c.deltaY/pv:c.deltaY&&c.deltaMode===1?-c.deltaY*20:c.deltaY&&c.deltaMode===2?-c.deltaY*60:c.deltaX||c.deltaZ?0:c.wheelDelta?(c.wheelDeltaY||c.wheelDelta)/2:c.detail&&Math.abs(c.detail)<32765?-c.detail*20:c.detail?c.detail/-32765*60:0}function Jl(c,f){var y=f.relatedTarget;if(!y)return!0;try{for(;y&&y!==c;)y=y.parentNode}catch{return!1}return y!==c}var _d={__proto__:null,on:lt,off:Jt,stopPropagation:Fr,disableScrollPropagation:wd,disableClickPropagation:Ql,preventDefault:Nn,stop:br,getPropagationPath:Ia,getMousePosition:Xl,getWheelDelta:op,isExternalTarget:Jl,addListener:lt,removeListener:Jt},Nd=be.extend({run:function(c,f,y,k){this.stop(),this._el=c,this._inProgress=!0,this._duration=y||.25,this._easeOutPower=1/Math.max(k||.5,.2),this._startPos=xi(c),this._offset=f.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Y(this._animate,this),this._step()},_step:function(c){var f=+new Date-this._startTime,y=this._duration*1e3;f<y?this._runFrame(this._easeOut(f/y),c):(this._runFrame(1),this._complete())},_runFrame:function(c,f){var y=this._startPos.add(this._offset.multiplyBy(c));f&&y._round(),An(this._el,y),this.fire("step")},_complete:function(){ce(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(c){return 1-Math.pow(1-c,this._easeOutPower)}}),Tt=be.extend({options:{crs:We,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(c,f){f=S(this,f),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(c),this._initLayout(),this._onResize=l(this._onResize,this),this._initEvents(),f.maxBounds&&this.setMaxBounds(f.maxBounds),f.zoom!==void 0&&(this._zoom=this._limitZoom(f.zoom)),f.center&&f.zoom!==void 0&&this.setView(me(f.center),f.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Co&&Ze.any3d&&!Ze.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),lt(this._proxy,ql,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
vendor: 8,641 bytes, line 801
801,setView:function(c,f,y){if(f=f===void 0?this._zoom:this._limitZoom(f),c=this._limitCenter(me(c),f,this.options.maxBounds),y=y||{},this._stop(),this._loaded&&!y.reset&&y!==!0){y.animate!==void 0&&(y.zoom=i({animate:y.animate},y.zoom),y.pan=i({animate:y.animate,duration:y.duration},y.pan));var k=this._zoom!==f?this._tryAnimatedZoom&&this._tryAnimatedZoom(c,f,y.zoom):this._tryAnimatedPan(c,y.pan);if(k)return clearTimeout(this._sizeTimer),this}return this._resetView(c,f,y.pan&&y.pan.noMoveStart),this},setZoom:function(c,f){return this._loaded?this.setView(this.getCenter(),c,{zoom:f}):(this._zoom=c,this)},zoomIn:function(c,f){return c=c||(Ze.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+c,f)},zoomOut:function(c,f){return c=c||(Ze.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-c,f)},setZoomAround:function(c,f,y){var k=this.getZoomScale(f),M=this.getSize().divideBy(2),$=c instanceof W?c:this.latLngToContainerPoint(c),X=$.subtract(M).multiplyBy(1-1/k),de=this.containerPointToLatLng(M.add(X));return this.setView(de,f,{zoom:y})},_getBoundsCenterZoom:function(c,f){f=f||{},c=c.getBounds?c.getBounds():le(c);var y=D(f.paddingTopLeft||f.padding||[0,0]),k=D(f.paddingBottomRight||f.padding||[0,0]),M=this.getBoundsZoom(c,!1,y.add(k));if(M=typeof f.maxZoom=="number"?Math.min(f.maxZoom,M):M,M===1/0)return{center:c.getCenter(),zoom:M};var $=k.subtract(y).divideBy(2),X=this.project(c.getSouthWest(),M),de=this.project(c.getNorthEast(),M),xe=this.unproject(X.add(de).divideBy(2).add($),M);return{center:xe,zoom:M}},fitBounds:function(c,f){if(c=le(c),!c.isValid())throw new Error("Bounds are not valid.");var y=this._getBoundsCenterZoom(c,f);return this.setView(y.center,y.zoom,f)},fitWorld:function(c){return this.fitBounds([[-90,-180],[90,180]],c)},panTo:function(c,f){return this.setView(c,this._zoom,{pan:f})},panBy:function(c,f){if(c=D(c).round(),f=f||{},!c.x&&!c.y)return this.fire("moveend");if(f.animate!==!0&&!this.getSize().contains(c))return this._resetView(this.unproject(this.project(this.getCenter()).add(c)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Nd,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),f.noMoveStart||this.fire("movestart"),f.animate!==!1){ft(this._mapPane,"leaflet-pan-anim");var y=this._getMapPanePos().subtract(c).round();this._panAnim.run(this._mapPane,y,f.duration||.25,f.easeLinearity)}else this._rawPanBy(c),this.fire("move").fire("moveend");return this},flyTo:function(c,f,y){if(y=y||{},y.animate===!1||!Ze.any3d)return this.setView(c,f,y);this._stop();var k=this.project(this.getCenter()),M=this.project(c),$=this.getSize(),X=this._zoom;c=me(c),f=f===void 0?X:f;var de=Math.max($.x,$.y),xe=de*this.getZoomScale(X,f),je=M.distanceTo(k)||1,Ie=1.42,rt=Ie*Ie;function yt(Gt){var Go=Gt?-1:1,Tv=Gt?xe:de,Ev=xe*xe-de*de+Go*rt*rt*je*je,Va=2*Tv*rt*je,Wa=Ev/Va,Ha=Math.sqrt(Wa*Wa+1)-Wa,Ld=Ha<1e-9?-18:Math.log(Ha);return Ld}function Qn(Gt){return(Math.exp(Gt)-Math.exp(-Gt))/2}function Hn(Gt){return(Math.exp(Gt)+Math.exp(-Gt))/2}function Us(Gt){return Qn(Gt)/Hn(Gt)}var ks=yt(0);function Ho(Gt){return de*(Hn(ks)/Hn(ks+Ie*Gt))}function Gh(Gt){return de*(Hn(ks)*Us(ks+Ie*Gt)-Qn(ks))/rt}function sa(Gt){return 1-Math.pow(1-Gt,1.5)}var Pp=Date.now(),Ua=(yt(1)-ks)/Ie,Ur=y.duration?1e3*y.duration:1e3*Ua*.8;function qo(){var Gt=(Date.now()-Pp)/Ur,Go=sa(Gt)*Ua;Gt<=1?(this._flyToFrame=Y(qo,this),this._move(this.unproject(k.add(M.subtract(k).multiplyBy(Gh(Go)/je)),X),this.getScaleZoom(de/Ho(Go),X),{flyTo:!0})):this._move(c,f)._moveEnd(!0)}return this._moveStart(!0,y.noMoveStart),qo.call(this),this},flyToBounds:function(c,f){var y=this._getBoundsCenterZoom(c,f);return this.flyTo(y.center,y.zoom,f)},setMaxBounds:function(c){return c=le(c),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),c.isValid()?(this.options.maxBounds=c,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(c){var f=this.options.minZoom;return this.options.minZoom=c,this._loaded&&f!==c&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(c):this},setMaxZoom:function(c){var f=this.options.maxZoom;return this.options.maxZoom=c,this._loaded&&f!==c&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(c):this},panInsideBounds:function(c,f){this._enforcingBounds=!0;var y=this.getCenter(),k=this._limitCenter(y,this._zoom,le(c));return y.equals(k)||this.panTo(k,f),this._enforcingBounds=!1,this},panInside:function(c,f){f=f||{};var y=D(f.paddingTopLeft||f.padding||[0,0]),k=D(f.paddingBottomRight||f.padding||[0,0]),M=this.project(this.getCenter()),$=this.project(c),X=this.getPixelBounds(),de=U([X.min.add(y),X.max.subtract(k)]),xe=de.getSize();if(!de.contains($)){this._enforcingBounds=!0;var je=$.subtract(de.getCenter()),Ie=de.extend($).getSize().subtract(xe);M.x+=je.x<0?-Ie.x:Ie.x,M.y+=je.y<0?-Ie.y:Ie.y,this.panTo(this.unproject(M),f),this._enforcingBounds=!1}return this},invalidateSize:function(c){if(!this._loaded)return this;c=i({animate:!1,pan:!0},c===!0?{animate:!0}:c);var f=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var y=this.getSize(),k=f.divideBy(2).round(),M=y.divideBy(2).round(),$=k.subtract(M);return!$.x&&!$.y?this:(c.animate&&c.pan?this.panBy($):(c.pan&&this._rawPanBy($),this.fire("move"),c.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:f,newSize:y}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(c){if(c=this._locateOptions=i({timeout:1e4,watch:!1},c),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var f=l(this._handleGeolocationResponse,this),y=l(this._handleGeolocationError,this);return c.watch?this._locationWatchId=navigator.geolocation.watchPosition(f,y,c):navigator.geolocation.getCurrentPosition(f,y,c),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(c){if(this._container._leaflet_id){var f=c.code,y=c.message||(f===1?"permission denied":f===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:f,message:"Geolocation error: "+y+"."})}},_handleGeolocationResponse:function(c){if(this._container._leaflet_id){var f=c.coords.latitude,y=c.coords.longitude,k=new fe(f,y),M=k.toBounds(c.coords.accuracy*2),$=this._locateOptions;if($.setView){var X=this.getBoundsZoom(M);this.setView(k,$.maxZoom?Math.min(X,$.maxZoom):X)}var de={latlng:k,bounds:M,timestamp:c.timestamp};for(var xe in c.coords)typeof c.coords[xe]=="number"&&(de[xe]=c.coords[xe]);this.fire("locationfound",de)}},addHandler:function(c,f){if(!f)return this;var y=this[c]=new f(this);return this._handlers.push(y),this.options[c]&&y.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),dn(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(ce(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var c;for(c in this._layers)this._layers[c].remove();for(c in this._panes)dn(this._panes[c]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(c,f){var y="leaflet-pane"+(c?" leaflet-"+c.replace("Pane","")+"-pane":""),k=xt("div",y,f||this._mapPane);return c&&(this._panes[c]=k),k},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var c=this.getPixelBounds(),f=this.unproject(c.getBottomLeft()),y=this.unproject(c.getTopRight());return new ie(f,y)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZo
801om===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(c,f,y){c=le(c),y=D(y||[0,0]);var k=this.getZoom()||0,M=this.getMinZoom(),$=this.getMaxZoom(),X=c.getNorthWest(),de=c.getSouthEast(),xe=this.getSize().subtract(y),je=U(this.project(de,k),this.project(X,k)).getSize(),Ie=Ze.any3d?this.options.zoomSnap:1,rt=xe.x/je.x,yt=xe.y/je.y,Qn=f?Math.max(rt,yt):Math.min(rt,yt);return k=this.getScaleZoom(Qn,k),Ie&&(k=Math.round(k/(Ie/100))*(Ie/100),k=f?Math.ceil(k/Ie)*Ie:Math.floor(k/Ie)*Ie),Math.max(M,Math.min($,k))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new W(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(c,f){var y=this._getTopLeftPoint(c,f);return new O(y,y.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(c){return this.options.crs.getProjectedBounds(c===void 0?this.getZoom():c)},getPane:function(c){return typeof c=="string"?this._panes[c]:c},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(c,f){var y=this.options.crs;return f=f===void 0?this._zoom:f,y.scale(c)/y.scale(f)},getScaleZoom:function(c,f){var y=this.options.crs;f=f===void 0?this._zoom:f;var k=y.zoom(c*y.scale(f));return isNaN(k)?1/0:k},project:function(c,f){return f=f===void 0?this._zoom:f,this.options.crs.latLngToPoint(me(c),f)},unproject:function(c,f){return f=f===void 0?this._zoom:f,this.options.crs.pointToLatLng(D(c),f)},layerPointToLatLng:function(c){var f=D(c).add(this.getPixelOrigin());return this.unproject(f)},latLngToLayerPoint:function(c){var f=this.project(me(c))._round();return f._subtract(this.getPixelOrigin())},wrapLatLng:function(c){return this.options.crs.wrapLatLng(me(c))},wrapLatLngBounds:function(c){return this.options.crs.wrapLatLngBounds(le(c))},distance:function(c,f){return this.options.crs.distance(me(c),me(f))},containerPointToLayerPoint:function(c){return D(c).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(c){return D(c).add(this._getMapPanePos())},containerPointToLatLng:function(c){var f=this.containerPointToLayerPoint(D(c));return this.layerPointToLatLng(f)},latLngToContainerPoint:function(c){return this.layerPointToContainerPoint(this.latLngToLayerPoint(me(c)))},mouseEventToContainerPoint:function(c){return Xl(c,this._container)},mouseEventToLayerPoint:function(c){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(c))},mouseEventToLatLng:function(c){return this.layerPointToLatLng(this.mouseEventToLayerPoint(c))},_initContainer:function(c){var f=this._container=xr(c);if(f){if(f._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");lt(f,"scroll",this._onScroll,this),this._containerId=h(f)},_initLayout:function(){var c=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ze.any3d,ft(c,"leaflet-container"+(Ze.touch?" leaflet-touch":"")+(Ze.retina?" leaflet-retina":"")+(Ze.ielt9?" leaflet-oldie":"")+(Ze.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var f=Gl(c,"position");f!=="absolute"&&f!=="relative"&&f!=="fixed"&&f!=="sticky"&&(c.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var c=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),An(this._mapPane,new W(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ft(c.markerPane,"leaflet-zoom-hide"),ft(c.shadowPane,"leaflet-zoom-hide"))},_resetView:function(c,f,y){An(this._mapPane,new W(0,0));var k=!this._loaded;this._loaded=!0,f=this._limitZoom(f),this.fire("viewprereset");var M=this._zoom!==f;this._moveStart(M,y)._move(c,f)._moveEnd(M),this.fire("viewreset"),k&&this.fire("load")},_moveStart:function(c,f){return c&&this.fire("zoomstart"),f||this.fire("movestart"),this},_move:function(c,f,y,k){f===void 0&&(f=this._zoom);var M=this._zoom!==f;return this._zoom=f,this._lastCenter=c,this._pixelOrigin=this._getNewPixelOrigin(c),k?y&&y.pinch&&this.fire("zoom",y):((M||y&&y.pinch)&&this.fire("zoom",y),this.fire("move",
801y)),this},_moveEnd:function(c){return c&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return ce(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(c){An(this._mapPane,this._getMapPanePos().subtract(c))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(c){this._targets={},this._targets[h(this._container)]=this;var f=c?Jt:lt;f(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&f(window,"resize",this._onResize,this),Ze.any3d&&this.options.transform3DLimit&&(c?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){ce(this._resizeRequest),this._resizeRequest=Y(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var c=this._getMapPanePos();Math.max(Math.abs(c.x),Math.abs(c.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(c,f){for(var y=[],k,M=f==="mouseout"||f==="mouseover",$=c.target||c.srcElement,X=!1;$;){if(k=this._targets[h($)],k&&(f==="click"||f==="preclick")&&this._draggableMoved(k)){X=!0;break}if(k&&k.listens(f,!0)&&(M&&!Jl($,c)||(y.push(k),M))||$===this._container)break;$=$.parentNode}return!y.length&&!X&&!M&&this.listens(f,!0)&&(y=[this]),y},_isClickDisabled:function(c){for(;c&&c!==this._container;){if(c._leaflet_disable_click)return!0;c=c.parentNode}},_handleDOMEvent:function(c){var f=c.target||c.srcElement;if(!(!this._loaded||f._leaflet_disable_events||c.type==="click"&&this._isClickDisabled(f))){var y=c.type;y==="mousedown"&&Mo(f),this._fireDOMEvent(c,y)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(c,f,y){if(c.type==="click"){var k=i({},c);k.type="preclick",this._fireDOMEvent(k,k.type,y)}var M=this._findEventTargets(c,f);if(y){for(var $=[],X=0;X<y.length;X++)y[X].listens(f,!0)&&$.push(y[X]);M=$.concat(M)}if(M.length){f==="contextmenu"&&Nn(c);var de=M[0],xe={originalEvent:c};if(c.type!=="keypress"&&c.type!=="keydown"&&c.type!=="keyup"){var je=de.getLatLng&&(!de._radius||de._radius<=10);xe.containerPoint=je?this.latLngToContainerPoint(de.getLatLng()):this.mouseEventToContainerPoint(c),xe.layerPoint=this.containerPointToLayerPoint(xe.containerPoint),xe.latlng=je?de.getLatLng():this.layerPointToLatLng(xe.layerPoint)}for(X=0;X<M.length;X++)if(M[X].fire(f,xe,!0),xe.originalEvent._stopped||M[X].options.bubblingMouseEvents===!1&&A(this._mouseEvents,f)!==-1)return}},_draggableMoved:function(c){return c=c.dragging&&c.dragging.enabled()?c:this,c.dragging&&c.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var c=0,f=this._handlers.length;c<f;c++)this._handlers[c].disable()},whenReady:function(c,f){return this._loaded?c.call(f||this,{target:this}):this.on("load",c,f),this},_getMapPanePos:function(){return xi(this._mapPane)||new W(0,0)},_moved:function(){var c=this._getMapPanePos();return c&&!c.equals([0,0])},_getTopLeftPoint:function(c,f){var y=c&&f!==void 0?this._getNewPixelOrigin(c,f):this.getPixelOrigin();return y.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(c,f){var y=this.getSize()._divideBy(2);return this.project(c,f)._subtract(y)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(c,f,y){var k=this._getNewPixelOrigin(y,f);return this.project(c,f)._subtract(k)},_latLngBoundsToNewLayerBounds:function(c,f,y){var k=this._getNewPixelOrigin(y,f);
801return U([this.project(c.getSouthWest(),f)._subtract(k),this.project(c.getNorthWest(),f)._subtract(k),this.project(c.getSouthEast(),f)._subtract(k),this.project(c.getNorthEast(),f)._subtract(k)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(c){return this.latLngToLayerPoint(c).subtract(this._getCenterLayerPoint())},_limitCenter:function(c,f,y){if(!y)return c;var k=this.project(c,f),M=this.getSize().divideBy(2),$=new O(k.subtract(M),k.add(M)),X=this._getBoundsOffset($,y,f);return Math.abs(X.x)<=1&&Math.abs(X.y)<=1?c:this.unproject(k.add(X),f)},_limitOffset:function(c,f){if(!f)return c;var y=this.getPixelBounds(),k=new O(y.min.add(c),y.max.add(c));return c.add(this._getBoundsOffset(k,f))},_getBoundsOffset:function(c,f,y){var k=U(this.project(f.getNorthEast(),y),this.project(f.getSouthWest(),y)),M=k.min.subtract(c.min),$=k.max.subtract(c.max),X=this._rebound(M.x,-$.x),de=this._rebound(M.y,-$.y);return new W(X,de)},_rebound:function(c,f){return c+f>0?Math.round(c-f)/2:Math.max(0,Math.ceil(c))-Math.max(0,Math.floor(f))},_limitZoom:function(c){var f=this.getMinZoom(),y=this.getMaxZoom(),k=Ze.any3d?this.options.zoomSnap:1;return k&&(c=Math.round(c/k)*k),Math.max(f,Math.min(y,c))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){an(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(c,f){var y=this._getCenterOffset(c)._trunc();return(f&&f.animate)!==!0&&!this.getSize().contains(y)?!1:(this.panBy(y,f),!0)},_createAnimProxy:function(){var c=this._proxy=xt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(c),this.on("zoomanim",function(f){var y=Nh,k=this._proxy.style[y];vr(this._proxy,this.project(f.center,f.zoom),this.getZoomScale(f.zoom,1)),k===this._proxy.style[y]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){dn(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var c=this.getCenter(),f=this.getZoom();
vendor: 12,129 bytes, line 801
801vr(this._proxy,this.project(c,f),this.getZoomScale(f,1))},_catchTransitionEnd:function(c){this._animatingZoom&&c.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(c,f,y){if(this._animatingZoom)return!0;if(y=y||{},!this._zoomAnimated||y.animate===!1||this._nothingToAnimate()||Math.abs(f-this._zoom)>this.options.zoomAnimationThreshold)return!1;var k=this.getZoomScale(f),M=this._getCenterOffset(c)._divideBy(1-1/k);return y.animate!==!0&&!this.getSize().contains(M)?!1:(Y(function(){this._moveStart(!0,y.noMoveStart||!1)._animateZoom(c,f,!0)},this),!0)},_animateZoom:function(c,f,y,k){this._mapPane&&(y&&(this._animatingZoom=!0,this._animateToCenter=c,this._animateToZoom=f,ft(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:c,zoom:f,noUpdate:k}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(l(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&an(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Zi(c,f){return new Tt(c,f)}var zs=q.extend({options:{position:"topright"},initialize:function(c){S(this,c)},getPosition:function(){return this.options.position},setPosition:function(c){var f=this._map;return f&&f.removeControl(this),this.options.position=c,f&&f.addControl(this),this},getContainer:function(){return this._container},addTo:function(c){this.remove(),this._map=c;var f=this._container=this.onAdd(c),y=this.getPosition(),k=c._controlCorners[y];return ft(f,"leaflet-control"),y.indexOf("bottom")!==-1?k.insertBefore(f,k.firstChild):k.appendChild(f),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(dn(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(c){this._map&&c&&c.screenX>0&&c.screenY>0&&this._map.getContainer().focus()}}),Qi=function(c){return new zs(c)};Tt.include({addControl:function(c){return c.addTo(this),this},removeControl:function(c){return c.remove(),this},_initControlPos:function(){var c=this._controlCorners={},f="leaflet-",y=this._controlContainer=xt("div",f+"control-container",this._container);function k(M,$){var X=f+M+" "+f+$;c[M+$]=xt("div",X,y)}k("top","left"),k("top","right"),k("bottom","left"),k("bottom","right")},_clearControlPos:function(){for(var c in this._controlCorners)dn(this._controlCorners[c]);dn(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ch=zs.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(c,f,y,k){return y<k?-1:k<y?1:0}},initialize:function(c,f,y){S(this,y),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var k in c)this._addLayer(c[k],k);for(k in f)this._addLayer(f[k],k,!0)},onAdd:function(c){this._initLayout(),this._update(),this._map=c,c.on("zoomend",this._checkDisabledLayers,this);for(var f=0;f<this._layers.length;f++)this._layers[f].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(c){return zs.prototype.addTo.call(this,c),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var c=0;c<this._layers.length;c++)this._layers[c].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(c,f){return this._addLayer(c,f),this._map?this._update():this},addOverlay:function(c,f){return this._addLayer(c,f,!0),this._map?this._update():this},removeLayer:function(c){c.off("add remove",this._onLayerChange,this);var f=this._getLayer(h(c));return f&&this._layers.splice(this._layers.indexOf(f),1),this._map?this._update():this},expand:function(){ft(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var c=this._map.getSize().y-(this._container.offsetTop+50);return c<this._section.clientHeight?(ft(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=c+"px"):an(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return an(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var c="leaflet-control-layers",f=this._container=xt("div",c),y=this.options.collapsed;f.setAttribute("aria-haspopup",!0),Ql(f),wd(f);var k=this._section=xt("section",c+"-list");y&&(this._map.on("click",this.collapse,this),lt(f,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var M=this._layersLink=xt("a",c+"-toggle",f);M.href="#",M.title="Layers",M.setAttribute("role","button"),lt(M,{keydown:function($){$.keyCode===13&&this._expandSafely()},click:function($){Nn($),this._expandSafely()}},this),y||this.expand(),this._baseLayersList=xt("div",c+"-base",k),this._separator=xt("div",c+"-separator",k),this._overlaysList=xt("div",c+"-overlays",k),f.appendChild(k)},_getLayer:function(c){for(var f=0;f<this._layers.length;f++)if(this._layers[f]&&h(this._layers[f].layer)===c)return this._layers[f]},_addLayer:function(c,f,y){this._map&&c.on("add remove",this._onLayerChange,this),this._layers.push({layer:c,name:f,overlay:y}),this.options.sortLayers&&this._layers.sort(l(function(k,M){return this.options.sortFunction(k.layer,M.layer,k.name,M.name)},this)),this.options.autoZIndex&&c.setZIndex&&(this._lastZIndex++,c.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;pd(this._baseLayersList),pd(this._overlaysList),this._layerControlInputs=[];var c,f,y,k,M=0;for(y=0;y<this._layers.length;y++)k=this._layers[y],this._addItem(k),f=f||k.overlay,c=c||!k.overlay,M+=k.overlay?0:1;return this.options.hideSingleBase&&(c=c&&M>1,this._baseLayersList.style.display=c?"":"none"),this._separator.style.display=f&&c?"":"none",this},_onLayerChange:function(c){this._handlingClick||this._update();var f=this._getLayer(h(c.target)),y=f.overlay?c.type==="add"?"overlayadd":"overlayremove":c.type==="add"?"baselayerchange":null;y&&this._map.fire(y,f)},_createRadioElement:function(c,f){var y='<input type="radio" class="leaflet-control-layers-selector" name="'+c+'"'+(f?' checked="checked"':"")+"/>",k=document.createElement("div");return k.innerHTML=y,k.firstChild},_addItem:function(c){var f=document.createElement("label"),y=this._map.hasLayer(c.layer),k;c.overlay?(k=document.createElement("input"),k.type="checkbox",k.className="leaflet-control-layers-selector",k.defaultChecked=y):k=this._createRadioElement("leaflet-base-layers_"+h(this),y),this._layerControlInputs.push(k),k.layerId=h(c.layer),lt(k,"click",this._onInputClick,this);var M=document.createElement("span");M.innerHTML=" "+c.name;var $=document.createElement("span");f.appendChild($),$.appendChild(k),$.appendChild(M);var X=c.overlay?this._overlaysList:this._baseLayersList;return X.appendChild(f),this._checkDisabledLayers(),f},_onInputClick:function(){if(!this._preventClick){var c=this._layerControlInputs,f,y,k=[],M=[];this._handlingClick=!0;for(var $=c.length-1;$>=0;$--)f=c[$],y=this._getLayer(f.layerId).layer,f.checked?k.push(y):f.checked||M.push(y);for($=0;$<M.length;$++)this._map.hasLayer(M[$])&&this._map.removeLayer(M[$]);for($=0;$<k.length;$++)this._map.hasLayer(k[$])||this._map.addLayer(k[$]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var c=this._layerControlInputs,f,y,k=this._map.getZoom(),M=c.length-1;M>=0;M--)f=c[M],y=this._getLayer(f.layerId).layer,f.disabled=y.options.minZoom!==void 0&&k<y.options.minZoom||y.options.maxZoom!==void 0&&k>y.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var c=this._section;this._preventClick=!0,lt(c,"click",Nn),this.expand();var f=this;setTimeout(function(){Jt(c,"click",Nn),f._preventClick=!1})}}),jd=function(c,f,y){return new Ch(c,f,y)},Ro=zs.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(c){var f="leaflet-control-zoom",y=xt("div",f+" leaflet-bar"),k=this.options;return this._zoomInButton=this._createButton(k.zoomInText,k.zoomInTitle,f+"-in",y,this._zoomIn),this._zoomOutButton=this._createButton(k.zoomOutText,k.zoomOutTitle,f+"-out",y,this._zoomOut),this._updateDisabled(),c.on("zoomend zoomlevelschange",this._updateDisabled,this),y},onRemove:function(c){c.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(c){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(c.shiftKey?3:1))},_zoomOut:function(c){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(c.shiftKey?3:1))},_createButton:function(c,f,y,k,M){var $=xt("a",y,k);return $.innerHTML=c,$.href="#",$.title=f,$.setAttribute("role","button"),$.setAttribute("aria-label",f),Ql($),lt($,"click",br),lt($,"click",M,this),lt($,"click",this._refocusOnMap,this),$},_updateDisabled:function(){var c=this._map,f="leaflet-disabled";an(this._zoomInButton,f),an(this._zoomOutButton,f),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||c._zoom===c.getMinZoom())&&(ft(this._zoomOutButton,f),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||c._zoom===c.getMaxZoom())&&(ft(this._zoomInButton,f),this._zoomInButton.setAttribute("aria-disabled","true"))}});Tt.mergeOptions({zoomControl:!0}),Tt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ro,this.addControl(this.zoomControl))});var lp=function(c){return new Ro(c)},Ss=zs.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(c){var f="leaflet-control-scale",y=xt("div",f),k=this.options;return this._addScales(k,f+"-line",y),c.on(k.updateWhenIdle?"moveend":"move",this._update,this),c.whenReady(this._update,this),y},onRemove:function(c){c.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(c,f,y){c.metric&&(this._mScale=xt("div",f,y)),c.imperial&&(this._iScale=xt("div",f,y))},_update:function(){var c=this._map,f=c.getSize().y/2,y=c.distance(c.containerPointToLatLng([0,f]),c.containerPointToLatLng([this.options.maxWidth,f]));this._updateScales(y)},_updateScales:function(c){this.options.metric&&c&&this._updateMetric(c),this.options.imperial&&c&&this._updateImperial(c)},_updateMetric:function(c){var f=this._getRoundNum(c),y=f<1e3?f+" m":f/1e3+" km";this._updateScale(this._mScale,y,f/c)},_updateImperial:function(c){var f=c*3.2808399,y,k,M;f>5280?(y=f/5280,k=this._getRoundNum(y),this._updateScale(this._iScale,k+" mi",k/y)):(M=this._getRoundNum(f),this._updateScale(this._iScale,M+" ft",M/f))},_updateScale:function(c,f,y){c.style.width=Math.round(this.options.maxWidth*y)+"px",c.innerHTML=f},_getRoundNum:function(c){var f=Math.pow(10,(Math.floor(c)+"").length-1),y=c/f;return y=y>=10?10:y>=5?5:y>=3?3:y>=2?2:1,f*y}}),Oo=function(c){return new Ss(c)},Ph='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',La=zs.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ze.inlineSvg?Ph+" ":"")+"Leaflet</a>"},initialize:function(c){S(this,c),this._attributions={}}
801,onAdd:function(c){c.attributionControl=this,this._container=xt("div","leaflet-control-attribution"),Ql(this._container);for(var f in c._layers)c._layers[f].getAttribution&&this.addAttribution(c._layers[f].getAttribution());return this._update(),c.on("layeradd",this._addAttribution,this),this._container},onRemove:function(c){c.off("layeradd",this._addAttribution,this)},_addAttribution:function(c){c.layer.getAttribution&&(this.addAttribution(c.layer.getAttribution()),c.layer.once("remove",function(){this.removeAttribution(c.layer.getAttribution())},this))},setPrefix:function(c){return this.options.prefix=c,this._update(),this},addAttribution:function(c){return c?(this._attributions[c]||(this._attributions[c]=0),this._attributions[c]++,this._update(),this):this},removeAttribution:function(c){return c?(this._attributions[c]&&(this._attributions[c]--,this._update()),this):this},_update:function(){if(this._map){var c=[];for(var f in this._attributions)this._attributions[f]&&c.push(f);var y=[];this.options.prefix&&y.push(this.options.prefix),c.length&&y.push(c.join(", ")),this._container.innerHTML=y.join(' <span aria-hidden="true">|</span> ')}}});Tt.mergeOptions({attributionControl:!0}),Tt.addInitHook(function(){this.options.attributionControl&&new La().addTo(this)});var gv=function(c){return new La(c)};zs.Layers=Ch,zs.Zoom=Ro,zs.Scale=Ss,zs.Attribution=La,Qi.layers=jd,Qi.zoom=lp,Qi.scale=Oo,Qi.attribution=gv;var nr=q.extend({initialize:function(c){this._map=c},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});nr.addTo=function(c,f){return c.addHandler(f,this),this};var Th={Events:he},Do=Ze.touch?"touchstart mousedown":"mousedown",wr=be.extend({options:{clickTolerance:3},initialize:function(c,f,y,k){S(this,k),this._element=c,this._dragStartTarget=f||c,this._preventOutline=y},enable:function(){this._enabled||(lt(this._dragStartTarget,Do,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(wr._dragging===this&&this.finishDrag(!0),Jt(this._dragStartTarget,Do,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(c){if(this._enabled&&(this._moved=!1,!To(this._element,"leaflet-zoom-anim"))){if(c.touches&&c.touches.length!==1){wr._dragging===this&&this.finishDrag();return}if(!(wr._dragging||c.shiftKey||c.which!==1&&c.button!==1&&!c.touches)&&(wr._dragging=this,this._preventOutline&&Mo(this._element),vd(),Ot(),!this._moving)){this.fire("down");var f=c.touches?c.touches[0]:c,y=vi(this._element);this._startPoint=new W(f.clientX,f.clientY),this._startPos=xi(this._element),this._parentScale=Lr(y);var k=c.type==="mousedown";lt(document,k?"mousemove":"touchmove",this._onMove,this),lt(document,k?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(c){if(this._enabled){if(c.touches&&c.touches.length>1){this._moved=!0;return}var f=c.touches&&c.touches.length===1?c.touches[0]:c,y=new W(f.clientX,f.clientY)._subtract(this._startPoint);!y.x&&!y.y||Math.abs(y.x)+Math.abs(y.y)<this.options.clickTolerance||(y.x/=this._parentScale.x,y.y/=this._parentScale.y,Nn(c),this._moved||(this.fire("dragstart"),this._moved=!0,ft(document.body,"leaflet-dragging"),this._lastTarget=c.target||c.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ft(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(y),this._moving=!0,this._lastEvent=c,this._updatePosition())}},_updatePosition:function(){var c={originalEvent:this._lastEvent};this.fire("predrag",c),An(this._element,this._newPos),this.fire("drag",c)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(c){an(document.body,"leaflet-dragging"),this._lastTarget&&(an(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Jt(document,"mousemove touchmove",this._onMove,this),Jt(document,"mouseup touchend touchcancel",this._onUp,this),yd(),Ao();var f=this._moved&&this._moving;this._moving=!1,wr._dragging=!1,f&&this.fire("dragend",{noInertia:c,distance:this._newPos.distanceTo(this._startPos)})}});function Eh(c,f,y){var k,M=[1,4,2,8],$,X,de,xe,je,Ie,rt,yt;for($=0,Ie=c.length;$<Ie;$++)c[$]._code=Fa(c[$],f);for(de=0;de<4;de++){for(rt=M[de],k=[],$=0,Ie=c.length,X=Ie-1;$<Ie;X=$++)xe=c[$],je=c[X],xe._code&rt?je._code&rt||(yt=kd(je,xe,rt,f,y),yt._code=Fa(yt,f),k.push(yt)):(je._code&rt&&(yt=kd(je,xe,rt,f,y),yt._code=Fa(yt,f),k.push(yt)),k.push(xe));c=k}return c}function cp(c,f){var y,k,M,$,X,de,xe,je,Ie;if(!c||c.length===0)throw new Error("latlngs not passed");sr(c)||(console.warn("latlngs are not flat! Only the first ring will be used"),c=c[0]);var rt=me([0,0]),yt=le(c),Qn=yt.getNorthWest().distanceTo(yt.getSouthWest
801())*yt.getNorthEast().distanceTo(yt.getNorthWest());Qn<1700&&(rt=Ah(c));var Hn=c.length,Us=[];for(y=0;y<Hn;y++){var ks=me(c[y]);Us.push(f.project(me([ks.lat-rt.lat,ks.lng-rt.lng])))}for(de=xe=je=0,y=0,k=Hn-1;y<Hn;k=y++)M=Us[y],$=Us[k],X=M.y*$.x-$.y*M.x,xe+=(M.x+$.x)*X,je+=(M.y+$.y)*X,de+=X*3;de===0?Ie=Us[0]:Ie=[xe/de,je/de];var Ho=f.unproject(D(Ie));return me([Ho.lat+rt.lat,Ho.lng+rt.lng])}function Ah(c){for(var f=0,y=0,k=0,M=0;M<c.length;M++){var $=me(c[M]);f+=$.lat,y+=$.lng,k++}return me([f/k,y/k])}var xv={__proto__:null,clipPolygon:Eh,polygonCenter:cp,centroid:Ah};function Sd(c,f){if(!f||!c.length)return c.slice();var y=f*f;return c=bv(c,y),c=yv(c,y),c}function dp(c,f,y){return Math.sqrt(Ba(c,f,y,!0))}function vv(c,f,y){return Ba(c,f,y)}function yv(c,f){var y=c.length,k=typeof Uint8Array<"u"?Uint8Array:Array,M=new k(y);M[0]=M[y-1]=1,Mh(c,M,f,0,y-1);var $,X=[];for($=0;$<y;$++)M[$]&&X.push(c[$]);return X}function Mh(c,f,y,k,M){var $=0,X,de,xe;for(de=k+1;de<=M-1;de++)xe=Ba(c[de],c[k],c[M],!0),xe>$&&(X=de,$=xe);$>y&&(f[X]=1,Mh(c,f,y,k,X),Mh(c,f,y,X,M))}function bv(c,f){for(var y=[c[0]],k=1,M=0,$=c.length;k<$;k++)wv(c[k],c[M])>f&&(y.push(c[k]),M=k);return M<$-1&&y.push(c[$-1]),y}var Rh;function up(c,f,y,k,M){var $=k?Rh:Fa(c,y),X=Fa(f,y),de,xe,je;for(Rh=X;;){if(!($|X))return[c,f];if($&X)return!1;de=$||X,xe=kd(c,f,de,y,M),je=Fa(xe,y),de===$?(c=xe,$=je):(f=xe,X=je)}}function kd(c,f,y,k,M){var $=f.x-c.x,X=f.y-c.y,de=k.min,xe=k.max,je,Ie;return y&8?(je=c.x+$*(xe.y-c.y)/X,Ie=xe.y):y&4?(je=c.x+$*(de.y-c.y)/X,Ie=de.y):y&2?(je=xe.x,Ie=c.y+X*(xe.x-c.x)/$):y&1&&(je=de.x,Ie=c.y+X*(de.x-c.x)/$),new W(je,Ie,M)}function Fa(c,f){var y=0;return c.x<f.min.x?y|=1:c.x>f.max.x&&(y|=2),c.y<f.min.y?y|=4:c.y>f.max.y&&(y|=8),y}function wv(c,f){var y=f.x-c.x,k=f.y-c.y;return y*y+k*k}function Ba(c,f,y,k){var M=f.x,$=f.y,X=y.x-M,de=y.y-$,xe=X*X+de*de,je;return xe>0&&(je=((c.x-M)*X+(c.y-$)*de)/xe,je>1?(M=y.x,$=y.y):je>0&&(M+=X*je,$+=de*je)),X=c.x-M,de=c.y-$,k?X*X+de*de:new W(M,$)}function sr(c){return!R(c[0])||typeof c[0][0]!="object"&&typeof c[0][0]<"u"}function hp(c){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),sr(c)}function fp(c,f){var y,k,M,$,X,de,xe,je;if(!c||c.length===0)throw new Error("latlngs not passed");sr(c)||(console.warn("latlngs are not flat! Only the first ring will be used"),c=c[0]);var Ie=me([0,0]),rt=le(c),yt=rt.getNorthWest().distanceTo(rt.getSouthWest
801())*rt.getNorthEast().distanceTo(rt.getNorthWest());yt<1700&&(Ie=Ah(c));var Qn=c.length,Hn=[];for(y=0;y<Qn;y++){var Us=me(c[y]);Hn.push(f.project(me([Us.lat-Ie.lat,Us.lng-Ie.lng])))}for(y=0,k=0;y<Qn-1;y++)k+=Hn[y].distanceTo(Hn[y+1])/2;if(k===0)je=Hn[0];else for(y=0,$=0;y<Qn-1;y++)if(X=Hn[y],de=Hn[y+1],M=X.distanceTo(de),$+=M,$>k){xe=($-k)/M,je=[de.x-xe*(de.x-X.x),de.y-xe*(de.y-X.y)];break}var ks=f.unproject(D(je));return me([ks.lat+Ie.lat,ks.lng+Ie.lng])}var mp={__proto__:null,simplify:Sd,pointToSegmentDistance:dp,closestPointOnSegment:vv,clipSegment:up,_getEdgeIntersection:kd,_getBitCode:Fa,_sqClosestPointOnSegment:Ba,isFlat:sr,_flat:hp,polylineCenter:fp},Oh={project:function(c){return new W(c.lng,c.lat)},unproject:function(c){return new fe(c.y,c.x)},bounds:new O([-180,-90],[180,90])},Dh={R:6378137,R_MINOR:6356752314245179e-9,bounds:new O([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(c){var f=Math.PI/180,y=this.R,k=c.lat*f,M=this.R_MINOR/y,$=Math.sqrt(1-M*M),X=$*Math.sin(k),de=Math.tan(Math.PI/4-k/2)/Math.pow((1-X)/(1+X),$/2);return k=-y*Math.log(Math.max(de,1e-10)),new W(c.lng*f*y,k)},unproject:function(c){for(var f=180/Math.PI,y=this.R,k=this.R_MINOR/y,M=Math.sqrt(1-k*k),$=Math.exp(-c.y/y),X=Math.PI/2-2*Math.atan($),de=0,xe=.1,je;de<15&&Math.abs(xe)>1e-7;de++)je=M*Math.sin(X),je=Math.pow((1-je)/(1+je),M/2),xe=Math.PI/2-2*Math.atan($*je)-X,X+=xe;return new fe(X*f,c.x*f/y)}},_v={__proto__:null,LonLat:Oh,Mercator:Dh,SphericalMercator:Ce},Nv=i({},Q,{code:"EPSG:3395",projection:Dh,transformation:(function(){var c=.5/(Math.PI*Dh.R);return Te(c,.5,-c,.5)})()}),pp=i({},Q,{code:"EPSG:4326",projection:Oh,transformation:Te(1/180,1,-1/180,.5)}),jv=i({},oe,{projection:Oh,transformation:Te(1,0,-1,0),scale:function(c){return Math.pow(2,c)},zoom:function(c){return Math.log(c)/Math.LN2},distance:function(c,f){var y=f.lng-c.lng,k=f.lat-c.lat;return Math.sqrt(y*y+k*k)},infinite:!0});oe.Earth=Q,oe.EPSG3395=Nv,oe.EPSG3857=We,oe.EPSG900913=$e,oe.EPSG4326=pp,oe.Simple=jv;var _r=be.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(c){return c.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(c){return c&&c.removeLayer(this),this},getPane:function(c){return this._map.getPane(c?this.options[c]||c:this.options.pane)},addInteractiveTarget:function(c){return this._map._targets[h(c)]=this,this},removeInteractiveTarget:function(c){return delete this._map._targets[h(c)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(c){var f=c.target;if(f.hasLayer(this)){if(this._map=f,this._zoomAnimated=f._zoomAnimated,this.getEvents){var y=this.getEvents();f.on(y,this),this.once("remove",function(){f.off(y,this)},this)}this.onAdd(f),this.fire("add"),f.fire("layeradd",{layer:this})}}});Tt.include({addLayer:function(c){if(!c._layerAdd)throw new Error("The provided object is not a Layer.");var f=h(c);return this._layers[f]?this:(this._layers[f]=c,c._mapToAdd=this,c.beforeAdd&&c.beforeAdd(this),this.whenReady(c._layerAdd,c),this)},removeLayer:function(c){var f=h(c);return this._layers[f]?(this._loaded&&c.onRemove(this),delete this._layers[f],this._loaded&&(this.fire("layerremove",{layer:c}),c.fire("remove")),c._map=c._mapToAdd=null,this):this},hasLayer:function(c){return h(c)in this._layers},eachLayer:function(c,f){for(var y in this._layers)c.call(f,this._layers[y]);return this},_addLayers:function(c){c=c?R(c)?c:[c]:[];for(var f=0,y=c.length;f<y;f++)this.addLayer(c[f])},_addZoomLimit:function(c){(!isNaN(c.options.maxZoom)||!isNaN(c.options.minZoom))&&(this._zoomBoundLayers[h(c)]=c,this._updateZoomLevels())},_removeZoomLimit:function(c){var f=h(c);this._zoomBoundLayers[f]&&(delete this._zoomBoundLayers[f],this._updateZoomLevels())},_updateZoomLevels:function(){var c=1/0,f=-1/0,y=this._getZoomSpan();for(var k in this._zoomBoundLayers){var M=this._zoomBoundLayers[k].options;c=M.minZoom===void 0?c:Math.min(c,M.minZoom),f=M.maxZoom===void 0?f:Math.max(f,M.maxZoom)}this._layersMaxZoom=f===-1/0?void 0:f,this._layersMinZoom=c===1/0?void 0:c,y!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZo
vendor: 13,968 bytes, line 801
801om&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Xi=_r.extend({initialize:function(c,f){S(this,f),this._layers={};var y,k;if(c)for(y=0,k=c.length;y<k;y++)this.addLayer(c[y])},addLayer:function(c){var f=this.getLayerId(c);return this._layers[f]=c,this._map&&this._map.addLayer(c),this},removeLayer:function(c){var f=c in this._layers?c:this.getLayerId(c);return this._map&&this._layers[f]&&this._map.removeLayer(this._layers[f]),delete this._layers[f],this},hasLayer:function(c){var f=typeof c=="number"?c:this.getLayerId(c);return f in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(c){var f=Array.prototype.slice.call(arguments,1),y,k;for(y in this._layers)k=this._layers[y],k[c]&&k[c].apply(k,f);return this},onAdd:function(c){this.eachLayer(c.addLayer,c)},onRemove:function(c){this.eachLayer(c.removeLayer,c)},eachLayer:function(c,f){for(var y in this._layers)c.call(f,this._layers[y]);return this},getLayer:function(c){return this._layers[c]},getLayers:function(){var c=[];return this.eachLayer(c.push,c),c},setZIndex:function(c){return this.invoke("setZIndex",c)},getLayerId:function(c){return h(c)}}),ec=function(c,f){return new Xi(c,f)},yi=Xi.extend({addLayer:function(c){return this.hasLayer(c)?this:(c.addEventParent(this),Xi.prototype.addLayer.call(this,c),this.fire("layeradd",{layer:c}))},removeLayer:function(c){return this.hasLayer(c)?(c in this._layers&&(c=this._layers[c]),c.removeEventParent(this),Xi.prototype.removeLayer.call(this,c),this.fire("layerremove",{layer:c})):this},setStyle:function(c){return this.invoke("setStyle",c)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var c=new ie;for(var f in this._layers){var y=this._layers[f];c.extend(y.getBounds?y.getBounds():y.getLatLng())}return c}}),gp=function(c,f){return new yi(c,f)},za=q.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(c){S(this,c)},createIcon:function(c){return this._createIcon("icon",c)},createShadow:function(c){return this._createIcon("shadow",c)},_createIcon:function(c,f){var y=this._getIconUrl(c);if(!y){if(c==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var k=this._createImg(y,f&&f.tagName==="IMG"?f:null);return this._setIconStyles(k,c),(this.options.crossOrigin||this.options.crossOrigin==="")&&(k.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),k},_setIconStyles:function(c,f){var y=this.options,k=y[f+"Size"];typeof k=="number"&&(k=[k,k]);var M=D(k),$=D(f==="shadow"&&y.shadowAnchor||y.iconAnchor||M&&M.divideBy(2,!0));c.className="leaflet-marker-"+f+" "+(y.className||""),$&&(c.style.marginLeft=-$.x+"px",c.style.marginTop=-$.y+"px"),M&&(c.style.width=M.x+"px",c.style.height=M.y+"px")},_createImg:function(c,f){return f=f||document.createElement("img"),f.src=c,f},_getIconUrl:function(c){return Ze.retina&&this.options[c+"RetinaUrl"]||this.options[c+"Url"]}});function xp(c){return new za(c)}var Io=za.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(c){return typeof Io.imagePath!="string"&&(Io.imagePath=this._detectIconPath()),(this.options.imagePath||Io.imagePath)+za.prototype._getIconUrl.call(this,c)},_stripUrl:function(c){var f=function(y,k,M){var $=k.exec(y);return $&&$[M]};return c=f(c,/^url\((['"])?(.+)\1\)$/,2),c&&f(c,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var c=xt("div","leaflet-default-icon-path",document.body),f=Gl(c,"background-image")||Gl(c,"backgroundImage");if(document.body.removeChild(c),f=this._stripUrl(f),f)return f;var y=document.querySelector('link[href$="leaflet.css"]');return y?y.href.substring(0,y.href.length-11-1):""}}),Ih=nr.extend({initialize:function(c){this._marker=c},addHooks:function(){var c=this._marker._icon;this._draggable||(this._draggable=new wr(c,c,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ft(c,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&an(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(c){var f=this._marker,y=f._map,k=this._marker.options.autoPanSpeed,M=this._marker.options.autoPanPadding,$=xi(f._icon),X=y.getPixelBounds(),de=y.getPixelOrigin(),xe=U(X.min._subtract(de).add(M),X.max._subtract(de).subtract(M));if(!xe.contains($)){var je=D((Math.max(xe.max.x,$.x)-xe.max.x)/(X.max.x-xe.max.x)-(Math.min(xe.min.x,$.x)-xe.min.x)/(X.min.x-xe.min.x),(Math.max(xe.max.y,$.y)-xe.max.y)/(X.max.y-xe.max.y)-(Math.min(xe.min.y,$.y)-xe.min.y)/(X.min.y-xe.min.y)).multiplyBy(k);y.panBy(je,{animate:!1}),this._draggable._newPos._add(je),this._draggable._startPos._add(je),An(f._icon,this._draggable._newPos),this._onDrag(c),this._panRequest=Y(this._adjustPan.bind(this,c))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(c){this._marker.options.autoPan&&(ce(this._panRequest),this._panRequest=Y(this._adjustPan.bind(this,c)))},_onDrag:function(c){var f=this._marker,y=f._shadow,k=xi(f._icon),M=f._map.layerPointToLatLng(k);y&&An(y,k),f._latlng=M,c.latlng=M,c.oldLatLng=this._oldLatLng,f.fire("move",c).fire("drag",c)},_onDragEnd:function(c){ce(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",c)}}),bi=_r.extend({options:{icon:new Io,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(c,f){S(this,f),this._latlng=me(c)},onAdd:function(c){this._zoomAnimated=this._zoomAnimated&&c.options.markerZoomAnimation,this._zoomAnimated&&c.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(c){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&c.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(c){var f=this._latlng;return this._latlng=me(c),this.update(),this.fire("move",{oldLatLng:f,latlng:this._latlng})},setZIndexOffset:function(c){return this.options.zIndexOffset=c,this.update()},getIcon:function(){return this.options.icon},setIcon:function(c){return this.options.icon=c,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var c=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(c)}return this},_initIcon:function(){var c=this.options,f="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),y=c.icon.createIcon(this._icon),k=!1;y!==this._icon&&(this._icon&&this._removeIcon(),k=!0,c.title&&(y.title=c.title),y.tagName==="IMG"&&(y.alt=c.alt||"")),ft(y,f),c.keyboard&&(y.tabIndex="0",y.setAttribute("role","button")),this._icon=y,c.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&<(y,"focus",this._panOnFocus,this);var M=c.icon.createShadow(this._shadow),$=!1;M!==this._shadow&&(this._removeShadow(),$=!0),M&&(ft(M,f),M.alt=""),this._shadow=M,c.opacity<1&&this._updateOpacity(),k&&this.getPane().appendChild(this._icon),this._initInteraction(),M&&$&&this.getPane(c.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Jt(this._icon,"focus",this._panOnFocus,this),dn(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&dn(this._shadow),this._shadow=null},_setPos:function(c){this._icon&&An(this._icon,c),this._shadow&&An(this._shadow,c),this._zIndex=c.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(c){this._icon&&(this._icon.style.zIndex=this._zIndex+c)},_animateZoom:function(c){var f=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center).round();this._setPos(f)},_initInteraction:function(){if(this.options.interactive&&(ft(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ih)){var c=this.options.draggable;this.dragging&&(c=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ih(this),c&&this.dragging.enable()}},setOpacity:function(c){return this.options.opacity=c,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var c=this.options.opacity;this._icon&&js(this._icon,c),this._shadow&&js(this._shadow,c)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var c=this._map;if(c){var f=this.options.icon.options,y=f.iconSize?D(f.iconSize):D(0,0),k=f.iconAnchor?D(f.iconAnchor):D(0,0);c.panInside(this._latlng,{paddingTopLeft:k,paddingBottomRight:y.subtract(k)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Sv(c,f){return new bi(c,f)}var Ji=_r.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(c){this._renderer=c.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(c){return S(this,c),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&c&&Object.prototype.hasOwnProperty.call(c,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Cd=Ji.extend({options:{fill:!0,radius:10},initialize:function(c,f){S(this,f),this._latlng=me(c),this._radius=this.options.radius},setLatLng:function(c){var f=this._latlng;return this._latlng=me(c),this.redraw(),this.fire("move",{oldLatLng:f,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(c){return this.options.radius=this._radius=c,this.redraw()},getRadius:function(){return this._radius},setStyle:function(c){var f=c&&c.radius||this._radius;return Ji.prototype.setStyle.call(this,c),this.setRadius(f),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var c=this._radius,f=this._radiusY||c,y=this._clickTolerance(),k=[c+y,f+y];this._pxBounds=new O(this._point.subtract(k),this._point.add(k))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(c){return c.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function vp(c,f){return new Cd(c,f)}var Pd=Cd.extend({initialize:function(c,f,y){if(typeof f=="number"&&(f=i({},y,{radius:f})),S(this,f),this._latlng=me(c),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(c){return this._mRadius=c,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var c=[this._radius,this._radiusY||this._radius];return new ie(this._map.layerPointToLatLng(this._point.subtract(c)),this._map.layerPointToLatLng(this._point.add(c)))},setStyle:Ji.prototype.setStyle,_project:function(){var c=this._latlng.lng,f=this._latlng.lat,y=this._map,k=y.options.crs;if(k.distance===Q.distance){var M=Math.PI/180,$=this._mRadius/Q.R/M,X=y.project([f+$,c]),de=y.project([f-$,c]),xe=X.add(de).divideBy(2),je=y.unproject(xe).lat,Ie=Math.acos((Math.cos($*M)-Math.sin(f*M)*Math.sin(je*M))/(Math.cos(f*M)*Math.cos(je*M)))/M;(isNaN(Ie)||Ie===0)&&(Ie=$/Math.cos(Math.PI/180*f)),this._point=xe.subtract(y.getPixelOrigin()),this._radius=isNaN(Ie)?0:xe.x-y.project([je,c-Ie]).x,this._radiusY=xe.y-X.y}else{var rt=k.unproject(k.project(this._latlng).subtract([this._mRadius,0]));this._point=y.latLngToLayerPoint(this._latlng),this._radius=this._point.x-y.latLngToLayerPoint(rt).x}this._updateBounds()}});function tc(c,f,y){return new Pd(c,f,y)}var $s=Ji.extend({options:{smoothFactor:1,noClip:!1},initialize:function(c,f){S(this,f),this._setLatLngs(c)},getLatLngs:function(){return this._latlngs},setLatLngs:function(c){return this._setLatLngs(c),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(c){for(var f=1/0,y=null,k=Ba,M,$,X=0,de=this._parts.length;X<de;X++)for(var xe=this._parts[X],je=1,Ie=xe.length;je<Ie;je++){M=xe[je-1],$=xe[je];var rt=k(c,M,$,!0);rt<f&&(f=rt,y=k(c,M,$))}return y&&(y.distance=Math.sqrt(f)),y}
801,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return fp(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(c,f){return f=f||this._defaultShape(),c=me(c),f.push(c),this._bounds.extend(c),this.redraw()},_setLatLngs:function(c){this._bounds=new ie,this._latlngs=this._convertLatLngs(c)},_defaultShape:function(){return sr(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(c){for(var f=[],y=sr(c),k=0,M=c.length;k<M;k++)y?(f[k]=me(c[k]),this._bounds.extend(f[k])):f[k]=this._convertLatLngs(c[k]);return f},_project:function(){var c=new O;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,c),this._bounds.isValid()&&c.isValid()&&(this._rawPxBounds=c,this._updateBounds())},_updateBounds:function(){var c=this._clickTolerance(),f=new W(c,c);this._rawPxBounds&&(this._pxBounds=new O([this._rawPxBounds.min.subtract(f),this._rawPxBounds.max.add(f)]))},_projectLatlngs:function(c,f,y){var k=c[0]instanceof fe,M=c.length,$,X;if(k){for(X=[],$=0;$<M;$++)X[$]=this._map.latLngToLayerPoint(c[$]),y.extend(X[$]);f.push(X)}else for($=0;$<M;$++)this._projectLatlngs(c[$],f,y)},_clipPoints:function(){var c=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(c))){if(this.options.noClip){this._parts=this._rings;return}var f=this._parts,y,k,M,$,X,de,xe;for(y=0,M=0,$=this._rings.length;y<$;y++)for(xe=this._rings[y],k=0,X=xe.length;k<X-1;k++)de=up(xe[k],xe[k+1],c,k,!0),de&&(f[M]=f[M]||[],f[M].push(de[0]),(de[1]!==xe[k+1]||k===X-2)&&(f[M].push(de[1]),M++))}},_simplifyPoints:function(){for(var c=this._parts,f=this.options.smoothFactor,y=0,k=c.length;y<k;y++)c[y]=Sd(c[y],f)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(c,f){var y,k,M,$,X,de,xe=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(c))return!1;for(y=0,$=this._parts.length;y<$;y++)for(de=this._parts[y],k=0,X=de.length,M=X-1;k<X;M=k++)if(!(!f&&k===0)&&dp(c,de[M],de[k])<=xe)return!0;return!1}});function kv(c,f){return new $s(c,f)}$s._flat=hp;var wi=$s.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
801,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return cp(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(c){var f=$s.prototype._convertLatLngs.call(this,c),y=f.length;return y>=2&&f[0]instanceof fe&&f[0].equals(f[y-1])&&f.pop(),f},_setLatLngs:function(c){$s.prototype._setLatLngs.call(this,c),sr(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return sr(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var c=this._renderer._bounds,f=this.options.weight,y=new W(f,f);if(c=new O(c.min.subtract(y),c.max.add(y)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(c))){if(this.options.noClip){this._parts=this._rings;return}for(var k=0,M=this._rings.length,$;k<M;k++)$=Eh(this._rings[k],c,!0),$.length&&this._parts.push($)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(c){var f=!1,y,k,M,$,X,de,xe,je;if(!this._pxBounds||!this._pxBounds.contains(c))return!1;for($=0,xe=this._parts.length;$<xe;$++)for(y=this._parts[$],X=0,je=y.length,de=je-1;X<je;de=X++)k=y[X],M=y[de],k.y>c.y!=M.y>c.y&&c.x<(M.x-k.x)*(c.y-k.y)/(M.y-k.y)+k.x&&(f=!f);return f||$s.prototype._containsPoint.call(this,c,!0)}});function Cv(c,f){return new wi(c,f)}var Br=yi.extend({initialize:function(c,f){S(this,f),this._layers={},c&&this.addData(c)},addData:function(c){var f=R(c)?c:c.features,y,k,M;if(f){for(y=0,k=f.length;y<k;y++)M=f[y],(M.geometries||M.geometry||M.features||M.coordinates)&&this.addData(M);return this}var $=this.options;if($.filter&&!$.filter(c))return this;var X=Lo(c,$);return X?(X.feature=Rd(c),X.defaultOptions=X.options,this.resetStyle(X),$.onEachFeature&&$.onEachFeature(c,X),this.addLayer(X)):this},resetStyle:function(c){return c===void 0?this.eachLayer(this.resetStyle,this):(c.options=i({},c.defaultOptions),this._setLayerStyle(c,this.options.style),this)},setStyle:function(c){return this.eachLayer(function(f){this._setLayerStyle(f,c)},this)},_setLayerStyle:function(c,f){c.setStyle&&(typeof f=="function"&&(f=f(c.feature)),c.setStyle(f))}});function Lo(c,f){var y=c.type==="Feature"?c.geometry:c,k=y?y.coordinates:null,M=[],$=f&&f.pointToLayer,X=f&&f.coordsToLatLng||Ed,de,xe,je,Ie;if(!k&&!y)return null;switch(y.type){case"Point":return de=X(k),Td($,c,de,f);case"MultiPoint":for(je=0,Ie=k.length;je<Ie;je++)de=X(k[je]),M.push(Td($,c,de,f));return new yi(M);case"LineString":case"MultiLineString":return xe=nc(k,y.type==="LineString"?0:1,X),new $s(xe,f);case"Polygon":case"MultiPolygon":return xe=nc(k,y.type==="Polygon"?1:2,X),new wi(xe,f);case"GeometryCollection":for(je=0,Ie=y.geometries.length;je<Ie;je++){var rt=Lo({geometry:y.geometries[je],type:"Feature",properties:c.properties},f);rt&&M.push(rt)}return new yi(M);case"FeatureCollection":for(je=0,Ie=y.features.length;je<Ie;je++){var yt=Lo(y.features[je],f);yt&&M.push(yt)}return new yi(M);default:throw new Error("Invalid GeoJSON object.")}}function Td(c,f,y,k){return c?c(f,y):new bi(y,k&&k.markersInheritOptions&&k)}function Ed(c){return new fe(c[1],c[0],c[2])}function nc(c,f,y){for(var k=[],M=0,$=c.length,X;M<$;M++)X=f?nc(c[M],f-1,y):(y||Ed)(c[M]),k.push(X);return k}function Ad(c,f){return c=me(c),c.alt!==void 0?[v(c.lng,f),v(c.lat,f),v(c.alt,f)]:[v(c.lng,f),v(c.lat,f)]}function Md(c,f,y,k){for(var M=[],$=0,X=c.length;$<X;$++)M.push(f?Md(c[$],sr(c[$])?0:f-1,y,k):Ad(c[$],k));return!f&&y&&M.length>0&&M.push(M[0].slice()),M}function Fo(c,f){return c.feature?i({},c.feature,{geometry:f}):Rd(f)}function Rd(c){return c.type==="Feature"||c.type==="FeatureCollection"?c:{type:"Feature",properties:{},geometry:c}}var Lh={toGeoJSON:function(c){return Fo(this,{type:"Point",coordinates:Ad(this.getLatLng(),c)})}};bi.include(Lh),Pd.include(Lh),Cd.include(Lh),$s.include({toGeoJSON:function(c){var f=!sr(this._latlngs),y=Md(this._latlngs,f?1:0,!1,c);return Fo(this,{type:(f?"Multi":"")+"LineString",coordinates:y})}}),wi.include({toGeoJSON:function(c){var f=!sr(this._latlngs),y=f&&!sr(this._latlngs[0]),k=Md(this._latlngs,y?2:f?1:0,!0,c);return f||(k=[k]),Fo(this,{type:(y?"Multi":"")+"Polygon",coordinates:k})}}),Xi.include({toMultiPoint:function(c){var f=[];return this.eachLayer(function(y){f.push(y.toGeoJSON(c).geometry.coordinates)}),Fo(this,{type:"MultiPoint",coordinates:f})},toGeoJSON:function(c){var f=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(f==="MultiPoint")return this.toMultiPoint(c);var y=f==="GeometryCollection",k=[];return this.eachLayer(function(M){if(M.toGeoJSON){var $=M.toGeoJSON(c);if(y)k.push($.geometry);else{var X=Rd($);X.type==="FeatureCollection"?k.push.apply(k,X.features):k.push(X)}}}),y?Fo(this,{geometries:k,type:"GeometryCollection"}):{type:"FeatureCollection",features:k}}});function yp(c,f){return new Br(c,f)}var Nr=yp,ea=_r.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(c,f,y){this._url=c,this._bounds=le(f),S(this,y)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ft(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){dn(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(c){return this.options.opacity=c,this._image&&this._updateOpacity(),this},setStyle:function(c){return c.opacity&&this.setOpacity(c.opacity),this},bringToFront:function(){return this._map&&Po(this._image),this},bringToBack:function(){return this._map&&gi(this._image),this},setUrl:function(c){return this._url=c,this._image&&(this._image.src=c),this},setBounds:function(c){return this._bounds=le(c),this._map&&this._reset(),this},getEvents:function(){var c={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},setZIndex:function(c){return this.options.zIndex=c,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var c=this._url.tagName==="IMG",f=this._image=c?this._url:xt("img");if(ft(f,"leaflet-image-layer"),this._zoomAnimated&&ft(f,"leaflet-zoom-animated"),this.options.className&&ft(f,this.options.className),f.onselectstart=x,f.onmousemove=x,f.onload=l(this.fire,this,"load"),f.onerror=l(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(f.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),c){this._url=f.src;return}f.src=this._url,f.alt=this.options.alt},_animateZoom:function(c){var f=this._map.getZoomScale(c.zoom),y=this._map._latLngBoundsToNewLayerBounds(this._bounds,c.zoom,c.center).min;vr(this._image,y,f)},_reset:function(){var c=this._image,f=new O(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),y=f.getSize();An(c,f.min),c.style.width=y.x+"px",c.style.height=y.y+"px"},_updateOpacity:function(){js(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var c=this.options.errorOverlayUrl;c&&this._url!==c&&(this._url=c,this._image.src=c)},getCenter:function(){return this._bounds.getCenter()}}),bp=function(c,f,y){return new ea(c,f,y)},Fh=ea.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInl
vendor: 8,892 bytes, line 801
801ine:!0},_initImage:function(){var c=this._url.tagName==="VIDEO",f=this._image=c?this._url:xt("video");if(ft(f,"leaflet-image-layer"),this._zoomAnimated&&ft(f,"leaflet-zoom-animated"),this.options.className&&ft(f,this.options.className),f.onselectstart=x,f.onmousemove=x,f.onloadeddata=l(this.fire,this,"load"),c){for(var y=f.getElementsByTagName("source"),k=[],M=0;M<y.length;M++)k.push(y[M].src);this._url=y.length>0?k:[f.src];return}R(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(f.style,"objectFit")&&(f.style.objectFit="fill"),f.autoplay=!!this.options.autoplay,f.loop=!!this.options.loop,f.muted=!!this.options.muted,f.playsInline=!!this.options.playsInline;for(var $=0;$<this._url.length;$++){var X=xt("source");X.src=this._url[$],f.appendChild(X)}}});function wp(c,f,y){return new Fh(c,f,y)}var Bh=ea.extend({_initImage:function(){var c=this._image=this._url;ft(c,"leaflet-image-layer"),this._zoomAnimated&&ft(c,"leaflet-zoom-animated"),this.options.className&&ft(c,this.options.className),c.onselectstart=x,c.onmousemove=x}});function zh(c,f,y){return new Bh(c,f,y)}var zr=_r.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(c,f){c&&(c instanceof fe||R(c))?(this._latlng=me(c),S(this,f)):(S(this,c),this._source=f),this.options.content&&(this._content=this.options.content)},openOn:function(c){return c=arguments.length?c:this._source._map,c.hasLayer(this)||c.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(c){return this._map?this.close():(arguments.length?this._source=c:c=this._source,this._prepareOpen(),this.openOn(c._map)),this},onAdd:function(c){this._zoomAnimated=c._zoomAnimated,this._container||this._initLayout(),c._fadeAnimated&&js(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),c._fadeAnimated&&js(this._container,1),this.bringToFront(),this.options.interactive&&(ft(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(c){c._fadeAnimated?(js(this._container,0),this._removeTimeout=setTimeout(l(dn,void 0,this._container),200)):dn(this._container),this.options.interactive&&(an(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(c){return this._latlng=me(c),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(c){return this._content=c,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var c={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Po(this._container),this},bringToBack:function(){return this._map&&gi(this._container),this},_prepareOpen:function(c){var f=this._source;if(!f._map)return!1;if(f instanceof yi){f=null;var y=this._source._layers;for(var k in y)if(y[k]._map){f=y[k];break}if(!f)return!1;this._source=f}if(!c)if(f.getCenter)c=f.getCenter();else if(f.getLatLng)c=f.getLatLng();else if(f.getBounds)c=f.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(c),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var c=this._contentNode,f=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof f=="string")c.innerHTML=f;else{for(;c.hasChildNodes();)c.removeChild(c.firstChild);c.appendChild(f)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var c=this._map.latLngToLayerPoint(this._latlng),f=D(this.options.offset),y=this._getAnchor();this._zoomAnimated?An(this._container,c.add(y)):f=f.add(c).add(y);var k=this._containerBottom=-f.y,M=this._containerLeft=-Math.round(this._containerWidth/2)+f.x;this._container.style.bottom=k+"px",this._container.style.left=M+"px"}},_getAnchor:function(){return[0,0]}});Tt.include({_initOverlay:function(c,f,y,k){var M=f;return M instanceof c||(M=new c(k).setContent(f)),y&&M.setLatLng(y),M}}),_r.include({_initOverlay:function(c,f,y,k){var M=y;return M instanceof c?(S(M,k),M._source=this):(M=f&&!k?f:new c(k,this),M.setContent(y)),M}});var Od=zr.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(c){return c=arguments.length?c:this._source._map,!c.hasLayer(this)&&c._popup&&c._popup.options.autoClose&&c.removeLayer(c._popup),c._popup=this,zr.prototype.openOn.call(this,c)},onAdd:function(c){zr.prototype.onAdd.call(this,c),c.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Ji||this._source.on("preclick",Fr))},onRemove:function(c){zr.prototype.onRemove.call(this,c),c.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Ji||this._source.off("preclick",Fr))},getEvents:function(){var c=zr.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(c.preclick=this.close),this.options.keepInView&&(c.moveend=this._adjustPan),c},_initLayout:function(){var c="leaflet-popup",f=this._container=xt("div",c+" "+(this.options.className||"")+" leaflet-zoom-animated"),y=this._wrapper=xt("div",c+"-content-wrapper",f);if(this._contentNode=xt("div",c+"-content",y),Ql(f),wd(this._contentNode),lt(f,"contextmenu",Fr),this._tipContainer=xt("div",c+"-tip-container",f),this._tip=xt("div",c+"-tip",this._tipContainer),this.options.closeButton){var k=this._closeButton=xt("a",c+"-close-button",f);k.setAttribute("role","button"),k.setAttribute("aria-label","Close popup"),k.href="#close",k.innerHTML='<span aria-hidden="true">×</span>',lt(k,"click",function(M){Nn(M),this.close()},this)}},_updateLayout:function(){var c=this._contentNode,f=c.style;f.width="",f.whiteSpace="nowrap";var y=c.offsetWidth;y=Math.min(y,this.options.maxWidth),y=Math.max(y,this.options.minWidth),f.width=y+1+"px",f.whiteSpace="",f.height="";var k=c.offsetHeight,M=this.options.maxHeight,$="leaflet-popup-scrolled";M&&k>M?(f.height=M+"px",ft(c,$)):an(c,$),this._containerWidth=this._container.offsetWidth},_animateZoom:function(c){var f=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center),y=this._getAnchor();An(this._container,f.add(y))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var c=this._map,f=parseInt(Gl(this._container,"marginBottom"),10)||0,y=this._container.offsetHeight+f,k=this._containerWidth,M=new W(this._containerLeft,-y-this._containerBottom);M._add(xi(this._container));var $=c.layerPointToContainerPoint(M),X=D(this.options.autoPanPadding),de=D(this.options.autoPanPaddingTopLeft||X),xe=D(this.options.autoPanPaddingBottomRight||X),je=c.getSize(),Ie=0,rt=0;$.x+k+xe.x>je.x&&(Ie=$.x+k-je.x+xe.x),$.x-Ie-de.x<0&&(Ie=$.x-de.x),$.y+y+xe.y>je.y&&(rt=$.y+y-je.y+xe.y),$.y-rt-de.y<0&&(rt=$.y-de.y),(Ie||rt)&&(this.options.keepInView&&(this._autopanning=!0),c.fire("autopanstart").panBy([Ie,rt]))}},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Bo=function(c,f){return new Od(c,f)};Tt.mergeOptions({closePopupOnClick:!0}),Tt.include({openPopup:function(c,f,y){return this._initOverlay(Od,c,f,y).openOn(this),this},closePopup:function(c){return c=arguments.length?c:this._popup,c&&c.close(),this}}),_r.include({bindPopup:function(c,f){return this._popup=this._initOverlay(Od,this._popup,c,f),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(c){return this._popup&&(this instanceof yi||(this._popup._source=this),this._popup._prepareOpen(c||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1}
801,setPopupContent:function(c){return this._popup&&this._popup.setContent(c),this},getPopup:function(){return this._popup},_openPopup:function(c){if(!(!this._popup||!this._map)){br(c);var f=c.layer||c.target;if(this._popup._source===f&&!(f instanceof Ji)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(c.latlng);return}this._popup._source=f,this.openPopup(c.latlng)}},_movePopup:function(c){this._popup.setLatLng(c.latlng)},_onKeyPress:function(c){c.originalEvent.keyCode===13&&this._openPopup(c)}});var zo=zr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(c){zr.prototype.onAdd.call(this,c),this.setOpacity(this.options.opacity),c.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(c){zr.prototype.onRemove.call(this,c),c.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var c=zr.prototype.getEvents.call(this);return this.options.permanent||(c.preclick=this.close),c},_initLayout:function(){var c="leaflet-tooltip",f=c+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=xt("div",f),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(c){var f,y,k=this._map,M=this._container,$=k.latLngToContainerPoint(k.getCenter()),X=k.layerPointToContainerPoint(c),de=this.options.direction,xe=M.offsetWidth,je=M.offsetHeight,Ie=D(this.options.offset),rt=this._getAnchor();de==="top"?(f=xe/2,y=je):de==="bottom"?(f=xe/2,y=0):de==="center"?(f=xe/2,y=je/2):de==="right"?(f=0,y=je/2):de==="left"?(f=xe,y=je/2):X.x<$.x?(de="right",f=0,y=je/2):(de="left",f=xe+(Ie.x+rt.x)*2,y=je/2),c=c.subtract(D(f,y,!0)).add(Ie).add(rt),an(M,"leaflet-tooltip-right"),an(M,"leaflet-tooltip-left"),an(M,"leaflet-tooltip-top"),an(M,"leaflet-tooltip-bottom"),ft(M,"leaflet-tooltip-"+de),An(M,c)},_updatePosition:function(){var c=this._map.latLngToLayerPoint(this._latlng);this._setPosition(c)},setOpacity:function(c){this.options.opacity=c,this._container&&js(this._container,c)},_animateZoom:function(c){var f=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center);this._setPosition(f)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),sc=function(c,f){return new zo(c,f)};Tt.include({openTooltip:function(c,f,y){return this._initOverlay(zo,c,f,y).openOn(this),this},closeTooltip:function(c){return c.close(),this}}),_r.include({bindTooltip:function(c,f){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(zo,this._tooltip,c,f),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(c){if(!(!c&&this._tooltipHandlersAdded)){var f=c?"off":"on",y={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?y.add=this._openTooltip:(y.mouseover=this._openTooltip,y.mouseout=this.closeTooltip,y.click=this._openTooltip,this._map?this._addFocusListeners():y.add=this._addFocusListeners),this._tooltip.options.sticky&&(y.mousemove=this._moveTooltip),this[f](y),this._tooltipHandlersAdded=!c}},openTooltip:function(c){return this._tooltip&&(this instanceof yi||(this._tooltip._source=this),this._tooltip._prepareOpen(c)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(c){return this._tooltip&&this._tooltip.setContent(c),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(c){var f=typeof c.getElement=="function"&&c.getElement();f&&(lt(f,"focus",function(){this._tooltip._source=c,this.openTooltip()},this),lt(f,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(c){var f=typeof c.getElement=="function"&&c.getElement();f&&f.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(c){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var f=this;this._map.once("moveend",function(){f._openOnceFlag=!1,f._openTooltip(c)});return}this._tooltip._source=c.layer||c.target,this.openTooltip(this._tooltip.options.sticky?c.latlng:void 0)}},_moveTooltip:function(c){var f=c.latlng,y,k;this._tooltip.options.sticky&&c.originalEvent&&(y=this._map.mouseEventToContainerPoint(c.originalEvent),k=this._map.containerPointToLayerPoint(y),f=this._map.layerPointToLatLng(k)),this._tooltip.setLatLng(f)}});var Dd=za.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(c){var f=c&&c.tagName==="DIV"?c:document.createElement("div"),y=this.options;if(y.html instanceof Element?(pd(f),f.appendChild(y.html)):f.innerHTML=y.html!==!1?y.html:"",y.bgPos){var k=D(y.bgPos);f.style.backgroundPosition=-k.x+"px "+-k.y+"px"}return this._setIconStyles(f,"icon"),f},createShadow:function(){return null}});function _p(c){return new Dd(c)}za.Default=Io;var ta=_r.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ze.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(c){S(this,c)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()}
801,beforeAdd:function(c){c._addZoomLimit(this)},onRemove:function(c){this._removeAllTiles(),dn(this._container),c._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Po(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(gi(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(c){return this.options.opacity=c,this._updateOpacity(),this},setZIndex:function(c){return this.options.zIndex=c,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var c=this._clampZoom(this._map.getZoom());c!==this._tileZoom&&(this._tileZoom=c,this._updateLevels()),this._update()}return this},getEvents:function(){var c={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=m(this._onMoveEnd,this.options.updateInterval,this)),c.move=this._onMove),this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},createTile:function(){return document.createElement("div")},getTileSize:function(){var c=this.options.tileSize;return c instanceof W?c:new W(c,c)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(c){for(var f=this.getPane().children,y=-c(-1/0,1/0),k=0,M=f.length,$;k<M;k++)$=f[k].style.zIndex,f[k]!==this._container&&$&&(y=c(y,+$));isFinite(y)&&(this.options.zIndex=y+c(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ze.ielt9){js(this._container,this.options.opacity);var c=+new Date,f=!1,y=!1;for(var k in this._tiles){var M=this._tiles[k];if(!(!M.current||!M.loaded)){var $=Math.min(1,(c-M.loaded)/200);js(M.el,$),$<1?f=!0:(M.active?y=!0:this._onOpaqueTile(M),M.active=!0)}}y&&!this._noPrune&&this._pruneTiles(),f&&(ce(this._fadeFrame),this._fadeFrame=Y(this._updateOpacity,this))}},_onOpaqueTile:x,_initContainer:function(){this._container||(this._container=xt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var c=this._tileZoom,f=this.options.maxZoom;if(c!==void 0){for(var y in this._levels)y=Number(y),this._levels[y].el.children.length||y===c?(this._levels[y].el.style.zIndex=f-Math.abs(c-y),this._onUpdateLevel(y)):(dn(this._levels[y].el),this._removeTilesAtZoom(y),this._onRemoveLevel(y),delete this._levels[y]);var k=this._levels[c],M=this._map;return k||(k=this._levels[c]={},k.el=xt("div","leaflet-tile-container leaflet-zoom-animated",this._container),k.el.style.zIndex=f,k.origin=M.project(M.unproject(M.getPixelOrigin()),c).round(),k.zoom=c,this._setZoomTransform(k,M.getCenter(),M.getZoom()),x(k.el.offsetWidth),this._onCreateLevel(k)),this._level=k,k}},_onUpdateLevel:x,_onRemoveLevel:x,_onCreateLevel:x,_pruneTiles:function(){if(this._map){var c,f,y=this._map.getZoom();if(y>this.options.maxZoom||y<this.options.minZoom){this._removeAllTiles();return}for(c in this._tiles)f=this._tiles[c],f.retain=f.current;for(c in this._tiles)if(f=this._tiles[c],f.current&&!f.active){var k=f.coords;this._retainParent(k.x,k.y,k.z,k.z-5)||this._retainChildren(k.x,k.y,k.z,k.z+2)}for(c in this._tiles)this._tiles[c].retain||this._removeTile(c)}},_removeTilesAtZoom:function(c){for(var f in this._tiles)this._tiles[f].coords.z===c&&this._removeTile(f)},_removeAllTiles:function(){for(var c in this._tiles)this._removeTile(c)},_invalidateAll:function(){for(var c in this._levels)dn(this._levels[c].el),this._onRemoveLevel(Number(c)),delete this._levels[c];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(c,f,y,k){var M=Math.floor(c/2),$=Math.floor(f/2),X=y-1,de=new W(+M,+$);de.z=+X;var xe=this._tileCoordsToKey(de),je=this._tiles[xe];return je&&je.active?(je.retain=!0,!0):(je&&je.loaded&&(je.retain=!0),X>k?this._retainParent(M,$,X,k):!1)},_retainChildren:function(c,f,y,k){for(var M=2*c;M<2*c+2;M++)for(var $=2*f;$<2*f+2;$++){var X=new W(M,$);X.z=y+1;var de=this._tileCoordsToKey(X),xe=this._tiles[de];if(xe&&xe.active){xe.retain=!0;continue}else xe&&xe.loaded&&(xe.retain=!0);y+1<k&&this._retainChildren(M,$,y+1,k)}},_resetView:function(c){var f=c&&(c.pinch||c.flyTo);
vendor: 10,455 bytes, line 801
801this._setView(this._map.getCenter(),this._map.getZoom(),f,f)},_animateZoom:function(c){this._setView(c.center,c.zoom,!0,c.noUpdate)},_clampZoom:function(c){var f=this.options;return f.minNativeZoom!==void 0&&c<f.minNativeZoom?f.minNativeZoom:f.maxNativeZoom!==void 0&&f.maxNativeZoom<c?f.maxNativeZoom:c},_setView:function(c,f,y,k){var M=Math.round(f);this.options.maxZoom!==void 0&&M>this.options.maxZoom||this.options.minZoom!==void 0&&M<this.options.minZoom?M=void 0:M=this._clampZoom(M);var $=this.options.updateWhenZooming&&M!==this._tileZoom;(!k||$)&&(this._tileZoom=M,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),M!==void 0&&this._update(c),y||this._pruneTiles(),this._noPrune=!!y),this._setZoomTransforms(c,f)},_setZoomTransforms:function(c,f){for(var y in this._levels)this._setZoomTransform(this._levels[y],c,f)},_setZoomTransform:function(c,f,y){var k=this._map.getZoomScale(y,c.zoom),M=c.origin.multiplyBy(k).subtract(this._map._getNewPixelOrigin(f,y)).round();Ze.any3d?vr(c.el,M,k):An(c.el,M)},_resetGrid:function(){var c=this._map,f=c.options.crs,y=this._tileSize=this.getTileSize(),k=this._tileZoom,M=this._map.getPixelWorldBounds(this._tileZoom);M&&(this._globalTileRange=this._pxBoundsToTileRange(M)),this._wrapX=f.wrapLng&&!this.options.noWrap&&[Math.floor(c.project([0,f.wrapLng[0]],k).x/y.x),Math.ceil(c.project([0,f.wrapLng[1]],k).x/y.y)],this._wrapY=f.wrapLat&&!this.options.noWrap&&[Math.floor(c.project([f.wrapLat[0],0],k).y/y.x),Math.ceil(c.project([f.wrapLat[1],0],k).y/y.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(c){var f=this._map,y=f._animatingZoom?Math.max(f._animateToZoom,f.getZoom()):f.getZoom(),k=f.getZoomScale(y,this._tileZoom),M=f.project(c,this._tileZoom).floor(),$=f.getSize().divideBy(k*2);return new O(M.subtract($),M.add($))},_update:function(c){var f=this._map;if(f){var y=this._clampZoom(f.getZoom());if(c===void 0&&(c=f.getCenter()),this._tileZoom!==void 0){var k=this._getTiledPixelBounds(c),M=this._pxBoundsToTileRange(k),$=M.getCenter(),X=[],de=this.options.keepBuffer,xe=new O(M.getBottomLeft().subtract([de,-de]),M.getTopRight().add([de,-de]));if(!(isFinite(M.min.x)&&isFinite(M.min.y)&&isFinite(M.max.x)&&isFinite(M.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var je in this._tiles){var Ie=this._tiles[je].coords;(Ie.z!==this._tileZoom||!xe.contains(new W(Ie.x,Ie.y)))&&(this._tiles[je].current=!1)}if(Math.abs(y-this._tileZoom)>1){this._setView(c,y);return}for(var rt=M.min.y;rt<=M.max.y;rt++)for(var yt=M.min.x;yt<=M.max.x;yt++){var Qn=new W(yt,rt);if(Qn.z=this._tileZoom,!!this._isValidTile(Qn)){var Hn=this._tiles[this._tileCoordsToKey(Qn)];Hn?Hn.current=!0:X.push(Qn)}}if(X.sort(function(ks,Ho){return ks.distanceTo($)-Ho.distanceTo($)}),X.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Us=document.createDocumentFragment();for(yt=0;yt<X.length;yt++)this._addTile(X[yt],Us);this._level.el.appendChild(Us)}}}},_isValidTile:function(c){var f=this._map.options.crs;if(!f.infinite){var y=this._globalTileRange;if(!f.wrapLng&&(c.x<y.min.x||c.x>y.max.x)||!f.wrapLat&&(c.y<y.min.y||c.y>y.max.y))return!1}if(!this.options.bounds)return!0;var k=this._tileCoordsToBounds(c);return le(this.options.bounds).overlaps(k)},_keyToBounds:function(c){return this._tileCoordsToBounds(this._keyToTileCoords(c))},_tileCoordsToNwSe:function(c){var f=this._map,y=this.getTileSize(),k=c.scaleBy(y),M=k.add(y),$=f.unproject(k,c.z),X=f.unproject(M,c.z);return[$,X]},_tileCoordsToBounds:function(c){var f=this._tileCoordsToNwSe(c),y=new ie(f[0],f[1]);return this.options.noWrap||(y=this._map.wrapLatLngBounds(y)),y},_tileCoordsToKey:function(c){return c.x+":"+c.y+":"+c.z},_keyToTileCoords:function(c){var f=c.split(":"),y=new W(+f[0],+f[1]);return y.z=+f[2],y},_removeTile:function(c){var f=this._tiles[c];f&&(dn(f.el),delete this._tiles[c],this.fire("tileunload",{tile:f.el,coords:this._keyToTileCoords(c)}))},_initTile:function(c){ft(c,"leaflet-tile");var f=this.getTileSize();c.style.width=f.x+"px",c.style.height=f.y+"px",c.onselectstart=x,c.onmousemove=x,Ze.ielt9&&this.options.opacity<1&&js(c,this.options.opacity)},_addTile:function(c,f){var y=this._getTilePos(c),k=this._tileCoordsToKey(c),M=this.createTile(this._wrapCoords(c),l(this._tileReady,this,c));this._initTile(M),this.createTile.length<2&&Y(l(this._tileReady,this,c,null,M)),An(M,y),this._tiles[k]={el:M,coords:c,current:!0},f.appendChild(M),this.fire("tileloadstart",{tile:M,coords:c})},_tileReady:function(c,f,y){f&&this.fire("tileerror",{error:f,tile:y,coords:c});var k=this._tileCoordsToKey(c);y=this._tiles[k],y&&(y.loaded=+new Date,this._map._fadeAnimated?(js(y.el,0),ce(this._fadeFrame),this._fadeFrame=Y(this._updateOpacity,this)):(y.active=!0,this._pruneTiles()),f||(ft(y.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:y.el,coords:c})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ze.ielt9||!this._map._fadeAnimated?Y(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(c){return c.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(c){var f=new W(this._wrapX?g(c.x,this._wrapX):c.x,this._wrapY?g(c.y,this._wrapY):c.y);return f.z=c.z,f},_pxBoundsToTileRange:function(c){var f=this.getTileSize();return new O(c.min.unscaleBy(f).floor(),c.max.unscaleBy(f).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var c in this._tiles)if(!this._tiles[c].loaded)return!1;return!0}});function $o(c){return new ta(c)}var na=ta.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(c,f){this._url=c,f=S(this,f),f.detectRetina&&Ze.retina&&f.maxZoom>0?(f.tileSize=Math.floor(f.tileSize/2),f.zoomReverse?(f.zoomOffset--,f.minZoom=Math.min(f.maxZoom,f.minZoom+1)):(f.zoomOffset++,f.maxZoom=Math.max(f.minZoom,f.maxZoom-1)),f.minZoom=Math.max(0,f.minZoom)):f.zoomReverse?f.minZoom=Math.min(f.maxZoom,f.minZoom):f.maxZoom=Math.max(f.minZoom,f.maxZoom),typeof f.subdomains=="string"&&(f.subdomains=f.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(c,f){return this._url===c&&f===void 0&&(f=!0),this._url=c,f||this.redraw(),this},createTile:function(c,f){var y=document.createElement("img");return lt(y,"load",l(this._tileOnLoad,this,f,y)),lt(y,"error",l(this._tileOnError,this,f,y)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(y.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(y.referrerPolicy=this.options.referrerPolicy),y.alt="",y.src=this.getTileUrl(c),y},getTileUrl:function(c){var f={r:Ze.retina?"@2x":"",s:this._getSubdomain(c),x:c.x,y:c.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var y=this._globalTileRange.max.y-c.y;this.options.tms&&(f.y=y),f["-y"]=y}return E(this._url,i(f,this.options))},_tileOnLoad:function(c,f){Ze.ielt9?setTimeout(l(c,this,null,f),0):c(null,f)},_tileOnError:function(c,f,y){var k=this.options.errorTileUrl;k&&f.getAttribute("src")!==k&&(f.src=k),c(y,f)},_onTileRemove:function(c){c.tile.onload=null},_getZoomForUrl:function(){var c=this._tileZoom,f=this.options.maxZoom,y=this.options.zoomReverse,k=this.options.zoomOffset;return y&&(c=f-c),c+k},_getSubdomain:function(c){var f=Math.abs(c.x+c.y)%this.options.subdomains.length;return this.options.subdomains[f]},_abortLoading:function(){var c,f;for(c in this._tiles)if(this._tiles[c].coords.z!==this._tileZoom&&(f=this._tiles[c].el,f.onload=x,f.onerror=x,!f.complete)){f.src=B;var y=this._tiles[c].coords;dn(f),delete this._tiles[c],this.fire("tileabort",{tile:f,coords:y})}},_removeTile:function(c){var f=this._tiles[c];if(f)return f.el.setAttribute("src",B),ta.prototype._removeTile.call(this,c)},_tileReady:function(c,f,y){if(!(!this._map||y&&y.getAttribute("src")===B))return ta.prototype._tileReady.call(this,c,f,y)}});function $h(c,f){return new na(c,f)}var rc=na.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(c,f){this._url=c;var y=i({},this.defaultWmsParams);for(var k in f)k in this.options||(y[k]=f[k]);f=S(this,f);var M=f.detectRetina&&Ze.retina?2:1,$=this.getTileSize();y.width=$.x*M,y.height=$.y*M,this.wmsParams=y},onAdd:function(c){this._crs=this.options.crs||c.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var f=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[f]=this._crs.code,na.prototype.onAdd.call(this,c)},getTileUrl:function(c){var f=this._tileCoordsToNwSe(c),y=this._crs,k=U(y.project(f[0]),y.project(f[1])),M=k.min,$=k.max,X=(this._wmsVersion>=1.3&&this._crs===pp?[M.y,M.x,$.y,$.x]:[M.x,M.y,$.x,$.y]).join(","),de=na.prototype.getTileUrl.call(this,c);return de+j(this.wmsParams,de,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+X},setParams:function(c,f){return i(this.wmsParams,c),f||this.redraw(),this}});function Np(c,f){return new rc(c,f)}na.WMS=rc,$h.wms=Np;var $r=_r.extend({options:{padding:.1},initialize:function(c){S(this,c),h(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ft(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var c={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(c.zoomanim=this._onAnimZoom),c},_onAnimZoom:function(c){this._updateTransform(c.center,c.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(c,f){var y=this._map.getZoomScale(f,this._zoom),k=this._map.getSize().multiplyBy(.5+this.options.padding),M=this._map.project(this._center,f),$=k.multiplyBy(-y).add(M).subtract(this._map._getNewPixelOrigin(c,f));Ze.any3d?vr(this._container,$,y):An(this._container,$)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var c in this._layers)this._layers[c]._reset()},_onZoomEnd:function(){for(var c in this._layers)this._layers[c]._project()},_updatePaths:function(){for(var c in this._layers)this._layers[c]._update()}
vendor: 4,120 bytes, line 801
801,_update:function(){var c=this.options.padding,f=this._map.getSize(),y=this._map.containerPointToLayerPoint(f.multiplyBy(-c)).round();this._bounds=new O(y,y.add(f.multiplyBy(1+c*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Uh=$r.extend({options:{tolerance:0},getEvents:function(){var c=$r.prototype.getEvents.call(this);return c.viewprereset=this._onViewPreReset,c},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){$r.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var c=this._container=document.createElement("canvas");lt(c,"mousemove",this._onMouseMove,this),lt(c,"click dblclick mousedown mouseup contextmenu",this._onClick,this),lt(c,"mouseout",this._handleMouseOut,this),c._leaflet_disable_events=!0,this._ctx=c.getContext("2d")},_destroyContainer:function(){ce(this._redrawRequest),delete this._ctx,dn(this._container),Jt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var c;this._redrawBounds=null;for(var f in this._layers)c=this._layers[f],c._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){$r.prototype._update.call(this);var c=this._bounds,f=this._container,y=c.getSize(),k=Ze.retina?2:1;An(f,c.min),f.width=k*y.x,f.height=k*y.y,f.style.width=y.x+"px",f.style.height=y.y+"px",Ze.retina&&this._ctx.scale(2,2),this._ctx.translate(-c.min.x,-c.min.y),this.fire("update")}},_reset:function(){$r.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(c){this._updateDashArray(c),this._layers[h(c)]=c;var f=c._order={layer:c,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=f),this._drawLast=f,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(c){this._requestRedraw(c)},_removePath:function(c){var f=c._order,y=f.next,k=f.prev;y?y.prev=k:this._drawLast=k,k?k.next=y:this._drawFirst=y,delete c._order,delete this._layers[h(c)],this._requestRedraw(c)},_updatePath:function(c){this._extendRedrawBounds(c),c._project(),c._update(),this._requestRedraw(c)},_updateStyle:function(c){this._updateDashArray(c),this._requestRedraw(c)},_updateDashArray:function(c){if(typeof c.options.dashArray=="string"){var f=c.options.dashArray.split(/[, ]+/),y=[],k,M;for(M=0;M<f.length;M++){if(k=Number(f[M]),isNaN(k))return;y.push(k)}c.options._dashArray=y}else c.options._dashArray=c.options.dashArray},_requestRedraw:function(c){this._map&&(this._extendRedrawBounds(c),this._redrawRequest=this._redrawRequest||Y(this._redraw,this))},_extendRedrawBounds:function(c){if(c._pxBounds){var f=(c.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new O,this._redrawBounds.extend(c._pxBounds.min.subtract([f,f])),this._redrawBounds.extend(c._pxBounds.max.add([f,f]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var c=this._redrawBounds;if(c){var f=c.getSize();this._ctx.clearRect(c.min.x,c.min.y,f.x,f.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var c,f=this._redrawBounds;if(this._ctx.save(),f){var y=f.getSize();this._ctx.beginPath(),this._ctx.rect(f.min.x,f.min.y,y.x,y.y),this._ctx.clip()}this._drawing=!0;for(var k=this._drawFirst;k;k=k.next)c=k.layer,(!f||c._pxBounds&&c._pxBounds.intersects(f))&&c._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(c,f){if(this._drawing){var y,k,M,$,X=c._parts,de=X.length,xe=this._ctx;if(de){for(xe.beginPath(),y=0;y<de;y++){for(k=0,M=X[y].length;k<M;k++)$=X[y][k],xe[k?"lineTo":"moveTo"]($.x,$.y);f&&xe.closePath()}this._fillStroke(xe,c)}}},_updateCircle:function(c){if(!(!this._drawing||c._empty())){var f=c._point,y=this._ctx,k=Math.max(Math.round(c._radius),1),M=(Math.max(Math.round(c._radiusY),1)||k)/k;M!==1&&(y.save(),y.scale(1,M)),y.beginPath(),y.arc(f.x,f.y/M,k,0,Math.PI*2,!1),M!==1&&y.restore(
801),this._fillStroke(y,c)}},_fillStroke:function(c,f){var y=f.options;y.fill&&(c.globalAlpha=y.fillOpacity,c.fillStyle=y.fillColor||y.color,c.fill(y.fillRule||"evenodd")),y.stroke&&y.weight!==0&&(c.setLineDash&&c.setLineDash(f.options&&f.options._dashArray||[]),c.globalAlpha=y.opacity,c.lineWidth=y.weight,c.strokeStyle=y.color,c.lineCap=y.lineCap,c.lineJoin=y.lineJoin,c.stroke())},_onClick:function(c){for(var f=this._map.mouseEventToLayerPoint(c),y,k,M=this._drawFirst;M;M=M.next)y=M.layer,y.options.interactive&&y._containsPoint(f)&&(!(c.type==="click"||c.type==="preclick")||!this._map._draggableMoved(y))&&(k=y);this._fireEvent(k?[k]:!1,c)},_onMouseMove:function(c){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var f=this._map.mouseEventToLayerPoint(c);this._handleMouseHover(c,f)}},_handleMouseOut:function(c){var f=this._hoveredLayer;f&&(an(this._container,"leaflet-interactive"),this._fireEvent([f],c,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(c,f){if(!this._mouseHoverThrottled){for(var y,k,M=this._drawFirst;M;M=M.next)y=M.layer,y.options.interactive&&y._containsPoint(f)&&(k=y);k!==this._hoveredLayer&&(this._handleMouseOut(c),k&&(ft(this._container,"leaflet-interactive"),this._fireEvent([k],c,"mouseover"),this._hoveredLayer=k)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,c),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(c,f,y){this._map._fireDOMEvent(f,y||f.type,c)},_bringToFront:function(c){var f=c._order;if(f){var y=f.next,k=f.prev;if(y)y.prev=k;else return;k?k.next=y:y&&(this._drawFirst=y),f.prev=this._drawLast,this._drawLast.next=f,f.next=null,this._drawLast=f,this._requestRedraw(c)}},_bringToBack:function(c){var f=c._order;if(f){var y=f.next,k=f.prev;if(k)k.next=y;else return;y?y.prev=k:k&&(this._drawLast=k),f.prev=null,f.next=this._drawFirst,this._drawFirst.prev=f,this._drawFirst=f,this._requestRedraw(c)}}});function Vh(c){return Ze.canvas?new Uh(c):null}var Uo=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(c){return document.createElement("<lvml:"+c+' class="lvml">')}}catch{}return function(c){return document.createElement("<"+c+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),jp={_initContainer:function(){this._container=xt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||($r.prototype._update.call(this),this.fire("update"))},_initPath:function(c){var f=c._container=Uo("shape");
vendor: 4,290 bytes, line 801
801ft(f,"leaflet-vml-shape "+(this.options.className||"")),f.coordsize="1 1",c._path=Uo("path"),f.appendChild(c._path),this._updateStyle(c),this._layers[h(c)]=c},_addPath:function(c){var f=c._container;this._container.appendChild(f),c.options.interactive&&c.addInteractiveTarget(f)},_removePath:function(c){var f=c._container;dn(f),c.removeInteractiveTarget(f),delete this._layers[h(c)]},_updateStyle:function(c){var f=c._stroke,y=c._fill,k=c.options,M=c._container;M.stroked=!!k.stroke,M.filled=!!k.fill,k.stroke?(f||(f=c._stroke=Uo("stroke")),M.appendChild(f),f.weight=k.weight+"px",f.color=k.color,f.opacity=k.opacity,k.dashArray?f.dashStyle=R(k.dashArray)?k.dashArray.join(" "):k.dashArray.replace(/( *, *)/g," "):f.dashStyle="",f.endcap=k.lineCap.replace("butt","flat"),f.joinstyle=k.lineJoin):f&&(M.removeChild(f),c._stroke=null),k.fill?(y||(y=c._fill=Uo("fill")),M.appendChild(y),y.color=k.fillColor||k.color,y.opacity=k.fillOpacity):y&&(M.removeChild(y),c._fill=null)},_updateCircle:function(c){var f=c._point.round(),y=Math.round(c._radius),k=Math.round(c._radiusY||y);this._setPath(c,c._empty()?"M0 0":"AL "+f.x+","+f.y+" "+y+","+k+" 0,"+65535*360)},_setPath:function(c,f){c._path.v=f},_bringToFront:function(c){Po(c._container)},_bringToBack:function(c){gi(c._container)}},jr=Ze.vml?Uo:Et,$a=$r.extend({_initContainer:function(){this._container=jr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=jr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){dn(this._container),Jt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){$r.prototype._update.call(this);var c=this._bounds,f=c.getSize(),y=this._container;(!this._svgSize||!this._svgSize.equals(f))&&(this._svgSize=f,y.setAttribute("width",f.x),y.setAttribute("height",f.y)),An(y,c.min),y.setAttribute("viewBox",[c.min.x,c.min.y,f.x,f.y].join(" ")),this.fire("update")}},_initPath:function(c){var f=c._path=jr("path");c.options.className&&ft(f,c.options.className),c.options.interactive&&ft(f,"leaflet-interactive"),this._updateStyle(c),this._layers[h(c)]=c},_addPath:function(c){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(c._path),c.addInteractiveTarget(c._path)},_removePath:function(c){dn(c._path),c.removeInteractiveTarget(c._path),delete this._layers[h(c)]},_updatePath:function(c){c._project(),c._update()},_updateStyle:function(c){var f=c._path,y=c.options;f&&(y.stroke?(f.setAttribute("stroke",y.color),f.setAttribute("stroke-opacity",y.opacity),f.setAttribute("stroke-width",y.weight),f.setAttribute("stroke-linecap",y.lineCap),f.setAttribute("stroke-linejoin",y.lineJoin),y.dashArray?f.setAttribute("stroke-dasharray",y.dashArray):f.removeAttribute("stroke-dasharray"),y.dashOffset?f.setAttribute("stroke-dashoffset",y.dashOffset):f.removeAttribute("stroke-dashoffset")):f.setAttribute("stroke","none"),y.fill?(f.setAttribute("fill",y.fillColor||y.color),f.setAttribute("fill-opacity",y.fillOpacity),f.setAttribute("fill-rule",y.fillRule||"evenodd")):f.setAttribute("fill","none"))},_updatePoly:function(c,f){this._setPath(c,Xt(c._parts,f))},_updateCircle:function(c){var f=c._point,y=Math.max(Math.round(c._radius),1),k=Math.max(Math.round(c._radiusY),1)||y,M="a"+y+","+k+" 0 1,0 ",$=c._empty()?"M0 0":"M"+(f.x-y)+","+f.y+M+y*2+",0 "+M+-y*2+",0 ";this._setPath(c,$)},_setPath:function(c,f){c._path.setAttribute("d",f)},_bringToFront:function(c){Po(c._path)},_bringToBack:function(c){gi(c._path)}});Ze.vml&&$a.include(jp);function Id(c){return Ze.svg||Ze.vml?new $a(c):null}Tt.include({getRenderer:function(c){var f=c.options.renderer||this._getPaneRenderer(c.options.pane)||this.options.renderer||this._renderer;return f||(f=this._renderer=this._createRenderer()),this.hasLayer(f)||this.addLayer(f),f},_getPaneRenderer:function(c){if(c==="overlayPane"||c===void 0)return!1;var f=this._paneRenderers[c];return f===void 0&&(f=this._createRenderer({pane:c}),this._paneRenderers[c]=f),f},_createRenderer:function(c){return this.options.preferCanvas&&Vh(c)||Id(c)}});var Sp=wi.extend({initialize:function(c,f){wi.prototype.initialize.call(this,this._boundsToLatLngs(c),f)},setBounds:function(c){return this.setLatLngs(this._boundsToLatLngs(c))}
vendor: 14,145 bytes, line 801
801,_boundsToLatLngs:function(c){return c=le(c),[c.getSouthWest(),c.getNorthWest(),c.getNorthEast(),c.getSouthEast()]}});function Pv(c,f){return new Sp(c,f)}$a.create=jr,$a.pointsToPath=Xt,Br.geometryToLayer=Lo,Br.coordsToLatLng=Ed,Br.coordsToLatLngs=nc,Br.latLngToCoords=Ad,Br.latLngsToCoords=Md,Br.getFeature=Fo,Br.asFeature=Rd,Tt.mergeOptions({boxZoom:!0});var Vo=nr.extend({initialize:function(c){this._map=c,this._container=c._container,this._pane=c._panes.overlayPane,this._resetStateTimeout=0,c.on("unload",this._destroy,this)},addHooks:function(){lt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Jt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){dn(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(c){if(!c.shiftKey||c.which!==1&&c.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Ot(),vd(),this._startPoint=this._map.mouseEventToContainerPoint(c),lt(document,{contextmenu:br,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(c){this._moved||(this._moved=!0,this._box=xt("div","leaflet-zoom-box",this._container),ft(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(c);var f=new O(this._point,this._startPoint),y=f.getSize();An(this._box,f.min),this._box.style.width=y.x+"px",this._box.style.height=y.y+"px"},_finish:function(){this._moved&&(dn(this._box),an(this._container,"leaflet-crosshair")),Ao(),yd(),Jt(document,{contextmenu:br,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(c){if(!(c.which!==1&&c.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(l(this._resetState,this),0);var f=new ie(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(f).fire("boxzoomend",{boxZoomBounds:f})}},_onKeyDown:function(c){c.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Tt.addInitHook("addHandler","boxZoom",Vo),Tt.mergeOptions({doubleClickZoom:!0});var kp=nr.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(c){var f=this._map,y=f.getZoom(),k=f.options.zoomDelta,M=c.originalEvent.shiftKey?y-k:y+k;f.options.doubleClickZoom==="center"?f.setZoom(M):f.setZoomAround(c.containerPoint,M)}});Tt.addInitHook("addHandler","doubleClickZoom",kp),Tt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Wh=nr.extend({addHooks:function(){if(!this._draggable){var c=this._map;this._draggable=new wr(c._mapPane,c._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),c.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),c.on("zoomend",this._onZoomEnd,this),c.whenReady(this._onZoomEnd,this))}ft(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){an(this._map._container,"leaflet-grab"),an(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var c=this._map;if(c._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var f=le(this._map.options.maxBounds);this._offsetLimit=U(this._map.latLngToContainerPoint(f.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(f.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;c.fire("movestart").fire("dragstart"),c.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(c){if(this._map.options.inertia){var f=this._lastTime=+new Date,y=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(y),this._times.push(f),this._prunePositions(f)}this._map.fire("move",c).fire("drag",c)},_prunePositions:function(c){for(;this._positions.length>1&&c-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var c=this._map.getSize().divideBy(2),f=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=f.subtract(c).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(c,f){return c-(c-f)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var c=this._draggable._newPos.subtract(this._draggable._startPos),f=this._offsetLimit;c.x<f.min.x&&(c.x=this._viscousLimit(c.x,f.min.x)),c.y<f.min.y&&(c.y=this._viscousLimit(c.y,f.min.y)),c.x>f.max.x&&(c.x=this._viscousLimit(c.x,f.max.x)),c.y>f.max.y&&(c.y=this._viscousLimit(c.y,f.max.y)),this._draggable._newPos=this._draggable._startPos.add(c)}},_onPreDragWrap:function(){var c=this._worldWidth,f=Math.round(c/2),y=this._initialWorldOffset,k=this._draggable._newPos.x,M=(k-f+y)%c+f-y,$=(k+f+y)%c-f-y,X=Math.abs(M+y)<Math.abs($+y)?M:$;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=X},_onDragEnd:function(c){var f=this._map,y=f.options,k=!y.inertia||c.noInertia||this._times.length<2;if(f.fire("dragend",c),k)f.fire("moveend");else{this._prunePositions(+new Date);var M=this._lastPos.subtract(this._positions[0]),$=(this._lastTime-this._times[0])/1e3,X=y.easeLinearity,de=M.multiplyBy(X/$),xe=de.distanceTo([0,0]),je=Math.min(y.inertiaMaxSpeed,xe),Ie=de.multiplyBy(je/xe),rt=je/(y.inertiaDeceleration*X),yt=Ie.multiplyBy(-rt/2).round();!yt.x&&!yt.y?f.fire("moveend"):(yt=f._limitOffset(yt,f.options.maxBounds),Y(function(){f.panBy(yt,{duration:rt,easeLinearity:X,noMoveStart:!0,animate:!0})}))}}});Tt.addInitHook("addHandler","dragging",Wh),Tt.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Hh=nr.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(c){this._map=c,this._setPanDelta(c.options.keyboardPanDelta),this._setZoomDelta(c.options.zoomDelta)},addHooks:function(){var c=this._map._container;c.tabIndex<=0&&(c.tabIndex="0"),lt(c,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Jt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var c=document.body,f=document.documentElement,y=c.scrollTop||f.scrollTop,k=c.scrollLeft||f.scrollLeft;this._map._container.focus(),window.scrollTo(k,y)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(c){var f=this._panKeys={},y=this.keyCodes,k,M;for(k=0,M=y.left.length;k<M;k++)f[y.left[k]]=[-1*c,0];for(k=0,M=y.right.length;k<M;k++)f[y.right[k]]=[c,0];for(k=0,M=y.down.length;k<M;k++)f[y.down[k]]=[0,c];for(k=0,M=y.up.length;k<M;k++)f[y.up[k]]=[0,-1*c]},_setZoomDelta:function(c){var f=this._zoomKeys={},y=this.keyCodes,k,M;for(k=0,M=y.zoomIn.length;k<M;k++)f[y.zoomIn[k]]=c;for(k=0,M=y.zoomOut.length;k<M;k++)f[y.zoomOut[k]]=-c},_addHooks:function(){lt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Jt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(c){if(!(c.altKey||c.ctrlKey||c.metaKey)){var f=c.keyCode,y=this._map,k;if(f in this._panKeys){if(!y._panAnim||!y._panAnim._inProgress)if(k=this._panKeys[f],c.shiftKey&&(k=D(k).multiplyBy(3)),y.options.maxBounds&&(k=y._limitOffset(D(k),y.options.maxBounds)),y.options.worldCopyJump){var M=y.wrapLatLng(y.unproject(y.project(y.getCenter()).add(k)));y.panTo(M)}else y.panBy(k)}else if(f in this._zoomKeys)y.setZoom(y.getZoom()+(c.shiftKey?3:1)*this._zoomKeys[f]);else if(f===27&&y._popup&&y._popup.options.closeOnEscapeKey)y.closePopup();else return;br(c)}}});Tt.addInitHook("addHandler","keyboard",Hh),Tt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var en=nr.extend({addHooks:function(){lt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Jt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(c){var f=op(c),y=this._map.options.wheelDebounceTime;this._delta+=f,this._lastMousePos=this._map.mouseEventToContainerPoint(c),this._startTime||(this._startTime=+new Date);var k=Math.max(y-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),k),br(c)},_performZoom:function(){var c=this._map,f=c.getZoom(),y=this._map.options.zoomSnap||0;c._stop();var k=this._delta/(this._map.options.wheelPxPerZoomLevel*4),M=4*Math.log(2/(1+Math.exp(-Math.abs(k))))/Math.LN2,$=y?Math.ceil(M/y)*y:M,X=c._limitZoom(f+(this._delta>0?$:-$))-f;this._delta=0,this._startTime=null,X&&(c.options.scrollWheelZoom==="center"?c.setZoom(f+X):c.setZoomAround(this._lastMousePos,f+X))}});Tt.addInitHook("addHandler","scrollWheelZoom",en);var qh=600;Tt.mergeOptions({tapHold:Ze.touchNative&&Ze.safari&&Ze.mobile,tapTolerance:15});var ic=nr.extend({addHooks:function(){lt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Jt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(c){if(clearTimeout(this._holdTimeout),c.touches.length===1){var f=c.touches[0];this._startPos=this._newPos=new W(f.clientX,f.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(lt(document,"touchend",Nn),lt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",f))},this),qh),lt(document,"touchend touchcancel contextmenu",this._cancel,this),lt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function c(){Jt(document,"touchend",Nn),Jt(document,"touchend touchcancel",c)},_cancel:function(){clearTimeout(this._holdTimeout),Jt(document,"touchend touchcancel contextmenu",this._cancel,this),Jt(document,"touchmove",this._onMove,this)},_onMove:function(c){var f=c.touches[0];this._newPos=new W(f.clientX,f.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(c,f){var y=new MouseEvent(c,{bubbles:!0,cancelable:!0,view:window,screenX:f.screenX,screenY:f.screenY,clientX:f.clientX,clientY:f.clientY});y._simulated=!0,f.target.dispatchEvent(y)}});Tt.addInitHook("addHandler","tapHold",ic),Tt.mergeOptions({touchZoom:Ze.touch,bounceAtZoomLimits:!0});var Wo=nr.extend({addHooks:function(){ft(this._map._container,"leaflet-touch-zoom"),lt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){an(this._map._container,"leaflet-touch-zoom"),Jt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(c){var f=this._map;if(!(!c.touches||c.touches.length!==2||f._animatingZoom||this._zooming)){var y=f.mouseEventToContainerPoint(c.touches[0]),k=f.mouseEventToContainerPoint(c.touches[1]);this._centerPoint=f.getSize()._divideBy(2),this._startLatLng=f.containerPointToLatLng(this._centerPoint),f.options.touchZoom!=="center"&&(this._pinchStartLatLng=f.containerPointToLatLng(y.add(k)._divideBy(2))),this._startDist=y.distanceTo(k),this._startZoom=f.getZoom(),this._moved=!1,this._zooming=!0,f._stop(),lt(document,"touchmove",this._onTouchMove,this),lt(document,"touchend touchcancel",this._onTouchEnd,this),Nn(c)}},_onTouchMove:function(c){if(!(!c.touches||c.touches.length!==2||!this._zooming)){var f=this._map,y=f.mouseEventToContainerPoint(c.touches[0]),k=f.mouseEventToContainerPoint(c.touches[1]),M=y.distanceTo(k)/this._startDist;if(this._zoom=f.getScaleZoom(M,this._startZoom),!f.options.bounceAtZoomLimits&&(this._zoom<f.getMinZoom()&&M<1||this._zoom>f.getMaxZoom()&&M>1)&&(this._zoom=f._limitZoom(this._zoom)),f.options.touchZoom==="center"){if(this._center=this._startLatLng,M===1)return}else{var $=y._add(k)._divideBy(2)._subtract(this._centerPoint);if(M===1&&$.x===0&&$.y===0)return;this._center=f.unproject(f.project(this._pinchStartLatLng,this._zoom).subtract($),this._zoom)}this._moved||(f._moveStart(!0,!1),this._moved=!0),ce(this._animRequest);var X=l(f._move,f,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Y(X,this,!0),Nn(c)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,ce(this._animRequest),Jt(document,"touchmove",this._onTouchMove,this),Jt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Tt.addInitHook("addHandler","touchZoom",Wo),Tt.BoxZoom=Vo,Tt.DoubleClickZoom=kp,Tt.Drag=Wh,Tt.Keyboard=Hh,Tt.ScrollWheelZoom=en,Tt.TapHold=ic,Tt.TouchZoom=Wo,n.Bounds=O,n.Browser=Ze,n.CRS=oe,n.Canvas=Uh,n.Circle=Pd,n.CircleMarker=Cd,n.Class=q,n.Control=zs,n.DivIcon=Dd,n.DivOverlay=zr,n.DomEvent=_d,n.DomUtil=Zl,n.Draggable=wr,n.Evented=be,n.FeatureGroup=yi,n.GeoJSON=Br,n.GridLayer=ta,n.Handler=nr,n.Icon=za,n.ImageOverlay=ea,n.LatLng=fe,n.LatLngBounds=ie,n.Layer=_r,n.LayerGroup=Xi,n.LineUtil=mp,n.Map=Tt,n.Marker=bi,n.Mixin=Th,n.Path=Ji,n.Point=W,n.PolyUtil=xv,n.Polygon=wi,n.Polyline=$s,n.Popup=Od,n.PosAnimation=Nd,n.Projection=_v,n.Rectangle=Sp,n.Renderer=$r,n.SVG=$a,n.SVGOverlay=Bh,n.TileLayer=na,n.Tooltip=zo,n.Transformation=De,n.Util=K,n.VideoOverlay=Fh,n.bind=l,n.bounds=U,n.canvas=Vh,n.circle=tc,n.circleMarker=vp,n.c
801ontrol=Qi,n.divIcon=_p,n.extend=i,n.featureGroup=gp,n.geoJSON=yp,n.geoJson=Nr,n.gridLayer=$o,n.icon=xp,n.imageOverlay=bp,n.latLng=me,n.latLngBounds=le,n.layerGroup=ec,n.map=Zi,n.marker=Sv,n.point=D,n.polygon=Cv,n.polyline=kv,n.popup=Bo,n.rectangle=Pv,n.setOptions=S,n.stamp=h,n.svg=Id,n.svgOverlay=zh,n.tileLayer=$h,n.tooltip=sc,n.transformation=Te,n.version=s,n.videoOverlay=wp;var Cp=window.L;n.noConflict=function(){return window.L=Cp,this},window.L=n}))})(If,If.exports)),If.exports}var ph=pce();const QO=Ll(ph);function iv(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function av(e,t){return t==null?function(s,i){const a=w.useRef();return a.current||(a.current=e(s,i)),a}:function(s,i){const a=w.useRef();a.current||(a.current=e(s,i));const l=w.useRef(s),{instance:u}=a.current;return w.useEffect(function(){l.current!==s&&(t(u,s,l.current),l.current=s)},[u,s,i]),a}}function XO(e,t){w.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var a;(a=t.layerContainer)==null||a.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function JO(e){return function(n){const s=dj(),i=e(rv(n,s),s);return qO(s.map,n.attribution),uj(i.current,n.eventHandlers),XO(i.current,s),i}}function gce(e,t){const n=w.useRef();w.useEffect(function(){if(t.pathOptions!==n.current){const i=t.pathOptions??{};e.instance.setStyle(i),n.current=i}},[e,t])}function xce(e){return function(n){const s=dj(),i=e(rv(n,s),s);return uj(i.current,n.eventHandlers),XO(i.current,s),gce(i.current,n),i}}function vce(e,t){const n=av(e,t),s=JO(n);return ZO(s)}function yce(e,t){const n=av(e),s=fce(n,t);return uce(s)}function bce(e,t){const n=av(e,t),s=xce(n);return ZO(s)}function wce(e,t){const n=av(e,t),s=JO(n);return hce(s)}function _ce(e,t,n){const{opacity:s,zIndex:i}=t;s!=null&&s!==n.opacity&&e.setOpacity(s),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function P1(){return P1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},P1.apply(this,arguments)}function Nce({bounds:e,boundsOptions:t,center:n,children:s,className:i,id:a,placeholder:l,style:u,whenReady:h,zoom:m,...g},x){const[v]=w.useState({className:i,id:a,style:u}),[_,N]=w.useState(null);w.useImperativeHandle(x,()=>(_==null?void 0:_.map)??null,[_]);const S=w.useCallback(P=>{if(P!==null&&_===null){const E=new ph.Map(P,g);n!=null&&m!=null?E.setView(n,m):e!=null&&E.fitBounds(e,t),h!=null&&E.whenReady(h),N(dce(E))}},[]);w.useEffect(()=>()=>{_==null||_.map.remove()},[_]);const j=_?dt.createElement(KO,{value:_},s):l??null;return dt.createElement("div",P1({},v,{ref:S}),j)}const jce=w.forwardRef(Nce),Sce=vce(function({position:t,...n},s){const i=new ph.Marker(t,n);return iv(i,GO(s,{overlayContainer:i}))},function(t,n,s){n.position!==s.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==s.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==s.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==s.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==s.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),kce=bce(function({positions:t,...n},s){const i=new ph.Polyline(t,n);return iv(i,GO(s,{overlayContainer:i}))},function(t,n,s){n.positions!==s.positions&&t.setLatLngs(n.positions)}),Cce=yce(function(t,n){const s=new ph.Popup(t,n.overlayContainer);return iv(s,n)},function(t,n,{position:s},i){w.useEffect(function(){const{instance:l}=t;function u(m){m.popup===l&&(l.update(),i(!0))}function h(m){m.popup===l&&i(!1)}return n.map.on({popupopen:u,popupclose:h}),n.overlayContainer==null?(s!=null&&l.setLatLng(s),l.openOn(n.map)):n.overlayContainer.bindPopup(l),function(){var g;n.map.off({popupopen:u,popupclose:h}),(g=n.overlayContainer)==null||g.unbindPopup(),n.map.removeLayer(l)}},[t,n,i,s])}),Pce=wce(function({url:t,...n},s){const i=new ph.TileLayer(t,rv(n,s));return iv(i,s)},function(t,n,s){_ce(t,n,s);const{url:i}=n;i!=null&&i!==s.url&&t.setUrl(i)});let Tce=QO.icon({iconUrl:"https://unpkg.com/[email protected]/dist/images/marker-icon.png",iconRetinaUrl:"https://unpkg.com/[email protected]/dist/images/marker-icon-2x.png",shadowUrl:"https://unpkg.com/[email protected]/dist/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]});QO.Marker.prototype.options.icon=Tce;const vT=({stop:e,tripStartDate:t})=>{const n=(e.title||"")+(e.address||"")+(e.lat||"")+(e.lng||"")+(e.day_number||"");let s=0;for(let h=0;h<n.length;h++)s+=n.charCodeAt(h);const i=[{icon:h0,text:"Sunny",temp:72+s%15},{icon:VL,text:"Partly Cloudy",temp:65+s%12},{icon:$L,text:"Light Rain",temp:58+s%10},{icon:h0,text:"Clear",temp:68+s%15},{icon:yF,text:"Snow Showers",temp:28+s%10}],a=i[s%i.length],l=a.icon;let u="";if(t){const h=new Date(t);h.setDate(h.getDate()+(e.day_number-1)),u=$n(h,"MMM do")}return r.jsxs("div",{className:"flex items-center space-x-2.5 bg-slate-50/80 backdrop-blur-sm px-3 py-2 rounded-2xl border border-slate-200/60 mt-3 w-fit shadow-sm",children:[r.jsx("div",{className:"p-1.5 rounded-xl bg-white shadow-sm border border-slate-100",children:r.jsx(l,{className:"w-4 h-4 text-blue-500"})}),r.jsxs("div",{className:"flex flex-col pr-1",children:[r.jsxs("span",{className:"text-sm font-semibold tracking-tight text-slate-700 leading-none",children:[a.temp,"°F"]}),r.jsxs("span",{className:"text-[10px] font-semibold tracking-tight uppercase tracking-wider text-slate-400 leading-none mt-1",children:[u?`${u} ⢠`:"",a.text]})]})]})};function Ece(){const e=Kn(),t=tn(),s=new URLSearchParams(window.location.search).get("id")||"1",[i,a]=w.useState(null),[l,u]=w.useState(!1),[h,m]=w.useState(null),[g,x]=w.useState({title:"",description:"",address:"",lat:"",lng:"",day_number:1,time:"",start_date:"",start_time:"",end_date:"",end_time:"",type:"camp",image_url:"",order_index:1}),[v,_]=w.useState(!1),[N,S]=w.useState(null),[j,P]=w.useState(null),[E,R]=w.useState(""),[A,B]=w.useState(!1),[I,z]=w.useState(!1),[V,te]=w.useState(!1),[H,Y]=w.useState("idle");w.useEffect(()=>{const ae=()=>z(window.scrollY>50);return window.addEventListener("scroll",ae),()=>window.removeEventListener("scroll",ae)},[]);const ce=async ae=>{var Ve;const Se=(Ve=ae.target.files)==null?void 0:Ve[0];if(Se){_(!0);try{const Nt=await ne.integrations.Core.UploadFile({file:Se});Nt!=null&&Nt.file_url&&x(gn=>({...gn,image_url:Nt.file_url})),_(!1)}catch(Nt){console.error(Nt),_(!1)}}},{data:K}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),{data:q}=Re({queryKey:["members",s],queryFn:()=>ne.entities.TripMember.filter({trip_id:s}).catch(()=>[])});dt.useEffect(()=>{if(q!==void 0&&j===null)if(K!=null&&K.email){const ae=q.find(Se=>Se.user_email===K.email);P(ae?{going:"confirmed",maybe:"pending",not_going:"not_going",pending:"pending"}[ae.rsvp_status]||"confirmed":"none")}else K===null&&P("none")},[q,K,j]);const ge=pt({mutationFn:async ae=>{if(!(K!=null&&K.email))return;const Se={confirmed:"going",pending:"maybe",not_going:"not_going"},Ve=q==null?void 0:q.find(Nt=>Nt.user_email===K.email);return Ve?ne.entities.TripMember.update(Ve.id,{rsvp_status:Se[ae]}):ne.entities.TripMember.create({trip_id:s,user_email:K.email,user_name:K.full_name||"Me",role:"admin",rsvp_status:Se[ae]})},onSuccess:()=>
801t.invalidateQueries(["members",s])}),he=ae=>{P(ae),ge.mutate(ae)},be=async()=>{if(E.trim()){B(!0);try{await ne.entities.TripMember.create({trip_id:s,user_email:E.trim(),user_name:E.split("@")[0],role:"member",rsvp_status:"pending"}),await ne.functions.invoke("sendEmail",{to:E.trim(),subject:`You've been invited to ${(Q==null?void 0:Q.title)||"a new trip"}!`,html:`<p>Hi there,</p><p>${(K==null?void 0:K.full_name)||(K==null?void 0:K.email)||"Someone"} has invited you to join the trip <strong>${(Q==null?void 0:Q.title)||"an upcoming adventure"}</strong>.</p><p>Click <a href="${window.location.href}">here</a> to view the trip details and RSVP!</p>`}),t.invalidateQueries(["members",s]),R("")}catch(ae){console.error("Error inviting member:",ae)}finally{B(!1)}}},W=pt({mutationFn:()=>ne.entities.Trip.delete(s),onSuccess:()=>{e(Xe("Home"))}}),Z=async()=>{te(!0),Y("capturing");try{const ae=(await EP(async()=>{const{default:st}=await import("./html2canvas.esm-QH1iLAAe.js");return{default:st}},[])).default,{PDFDocument:Se}=await EP(async()=>{const{PDFDocument:st}=await import("./index-BKdTBOlM.js");return{PDFDocument:st}},[]),Ve=document.getElementById("infographic-container");if(!Ve)throw new Error("Infographic container not found");const gn=(await ae(Ve,{scale:2,useCORS:!0,logging:!1})).toDataURL("image/png");Y("pdf");const Mt=await Se.create(),En=await Mt.embedPng(gn),{width:Rt,height:xn}=En.scale(1);Mt.addPage([Rt,xn]).drawImage(En,{x:0,y:0,width:Rt,height:xn});const Ir=await Mt.save(),mi=new Blob([Ir],{type:"application/pdf"}),Ma=new File([mi],`infographic-${Q.id}-${Date.now()}.pdf`,{type:"application/pdf"});Y("uploading");const we=await ne.integrations.Core.UploadFile({file:Ma});we!=null&&we.file_url&&(await ne.entities.Trip.update(Q.id,{infographic_url:we.file_url}),t.invalidateQueries(["trip",s]),Y("success"),setTimeout(()=>{te(!1),Y("idle")},3e3))}catch(ae){console.error(ae),Y("error"),setTimeout(()=>{te(!1),Y("idle")},4e3)}},D=pt({mutationFn:()=>ne.entities.Trip.update(s,{status:"cancelled"}),onSuccess:()=>t.invalidateQueries(["trip",s])}),O=pt({mutationFn:async()=>{await ne.functions.invoke("endTripFlow",{trip_id:s})},onSuccess:()=>{t.invalidateQueries(["trip",s]),t.invalidateQueries(["members",s])}}),U=pt({mutationFn:()=>ne.entities.Trip.update(s,{status:"upcoming"}),onSuccess:()=>{t.invalidateQueries(["trip",s]),a(null)}}),ie=pt({mutationFn:ae=>ne.entities.ItineraryStop.create(ae),onSuccess:()=>{t.invalidateQueries(["stops",s]),u(!1),x({title:"",description:"",address:"",lat:"",lng:"",day_number:1,time:"",start_date:"",start_time:"",end_date:"",end_time:"",type:"camp",image_url:""})}}),le=pt({mutationFn:({id:ae,data:Se})=>ne.entities.ItineraryStop.update(ae,Se),onSuccess:()=>{t.invalidateQueries(["stops",s]),u(!1),m(null),x({title:"",description:"",address:"",lat:"",lng:"",day_number:1,time:"",start_date:"",start_time:"",end_date:"",end_time:"",type:"camp",image_url:""})}}),fe=async ae=>{if(!ae.destination)return;const Se=ae.source.index,Ve=ae.destination.index;if(Se===Ve)return;const Nt=Array.from(Ce),[gn]=Nt.splice(Se,1);Nt.splice(Ve,0,gn);const Mt=Nt.map((Rt,xn)=>({...Rt,order_index:xn+1}));t.setQueryData(["stops",s],Mt);const En=Nt.map((Rt,xn)=>({id:Rt.id,newOrder:xn+1,oldOrder:Rt.order_index})).filter(Rt=>Rt.newOrder!==Rt.oldOrder);try{await Promise.all(En.map(Rt=>ne.entities.ItineraryStop.update(Rt.id,{order_index:Rt.newOrder})))}catch(Rt){console.error(Rt),t.invalidateQueries(["stops",s])}},me=async()=>{if(!g.title)return;const ae={...g};ae.lat===""&&(ae.lat=null),ae.lng===""&&(ae.lng=null),ae.order_index=parseInt(ae.order_index)||1,ae.day_number=parseInt(ae.day_number)||1;try{if(h){const{id:Se,created_by:Ve,created_date:Nt,updated_date:gn,...Mt}=ae,En=Ce.find(Rt=>Rt.id===h);if(En&&En.order_index!==ae.order_index){const Rt=ae.order_index<En.order_index,xn=Ce.filter(Vn=>Vn.id!==h&&(Rt?Vn.order_index>=ae.order_index&&Vn.order_index<En.order_index:Vn.order_index<=ae.order_index&&Vn.order_index>En.order_index));await Promise.all(xn.map(Vn=>ne.entities.ItineraryStop.update(Vn.id,{order_index:Rt?(Vn.order_index||0)+1:(Vn.order_index||0)-1})))}le.mutate({id:h,data:Mt})}else{const Se=Ce.filter(Ve=>(Ve.order_index||0)>=ae.order_index);Se.length>0&&await Promise.all(Se.map(Ve=>ne.entities.ItineraryStop.update(Ve.id,{order_index:(Ve.order_index||0)+1}))),ie.mutate({...ae,trip_id:s})}}catch(Se){console.error(Se)}},{data:oe}=Re({queryKey:["trip",s],queryFn:()=>ne.entities.Trip.get(s).catch(()=>null)}),Q=oe,{data:Ne}=Re({queryKey:["stops",s],queryFn:async()=>(await ne.entities.ItineraryStop.filter({trip_id:s}).catch(()=>[])).sort((Se,Ve)=>{const Nt=Se.order_index??Se.day_number??999,gn=Ve.order_index??Ve.day_number??999;return Nt-gn})}),Ce=Ne||[],De=!(Q!=null&&Q.created_by)||(K==null?void 0:K.email)&&(Q==null?void 0:Q.created_by)===(K==null?void 0:K.email),Te=(Q==null?void 0:Q.status)==="completed",We=(Q==null?void 0:Q.status)==="cancelled",$e=(K==null?void 0:K.role)==="admin"||(K==null?void 0:K.role)==="moderator"||(K==null?void 0:K.role)==="superadmin",Et=(Q==null?void 0:Q.approval_status)==="pending_approval",Xt=(Q==null?void 0:Q.approval_status)==="rejected";if(dt.useEffect(()=>{i===null&&a(Te?"Memories":"Itinerary")},[Te,i]),!Q)return r.jsx("div",{className:"min-h-screen flex items-center justify-center",children:r.jsx(gt,{className:"w-8 h-8 text-blue-600 animate-spin"})});const Zt=q==null?void 0:q.some(ae=>ae.user_email===(K==null?void 0:K.email));if(!(!((Q==null?void 0:Q.visibility)==="private")||De||$e||Zt))return r.jsx("div",{className:"min-h-screen flex flex-col items-center justify-center bg-[#f9fafb] p-6",children:r.jsxs("div",{className:"bg-white p-8 rounded-3xl shadow-xl max-w-md text-center border border-slate-100",children:[r.jsx(Os,{className:"w-16 h-16 text-slate-300 mx-auto mb-5"}),r.jsx("h2",{className:"text-2xl font-semibold tracking-tight tracking-tight text-slate-900 mb-2",children:"Private Adventure"}),r.jsx("p",{className:"text-slate-500 font-medium mb-8",children:"This trip is invite-only. You'll need an invite from the organizer to view the itinerary and gear list."}),r.jsx("button",{onClick:()=>e("/Explore"),className:"bg-slate-900 text-white font-semibold py-3.5 px-6 rounded-2xl hover:bg-slate-800 transition-colors shadow-lg shadow-slate-900/20 active:scale-[0.98]",children:"Explore Public Trips"})]})});const pn={confirmed:{label:"Going",icon:ht,color:"text-emerald-600",bg:"bg-emerald-50",border:"border-emerald-200"},pending:{label:"Maybe",icon:zn,color:"text-amber-600",bg:"bg-amber-50",border:"border-amber-200"},not_going:{label:"Not Going",icon:hn,color:"text-rose-600",bg:"bg-rose-50",border:"border-rose-200"},none:{label:"Join Trip",icon:Cn,color:"text-blue-600",bg:"bg-blue-50",border:"border-blue-200"}},Tn=pn[j]||pn.none,ms=Tn.icon;return r.jsxs(re.div,{initial:{opacity:0}
801,animate:{opacity:1},transition:{duration:.4},className:"min-h-screen flex flex-col pb-[100px] md:pb-[40px] bg-[#f9fafb]",children:[r.jsxs("header",{className:`fixed top-0 w-full z-40 flex items-center justify-between p-4 px-6 transition-all duration-300 md:-mx-4 md:w-[calc(100%+2rem)] md:top-2 md:rounded-3xl ${I?"bg-white/90 backdrop-blur-xl border border-slate-200/60 shadow-lg shadow-slate-200/50":"bg-transparent"}`,children:[r.jsx("button",{onClick:()=>e(-1),className:`p-2.5 rounded-full backdrop-blur-md transition-colors ${I?"bg-slate-100 hover:bg-slate-200 text-slate-800":"bg-black/20 hover:bg-black/30 text-white"}`,children:r.jsx(gr,{className:"w-5 h-5"})}),r.jsx("h1",{className:`font-semibold tracking-tight text-lg transition-opacity duration-300 ${I?"opacity-100 text-slate-900":"opacity-0"}`,children:Q.title}),r.jsxs("div",{className:"flex space-x-2",children:[Q.infographic_url&&r.jsx("button",{onClick:()=>{const ae=document.createElement("a");ae.href=Q.infographic_url,ae.download=`Infographic-${Q.title}.pdf`,ae.target="_blank",document.body.appendChild(ae),ae.click(),document.body.removeChild(ae)},className:`p-2.5 rounded-full backdrop-blur-md transition-colors ${I?"bg-slate-100 hover:bg-slate-200 text-emerald-600":"bg-black/20 hover:bg-black/30 text-emerald-400"}`,title:"Download Infographic",children:r.jsx(Vy,{className:"w-5 h-5"})}),r.jsxs(sce,{children:[r.jsx(rce,{asChild:!0,children:r.jsx("button",{className:`md:hidden p-2.5 rounded-full backdrop-blur-md transition-colors ${I?"bg-slate-100 hover:bg-slate-200 text-slate-800":"bg-black/20 hover:bg-black/30 text-white"}`,children:r.jsx(a5,{className:"w-5 h-5"})})}),r.jsx(HO,{side:"right",className:"w-72 p-0 border-l-0 rounded-l-3xl overflow-hidden",children:r.jsxs("nav",{className:"flex flex-col h-full bg-white pt-12 pb-8 px-6",children:[r.jsxs("div",{className:"flex items-center space-x-3 mb-10 px-2",children:[r.jsx("div",{className:"w-10 h-10 bg-blue-600 rounded-xl flex items-center justify-center text-white shadow-md shadow-blue-600/20",children:r.jsx(ws,{className:"w-6 h-6"})}),r.jsx("h2",{className:"text-xl font-semibold tracking-tight text-slate-900",children:"BATA Base"})]}),r.jsx("div",{className:"space-y-1 flex-1",children:[{to:"Home",icon:Ii,label:"Dashboard"},{to:"Explore",icon:Ku,label:"Explore"},{to:"Trips",icon:ws,label:"My Trips"},{id:"MapItem",icon:Zs,label:"Route Map"},{to:"Profile",icon:rd,label:"My Profile"}].map(ae=>{const Se=ae.icon;return r.jsxs("button",{onClick:()=>{ae.id==="MapItem"?(a("Itinerary"),setTimeout(()=>{var Ve;return(Ve=document.getElementById("route-map"))==null?void 0:Ve.scrollIntoView({behavior:"smooth",block:"center"})},100)):e(Xe(ae.to))},className:"w-full flex items-center gap-3 px-4 py-3.5 rounded-2xl text-slate-600 hover:text-slate-900 hover:bg-slate-50 font-semibold text-[15px] tracking-tight transition-all",children:[r.jsx(Se,{className:"w-5 h-5 text-slate-400"}),ae.label]},ae.to||ae.id)})}),r.jsxs("button",{onClick:()=>e(Xe("CreateTrip")),className:"w-full bg-blue-600 hover:bg-blue-700 text-white rounded-2xl flex items-center justify-center space-x-2 p-4 shadow-lg shadow-blue-600/30 transition-all active:scale-95 font-semibold tracking-tight",children:[r.jsx(Cn,{className:"w-5 h-5"}),r.jsx("span",{children:"Create Trip"})]})]})})]}),r.jsxs(mu,{children:[r.jsx(pu,{asChild:!0,children:r.jsx("button",{className:`md:hidden p-2.5 rounded-full backdrop-blur-md transition-colors ${I?"bg-slate-100 hover:bg-slate-200 text-slate-800":"bg-black/20 hover:bg-black/30 text-white"}`,children:r.jsx(r5,{className:"w-5 h-5"})})}),r.jsxs(Ec,{align:"end",className:"w-64 rounded-2xl shadow-xl border-slate-100 p-2",children:[r.jsxs(ln,{onClick:()=>e(Xe("ActivityFeed")+"?trip_id="+Q.id),className:"rounded-xl cursor-pointer p-3 font-semibold mb-1",children:[r.jsx(Cf,{className:"w-4 h-4 mr-3 text-blue-500"})," Activity Log"]}),Q.infographic_url&&r.jsxs(ln,{onClick:()=>{const ae=document.createElement("a");ae.href=Q.infographic_url,ae.download=`Infographic-${Q.title}.pdf`,ae.target="_blank",document.body.appendChild(ae),ae.click(),document.body.removeChild(ae)},className:"rounded-xl cursor-pointer p-3 font-semibold mb-1 text-emerald-600 focus:text-emerald-700 focus:bg-emerald-50",children:[r.jsx(Vy,{className:"w-4 h-4 mr-3"})," Download Infographic"]}),De&&r.jsxs(ln,{onClick:Z,disabled:V,className:"rounded-xl cursor-pointer p-3 font-semibold mb-1 text-indigo-600 focus:text-indigo-700 focus:bg-indigo-50",children:[V?r.jsx(gt,{className:"w-4 h-4 mr-3 animate-spin"}):r.jsx(Qs,{className:"w-4 h-4 mr-3"}),Q.infographic_url?"Update Infographic PDF":"Create Infographic"]}),De&&!We&&!Te&&r.jsxs(r.Fragment,{children:[r.jsxs(ln,{onClick:()=>e(Xe("CreateTrip")+"?id="+Q.id),className:"rounded-xl cursor-pointer p-3 font-semibold mb-1",children:[r.jsx(Wy,{className:"w-4 h-4 mr-3 text-slate-500"})," Edit Trip Info"]}),r.jsx("div",{className:"h-px bg-slate-100 my-1 mx-2"}),r.jsxs(ln,{onClick:()=>{window.confirm("End this trip? This will notify all members to check in when they get home safely. This action cannot be undone.")&&O.mutate()},className:"rounded-xl cursor-pointer p-3 font-semibold mb-1",children:[r.jsx(lS,{className:"w-4 h-4 mr-3 text-emerald-600"})," End Trip"]}),r.jsxs(ln,{onClick:()=>{window.confirm("Cancel this trip? All members will see the trip as cancelled. This action cannot be undone.")&&D.mutate()},className:"rounded-xl text-amber-600 focus:text-amber-700 focus:bg-amber-50 cursor-pointer p-3 font-semibold mb-1",children:[r.jsx(Ug,{className:"w-4 h-4 mr-3"})," Cancel Trip"]}),r.jsx("div",{className:"h-px bg-slate-100 my-1 mx-2"}),r.jsxs(ln,{onClick:()=>{window.confirm("Are you sure you want to delete this trip?")&&W.mutate()},className:"rounded-xl text-red-600 focus:text-red-700 focus:bg-red-50 cursor-pointer p-3 font-semibold",children:[r.jsx(us,{className:"w-4 h-4 mr-3"})," Delete Trip"]})]}),De&&(We||Te)&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"h-px bg-slate-100 my-1 mx-2"}),r.jsxs(ln,{onClick:()=>{window.confirm("Revert this trip back to upcoming? Members will see it as an active trip again.")&&U.mutate()},className:"rounded-xl cursor-pointer p-3 font-semibold mb-1",children:[r.jsx(uw,{className:"w-4 h-4 mr-3 text-blue-500"})," Revert to Upcoming"]}),r.jsx("div",{className:"h-px bg-slate-100 my-1 mx-2"}),r.jsxs(ln,{onClick:()=>{window.confirm("Are you sure you want to delete this trip?")&&W.mutate()},className:"rounded-xl text-red-600 focus:text-red-700 focus:bg-red-50 cursor-pointer p-3 font-semibold",children:[r.jsx(us,{className:"w-4 h-4 mr-3"})," Delete Trip"]})]})]})]})]})]}),r.jsxs("div",{className:"relative h-[450px] md:h-[600px] w-full md:max-w-6xl md:mx-auto md:rounded-[40px] overflow-hidden md:mt-6 z-0 shadow-2xl md:border md:border-slate-800/30 mb-8 md:mb-12",children:[r.jsx("img",{src:Q.cover_image_url||"https://images.unsplash.com/photo-1464822759023-fed622ff2c3b",className:"absolute inset-0 w-full h-full object-cover scale-105",alt:"Cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#0A0F1A]/95 via-[#0A0F1A]/50 to-transparent md:bg-gradient-to-r md:from-[#0A0F1A]/95 md:via-[#0A0F1A]/60 md:to-transparent"}),r.jsx("button",{onClick:()=>e(-1),className:"hidden md:flex absolute top-8 left-8 p-3.5 rounded-full bg-black/20 hover:bg-black/40 backdrop-blur-md text-white border border-white/10 transition-all z-10",children:r.jsx(gr,{className:"w-5 h-5"})}),r.jsx("div",{className:"absolute inset-0 p-6 md:p-16 pb-14 md:pb-16 flex flex-col justify-end",children:r.jsxs("div",{className:"flex flex-col md:max-w-4xl",children:[r.jsxs("div",{className:"flex flex-col gap-3 mb-6 items-start",children:[r.jsxs("span",{className:"bg-white/10 backdrop-blur-md text-white/90 px-4 py-2 rounded-full text-[13px] font-medium tracking-wide flex items-center border border-white/20 shadow-lg",children:[r.jsx(pa,{className:"w-3.5 h-3.5 mr-2.5 opacity-80"}),Q.start_date?$n(new Date(Q.start_date),"MMM do"):""," ",Q.end_date?`- ${$n(new Date(Q.end_date),"MMM do")}`:""]}),Q.location&&r.jsxs("span",{className:"bg-white/10 backdrop-blur-md text-white/90 px-4 py-2 rounded-full text-[13px] font-medium tracking-wide flex items-center border border-white/20 shadow-lg",children:[r.jsx(Dn,{className:"w-3.5 h-3.5 mr-2.5 opacity-80"}),Q.location]}),Q.difficulty&&r.jsx("span",{className:"bg-white/10 backdrop-blur-md text-white/90 px-4 py-1.5 rounded-full text-[11px] font-bold tracking-widest flex items-center border border-white/20 shadow-lg uppercase",children:Q.difficulty})]}),r.jsx("h1",{className:"text-4xl md:text-[72px] font-bold tracking-tight text-white leading-[1.05] mb-5 drop-shadow-lg",children:Q.title}),r.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-6 md:gap-8",children:[Q.description&&r.jsx("p",{className:"text-slate-300 md:text-[17px] font-medium leading-relaxed drop-shadow-md line-clamp-2 md:line-clamp-3 max-w-sm",children:Q.description}),r.jsxs("div",{className:"hidden md:flex flex-wrap items-center gap-4 shrink-0",children:[!We&&!Te&&r.jsxs(mu,{children:[r.jsx(pu,{asChild:!0,children:r.jsxs("button",{className:"flex items-center justify-between gap-3 px-6 h-[52px] min-w-[140px] rounded-[18px] bg-white text-slate-900 shadow-xl transition-all font-semibold text-[14px]",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ms,{className:`w-4 h-4 ${Tn.color}`}
801),r.jsx("span",{children:Tn.label})]}),r.jsx(uo,{className:"w-4 h-4 opacity-50"})]})}),r.jsx(Ec,{align:"start",className:"w-48 p-2 rounded-2xl shadow-xl border-slate-100",children:[{key:"confirmed",label:"Going",icon:ht,color:"text-emerald-600",bg:"hover:bg-emerald-50"},{key:"pending",label:"Maybe",icon:zn,color:"text-amber-600",bg:"hover:bg-amber-50"},{key:"not_going",label:"Not Going",icon:hn,color:"text-rose-600",bg:"hover:bg-rose-50"}].map(ae=>{const Se=ae.icon,Ve=j===ae.key;return r.jsxs(ln,{onClick:()=>he(ae.key),className:`w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm font-semibold tracking-tight transition-colors cursor-pointer ${ae.bg} ${Ve?"bg-slate-100 text-slate-900":"text-slate-600"}`,children:[r.jsx(Se,{className:`w-4 h-4 ${ae.color}`}),r.jsx("span",{children:ae.label}),Ve&&r.jsx("span",{className:"ml-auto text-[10px] font-semibold tracking-tight text-slate-400 uppercase",children:"Current"})]},ae.key)})})]}),r.jsxs(mu,{children:[r.jsx(pu,{asChild:!0,children:r.jsxs("button",{className:"flex items-center justify-between gap-3 px-5 h-[52px] min-w-[150px] rounded-[18px] bg-[#2A2D3C]/80 hover:bg-[#34384A] text-white backdrop-blur-md border border-white/10 shadow-xl transition-all font-semibold text-[13px] text-left",children:[r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx(Zs,{className:"w-4 h-4 opacity-70"}),r.jsxs("div",{className:"leading-tight",children:[r.jsx("div",{children:"Quick"}),r.jsx("div",{children:"Links"})]})]}),r.jsx(uo,{className:"w-4 h-4 opacity-50"})]})}),r.jsxs(Ec,{align:"start",className:"w-56 p-2 rounded-2xl shadow-xl border-slate-100",children:[r.jsxs(ln,{onClick:()=>e(Xe("GearList")+"?trip_id="+Q.id),className:"rounded-xl cursor-pointer p-3 font-semibold tracking-tight mb-1 text-slate-700",children:[r.jsx(ri,{className:"w-4 h-4 mr-3 text-blue-500"})," Gear & Food"]}),r.jsxs(ln,{onClick:()=>e(Xe("Chat")+"?trip_id="+Q.id),className:"rounded-xl cursor-pointer p-3 font-semibold tracking-tight mb-1 text-slate-700",children:[r.jsx(dw,{className:"w-4 h-4 mr-3 text-indigo-500"})," Trip Chat"]}),r.jsxs(ln,{onClick:()=>{a("Itinerary"),setTimeout(()=>{var ae;return(ae=document.getElementById("route-map"))==null?void 0:ae.scrollIntoView({behavior:"smooth",block:"center"})},100)},className:"rounded-xl cursor-pointer p-3 font-semibold tracking-tight text-slate-700",children:[r.jsx(Zs,{className:"w-4 h-4 mr-3 text-emerald-500"})," Route Map"]})]})]}),Q.infographic_url&&r.jsxs("button",{onClick:()=>{const ae=document.createElement("a");ae.href=Q.infographic_url,ae.download=`Infographic-${Q.title}.pdf`,ae.target="_blank",document.body.appendChild(ae),ae.click(),document.body.removeChild(ae)},className:"flex items-center justify-center gap-3 px-5 h-[52px] min-w-[140px] rounded-[18px] bg-[#2A2D3C]/80 hover:bg-[#34384A] text-white backdrop-blur-md border border-white/10 shadow-xl transition-all font-semibold text-[13px] text-left",children:[r.jsx(Vy,{className:"w-4 h-4 opacity-70"}),r.jsxs("div",{className:"leading-tight",children:[r.jsx("div",{children:"Itinerary"}),r.jsx("div",{children:"PDF"})]})]}),(De||$e)&&r.jsxs(mu,{children:[r.jsx(pu,{asChild:!0,children:r.jsxs("button",{className:"flex items-center justify-between gap-3 px-5 h-[52px] min-w-[130px] rounded-[18px] bg-[#0F1423]/90 hover:bg-black text-white backdrop-blur-md border border-white/10 shadow-xl transition-all font-semibold text-[14px]",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Os,{className:"w-4 h-4 opacity-80"}),r.jsx("span",{children:"Manage"})]}),r.jsx(uo,{className:"w-4 h-4 opacity-50"})]})}),r.jsxs(Ec,{align:"start",className:"w-56 p-2 rounded-2xl shadow-xl border-slate-100",children:[r.jsxs(ln,{onClick:()=>e(Xe("ActivityFeed")+"?trip_id="+Q.id),className:"rounded-xl cursor-pointer p-3 font-semibold tracking-tight mb-1 text-slate-700",children:[r.jsx(Cf,{className:"w-4 h-4 mr-3 text-blue-500"})," Activity Log"]}),r.jsxs(ln,{onClick:Z,disabled:V,className:"rounded-xl cursor-pointer p-3 font-semibold tracking-tight mb-1 text-slate-700",children:[V?r.jsx(gt,{className:"w-4 h-4 mr-3 animate-spin text-indigo-500"}):r.jsx(Qs,{className:"w-4 h-4 mr-3 text-indigo-500"}),Q.infographic_url?"Update Infographic PDF":"Create Infographic"]}),!We&&!Te&&r.jsxs(r.Fragment,{children:[r.jsxs(ln,{onClick:()=>e(Xe("CreateTrip")+"?id="+Q.id),className:"rounded-xl cursor-pointer p-3 font-semibold tracking-tight mb-1 text-slate-700",children:[r.jsx(Wy,{className:"w-4 h-4 mr-3 text-slate-500"})," Edit Trip Info"]}),r.jsx("div",{className:"h-px bg-slate-100 my-1 mx-2"}),r.jsxs(ln,{onClick:()=>{window.confirm("End this trip? This will notify all members to check in when they get home safely. This action cannot be undone.")&&O.mutate()},className:"rounded-xl cursor-pointer p-3 font-semibold tracking-tight mb-1 text-slate-700",children:[r.jsx(lS,{className:"w-4 h-4 mr-3 text-emerald-500"})," End Trip"]}),r.jsxs(ln,{onClick:()=>{window.confirm("Cancel this trip? All members will see the trip as cancelled. This action cannot be undone.")&&D.mutate()},className:"rounded-xl cursor-pointer p-3 font-semibold tracking-tight mb-1 text-amber-600 focus:text-amber-700 focus:bg-amber-50",children:[r.jsx(Ug,{className:"w-4 h-4 mr-3"})," Cancel Trip"]}),r.jsxs(ln,{onClick:()=>{window.confirm("Are you sure you want to delete this trip?")&&W.mutate()},className:"rounded-xl cursor-pointer p-3 font-semibold tracking-tight text-red-600 focus:text-red-700 focus:bg-red-50",children:[r.jsx(us,{className:"w-4 h-4 mr-3"})," Delete Trip"]})]}),(We||Te)&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"h-px bg-slate-100 my-1 mx-2"}),r.jsxs(ln,{onClick:()=>{window.confirm("Revert this trip back to upcoming? Members will see it as an active trip again.")&&U.mutate()},className:"rounded-xl cursor-pointer p-3 font-semibold tracking-tight mb-1 text-slate-700",children:[r.jsx(uw,{className:"w-4 h-4 mr-3 text-blue-500"})," Revert to Upcoming"]}),r.jsxs(ln,{onClick:()=>{window.confirm("Are you sure you want to delete this trip?")&&W.mutate()},className:"rounded-xl cursor-pointer p-3 font-semibold tracking-tight text-red-600 focus:text-red-700 focus:bg-red-50",children:[r.jsx(us,{className:"w-4 h-4 mr-3"})," Delete Trip"]})]})]})]})]})]})]})})]}),r.jsxs("div",{className:"flex flex-col gap-8 px-4 md:px-0 w-full max-w-5xl mx-auto relative z-10",children:[r.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[Et&&r.jsxs(re.div,{initial:{opacity:0,y:10}
801,animate:{opacity:1,y:0},className:"bg-amber-50 border border-amber-200 rounded-[24px] p-5 mb-6 flex items-start gap-3",children:[r.jsx(zn,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold tracking-tight text-amber-800 text-sm",children:"Pending Approval"}),r.jsx("p",{className:"text-xs text-amber-600 mt-0.5",children:"This trip is awaiting admin/moderator approval. You can edit details, add gear & locations, but it won't be visible to others until approved."})]})]}),Xt&&r.jsxs(re.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"bg-red-50 border border-red-200 rounded-[24px] p-5 mb-6 flex items-start gap-3",children:[r.jsx(Ug,{className:"w-5 h-5 text-red-600 flex-shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold tracking-tight text-red-800 text-sm",children:"Trip Rejected"}),r.jsx("p",{className:"text-xs text-red-600 mt-0.5",children:Q.rejection_reason||"This trip was not approved. Please edit and resubmit or contact an admin."})]})]}),We&&r.jsx(Mle,{}),Te&&r.jsx(Rle,{tripId:s,user:K,members:q}),!We&&!Te&&r.jsxs("div",{className:"mb-8 relative z-20 md:hidden",children:[r.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"bg-white rounded-[28px] p-2 pr-5 shadow-xl shadow-slate-200/50 border border-slate-100 flex items-center justify-between relative z-10",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("div",{className:`w-14 h-14 rounded-[20px] flex items-center justify-center transition-colors ${Tn.bg} ${Tn.color} border ${Tn.border} ml-1`,children:r.jsx(ms,{className:"w-6 h-6",strokeWidth:2.5})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-[11px] uppercase tracking-widest text-slate-400 font-semibold tracking-tight mb-0.5",children:"Your Status"}),r.jsx("p",{className:"font-semibold tracking-tight text-lg text-slate-800 leading-none",children:Tn.label})]})]}),r.jsxs(tce,{children:[r.jsx(nce,{asChild:!0,children:r.jsx("button",{className:"bg-slate-50 text-slate-600 text-xs font-semibold tracking-tight px-4 py-2.5 rounded-xl hover:bg-slate-100 transition-colors cursor-pointer",children:j==="none"?"Tap to Join":"Tap to Change"})}),r.jsx(VO,{align:"end",className:"w-48 p-2 rounded-2xl shadow-xl border-slate-100",children:[{key:"confirmed",label:"Going",icon:ht,color:"text-emerald-600",bg:"hover:bg-emerald-50"},{key:"pending",label:"Maybe",icon:zn,color:"text-amber-600",bg:"hover:bg-amber-50"},{key:"not_going",label:"Not Going",icon:hn,color:"text-rose-600",bg:"hover:bg-rose-50"}].map(ae=>{const Se=ae.icon,Ve=j===ae.key;return r.jsxs("button",{onClick:()=>he(ae.key),className:`w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm font-semibold tracking-tight transition-colors ${ae.bg} ${Ve?"bg-slate-100":""}`,children:[r.jsx(Se,{className:`w-4 h-4 ${ae.color}`}),r.jsx("span",{className:Ve?"text-slate-900":"text-slate-600",children:ae.label}),Ve&&r.jsx("span",{className:"ml-auto text-[10px] font-semibold tracking-tight text-slate-400 uppercase",children:"Current"})]},ae.key)})})]})]}),r.jsx(Lt,{children:j==="pending"&&r.jsx(re.div,{initial:{opacity:0,height:0,y:-20},animate:{opacity:1,height:"auto",y:0},exit:{opacity:0,height:0,y:-20},className:"mx-2 mt-3 -z-10 relative",children:r.jsxs("div",{className:"px-4 text-xs font-semibold tracking-tight text-amber-700 bg-amber-50 border border-amber-200 rounded-xl py-3 flex items-center gap-2 shadow-sm",children:[r.jsx(ri,{className:"w-4 h-4 flex-shrink-0 text-amber-500"}),r.jsx("span",{children:`You're currently marked as "Maybe". RSVP "Going" to unlock gear selection for this trip!`})]})})})]}),r.jsxs("div",{className:"bg-white p-2 rounded-[28px] md:rounded-full border border-slate-200 shadow-sm flex mb-8 md:mb-12 w-full md:max-w-4xl md:mx-auto",children:[(Te?["Memories","Check-in"]:["Itinerary","Members"]).map(ae=>r.jsx("button",{onClick:()=>a(ae),className:`flex-1 py-3 md:py-4 text-center rounded-[20px] md:rounded-full text-sm md:text-[15px] font-semibold tracking-tight transition-all duration-300 ${i===ae?"bg-[#0f172a] text-white shadow-md":"text-slate-500 hover:text-slate-900 hover:bg-slate-50"}`,children:ae},ae)),!Te&&!We&&r.jsxs("button",{onClick:()=>e(Xe("GearList")+"?trip_id="+Q.id),className:"flex-1 py-3 md:py-4 text-center rounded-[20px] md:rounded-full text-sm md:text-[15px] font-semibold tracking-tight text-slate-500 hover:text-slate-900 hover:bg-slate-50 transition-all duration-300 flex justify-center items-center gap-2",children:["Gear & Food ",r.jsx(Ace,{})]})]}),i==="Memories"&&Te&&r.jsx(Ole,{tripId:s,user:K}),i==="Check-in"&&Te&&r.jsx(Dle,{members:q,user:K,tripMaxPeople:Q.max_people}),i==="Itinerary"&&r.jsxs("div",{className:"animate-in fade-in duration-300",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-slate-900 tracking-tight",children:"Route & Stops"}),!l&&r.jsx("button",{onClick:()=>{m(null);const ae=Ce.length>0?Math.max(...Ce.map(Ve=>Ve.order_index||0))+1:1,Se=Ce.length>0?Math.max(...Ce.map(Ve=>Ve.day_number||0)):1;x({title:"",description:"",address:"",lat:"",lng:"",day_number:Se,time:"",start_date:"",start_time:"",end_date:"",end_time:"",type:"camp",image_url:"",order_index:ae}),u(!0)},className:"bg-blue-50 text-blue-600 hover:bg-blue-100 p-2.5 rounded-full transition-colors",children:r.jsx(Cn,{className:"w-5 h-5"})})]}),r.jsx(Woe,{onDragEnd:fe,children:r.jsx(Ale,{droppableId:"stops-list",children:ae=>r.jsxs("div",{...ae.droppableProps,ref:ae.innerRef,className:"space-y-6 relative ml-4 md:ml-6 pb-6",children:[r.jsx("div",{className:"absolute left-[19px] top-6 bottom-4 w-1 bg-slate-100 rounded-full z-0"}),Ce==null?void 0:Ce.map((Se,Ve)=>r.jsx(cle,{draggableId:Se.id||`mock-${Ve}`,index:Ve,children:(Nt,gn)=>r.jsxs("div",{ref:Nt.innerRef,...Nt.draggableProps,className:`relative pl-14 md:pl-16 ${gn.isDragging?"z-50 opacity-95":""}`,style:Nt.draggableProps.style,children:[r.jsx("div",{...Nt.dragHandleProps,className:"absolute left-[0px] top-4 w-10 h-10 rounded-full bg-white border-4 border-slate-100 flex items-center justify-center text-blue-600 shadow-sm z-10 cursor-grab active:cursor-grabbing hover:border-blue-100 transition-colors",children:Se.type==="camp"?r.jsx(Cf,{className:"w-4 h-4"}):Se.type==="flag"?r.jsx(l6,{className:"w-4 h-4"}):r.jsx(Dn,{className:"w-4 h-4"})}),r.jsxs("div",{className:"bg-white rounded-[32px] p-5 shadow-[0_4px_20px_rgb(0,0,0,0.03)] border border-slate-100 group transition-all",children:[Se.image_url&&r.jsx("div",{className:"mb-4 rounded-[24px] overflow-hidden h-40 border border-slate-100 relative group-hover:shadow-md transition-shadow",children:r.jsx("img",{src:Se.image_url,alt:Se.title,className:"w-full h-full object-cover"})}),r.jsxs("div",{className:"flex justify-between items-start mb-1",children:[r.jsxs("div",{children:[r.jsx("h4",{className:"font-semibold tracking-tight text-xl text-slate-900 leading-tight",children:Se.title}),r.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[r.jsxs("span",{className:"bg-slate-100 text-slate-600 text-[10px] font-semibold tracking-tight uppercase tracking-wider px-2.5 py-1 rounded-lg",children:["Day ",Se.day_number]}),(Se.time||Se.start_time||Se.start_date)&&r.jsxs("span",{className:"text-slate-400 text-xs font-semibold tracking-tight flex items-center",children:[r.jsx(zn,{className:"w-3.5 h-3.5 mr-1"}),Se.start_date?`${$n(new Date(Se.start_date),"MMM do")} `:"",Se.start_time||Se.time,(Se.end_date||Se.end_time)&&" - ",Se.end_date?`${$n(new Date(Se.end_date),"MMM do")} `:"",Se.end_time]})]})]}),r.jsxs("div",{className:"flex gap-2",children:[Se.difficulty&&r.jsx("span",{className:"inline-flex items-center text-[10px] font-semibold tracking-tight tracking-wider text-rose-600 bg-rose-50 px-2.5 py-1 rounded-lg uppercase",children:Se.difficulty}),(!(Q!=null&&Q.created_by)||(K==null?void 0:K.email)&&(Q==null?void 0:Q.created_by)===K.email)&&r.jsx("button",{onClick:Mt=>{Mt.stopPropagation(),x(Se),m(Se.id),u(!0)},className:"p-2 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-xl transition-colors",children:r.jsx(Wy,{className:"w-4 h-4"})})]})]}),r.jsx(vT,{stop:Se,tripStartDate:Q==null?void 0:Q.start_date}),Se.description&&r.jsx("p",{className:"text-slate-500 text-sm leading-relaxed mt-4 font-medium",children:Se.description}),(Se.address||Se.lat||Se.lng)&&r.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-50 flex flex-col gap-2",children:[Se.address&&r.jsxs("a",{href:`https://maps.google.com/?q=${Se.lat&&Se.lng?`${Se.lat},${Se.lng}`:encodeURIComponent(Se.address||"")}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm font-semibold tracking-tight text-blue-600 hover:text-blue-700 transition-colors w-fit",children:[r.jsx(Dn,{className:"w-4 h-4 mr-1.5"}
801)," ",Se.address]}),(Se.lat||Se.lng)&&r.jsxs("button",{onClick:()=>S(Se),className:"text-[11px] font-semibold tracking-tight tracking-widest text-slate-400 hover:text-slate-600 uppercase flex items-center",children:["GPS: ",Se.lat,", ",Se.lng," ",r.jsx(uo,{className:"w-3 h-3 ml-1"})]})]})]})]})},Se.id||`mock-${Ve}`)),ae.placeholder]})})}),r.jsx($i,{open:l,onOpenChange:ae=>{ae||(u(!1),m(null))},children:r.jsxs(ci,{className:"sm:max-w-2xl max-h-[90vh] overflow-y-auto rounded-[32px] p-6 md:p-8",children:[r.jsxs(di,{className:"mb-2",children:[r.jsx(ui,{className:"font-semibold tracking-tight text-2xl text-slate-900 text-left",children:h?"Edit Location":"New Location"}),r.jsx(Vu,{className:"sr-only",children:"Add or edit location details."})]}),r.jsxs("div",{className:"space-y-6 mb-8",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-semibold tracking-tight tracking-wider text-slate-500 uppercase mb-2 ml-1",children:"Location Title"}),r.jsx("input",{type:"text",placeholder:"e.g. Base Camp Alpha",value:g.title,onChange:ae=>x({...g,title:ae.target.value}),className:"w-full bg-slate-50 border border-slate-200/60 rounded-2xl p-4 text-base font-semibold tracking-tight text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-blue-500/30 transition-all"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-semibold tracking-tight tracking-wider text-slate-500 uppercase mb-2 ml-1",children:"Notes / Description"}),r.jsx("textarea",{placeholder:"Add important details here...",value:g.de
801scription,onChange:ae=>x({...g,description:ae.target.value}),className:"w-full bg-slate-50 border border-slate-200/60 rounded-2xl p-4 text-sm font-medium text-slate-700 h-28 focus:outline-none focus:ring-2 focus:ring-blue-500/30 transition-all resize-none placeholder:text-slate-400"})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{className:"md:col-span-2",children:[r.jsx("label",{className:"block text-xs font-semibold tracking-tight tracking-wider text-slate-500 uppercase mb-2 ml-1",children:"Day #"}),r.jsx("input",{type:"number",min:"1",value:g.day_number||"",onChange:ae=>x({...g,day_number:parseInt(ae.target.value)}),className:"w-full bg-slate-50 border border-slate-200/60 rounded-2xl p-4 text-sm font-semibold tracking-tight text-slate-900 focus:outline-none focus:ring-2 focus:ring-blue-500/30 transition-all"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-semibold tracking-tight tracking-wider text-slate-500 uppercase mb-2 ml-1",children:"Start Date & Time"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("input",{type:"date",value:g.start_date||"",onChange:ae=>{const Se=ae.target.value;x(Ve=>({...Ve,start_date:Se,end_date:!Ve.end_date||Ve.end_date===Ve.start_date?Se:Ve.end_date}))},className:"w-full bg-slate-50 border border-slate-200/60 rounded-xl p-3 text-sm font-semibold tracking-tight text-slate-900 focus:outline-none focus:ring-2 focus:ring-blue-500/30 transition-all"}),r.jsx("input",{type:"time",value:g.start_time||g.time||"",onChange:ae=>{const Se=ae.target.value;x(Ve=>({...Ve,start_time:Se,time:Se,end_time:!Ve.end_time||Ve.end_time===Ve.start_time?Se:Ve.end_time}))},className:"w-full bg-slate-50 border border-slate-200/60 rounded-xl p-3 text-sm font-semibold tracking-tight text-slate-900 focus:outline-none focus:ring-2 focus:ring-blue-500/30 transition-all"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-semibold tracking-tight tracking-wider text-slate-500 uppercase mb-2 ml-1",children:"End Date & Time"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("input",{type:"date",value:g.end_date||"",onChange:ae=>x({...g,end_date:ae.target.value}),className:"w-full bg-slate-50 border border-slate-200/60 rounded-xl p-3 text-sm font-semibold tracking-tight text-slate-900 focus:outline-none focus:ring-2 focus:ring-blue-500/30 transition-all"}),r.jsx("input",{type:"time",value:g.end_time||"",onChange:ae=>x({...g,end_time:ae.target.value}),className:"w-full bg-slate-50 border border-slate-200/60 rounded-xl p-3 text-sm font-semibold tracking-tight text-slate-900 focus:outline-none focus:ring-2 focus:ring-blue-500/30 transition-all"})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-semibold tracking-tight tracking-wider text-slate-500 uppercase mb-2 ml-1",children:"Location Details"}),r.jsxs("div",{className:"space-y-3 p-4 bg-slate-50 rounded-3xl border border-slate-200/60",children:[r.jsx("input",{type:"text",placeholder:"Address (e.g. 123 Trailhead Rd)",value:g.address,onChange:ae=>x({...g,address:ae.target.value}),className:"w-full bg-white border border-slate-200 rounded-xl p-3.5 text-sm font-semibold tracking-tight text-slate-900 focus:outline-none focus:ring-2 focus:ring-blue-500/30 transition-all"}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsx("input",{type:"number",step:"any",placeholder:"Latitude",value:g.lat,onChange:ae=>x({...g,lat:ae.target.value?parseFloat(ae.target.value):""}),className:"w-full bg-white border border-slate-200 rounded-xl p-3 text-sm font-semibold tracking-tight text-slate-900 focus:outline-none focus:ring-2 focus:ring-blue-500/30 transition-all"}),r.jsx("input",{type:"number",step:"any",placeholder:"Longitude",value:g.lng,onChange:ae=>x({...g,lng:ae.target.value?parseFloat(ae.target.value):""}),className:"w-full bg-white border border-slate-200 rounded-xl p-3 text-sm font-semibold tracking-tight text-slate-900 focus:outline-none focus:ring-2 focus:ring-blue-500/30 transition-all"})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-semibold tracking-tight tracking-wider text-slate-500 uppercase mb-2 ml-1",children:"Cover Photo"}),r.jsxs("div",{className:"relative h-40 w-full rounded-[24px] flex flex-col items-center justify-center overflow-hidden border-2 border-dashed border-slate-200 bg-slate-50 hover:bg-slate-100 transition-colors",children:[g.image_url?r.jsx("img",{src:g.image_url,alt:"Location",className:"w-full h-full object-cover absolute inset-0"}):null,r.jsxs("div",{className:`absolute inset-0 flex flex-col items-center justify-center transition-all duration-300 ${g.image_url?"bg-black/40 hover:bg-black/50 opacity-0 hover:opacity-100":""}`,children:[r.jsx(Qs,{className:`w-8 h-8 mb-2 ${g.image_url?"text-white":"text-slate-400"}`}),r.jsx("span",{className:`text-xs font-semibold tracking-tight tracking-wide ${g.image_url?"text-white":"text-slate-500"}`,children:v?"Uploading...":g.image_url?"Change photo":"Upload photo"})]}),r.jsx("input",{type:"file",accept:"image/*",onChange:ce,disabled:v,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10"})]})]})]}),r.jsx("button",{onClick:me,disabled:ie.isPending||le.isPending,className:"w-full bg-slate-900 hover:bg-black text-white font-semibold tracking-tight py-4 rounded-2xl flex items-center justify-center active:scale-[0.98] transition-all shadow-xl shadow-slate-900/20 text-lg",children:ie.isPending||le.isPending?r.jsx(gt,{className:"w-6 h-6 animate-spin"}):h?"Update Location":"Save to Itinerary"})]})}),(()=>{const ae=(Ce==null?void 0:Ce.filter(Se=>Se.lat&&Se.lng))||[];
801if(ae.length>0){const Se=ae.map(Mt=>Mt.lat),Ve=ae.map(Mt=>Mt.lng),Nt=[[Math.min(...Se),Math.min(...Ve)],[Math.max(...Se),Math.max(...Ve)]],gn=ae.map(Mt=>[Mt.lat,Mt.lng]);return r.jsxs("div",{className:"mt-12 mb-8",id:"route-map",children:[r.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-slate-900 tracking-tight mb-6",children:"Interactive Route Map"}),r.jsx("div",{className:"rounded-[40px] p-2 bg-white shadow-xl shadow-slate-200/40 border border-slate-100",children:r.jsx("div",{className:"h-[350px] md:h-[450px] w-full rounded-[32px] overflow-hidden relative z-0",children:r.jsxs(jce,{bounds:Nt,className:"w-full h-full",zoomControl:!1,scrollWheelZoom:!1,children:[r.jsx(Pce,{url:"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",attribution:"© OpenStreetMap contributors"}),r.jsx(kce,{positions:gn,color:"#2563eb",weight:4,opacity:.8,dashArray:"8, 12"}),ae.map(Mt=>r.jsx(Sce,{position:[Mt.lat,Mt.lng],children:r.jsxs(Cce,{className:"rounded-xl font-semibold tracking-tight border-0 shadow-xl",children:[r.jsx("div",{className:"text-sm text-slate-900 mb-0.5",children:Mt.title}),r.jsxs("div",{className:"text-xs text-blue-600",children:["Day ",Mt.day_number]})]})},Mt.id))]})})})]})}return null})()]}),i==="Members"&&r.jsxs("div",{className:"animate-in fade-in duration-300",children:[!Et&&!Xt||$e?r.jsxs("div",{className:"bg-slate-900 p-8 rounded-[40px] text-white shadow-2xl shadow-slate-900/20 mb-10 relative overflow-hidden",children:[r.jsx("div",{className:"absolute top-0 right-0 p-8 opacity-5",children:r.jsx(Li,{className:"w-48 h-48 -mt-10 -mr-10"})}),r.jsx("h3",{className:"font-semibold tracking-tight text-2xl tracking-tight mb-2 relative z-10",children:"Expand your crew"}),r.jsx("p",{className:"text-slate-400 font-medium mb-6 relative z-10 max-w-sm",children:"Invite friends to join this adventure, coordinate gear, and chat."}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 relative z-10",children:[r.jsx("input",{type:"email",value:E,onChange:ae=>R(ae.target.value),placeholder:"[email protected]",className:"flex-1 bg-white/10 border border-white/10 text-white placeholder:text-slate-500 rounded-2xl px-5 py-4 focus:outline-none focus:bg-white/20 transition-colors font-semibold"}),r.jsx("button",{onClick:be,disabled:A,className:"bg-blue-600 hover:bg-blue-500 text-white font-semibold tracking-tight px-8 py-4 rounded-2xl active:scale-[0.98] transition-all flex justify-center",children:A?r.jsx(gt,{className:"w-6 h-6 animate-spin"}):"Send Invite"})]}),r.jsxs("button",{onClick:()=>navigator.clipboard.writeText(window.location.href),className:"mt-6 flex items-center text-sm font-semibold tracking-tight text-slate-400 hover:text-white transition-colors",children:[r.jsx(Zu,{className:"w-4 h-4 mr-2"})," Copy link instead"]})]}):r.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-[28px] p-6 mb-10 text-center",children:[r.jsx(zn,{className:"w-8 h-8 text-amber-500 mx-auto mb-3"}),r.jsx("h3",{className:"font-semibold tracking-tight text-amber-800 mb-1",children:"Invites Disabled"}),r.jsx("p",{className:"text-sm text-amber-600",children:"You can invite members after this trip is approved by an admin or moderator."})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsx("h3",{className:"text-2xl font-semibold tracking-tight text-slate-900 tracking-tight",children:"The Crew"}),r.jsxs("span",{className:"bg-blue-50 text-blue-700 px-3 py-1 rounded-xl text-sm font-semibold tracking-tight",children:[(q==null?void 0:q.length)||0||1,Q.max_people?` / ${Q.max_people}`:""]})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:q&&q.length>0?q.map(ae=>{const Se=ae.user_email===(K==null?void 0:K.email),Ve={going:"text-emerald-600 bg-emerald-50",maybe:"text-amber-600 bg-amber-50",not_going:"text-rose-600 bg-rose-50",pending:"text-slate-500 bg-slate-100"}[ae.rsvp_status]||"text-slate-500 bg-slate-100",Nt={going:"Going",maybe:"Maybe",not_going:"Not Going",pending:"Pending"}[ae.rsvp_status]||"Pending";return r.jsxs("div",{className:"bg-white p-5 rounded-[28px] border border-slate-100 shadow-sm flex items-center justify-between group hover:shadow-md transition-shadow",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsx("div",{className:"w-14 h-14 roun
801ded-full overflow-hidden bg-slate-100 border-2 border-slate-50",children:r.jsx(Js,{user:ae.user_email===(K==null?void 0:K.email)?K:void 0,email:ae.user_email,alt:ae.user_name,className:"w-full h-full object-cover"})}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold tracking-tight text-slate-900 text-lg leading-tight",children:ae.user_name||ae.user_email.split("@")[0]}),r.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[ae.role==="admin"&&r.jsx("span",{className:"text-[10px] font-semibold tracking-tight uppercase tracking-wider text-blue-600",children:"Admin"}),Se&&r.jsx("span",{className:"text-[10px] font-semibold tracking-tight uppercase tracking-wider text-slate-400",children:"You"})]})]})]}),r.jsx("span",{className:`px-3 py-1.5 rounded-xl text-xs font-semibold tracking-tight ${Ve}`,children:Nt})]},ae.id)}):r.jsxs("div",{className:"bg-white p-5 rounded-[28px] border border-slate-100 shadow-sm flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsx("div",{className:"w-14 h-14 rounded-full overflow-hidden bg-slate-100 border-2 border-slate-50",children:r.jsx(Js,{user:K,alt:"You",className:"w-full h-full object-cover"})}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold tracking-tight text-slate-900 text-lg leading-tight",children:(K==null?void 0:K.full_name)||"You"}),r.jsx("p",{className:"text-[10px] font-semibold tracking-tight uppercase tracking-wider text-blue-600 mt-1",children:"Admin"})]})]}),r.jsx("span",{className:"px-3 py-1.5 rounded-xl text-xs font-semibold tracking-tight text-emerald-600 bg-emerald-50",children:"Going"})]})})]})]})]})," "]}),r.jsx(Lt,{children:N&&r.jsx(re.div,{initial:{opacity:0}
801,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-end md:items-center justify-center bg-slate-900/40 backdrop-blur-sm md:p-4",onClick:()=>S(null),children:r.jsxs(re.div,{initial:{opacity:0,y:100},animate:{opacity:1,y:0},exit:{opacity:0,y:100},className:"bg-white rounded-t-[40px] md:rounded-[40px] w-full max-w-lg overflow-hidden shadow-2xl relative",onClick:ae=>ae.stopPropagation(),children:[r.jsx("div",{className:"absolute top-4 left-0 right-0 flex justify-center md:hidden z-10",children:r.jsx("div",{className:"w-12 h-1.5 bg-white/50 backdrop-blur-md rounded-full"})}),N.image_url&&r.jsxs("div",{className:"h-64 w-full relative",children:[r.jsx("img",{src:N.image_url,alt:N.title,className:"w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-slate-900/60 to-transparent"}),r.jsx("button",{onClick:()=>S(null),className:"absolute top-6 right-6 p-2 bg-white/20 text-white rounded-full hover:bg-white/30 backdrop-blur-md transition-colors",children:r.jsx(hn,{className:"w-5 h-5"})}),r.jsxs("div",{className:"absolute bottom-6 left-6 right-6 text-white",children:[r.jsx("h3",{className:"text-3xl font-semibold tracking-tight tracking-tight mb-2 drop-shadow-md",children:N.title}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("span",{className:"bg-white/20 backdrop-blur-md text-white text-xs font-semibold tracking-tight px-3 py-1 rounded-lg",children:["Day ",N.day_number]}),(N.time||N.start_time||N.start_date)&&r.jsxs("span",{className:"text-white/90 text-sm font-semibold tracking-tight flex items-center drop-shadow-md",children:[r.jsx(zn,{className:"w-4 h-4 mr-1"}),N.start_date?`${$n(new Date(N.start_date),"MMM do")} `:"",N.start_time||N.time,(N.end_date||N.end_time)&&" - ",N.end_date?`${$n(new Date(N.end_date),"MMM do")} `:"",N.end_time]})]})]})]}),r.jsxs("div",{className:"p-8 max-h-[70vh] overflow-y-auto",children:[!N.image_url&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex justify-between items-start mb-6",children:[r.jsx("h3",{className:"text-3xl font-semibold tracking-tight tracking-tight text-slate-900",children:N.title}),r.jsx("button",{onClick:()=>S(null),className:"p-2 bg-slate-100 hover:bg-slate-200 rounded-full text-slate-600 transition-colors",children:r.jsx(hn,{className:"w-5 h-5"})})]}),r.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[r.jsxs("span",{className:"bg-slate-100 text-slate-600 text-xs font-semibold tracking-tight px-3 py-1 rounded-lg",children:["Day ",N.day_number]}),(N.time||N.start_time||N.start_date)&&r.jsxs("span",{className:"text-slate-500 text-sm font-semibold tracking-tight flex items-center",children:[r.jsx(zn,{className:"w-4 h-4 mr-1"}),N.start_date?`${$n(new Date(N.start_date),"MMM do")} `:"",N.start_time||N.time,(N.end_date||N.end_time)&&" - ",N.end_date?`${$n(new Date(N.end_date),"MMM do")} `:"",N.end_time]})]})]}),r.jsx("div",{className:"mb-6",children:r.jsx(vT,{stop:N,tripStartDate:Q==null?void 0:Q.start_date})}),N.description&&r.jsx("p",{className:"text-slate-600 font-medium mb-8 leading-relaxed text-[15px]",children:N.description}),(N.address||N.lat||N.lng)&&r.jsxs("div",{className:"mb-8 space-y-3 p-5 bg-slate-50 rounded-[24px] border border-slate-100",children:[N.address&&r.jsxs("p",{className:"text-sm font-semibold tracking-tight text-slate-800 flex items-center",children:[r.jsx(Dn,{className:"w-4 h-4 mr-2 text-blue-500"})," ",N.address]}),(N.lat||N.lng)&&r.jsxs("p",{className:"text-xs font-semibold tracking-tight text-slate-400 uppercase tracking-wider pl-6",children:["GPS: ",N.lat||"N/A",", ",N.lng||"N/A"]})]}),r.jsx("div",{className:"w-full rounded-[24px] overflow-hidden border border-slate-100 bg-slate-50 shadow-inner p-1.5",children:r.jsx("iframe",{width:"100%",height:"200",className:"rounded-[18px]",style:{border:0},loading:"lazy",allowFullScreen:!0,src:`https://maps.google.com/maps?q=${N.lat&&N.lng?`${N.lat},${N.lng}`:encodeURIComponent(N.address||N.title)}&t=&z=15&ie=UTF8&iwloc=&output=embed`})})]})]})})}),r.jsx("div",{className:"md:hidden fixed bottom-6 left-6 right-6 z-50",children:r.jsxs("div",{className:"bg-white/90 backdrop-blur-xl border border-slate-200/60 p-2.5 rounded-[32px] flex justify-around items-center shadow-2xl",children:[r.jsxs("button",{onClick:()=>e(Xe("Home")),className:"flex flex-col items-center justify-center w-full text-slate-400 hover:text-slate-900 transition-colors",children:[r.jsx(Ii,{className:"w-6 h-6 mb-1",strokeWidth:2}),r.jsx("span",{className:"text-[9px] font-semibold tracking-tight tracking-widest uppercase",children:"Home"})]}),r.jsxs("button",{onClick:()=>e(Xe("GearList")+"?trip_id="+Q.id),className:"flex flex-col items-center justify-center w-full text-slate-400 hover:text-slate-900 transition-colors",children:[r.jsx(ri,{className:"w-6 h-6 mb-1",strokeWidth:2}),r.jsx("span",{className:"text-[9px] font-semibold tracking-tight tracking-widest uppercase",children:"Gear"})]}),r.jsxs("button",{onClick:()=>{a("Itinerary"),setTimeout(()=>{var ae;return(ae=document.getElementById("route-map"))==null?void 0:ae.scrollIntoView({behavior:"smooth",block:"center"})},100)},className:"flex flex-col items-center justify-center w-full text-slate-400 hover:text-slate-900 transition-colors",children:[r.jsx(Zs,{className:"w-6 h-6 mb-1",strokeWidth:2}),r.jsx("span",{className:"text-[9px] font-semibold tracking-tight tracking-widest uppercase",children:"Map"})]}),r.jsxs("button",{onClick:()=>e(Xe("Chat")+"?trip_id="+Q.id),className:"flex flex-col items-center justify-center w-full text-slate-400 hover:text-slate-900 transition-colors relative",children:[r.jsx(dw,{className:"w-6 h-6 mb-1",strokeWidth:2}),r.jsx("span",{className:"absolute top-0 right-[22%] w-2.5 h-2.5 bg-blue-500 rounded-full border-2 border-white"}),r.jsx("span",{className:"text-[9px] font-semibold tracking-tight tracking-widest uppercase",children:"Chat"})]})]})}),r.jsx(Lt,{children:V&&r.jsx(re.div,{initial:{opacity:0}
801,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center bg-slate-900/60 backdrop-blur-sm p-4",children:r.jsx(re.div,{initial:{scale:.9,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},exit:{scale:.9,opacity:0,y:20},className:"bg-white rounded-3xl shadow-2xl p-8 max-w-sm w-full text-center border border-slate-100",children:H==="error"?r.jsxs("div",{className:"flex flex-col items-center",children:[r.jsx("div",{className:"w-16 h-16 bg-red-100 text-red-600 rounded-full flex items-center justify-center mb-4",children:r.jsx(hn,{className:"w-8 h-8"})}),r.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Generation Failed"}),r.jsx("p",{className:"text-slate-500 text-sm",children:"We couldn't generate your infographic right now. Please try again."})]}):H==="success"?r.jsxs("div",{className:"flex flex-col items-center",children:[r.jsx("div",{className:"w-16 h-16 bg-emerald-100 text-emerald-600 rounded-full flex items-center justify-center mb-4",children:r.jsx(ht,{className:"w-8 h-8"})}),r.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Infographic Ready!"}),r.jsx("p",{className:"text-slate-500 text-sm",children:"Your new trip itinerary PDF has been generated and saved."})]}):r.jsxs("div",{className:"flex flex-col items-center",children:[r.jsxs("div",{className:"w-16 h-16 bg-blue-50 text-blue-600 rounded-full flex items-center justify-center mb-6 relative",children:[r.jsx(gt,{className:"w-8 h-8 animate-spin"}),r.jsx("div",{className:"absolute inset-0 border-4 border-blue-200 rounded-full opacity-20"})]}),r.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Creating Magic..."}),r.jsxs("div",{className:"space-y-3 w-full mt-4",children:[r.jsxs("div",{className:`flex items-center text-sm font-medium transition-colors duration-300 ${["capturing","pdf","uploading"].includes(H)?"text-slate-800":"text-slate-400"}`,children:[["pdf","uploading"].includes(H)?r.jsx(ht,{className:"w-4 h-4 mr-3 text-emerald-500"}):r.jsx("div",{className:"w-4 h-4 mr-3 rounded-full border-2 border-current opacity-50"}),"Capturing beautiful layout"]}),r.jsxs("div",{className:`flex items-center text-sm font-medium transition-colors duration-300 ${["pdf","uploading"].includes(H)?"text-slate-800":"text-slate-400"}`,children:[["uploading"].includes(H)?r.jsx(ht,{className:"w-4 h-4 mr-3 text-emerald-500"}):r.jsx("div",{className:"w-4 h-4 mr-3 rounded-full border-2 border-current opacity-50"}),"Converting to PDF format"]}),r.jsxs("div",{className:`flex items-center text-sm font-medium transition-colors duration-300 ${["uploading"].includes(H)?"text-slate-800":"text-slate-400"}`,children:[r.jsx("div",{className:"w-4 h-4 mr-3 rounded-full border-2 border-current opacity-50"}),"Saving to your trip"]})]})]})})})}),r.jsx("div",{className:"overflow-hidden fixed pointer-events-none",style:{left:"-9999px",top:0},children:r.jsxs("div",{id:"infographic-container",className:"w-[800px] bg-white relative pb-32",style:{minHeight:"1131px",fontFamily:"Inter, sans-serif"},children:[r.jsxs("div",{className:"h-[400px] relative w-full",children:[r.jsx("img",{src:(Q==null?void 0:Q.cover_image_url)||"https://images.unsplash.com/photo-1464822759023-fed622ff2c3b",className:"w-full h-full object-cover",crossOrigin:"anonymous",alt:"cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-slate-900 via-slate-900/40 to-transparent"}),r.jsx("div",{className:"absolute bottom-0 left-0 p-10 text-white w-full",children:r.jsxs("div",{className:"flex justify-between items-end",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-5xl font-bold tracking-tight mb-4 drop-shadow-md leading-tight",children:Q==null?void 0:Q.title}),r.jsxs("div",{className:"flex gap-6 text-lg font-medium text-slate-100",children:[(Q==null?void 0:Q.location)&&r.jsxs("span",{className:"flex items-center",children:[r.jsx(Dn,{className:"w-5 h-5 mr-2 text-emerald-400"})," ",Q.location]}),r.jsxs("span",{className:"flex items-center",children:[r.jsx(pa,{className:"w-5 h-5 mr-2 text-blue-400"})," ",Q!=null&&Q.start_date?$n(new Date(Q.start_date),"MMM do, yyyy"):""]})]})]}),r.jsx("div",{className:"text-right shrink-0 ml-4",children:r.jsxs("div",{className:"bg-white/20 backdrop-blur-md px-5 py-3 rounded-2xl border border-white/30 text-center shadow-xl",children:[r.jsx("div",{className:"text-xs uppercase tracking-widest text-slate-200 mb-1 font-semibold",children:"Difficulty"}),r.jsx("div",{className:"text-2xl font-bold text-white",children:(Q==null?void 0:Q.difficulty)||"Moderate"})]})})]})})]}),r.jsxs("div",{className:"p-10 text-slate-800",children:[(Q==null?void 0:Q.description)&&r.jsxs("div",{className:"mb-12",children:[r.jsxs("h3",{className:"text-xl font-bold text-slate-400 uppercase tracking-widest mb-4 border-b border-slate-100 pb-3 flex items-center",children:[r.jsx(tx,{className:"w-5 h-5 mr-2"})," About the trip"]}),r.jsx("p",{className:"text-xl leading-relaxed font-medium text-slate-700",children:Q.description})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-8 mb-12",children:[r.jsxs("div",{className:"bg-slate-50 p-8 rounded-3xl border border-slate-100 shadow-sm",children:[r.jsx("h3",{className:"text-sm font-bold text-slate-400 uppercase tracking-widest mb-6",children:"Trip Overview"}),r.jsxs("ul",{className:"space-y-6",children:[r.jsxs("li",{className:"flex items-center text-xl font-semibold text-slate-700",children:[r.jsx("div",{className:"w-12 h-12 rounded-2xl bg-blue-100 text-blue-600 flex items-center justify-center mr-5 shadow-sm",children:r.jsx(Li,{className:"w-6 h-6"})}),(q==null?void 0:q.length)||1," ",(q==null?void 0:q.length)===1?"Member":"Members"]}),r.jsxs("li",{className:"flex items-center text-xl font-semibold text-slate-700",children:[r.jsx("div",{className:"w-12 h-12 rounded-2xl bg-emerald-100 text-emerald-600 flex items-center justify-center mr-5 shadow-sm",children:r.jsx(zn,{className:"w-6 h-6"})}),(Q==null?void 0:Q.duration_days)||1," Days Duration"]}),r.jsxs("li",{className:"flex items-center text-xl font-semibold text-slate-700",children:[r.jsx("div",{className:"w-12 h-12 rounded-2xl bg-amber-100 text-amber-600 flex items-center justify-center mr-5 shadow-sm",children:r.jsx(Dn,{className:"w-6 h-6"})}),(Ce==null?void 0:Ce.length)||0," Locations"]})]})]}),r.jsxs("div",{className:"bg-slate-900 p-8 rounded-3xl shadow-xl flex flex-col items-center justify-center text-center relative overflow-hidden",children:[r.jsx("div",{className:"absolute top-0 right-0 p-8 opacity-5",children:r.jsx(ws,{className:"w-48 h-48 -mt-10 -mr-10"})}),r.jsx("h3",{className:"text-lg font-bold text-white mb-6 relative z-10",children:"Scan to View Trip"}),r.jsx("div",{className:"bg-white p-3 rounded-2xl shadow-lg relative z-10 mb-4",children:r.jsx("img",{src:`https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${encodeURIComponent(window.location.href)}`,className:"w-32 h-32",alt:"QR Code",crossOrigin:"anonymous"})}),r.jsx("p",{className:"text-sm font-medium text-slate-400 relative z-10",children:"Join the adventure, RSVP, and see the full gear list!"})]})]}),Ce&&Ce.length>0&&r.jsxs("div",{children:[r.jsxs("h3",{className:"text-xl font-bold text-slate-400 uppercase tracking-widest mb-8 border-b border-slate-100 pb-3 flex items-center",children:[r.jsx(Cf,{className:"w-5 h-5 mr-2"})," Official Itinerary"]}),r.jsx("div",{className:"space-y-6",children:Ce.map((ae,Se)=>r.jsxs("div",{className:"flex bg-white border border-slate-200 rounded-3xl p-6 shadow-sm break-inside-avoid relative overflow-hidden",children:[r.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-2 bg-blue-500"}),r.jsx("div",{className:"mr-6 flex flex-col items-center",children:r.jsx("div",{className:"w-14 h-14 roun
801ded-full bg-blue-50 text-blue-600 border border-blue-100 flex items-center justify-center font-bold text-2xl shadow-sm",children:Se+1})}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex justify-between items-start mb-2",children:[r.jsx("h4",{className:"text-2xl font-bold text-slate-900 leading-tight pr-4",children:ae.title}),r.jsxs("span",{className:"bg-slate-100 text-slate-600 px-4 py-1.5 rounded-xl text-sm font-bold uppercase tracking-wider shrink-0",children:["Day ",ae.day_number]})]}),(ae.time||ae.start_time||ae.start_date)&&r.jsxs("div",{className:"text-slate-500 font-semibold text-base mb-3 flex items-center bg-slate-50 w-fit px-3 py-1.5 rounded-lg border border-slate-100",children:[r.jsx(zn,{className:"w-4 h-4 mr-2 text-blue-500"}),ae.start_date?`${$n(new Date(ae.start_date),"MMM do")} `:"",ae.start_time||ae.time||"Anytime"]}),ae.description&&r.jsx("p",{className:"text-slate-600 font-medium text-lg leading-relaxed mb-4",children:ae.description}),ae.address&&r.jsxs("p",{className:"text-base font-semibold text-blue-600 flex items-center mt-2",children:[r.jsx(Dn,{className:"w-5 h-5 mr-2 text-blue-400"})," ",ae.address]})]})]},ae.id||Se))})]})]}),r.jsxs("div",{className:"absolute bottom-0 w-full bg-slate-50 border-t border-slate-200 text-slate-500 text-center py-8",children:[r.jsxs("div",{className:"flex items-center justify-center gap-3 text-xl font-bold mb-2",children:[r.jsx(ws,{className:"w-8 h-8 text-blue-600"}),r.jsx("span",{className:"text-slate-900 tracking-tight",children:"WeAllCamp"})]}),r.jsxs("p",{className:"text-base font-medium",children:["Create your own adventures at ",r.jsx("span",{className:"text-blue-600 font-semibold",children:"weallcamp.com"})]})]})]})})]})}const Ace=()=>r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M7 17L17 7"}),r.jsx("path",{d:"M7 7h10v10"})]});function Mce(){const e=Kn(),[t,n]=w.useState("upcoming"),[s,i]=w.useState("All"),[a,l]=w.useState(""),[u,h]=w.useState("all"),[m,g]=w.useState("grid"),{data:x}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),{data:v,isLoading:_}=Re({queryKey:["trips"],queryFn:()=>ne.entities.Trip.list("-start_date").catch(()=>[])}),N=v||[],{data:S}=Re({queryKey:["myMemberships",x==null?void 0:x.email],queryFn:()=>x!=null&&x.email?ne.entities.TripMember.filter({user_email:x.email}).catch(()=>[]):[],enabled:!!(x!=null&&x.email)}),j=(S==null?void 0:S.map(A=>A.trip_id))||[],P=(x==null?void 0:x.role)==="admin"||(x==null?void 0:x.role)==="moderator",E=w.useMemo(()=>N.filter(A=>{var I,z;if(!P&&A.approval_status==="pending_approval"&&A.created_by!==(x==null?void 0:x.email)||!P&&A.approval_status==="rejected"&&A.created_by!==(x==null?void 0:x.email)||!(A.visibility!=="private"||A.created_by===(x==null?void 0:x.email)||j.includes(A.id))||u==="mine"&&!j.includes(A.id)&&A.created_by!==(x==null?void 0:x.email)||t==="upcoming"&&A.status!=="upcoming"||t==="ongoing"&&A.status!=="ongoing"||t==="completed"&&A.status!=="completed"||s!=="All"&&A.difficulty!==s)return!1;if(a){const V=a.toLowerCase();return((I=A.title)==null?void 0:I.toLowerCase().includes(V))||((z=A.location)==null?void 0:z.toLowerCase().includes(V))}return!0}),[N,x,j,t,u,a,s,P]),R=(A,B,I)=>{if(I)return`${I} days`;if(A&&B){const z=new Date(A),V=new Date(B),te=Math.ceil((V-z)/(1e3*60*60*24));return te>0?`${te} days`:"1 day"}return"TBA"};return r.jsxs("div",{className:"min-h-screen bg-[#fafcff] pb-24 md:pb-12 font-sans selection:bg-blue-200",children:[r.jsxs("div",{className:"bg-slate-900 px-6 pt-12 pb-32 md:pt-20 md:pb-36 rounded-b-[48px] relative overflow-hidden text-white shadow-2xl shadow-slate-900/20",children:[r.jsx("div",{className:"absolute inset-0 bg-[url('https://images.unsplash.com/photo-1516939884455-1445c8652f83?q=80&w=2000&auto=format&fit=crop')] bg-cover bg-center opacity-10 mix-blend-overlay pointer-events-none"}),r.jsx("div",{className:"absolute top-0 right-0 -mr-20 -mt-20 w-96 h-96 bg-blue-500/20 rounded-full blur-3xl pointer-events-none"}),r.jsx("div",{className:"absolute bottom-0 left-0 -ml-20 -mb-20 w-80 h-80 bg-emerald-500/20 rounded-full blur-3xl pointer-events-none"}),r.jsxs("div",{className:"max-w-6xl mx-auto relative z-10 flex flex-col md:flex-row md:items-end justify-between gap-8",children:[r.jsxs("div",{className:"max-w-xl",children:[r.jsxs(re.h1,{initial:{opacity:0,y:20}
801,animate:{opacity:1,y:0},className:"text-4xl md:text-6xl font-semibold tracking-tight mb-4",children:["Explore ",r.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-emerald-400",children:"Trips"})]}),r.jsx(re.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"text-slate-300 font-medium text-lg",children:"Discover your next great adventure, join communities, and explore the outdoors like never before."})]}),r.jsxs(re.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:.2},className:"flex bg-white/10 p-1.5 rounded-2xl w-full md:w-auto backdrop-blur-md border border-white/10",children:[r.jsx("button",{onClick:()=>h("all"),className:`flex-1 md:flex-none px-6 py-3 text-sm font-semibold rounded-xl transition-all ${u==="all"?"bg-white text-slate-900 shadow-sm":"text-slate-300 hover:text-white hover:bg-white/5"}`,children:"Community"}),r.jsx("button",{onClick:()=>h("mine"),className:`flex-1 md:flex-none px-6 py-3 text-sm font-semibold rounded-xl transition-all ${u==="mine"?"bg-white text-slate-900 shadow-sm":"text-slate-300 hover:text-white hover:bg-white/5"}`,children:"My Trips"})]})]})]}),r.jsxs("div",{className:"max-w-6xl mx-auto px-4 md:px-8 -mt-20 relative z-20",children:[r.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"bg-white p-4 rounded-[28px] shadow-xl shadow-slate-200/50 border border-slate-100 flex flex-col md:flex-row gap-4 items-center justify-between mb-8",children:[r.jsxs("div",{className:"relative w-full md:max-w-md",children:[r.jsx(ai,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),r.jsx("input",{type:"text",placeholder:"Search destinations, trip names...",value:a,onChange:A=>l(A.target.value),className:"w-full pl-12 pr-4 py-3.5 bg-slate-50 border-none rounded-2xl text-slate-900 font-medium placeholder:text-slate-400 focus:bg-slate-100 focus:ring-0 transition-colors outline-none"})]}),r.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4 w-full md:w-auto justify-between md:justify-end overflow-x-auto hide-scrollbar",children:[r.jsx("div",{className:"flex bg-slate-50 p-1.5 rounded-2xl shrink-0",children:["All","Easy","Moderate","Hard","Expert"].map(A=>r.jsx("button",{onClick:()=>i(A),className:`px-4 py-2 rounded-xl text-sm font-semibold whitespace-nowrap transition-all ${s===A?"bg-white text-blue-600 shadow-sm":"text-slate-500 hover:text-slate-700"}`,children:A},A))}),r.jsxs("div",{className:"flex bg-slate-50 p-1.5 rounded-2xl shrink-0 hidden sm:flex",children:[r.jsx("button",{onClick:()=>g("grid"),className:`p-2 rounded-xl transition-all ${m==="grid"?"bg-white text-blue-600 shadow-sm":"text-slate-400 hover:text-slate-600"}`,children:r.jsx(W1,{className:"w-5 h-5"})}),r.jsx("button",{onClick:()=>g("list"),className:`p-2 rounded-xl transition-all ${m==="list"?"bg-white text-blue-600 shadow-sm":"text-slate-400 hover:text-slate-600"}`,children:r.jsx(S6,{className:"w-5 h-5"})})]})]})]}),r.jsx("div",{className:"flex overflow-x-auto hide-scrollbar gap-3 mb-8 pb-2",children:["upcoming","ongoing","completed"].map(A=>{const B=N.filter(I=>I.status===A&&(u==="all"||j.includes(I.id)||I.created_by===(x==null?void 0:x.email))).length;return r.jsxs("button",{onClick:()=>n(A),className:`px-6 py-3 rounded-2xl text-sm font-semibold whitespace-nowrap transition-all flex items-center gap-2.5 ${t===A?"bg-slate-900 text-white shadow-lg shadow-slate-900/20":"bg-white text-slate-500 border border-slate-200/60 hover:border-slate-300 hover:bg-slate-50 shadow-sm"}`,children:[A.charAt(0).toUpperCase()+A.slice(1),r.jsx("span",{className:`px-2.5 py-0.5 rounded-full text-xs font-bold ${t===A?"bg-white/20 text-white":"bg-slate-100 text-slate-600"}`,children:B})]},A)})}),_?r.jsx("div",{className:m==="grid"?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"flex flex-col gap-4",children:[1,2,3].map(A=>r.jsx("div",{className:`bg-white rounded-[32px] animate-pulse border border-slate-100 ${m==="grid"?"h-[400px]":"h-32"}`},A))}):E.length===0?r.jsxs(re.div,{initial:{opacity:0,scale:.95}
801,animate:{opacity:1,scale:1},className:"flex flex-col items-center justify-center py-32 text-center bg-white rounded-[40px] border border-slate-200/60 shadow-sm",children:[r.jsx("div",{className:"w-24 h-24 bg-slate-50 rounded-full flex items-center justify-center mb-6 border-8 border-white shadow-xl shadow-slate-200/50",children:r.jsx(ws,{className:"w-10 h-10 text-slate-400"})}),r.jsx("h3",{className:"text-3xl font-semibold tracking-tight text-slate-900 mb-3",children:"No trips found"}),r.jsx("p",{className:"text-slate-500 font-medium max-w-md mb-8 text-lg",children:N.length===0?"The outdoors are calling. Be the first to plan a trip!":`No ${t} trips match your current filters. Try changing your search.`}),r.jsxs("button",{onClick:()=>e(Xe("CreateTrip")),className:"bg-blue-600 hover:bg-blue-700 text-white font-semibold text-lg px-8 py-4 rounded-full flex items-center gap-2 shadow-xl shadow-blue-600/20 active:scale-95 transition-all",children:[r.jsx(Cn,{className:"w-5 h-5"})," Start Planning"]})]}):r.jsx("div",{className:m==="grid"?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"flex flex-col gap-4",children:r.jsx(Lt,{mode:"popLayout",children:E.map((A,B)=>{const I=A.max_people&&A.participants_count>=A.max_people,z=A.max_people?A.participants_count/A.max_people*100:0;return m==="grid"?r.jsxs(re.div,{layout:!0,initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,transition:{duration:.2}},transition:{duration:.4,delay:B*.05},onClick:()=>e(Xe("TripDetails")+"?id="+A.id),className:"group bg-white rounded-[32px] overflow-hidden shadow-sm hover:shadow-2xl hover:shadow-slate-200/60 transition-all cursor-pointer border border-slate-100 flex flex-col",children:[r.jsx("div",{className:"relative h-64 overflow-hidden p-3",children:r.jsxs("div",{className:"w-full h-full rounded-[24px] overflow-hidden relative",children:[r.jsx("img",{src:A.cover_image_url||"https://images.unsplash.com/photo-1501555088652-021faa106b9b",className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-700 ease-out",alt:A.title}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-slate-900/90 via-slate-900/20 to-transparent opacity-80 group-hover:opacity-90 transition-opacity"}),r.jsxs("div",{className:"absolute top-4 left-4 right-4 flex justify-between items-start",children:[r.jsx("div",{className:"flex gap-2 flex-wrap",children:A.status==="ongoing"&&r.jsxs("div",{className:"bg-emerald-500/90 backdrop-blur-md text-white text-xs font-semibold px-3 py-1.5 rounded-xl flex items-center shadow-sm",children:[r.jsx("span",{className:"w-1.5 h-1.5 bg-white rounded-full mr-1.5 animate-pulse"}),"Live Now"]})}),A.difficulty&&r.jsx("div",{className:"bg-white/20 backdrop-blur-md text-white text-[10px] font-semibold px-3 py-1.5 rounded-xl uppercase tracking-widest border border-white/20",children:A.difficulty})]}),r.jsxs("div",{className:"absolute bottom-4 left-5 right-5",children:[r.jsx("h4",{className:"font-semibold tracking-tight text-white text-2xl leading-tight mb-2 group-hover:text-blue-100 transition-colors",children:A.title}),A.location&&r.jsxs("div",{className:"flex items-center text-white/80 text-sm font-medium",children:[r.jsx(Dn,{className:"w-4 h-4 mr-1.5 opacity-80"}),r.jsx("span",{className:"truncate",children:A.location})]})]})]})}),r.jsxs("div",{className:"p-6 flex-1 flex flex-col bg-white",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-blue-50 flex items-center justify-center text-blue-600",children:r.jsx(pa,{className:"w-4 h-4"})}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[11px] font-semibold text-slate-400 uppercase tracking-widest mb-0.5",children:"Start Date"}),r.jsx("div",{className:"text-sm font-semibold text-slate-900",children:A.start_date?$n(new Date(A.start_date),"MMM dd, yyyy"):"TBA"})]})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-emerald-50 flex items-center justify-center text-emerald-600",children:r.jsx(zn,{className:"w-4 h-4"})}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[11px] font-semibold text-slate-400 uppercase tracking-widest mb-0.5",children:"Duration"}),r.jsx("div",{className:"text-sm font-semibold text-slate-900",children:R(A.start_date,A.end_date,A.duration_days)})]})]})]}),r.jsxs("div",{className:"mt-auto pt-5 border-t border-slate-100 flex flex-col gap-3",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("span",{className:"text-sm font-semibold text-slate-600 flex items-center",children:[r.jsx(Li,{className:"w-4 h-4 mr-2 text-slate-400"}),A.participants_count||1," ",A.max_people?r.jsxs("span",{className:"text-slate-400 ml-1",children:["/ ",A.max_people," joined"]}):"joined"]}),I&&r.jsx("span",{className:"text-[10px] font-bold text-rose-500 uppercase tracking-widest bg-rose-50 px-2.5 py-1 rounded-lg",children:"Full"})]}),A.max_people&&r.jsx("div",{className:"w-full bg-slate-100 rounded-full h-1.5 overflow-hidden",children:r.jsx("div",{className:`h-full rounded-full transition-all duration-1000 ease-out ${I?"bg-rose-500":"bg-blue-600"}`,style:{width:`${Math.min(z,100)}%`}})})]})]})]},A.id):r.jsxs(re.div,{layout:!0,initial:{opacity:0,scale:.98,y:10}
801,animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,transition:{duration:.2}},transition:{duration:.3},onClick:()=>e(Xe("TripDetails")+"?id="+A.id),className:"group bg-white rounded-[24px] p-3 shadow-sm hover:shadow-xl hover:shadow-slate-200/50 transition-all cursor-pointer border border-slate-100 flex flex-col md:flex-row items-center gap-5",children:[r.jsxs("div",{className:"w-full md:w-48 h-48 md:h-32 rounded-[16px] overflow-hidden relative shrink-0",children:[r.jsx("img",{src:A.cover_image_url||"https://images.unsplash.com/photo-1501555088652-021faa106b9b",className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-700 ease-out",alt:A.title}),A.difficulty&&r.jsx("div",{className:"absolute top-2 left-2 bg-black/50 backdrop-blur-md text-white text-[10px] font-semibold px-2.5 py-1 rounded-lg uppercase tracking-widest border border-white/20",children:A.difficulty})]}),r.jsxs("div",{className:"flex-1 w-full flex flex-col justify-center py-2 px-2 md:px-0",children:[r.jsxs("div",{className:"flex justify-between items-start mb-2",children:[r.jsx("h4",{className:"font-semibold tracking-tight text-slate-900 text-xl group-hover:text-blue-600 transition-colors",children:A.title}),A.status==="ongoing"&&r.jsxs("div",{className:"bg-emerald-50 text-emerald-600 text-[10px] font-semibold px-2.5 py-1 rounded-lg flex items-center uppercase tracking-widest",children:[r.jsx("span",{className:"w-1.5 h-1.5 bg-emerald-500 rounded-full mr-1.5 animate-pulse"}),"Live"]})]}),A.location&&r.jsxs("div",{className:"flex items-center text-slate-500 text-sm font-medium mb-4",children:[r.jsx(Dn,{className:"w-4 h-4 mr-1.5 text-slate-400"}),r.jsx("span",{className:"truncate",children:A.location})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm font-medium text-slate-600",children:[r.jsxs("div",{className:"flex items-center bg-slate-50 px-3 py-1.5 rounded-lg border border-slate-100",children:[r.jsx(pa,{className:"w-4 h-4 mr-2 text-blue-500"}),A.start_date?$n(new Date(A.start_date),"MMM dd, yyyy"):"TBA"]}),r.jsxs("div",{className:"flex items-center bg-slate-50 px-3 py-1.5 rounded-lg border border-slate-100",children:[r.jsx(zn,{className:"w-4 h-4 mr-2 text-indigo-500"}),R(A.start_date,A.end_date,A.duration_days)]}),r.jsxs("div",{className:"flex items-center bg-slate-50 px-3 py-1.5 rounded-lg border border-slate-100",children:[r.jsx(Li,{className:"w-4 h-4 mr-2 text-emerald-500"}),A.participants_count||1," ",A.max_people?`/ ${A.max_people}`:""]})]})]}),r.jsx("div",{className:"hidden md:flex w-12 h-12 rounded-full bg-slate-50 items-center justify-center mr-4 group-hover:bg-blue-600 group-hover:text-white transition-all",children:r.jsx(uo,{className:"w-5 h-5 group-hover:translate-x-0.5 transition-transform"})})]},A.id)})})})]})]})}const Rce=[{title:"Main",items:[{to:"Home",icon:Ii,label:"Dashboard",color:"bg-blue-50 text-blue-600"},{to:"Explore",icon:Ku,label:"Explore Feed",color:"bg-purple-50 text-purple-600"},{to:"Trips",icon:ws,label:"My Trips",color:"bg-emerald-50 text-emerald-600"},{to:"Messages",icon:sd,label:"Direct Messages",color:"bg-sky-50 text-sky-600"},{to:"Profile",icon:rd,label:"My Profile",color:"bg-amber-50 text-amber-600"},{to:"MyGear",icon:ri,label:"My Gear",color:"bg-teal-50 text-teal-600"}]},{title:"More",items:[{to:"CreateTrip",icon:Cn,label:"Create a Trip",color:"bg-indigo-50 text-indigo-600"},{to:"Notifications",icon:Du,label:"Notifications",color:"bg-rose-50 text-rose-600"},{to:"Achievements",icon:d0,label:"Achievements",color:"bg-yellow-50 text-yellow-600"},{to:"ActivityFeed",icon:rL,label:"Activity Feed",color:"bg-orange-50 text-orange-600"}]}];function Oce({isOpen:e,onClose:t,isAdmin:n,isSuperAdmin:s,appName:i="WeAllCamp"}){return r.jsx(Lt,{children:e&&r.jsxs(r.Fragment,{children:[r.jsx(re.div,{initial:{opacity:0}
801,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-[60]",onClick:t}),r.jsxs(re.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",stiffness:400,damping:35},className:"fixed bottom-0 left-0 right-0 z-[61] bg-white rounded-t-[28px] max-h-[80vh] overflow-y-auto shadow-2xl",children:[r.jsx("div",{className:"flex justify-center pt-3 pb-1",children:r.jsx("div",{className:"w-10 h-1 bg-slate-200 rounded-full"})}),r.jsxs("div",{className:"flex items-center justify-between px-6 py-3",children:[r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx("div",{className:"w-8 h-8 bg-slate-900 rounded-xl flex items-center justify-center",children:r.jsx(Or,{className:"w-5 h-5",color:"white"})}),r.jsx("span",{className:"font-semibold tracking-tight text-slate-900 tracking-tight",children:"Choose your destination"})]}),r.jsx("button",{onClick:t,className:"p-2 hover:bg-slate-100 rounded-xl text-slate-400 transition-colors",children:r.jsx(hn,{className:"w-5 h-5"})})]}),r.jsxs("div",{className:"px-5 pb-6 space-y-5",children:[Rce.map(a=>r.jsxs("div",{children:[r.jsx("p",{className:"text-[10px] font-semibold tracking-tight tracking-widest text-slate-400 uppercase mb-2.5 px-1",children:a.title}),r.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:a.items.map(l=>r.jsxs(Di,{to:Xe(l.to),onClick:t,className:"flex flex-col items-center gap-2 p-4 bg-slate-50/80 hover:bg-slate-100 rounded-2xl transition-colors active:scale-95",children:[r.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center ${l.color}`,children:r.jsx(l.icon,{className:"w-5 h-5"})}),r.jsx("span",{className:"text-[11px] font-semibold text-slate-700 text-center leading-tight tracking-tight",children:l.label})]},l.to))})]},a.title)),n&&r.jsxs("div",{children:[r.jsx("p",{className:"text-[10px] font-semibold tracking-tight tracking-widest text-slate-400 uppercase mb-2.5 px-1",children:"Admin"}),r.jsxs("div",{className:"grid grid-cols-3 gap-2.5",children:[r.jsxs(Di,{to:Xe("AdminPanel"),onClick:t,className:"flex flex-col items-center gap-2 p-4 bg-slate-50/80 hover:bg-slate-100 rounded-2xl transition-colors active:scale-95",children:[r.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center bg-red-50 text-red-600",children:r.jsx(Os,{className:"w-5 h-5"})}),r.jsx("span",{className:"text-[11px] font-semibold text-slate-700 text-center leading-tight tracking-tight",children:"Admin Panel"})]}),s&&r.jsxs(Di,{to:Xe("SuperAdminPanel"),onClick:t,className:"flex flex-col items-center gap-2 p-4 bg-slate-50/80 hover:bg-slate-100 rounded-2xl transition-colors active:scale-95",children:[r.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center bg-purple-50 text-purple-600",children:r.jsx(Os,{className:"w-5 h-5"})}),r.jsx("span",{className:"text-[11px] font-semibold text-slate-700 text-center leading-tight tracking-tight",children:"Super Admin"})]})]})]}),r.jsxs("div",{className:"flex items-center justify-center gap-1.5 pt-4 pb-6 border-t border-slate-100 mt-2",children:[r.jsx("span",{className:"text-[10px] font-medium text-slate-400 tracking-wide",children:"powered by"}),r.jsx(Or,{className:"w-3 h-3",color:"#94a3b8"}),r.jsx("span",{className:"text-[10px] font-semibold text-slate-400 tracking-tight",children:i})]})]})]})]})})}function Dce(){const e=tn(),{data:t,isFetching:n}=Re({queryKey:["user"],queryFn:()=>ne.auth.me()}),{data:s,isLoading:i}=Re({queryKey:["app-settings","admin_contacts"],queryFn:async()=>{var u;const l=await ne.entities.AppSettings.filter({key:"admin_contacts"});return(u=l[0])!=null&&u.value?JSON.parse(l[0].value):[]},initialData:[]}),a=(t==null?void 0:t.approval_status)==="rejected";return r.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-amber-50/20 to-slate-50 flex items-center justify-center p-4",children:r.jsxs(re.div,{initial:{opacity:0,y:20,scale:.97},animate:{opacity:1,y:0,scale:1},transition:{type:"spring",stiffness:300,damping:30},className:"w-full max-w-md text-center",children:[r.jsx("div",{className:`w-20 h-20 ${a?"bg-red-100":"bg-amber-100"} rounded-[24px] flex items-center justify-center mx-auto mb-6 shadow-sm`,children:a?r.jsx(Os,{className:"w-10 h-10 text-red-500"}):r.jsx(zn,{className:"w-10 h-10 text-amber-600"})}),r.jsx("h1",{className:"text-2xl font-black tracking-tight text-slate-900 mb-2",children:a?"Access Denied":"Waiting for Approval"}),r.jsx("p",{className:"text-slate-500 font-medium mb-8 max-w-xs mx-auto leading-relaxed",children:a?"Your account request was not approved. Please reach out to an admin if you think this is a mistake.":"Your account is pending review. An admin or moderator will approve your access shortly."}),r.jsxs("div",{className:"bg-white rounded-[28px] shadow-lg shadow-slate-200/50 border border-slate-100 p-6 mb-6 text-left",children:[r.jsxs("h3",{className:"text-sm font-bold text-slate-900 mb-3 flex items-center gap-2",children:[r.jsx(sd,{className:"w-4 h-4 text-blue-600"}),"Contact an Admin / Moderator"]}),r.jsx("p",{className:"text-xs text-slate-500 mb-4",children:"Send a message to one of these people to speed up your approval:"}),i?r.jsx("p",{className:"text-sm text-slate-400 text-center py-4",children:"Loading contacts..."}):s.length>0?r.jsx("div",{className:"space-y-2",children:s.map((l,u)=>r.jsxs("div",{className:"bg-slate-50 rounded-2xl p-3 border border-slate-100",children:[r.jsxs("div",{className:"flex items-center justify-between mb-1",children:[r.jsx("p",{className:"font-bold text-slate-900 text-sm",children:l.name||"Admin"}),l.role&&r.jsx("span",{className:"text-[10px] font-black tracking-wider up
801percase px-2 py-1 rounded-lg bg-blue-50 text-blue-600",children:l.role})]}),r.jsxs("div",{className:"space-y-1",children:[l.email&&r.jsxs("a",{href:`mailto:${l.email}`,className:"flex items-center gap-2 text-xs text-slate-500 hover:text-blue-600 transition-colors",children:[r.jsx(nx,{className:"w-3 h-3"})," ",l.email]}),l.phone&&r.jsxs("a",{href:`tel:${l.phone}`,className:"flex items-center gap-2 text-xs text-slate-500 hover:text-blue-600 transition-colors",children:[r.jsx(rx,{className:"w-3 h-3"})," ",l.phone]})]})]},u))}):r.jsx("p",{className:"text-sm text-slate-400 text-center py-4",children:"No contact info available yet."})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("button",{onClick:()=>e.invalidateQueries({queryKey:["user"]}),disabled:n,className:"w-full bg-slate-900 text-white font-bold py-4 rounded-2xl flex items-center justify-center gap-2 hover:bg-black active:scale-[0.98] transition-all shadow-lg shadow-slate-900/20 disabled:opacity-70 disabled:cursor-not-allowed",children:[r.jsx(iF,{className:`w-5 h-5 ${n?"animate-spin":""}`}),n?"Checking...":"Check Again"]}),r.jsxs("button",{onClick:()=>ne.auth.logout(),className:"w-full bg-white text-slate-600 font-bold py-4 rounded-2xl flex items-center justify-center gap-2 hover:bg-slate-50 active:scale-[0.98] transition-all border border-slate-200",children:[r.jsx(H1,{className:"w-5 h-5"}),"Sign Out"]})]}),t&&r.jsxs("p",{className:"text-xs text-slate-400 mt-6",children:["Signed in as ",r.jsx("span",{className:"font-semibold",children:t.email})]})]})})}const yT="sidebar_collapsed_v1";function Ice({currentPageName:e,user:t,appName:n}){const{theme:s}=SA(),[i,a]=w.useState(()=>{try{return localStorage.getItem(yT)==="1"}catch{return!1}});w.useEffect(()=>{try{localStorage.setItem(yT,i?"1":"0")}catch{}},[i]);const l=(t==null?void 0:t.role)==="admin"||(t==null?void 0:t.role)==="moderator"||(t==null?void 0:t.role)==="superadmin",u=(t==null?void 0:t.role)==="superadmin",{data:h=0}=Re({queryKey:["unread-notifications",t==null?void 0:t.email],queryFn:async()=>{if(!(t!=null&&t.email))return 0;const N=await ne.entities.Notification.filter({user_email:t.email,is_read:!1});return(N==null?void 0:N.length)||0},enabled:!!(t!=null&&t.email),refetchInterval:6e4}),m=[{to:"Home",icon:Ii,label:"Dashboard",hint:"Your overview"},{to:"Explore",icon:Ku,label:"Explore",hint:"Community feed"},{to:"Trips",icon:ws,label:"My Trips",hint:"Your adventures"},{to:"Messages",icon:sd,label:"Messages",hint:"Direct chats",badge:h}],g=[{to:"Profile",icon:rd,label:"Profile",hint:"Your account"},{to:"MyGear",icon:ou,label:"My Gear",hint:"Packing list"},{to:"Notifications",icon:Du,label:"Notifications",hint:"Recent activity",badge:h}],x=[...l?[{to:"AdminPanel",icon:Os,label:"Admin Panel",hint:"Manage site"}]:[],...u?[{to:"SuperAdminPanel",icon:mo,label:"Super Admin",hint:"System controls"}]:[]],v=async()=>{try{await ne.auth.logout("/")}catch{window.location.href="/"}},_=i?"w-[84px]":"w-64 lg:w-72";return r.jsxs("aside",{className:`hidden md:flex flex-col ${_} bg-white/95 backdrop-blur-xl border border-slate-100 shadow-xl shadow-slate-200/50 rounded-3xl sticky top-6 h-[calc(100vh-3rem)] z-40 shrink-0 ml-6 transition-[width] duration-300 ease-out overflow-hidden`,children:[r.jsxs("div",{className:`flex items-center ${i?"justify-center":"justify-between"} px-5 pt-5 pb-4 shrink-0`,children:[r.jsxs(Di,{to:Xe("Home"),className:"flex items-center gap-2.5 hover:opacity-80 transition-opacity min-w-0",children:[r.jsx("div",{className:"w-9 h-9 rounded-xl flex items-center justify-center shrink-0",style:{background:`linear-gradient(135deg, ${s.light}, white)`,border:`1px solid ${s.border}`},children:r.jsx(Or,{className:"w-5 h-5",color:s.primary})}),!i&&r.jsxs("div",{className:"min-w-0",children:[r.jsx("h1",{className:"text-[15px] font-bold tracking-tight text-slate-900 truncate leading-tight",children:n}),r.jsx("p",{className:"text-[10px] text-slate-400 font-medium tracking-wide uppercase leading-tight",children:"Trail HQ"})]})]}),!i&&r.jsx("button",{onClick:()=>a(!0),className:"w-8 h-8 rounded-lg flex items-center justify-center text-slate-400 hover:text-slate-700 hover:bg-slate-100 transition-all shrink-0","aria-label":"Collapse sidebar",children:r.jsx(PL,{className:"w-4 h-4"})})]}),i&&r.jsx("button",{onClick:()=>a(!1),className:"mx-auto mb-3 w-8 h-8 rounded-lg flex items-center justify-center text-slate-400 hover:text-slate-700 hover:bg-slate-100 transition-all","aria-label":"Expand sidebar",children:r.jsx(EL,{className:"w-4 h-4"})}),t&&r.jsx("div",{className:`px-4 mb-3 shrink-0 ${i?"flex justify-center":""}`,children:r.jsxs(Di,{to:Xe("Profile"),className:`group flex items-center gap-3 rounded-2xl transition-all ${i?"p-1.5":"p-2.5 bg-slate-50/70 hover:bg-slate-100 border border-slate-100"}`,children:[r.jsxs("div",{className:"relative shrink-0",children:[r.jsx(Js,{user:t,className:"w-10 h-10 rounded-xl ring-2 ring-white"}),r.jsx("span",{className:"absolute -bottom-0.5 -right-0.5 w-3 h-3 rounded-full bg-emerald-500 border-2 border-white"})]}),!i&&r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("p",{className:"text-[13px] font-semibold text-slate-900 truncate tracking-tight leading-tight",children:t.full_name||"Explorer"}),r.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:r.jsx("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded-md capitalize",style:{color:s.text,backgroundColor:s.light,border:`1px solid ${s.border}`},children:t.role||"member"})})]})]})}),r.jsx("div",{className:`px-4 mb-4 shrink-0 ${i?"flex justify-center":""}`,children:r.jsxs(Di,{to:Xe("CreateTrip"),className:`${i?"w-11 h-11 rounded-xl":"w-full rounded-2xl py-3 px-4"} text-white flex items-center justify-center gap-2 shadow-lg transition-all active:scale-[0.97] hover:shadow-xl`,style:{backgroundColor:s.primary,boxShadow:`0 8px 20px ${s.shadow}`},title:i?"Create Trip":void 0,children:[r.jsx(Cn,{className:`${i?"w-5 h-5":"w-4 h-4"} stroke-[2.5]`}),!i&&r.jsx("span",{className:"font-semibold tracking-tight text-[14px]",children:"Create Trip"})]})}),r.jsxs("nav",{className:"flex-1 overflow-y-auto px-3 pb-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:bg-slate-200 [&::-webkit-scrollbar-thumb]:rounded-full",children:[r.jsx(Yb,{label:"Main",collapsed:i,items:m,current:e,theme:s}),r.jsx(Yb,{label:"You",collapsed:i,items:g,current:e,theme:s}),x.length>0&&r.jsx(Yb,{label:"Admin",collapsed:i,items:x,current:e,theme:s}),r.jsx("div",{className:"mt-2",children:r.jsx(eD,{item:{to:"About",icon:tx,label:"About",hint:"Learn more"},current:e,collapsed:i,theme:s})}),!i&&r.jsxs(r.Fragment,{children:[r.jsx(sse,{}),r.jsx("div",{className:"mt-4 px-1",children:r.jsx(Wc,{placementName:"sidebar",page:e,role:t==null?void 0:t.role,className:"max-h-48 rounded-2xl overflow-hidden"})})]})]}),r.jsxs("div",{className:"shrink-0 border-t border-slate-100 px-3 py-3",children:[r.jsxs("button",{onClick:v,className:`w-full flex items-center ${i?"justify-center":"gap-3 px-3"} py-2.5 rounded-xl text-slate-500 hover:text-red-600 hover:bg-red-50 transition-all text-[13px] font-semibold`,title:i?"Sign out":void 0,children:[r.jsx(H1,{className:"w-4 h-4 shrink-0"}),!i&&r.jsx("span",{className:"tracking-tight",children:"Sign out"})]}),!i&&r.jsxs("div",{className:"flex items-center justify-center gap-1.5 mt-2 opacity-50",children:[r.jsx("span",{className:"text-[9px] font-medium text-slate-500 tracking-wide",children:"powered by"}),r.jsx(Or,{className:"w-3 h-3",color:"#64748b"}),r.jsx("span",{className:"text-[9px] font-semibold text-slate-600 tracking-tight",children:n})]})]})]})}function Yb({label:e,items:t,current:n,collapsed:s,theme:i}){return t.length===0?null:r.jsxs("div",{className:"mb-3",children:[!s&&r.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-[0.14em] px-3 mb-1.5 mt-2",children:e}),s&&r.jsx("div",{className:"h-px bg-slate-100 mx-3 my-3"}),r.jsx("div",{className:"space-y-0.5",children:t.map(a=>r.jsx(eD,{item:a,current:n,collapsed:s,theme:i},a.to))})]})}function eD({item:e,current:t,collapsed:n,theme:s}){const{to:i,icon:a,label:l,hint:u,badge:h}=e,m=t===i,g=h>0;return r.jsxs(Di,{to:Xe(i),className:`relative group flex items-center ${n?"justify-center p-2.5 mx-auto w-11 h-11":"gap-3 px-3 py-2.5"} rounded-xl transition-all overflow-hidden`,title:n?l:void 0,children:[m&&r.jsx(re.div,{layoutId:"sidebar-active-indicator",className:"absolute inset-0 rounded-xl",style:{backgroundColor:s.light,border:`1px solid ${s.border}`},transition:{type:"spring",stiffness:400,damping:32}}),!m&&r.jsx("div",{className:"absolute inset-0 bg-slate-50 opacity-0 group-hover:opacity-100 transition-opacity rounded-xl"}),m&&!n&&r.jsx("span",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-5 rounded-r-full",style:{backgroundColor:s.primary}}),r.jsxs("div",{className:"relative z-10 flex items-center gap-3 w-full min-w-0",children:[r.jsxs("div",{className:"relative shrink-0",children:[r.jsx(a,{className:`w-[19px] h-[19px] transition-all ${m?"":"stroke-slate-400 group-hover:stroke-slate-700"}`,style:m?{stroke:s.primary}:void 0,strokeWidth:m?2.4:2}),g&&n&&r.jsx("span",{className:"absolute -top-1.5 -right-1.5 min-w-[14px] h-[14px] px-1 rounded-full text-white text-[9px] font-bold flex items-center justify-center",style:{backgroundColor:s.primary},children:h>9?"9+":h})]}),!n&&r.jsxs(r.Fragment,{children:[r.jsx("span",{className:`text-[14px] tracking-tight truncate flex-1 ${m?"font-semibold":"font-medium text-slate-600 group-hover:text-slate-900"}`,style:m?{color:s.text}:void 0,children:l}),g&&r.jsx("span",{className:"shrink-0 min-w-[18px] h-[18px] px-1.5 rounded-full text-white text-[10px] font-bold flex items-center justify-center",style:{backgroundColor:s.primary},children:h>9?"9+":h})]})]})]})}function Lce({children:e,currentPageName:t}){var x;const{theme:n}=SA(),[s,i]=w.useState(!1);w.useEffect(()=>{if(!document.getElementById("inter-font")){const v=document.createElement("link");v.id="inter-font",v.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap",v.rel="stylesheet",document.head.appendChild(v)}},[]);const{data:a}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),{data:l=[]}=Re({queryKey:["app-settings"],queryFn:()=>ne.entities.AppSettings.list().catch(()=>[])}),u=((x=l.find(v=>v.key==="app_name"))==null?void 0:x.value)||"WeAllCamp",h=(a==null?void 0:a.role)==="admin"||(a==null?void 0:a.role)==="moderator"||(a==null?void 0:a.role)==="superadmin",m=(a==null?void 0:a.role)==="superadmin",g=["TripDetails","Chat","CreateTrip","GearList","AdminPanel","DirectChat"].includes(t);return a&&!a.onboarding_completed&&!h&&t!=="Onboarding"?(window.location.href="/Onboarding",null):a&&a.onboarding_completed&&a.approval_status!=="approved"&&!h?r.jsx(Dce,{}):r.jsxs("div",{className:"flex flex-col md:flex-row min-h-screen bg-[#f9fafb] text-slate-900 selection:bg-blue-100",style:{fontFamily:'"Inter", sans-serif'},children:[r.jsx(Ice,{currentPageName:t,user:a,appName:u}),r.jsx("main",{className:`flex-1 flex flex-col items-center ${g?"":"pb-[88px] md:pb-0"}`,children:r.jsx("div",{className:`w-full ${g?"max-w-5xl md:px-8":"max-w-5xl md:px-8 md:py-6"} transition-all min-h-screen relative`,children:e})}),!g&&r.jsxs(r.Fragment,{children:[r.jsx(re.div,{initial:{scale:0,opacity:0}
801,animate:{scale:1,opacity:1},transition:{type:"spring",stiffness:400,damping:30,delay:.3},className:"md:hidden fixed bottom-[104px] right-6 z-40",children:r.jsx(Di,{to:Xe("CreateTrip"),className:"flex items-center justify-center w-[52px] h-[52px] bg-slate-900 text-white rounded-[20px] shadow-xl shadow-slate-900/30 active:scale-90 transition-all duration-300 group",children:r.jsx(Cn,{className:"w-6 h-6 stroke-[2.5] group-active:rotate-90 transition-transform duration-300"})})}),r.jsxs("div",{className:"md:hidden fixed bottom-0 left-0 right-0 z-50 pb-8 pt-10 px-6 pointer-events-none flex justify-center",children:[r.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-32 bg-gradient-to-t from-white/90 via-white/50 to-transparent z-[-1]"}),r.jsxs(re.nav,{initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{type:"spring",stiffness:400,damping:30,delay:.1},className:"bg-white/90 backdrop-blur-2xl pointer-events-auto border border-slate-200/50 rounded-[24px] flex items-center justify-between p-1.5 shadow-2xl shadow-slate-200/60 w-full max-w-[380px]",children:[r.jsx(jf,{to:"Home",icon:Ii,label:"Home",current:t}),r.jsx(jf,{to:"Explore",icon:Ku,label:"Explore",current:t}),r.jsx(jf,{to:"Trips",icon:ws,label:"Trips",current:t}),r.jsx(jf,{to:"Messages",icon:sd,label:"DMs",current:t}),r.jsx(jf,{to:"Profile",icon:rd,label:"Profile",current:t}),r.jsx("button",{onClick:()=>i(!0),className:"relative flex items-center justify-center w-[46px] h-[46px] rounded-[18px] transition-all duration-300 hover:bg-slate-50 shrink-0 group",children:r.jsx(a5,{className:"shrink-0 w-5 h-5 stroke-slate-400 group-hover:stroke-slate-600 transition-all duration-300",strokeWidth:2})})]})]}),r.jsx(Oce,{isOpen:s,onClose:()=>i(!1),isAdmin:h,isSuperAdmin:m,appName:u})]})]})}function jf({to:e,icon:t,label:n,current:s}){const i=s===e||s===void 0&&e==="Home";return r.jsxs(Di,{to:Xe(e),className:"relative flex items-center justify-center w-[46px] h-[46px] rounded-[18px] transition-all duration-300 hover:bg-slate-50 shrink-0 group",children:[i&&r.jsx(re.div,{layoutId:"mobile-nav-indicator",className:"absolute inset-0 bg-slate-100 rounded-[18px]",transition:{type:"spring",stiffness:400,damping:30}}),r.jsx("div",{className:"relative z-10 flex flex-col items-center justify-center",children:r.jsx(t,{className:`shrink-0 w-5 h-5 transition-all duration-300 ${i?"stroke-slate-900":"stroke-slate-400 group-hover:stroke-slate-600 group-hover:scale-110"}`,strokeWidth:i?2.5:2})})]})}function Fce({children:e,currentPageName:t}){return r.jsx(JG,{children:r.jsx(Lce,{children:e,currentPageName:t})})}const Bce={Achievements:FH,ActivityFeed:KG,AdminPanel:kA,Chat:dY,CreateTrip:hY,DirectChat:fY,Explore:y3,GearList:nse,Home:ise,Messages:ase,Notifications:lse,Onboarding:w3,Profile:cse,TripDetails:Ece,Trips:Mce},zce={mainPage:"Home",Pages:Bce,Layout:Fce},$ce={animate:{y:[0,-12,0],transition:{duration:4,repeat:1/0,ease:"easeInOut"}}},Uce=[{label:"Dashboard",to:"Home",icon:Ii,color:"bg-blue-50 text-blue-600 border-blue-100"},{label:"Explore Trips",to:"Explore",icon:ws,color:"bg-emerald-50 text-emerald-600 border-emerald-100"},{label:"My Trips",to:"Trips",icon:kc,color:"bg-purple-50 text-purple-600 border-purple-100"}];function Vce(){var i;const t=rh().pathname.substring(1),{data:n,isFetched:s}=Re({queryKey:["user"],queryFn:async()=>{try{return{user:await ne.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return r.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-blue-50/30 to-slate-50 flex flex-col items-center justify-center px-5 py-12 relative overflow-hidden",children:[r.jsxs("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",children:[r.jsx("div",{className:"absolute top-[10%] left-[5%] w-72 h-72 bg-blue-100/40 rounded-full blur-3xl"}),r.jsx("div",{className:"absolute bottom-[15%] right-[8%] w-80 h-80 bg-purple-100/30 rounded-full blur-3xl"}),r.jsx("div",{className:"absolute top-[40%] right-[20%] w-48 h-48 bg-amber-100/30 rounded-full blur-3xl"})]}),r.jsxs("div",{className:"relative z-10 w-full max-w-lg",children:[r.jsx(re.div,{variants:$ce,animate:"animate",className:"flex justify-center mb-8",children:r.jsxs("div",{className:"relative",children:[r.jsx("div",{className:"w-36 h-36 md:w-44 md:h-44 bg-white rounded-[40px] shadow-2xl shadow-slate-200/60 border border-slate-100/80 flex items-center justify-center rotate-3",children:r.jsx("div",{className:"text-center -rotate-3",children:r.jsxs("div",{className:"flex items-center justify-center gap-1 mb-1",children:[r.jsx("span",{className:"text-5xl md:text-6xl font-black tracking-tighter bg-gradient-to-br from-slate-800 via-blue-700 to-slate-900 bg-clip-text text-transparent",children:"4"}),r.jsx("div",{className:"w-10 h-10 md:w-12 md:h-12 rounded-2xl bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center shadow-lg shadow-blue-500/30",children:r.jsx(Or,{className:"w-7 h-7 md:w-8 md:h-8",color:"white"})}),r.jsx("span",{className:"text-5xl md:text-6xl font-black tracking-tighter bg-gradient-to-br from-slate-800 via-blue-700 to-slate-900 bg-clip-text text-transparent",children:"4"})]})})}),r.jsx(re.div,{animate:{scale:[1,1.3,1],opacity:[.5,1,.5]},transition:{duration:2,repeat:1/0,delay:0},className:"absolute -top-2 -right-2",children:r.jsx(mo,{className:"w-5 h-5 text-amber-400"})}),r.jsx(re.div,{animate:{scale:[1,1.3,1],opacity:[.5,1,.5]},transition:{duration:2,repeat:1/0,delay:.7},className:"absolute -bottom-1 -left-3",children:r.jsx(mo,{className:"w-4 h-4 text-blue-400"})})]})}),r.jsxs(re.div,{initial:{opacity:0,y:20}
801,animate:{opacity:1,y:0},transition:{delay:.15,duration:.5},className:"text-center mb-10",children:[r.jsx("h1",{className:"text-2xl md:text-3xl font-black tracking-tight text-slate-900 mb-3",children:"Trail not found"}),r.jsxs("p",{className:"text-slate-500 font-medium text-sm md:text-base max-w-xs mx-auto leading-relaxed",children:["Looks like ",r.jsxs("span",{className:"font-bold text-slate-700",children:['"',t||"/",'"']})," doesn't lead anywhere. Let's get you back on the path."]})]}),r.jsx(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3,duration:.5},className:"space-y-3 mb-8",children:Uce.map((a,l)=>{const u=a.icon;return r.jsx(re.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.35+l*.08},children:r.jsxs(Di,{to:Xe(a.to),className:"flex items-center gap-4 bg-white/80 backdrop-blur-sm border border-slate-100 rounded-2xl p-4 hover:shadow-lg hover:shadow-slate-200/50 hover:scale-[1.02] active:scale-[0.98] transition-all duration-300 group",children:[r.jsx("div",{className:`w-11 h-11 rounded-xl flex items-center justify-center border ${a.color} transition-transform group-hover:scale-110 group-hover:rotate-3`,children:r.jsx(u,{className:"w-5 h-5",strokeWidth:2.2})}),r.jsx("div",{className:"flex-1",children:r.jsx("p",{className:"font-bold text-slate-900 text-sm tracking-tight",children:a.label})}),r.jsx(gr,{className:"w-4 h-4 text-slate-300 rotate-180 group-hover:translate-x-1 transition-transform"})]})},a.to)})}),r.jsx(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.55,duration:.5},className:"text-center",children:r.jsxs(Di,{to:Xe("Home"),className:"inline-flex items-center gap-2.5 bg-slate-900 text-white font-bold px-8 py-4 rounded-2xl shadow-xl shadow-slate-900/20 hover:bg-black hover:shadow-2xl hover:shadow-slate-900/25 active:scale-[0.97] transition-all duration-300 text-sm",children:[r.jsx(Ii,{className:"w-4.5 h-4.5",strokeWidth:2.5}),"Back to Home"]})}),s&&(n==null?void 0:n.isAuthenticated)&&((i=n==null?void 0:n.user)==null?void 0:i.role)==="admin"&&r.jsx(re.div,{initial:{opacity:0}
801,animate:{opacity:1},transition:{delay:.7},className:"mt-8 bg-amber-50/80 backdrop-blur-sm border border-amber-200/60 rounded-2xl p-4",children:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"w-8 h-8 bg-amber-100 rounded-xl flex items-center justify-center shrink-0 mt-0.5",children:r.jsx(ai,{className:"w-4 h-4 text-amber-600"})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-bold text-amber-800",children:"Admin Note"}),r.jsx("p",{className:"text-xs text-amber-600 mt-0.5 leading-relaxed",children:"This page hasn't been implemented yet. Ask the AI to create it in the chat."})]})]})})]})]})}const tD=w.createContext(),Wce=({children:e})=>{const[t,n]=w.useState(null),[s,i]=w.useState(!1),[a,l]=w.useState(!0),[u,h]=w.useState(!0),[m,g]=w.useState(null),[x,v]=w.useState(null);w.useEffect(()=>{_()},[]);const _=async()=>{var P,E;try{h(!0),g(null);const R=Tf({baseURL:"/api/apps/public",headers:{"X-App-Id":Af.appId},token:Af.token,interceptResponses:!0});try{const A=await R.get(`/prod/public-settings/by-id/${Af.appId}`);v(A),Af.token?await N():(l(!1),i(!1)),h(!1)}catch(A){if(console.error("App state check failed:",A),A.status===403&&((E=(P=A.data)==null?void 0:P.extra_data)!=null&&E.reason)){const B=A.data.extra_data.reason;g(B==="auth_required"?{type:"auth_required",message:"Authentication required"}:B==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:B,message:A.message})}else g({type:"unknown",message:A.message||"Failed to load app"});h(!1),l(!1)}}catch(R){console.error("Unexpected error:",R),g({type:"unknown",message:R.message||"An unexpected error occurred"}),h(!1),l(!1)}},N=async()=>{try{l(!0);const P=await ne.auth.me();n(P),i(!0),l(!1)}catch(P){console.error("User auth check failed:",P),l(!1),i(!1),(P.status===401||P.status===403)&&g({type:"auth_required",message:"Authentication required"})}},S=(P=!0)=>{n(null),i(!1),P?ne.auth.logout(window.location.href):ne.auth.logout()},j=()=>{const P=encodeURIComponent(window.location.href);window.location.href=`/auth?next=${P}`};return r.jsx(tD.Provider,{value:{user:t,isAuthenticated:s,isLoadingAuth:a,isLoadingPublicSettings:u,authError:m,appPublicSettings:x,logout:S,navigateToLogin:j,checkAppState:_},children:e})},Hce=()=>{const e=w.useContext(tD);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},qce=()=>r.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:r.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:r.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),r.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),r.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),r.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[r.jsx("p",{children:"If you believe this is an error, you can:"}),r.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[r.jsx("li",{children:"Verify you are logged in with the correct account"}),r.jsx("li",{children:"Contact the app administrator for access"}),r.jsx("li",{children:"Try logging out and back in again"})]})]})]})})});var Gce=Symbol.for("react.lazy"),Z0=J0[" use ".trim().toString()];function Yce(e){return typeof e=="object"&&e!==null&&"then"in e}function nD(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Gce&&"_payload"in e&&Yce(e._payload)}function sD(e){const t=Zce(e),n=w.forwardRef((s,i)=>{let{children:a,...l}=s;nD(a)&&typeof Z0=="function"&&(a=Z0(a._payload));const u=w.Children.toArray(a),h=u.find(Xce);if(h){const m=h.props.children,g=u.map(x=>x===h?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:x);return r.jsx(t,{...l,ref:i,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return r.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var Kce=sD("Slot");function Zce(e){const t=w.forwardRef((n,s)=>{let{children:i,...a}=n;if(nD(i)&&typeof Z0=="function"&&(i=Z0(i._payload)),w.isValidElement(i)){const l=ede(i),u=Jce(a,i.props);return i.type!==w.Fragment&&(u.ref=s?Ca(s,l):l),w.cloneElement(i,u)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qce=Symbol("radix.slottable");function Xce(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qce}
vendor: 21,991 bytes, line 801
801function Jce(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...u)=>{const h=a(...u);return i(...u),h}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function ede(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const tde=ex("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),_t=w.forwardRef(({className:e,variant:t,size:n,asChild:s=!1,...i},a)=>{const l=s?Kce:"button";return r.jsx(l,{className:Ct(tde({variant:t,size:n,className:e})),ref:a,...i})});_t.displayName="Button";const sn=w.forwardRef(({className:e,type:t,...n},s)=>r.jsx("input",{type:t,className:Ct("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:s,...n}));sn.displayName="Input";var nde=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sde=nde.reduce((e,t)=>{const n=sD(`Primitive.${t}`),s=w.forwardRef((i,a)=>{const{asChild:l,...u}=i,h=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(h,{...u,ref:a})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),rde="Label",rD=w.forwardRef((e,t)=>r.jsx(sde.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));rD.displayName=rde;var iD=rD;const ide=ex("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),mt=w.forwardRef(({className:e,...t},n)=>r.jsx(iD,{ref:n,className:Ct(ide(),e),...t}));mt.displayName=iD.displayName;const ed=w.forwardRef(({className:e,...t},n)=>r.jsx("textarea",{className:Ct("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));ed.displayName="Textarea";function bT(e,[t,n]){return Math.min(n,Math.max(t,e))}function ade(e){const t=ode(e),n=w.forwardRef((s,i)=>{const{children:a,...l}=s,u=w.Children.toArray(a),h=u.find(cde);if(h){const m=h.props.children,g=u.map(x=>x===h?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:x);return r.jsx(t,{...l,ref:i,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return r.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function ode(e){const t=w.forwardRef((n,s)=>{const{children:i,...a}=n;if(w.isValidElement(i)){const l=ude(i),u=dde(a,i.props);return i.type!==w.Fragment&&(u.ref=s?Ca(s,l):l),w.cloneElement(i,u)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lde=Symbol("radix.slottable");function cde(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lde}function dde(e,t){const n={...t};for(const s in t){const i=e[s],a=t[s];/^on[A-Z]/.test(s)?i&&a?n[s]=(...u)=>{const h=a(...u);return i(...u),h}:i&&(n[s]=i):s==="style"?n[s]={...i,...a}:s==="className"&&(n[s]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function ude(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function aD(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var oD=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),hde="VisuallyHidden",fde=w.forwardRef((e,t)=>r.jsx(Pt.span,{...e,ref:t,style:{...oD,...e.style}}));fde.displayName=hde;var mde=[" ","Enter","ArrowUp","ArrowDown"],pde=[" ","Enter"],td="Select",[ov,lv,gde]=Z_(td),[gh]=No(td,[gde,oh]),cv=oh(),[xde,Ul]=gh(td),[vde,yde]=gh(td),lD=e=>{const{__scopeSelect:t,children:n,open:s,defaultOpen:i,onOpenChange:a,value:l,defaultValue:u,onValueChange:h,dir:m,name:g,autoComplete:x,disabled:v,required:_,form:N}=e,S=cv(t),[j,P]=w.useState(null),[E,R]=w.useState(null),[A,B]=w.useState(!1),I=Q_(m),[z,V]=Zc({prop:s,defaultProp:i??!1,onChange:a,caller:td}),[te,H]=Zc({prop:l,defaultProp:u,onChange:h,caller:td}),Y=w.useRef(null),ce=j?N||!!j.closest("form"):!0,[K,q]=w.useState(new Set),ge=Array.from(K).map(he=>he.props.value).join(";");return r.jsx(aN,{...S,children:r.jsxs(xde,{required:_,scope:t,trigger:j,onTriggerChange:P,valueNode:E,onValueNodeChange:R,valueNodeHasChildren:A,onValueNodeHasChildrenChange:B,contentId:ya(),value:te,onValueChange:H,open:z,onOpenChange:V,dir:I,triggerPointerDownPosRef:Y,disabled:v,children:[r.jsx(ov.Provider,{scope:t,children:r.jsx(vde,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(he=>{q(be=>new Set(be).add(he))},[]),onNativeOptionRemove:w.useCallback(he=>{q(be=>{const W=new Set(be);return W.delete(he),W})},[]),children:n})}),ce?r.jsxs(MD,{"aria-hidden":!0,required:_,tabIndex:-1,name:g,autoComplete:x,value:te,onChange:he=>H(he.target.value),disabled:v,form:N,children:[te===void 0?r.jsx("option",{value:""}):null,Array.from(K)]},ge):null]})})};lD.displayName=td;var cD="SelectTrigger",dD=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:s=!1,...i}=e,a=cv(n),l=Ul(cD,n),u=l.disabled||s,h=qt(t,l.onTriggerChange),m=lv(n),g=w.useRef("touch"),[x,v,_]=OD(S=>{const j=m().filter(R=>!R.disabled),P=j.find(R=>R.value===l.value),E=DD(j,S,P);E!==void 0&&l.onValueChange(E.value)}),N=S=>{u||(l.onOpenChange(!0),_()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return r.jsx(Px,{asChild:!0,...a,children:r.jsx(Pt.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":RD(l.value)?"":void 0,...i,ref:h,onClick:Ke(i.onClick,S=>{S.currentTarget.focus(),g.current!=="mouse"&&N(S)}),onPointerDown:Ke(i.onPointerDown,S=>{g.current=S.pointerType;const j=S.target;j.hasPointerCapture(S.pointerId)&&j.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(N(S),S.preventDefault())}),onKeyDown:Ke(i.onKeyDown,S=>{const j=x.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&v(S.key),!(j&&S.key===" ")&&mde.includes(S.key)&&(N(),S.preventDefault())})})})});dD.displayName=cD;var uD="SelectValue",hD=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:i,children:a,placeholder:l="",...u}=e,h=Ul(uD,n),{onValueNodeHasChildrenChange:m}=h,g=a!==void 0,x=qt(t,h.onValueNodeChange);return Fs(()=>{m(g)},[m,g]),r.jsx(Pt.span,{...u,ref:x,style:{pointerEvents:"none"},children:RD(h.value)?r.jsx(r.Fragment,{children:l}):a})});hD.displayName=uD;var bde="SelectIcon",fD=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:s,...i}=e;return r.jsx(Pt.span,{"aria-hidden":!0,...i,ref:t,children:s||"â¼"})});fD.displayName=bde;var wde="SelectPortal",mD=e=>r.jsx(Um,{asChild:!0,...e});mD.displayName=wde;var nd="SelectContent",pD=w.forwardRef((e,t)=>{const n=Ul(nd,e.__scopeSelect),[s,i]=w.useState();if(Fs(()=>{i(new DocumentFragment)},[]),!n.open){const a=s;return a?zl.createPortal(r.jsx(gD,{scope:e.__scopeSelect,children:r.jsx(ov.Slot,{scope:e.__scopeSelect,children:r.jsx("div",{children:e.children})})}),a):null}return r.jsx(xD,{...e,ref:t})});pD.displayName=nd;var Pi=10,[gD,Vl]=gh(nd),_de="SelectContentImpl",Nde=ade("SelectContent.RemoveScroll"),xD=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:s="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:l,side:u,sideOffset:h,align:m,alignOffset:g,arrowPadding:x,collisionBoundary:v,collisionPadding:_,sticky:N,hideWhenDetached:S,avoidCollisions:j,...P}=e,E=Ul(nd,n),[R,A]=w.useState(null),[B,I]=w.useState(null),z=qt(t,oe=>A(oe)),[V,te]=w.useState(null),[H,Y]=w.useState(null),ce=lv(n),[K,q]=w.useState(!1),ge=w.useRef(!1);w.useEffect(()=>{if(R)return Tx(R)},[R]),Nx();const he=w.useCallback(oe=>{const[Q,...Ne]=ce().map(Te=>Te.ref.current),[Ce]=Ne.slice(-1),De=document.activeElement;for(const Te of oe)if(Te===De||(Te==null||Te.scrollIntoView({block:"nearest"}),Te===Q&&B&&(B.scrollTop=0),Te===Ce&&B&&(B.scrollTop=B.scrollHeight),Te==null||Te.focus(),document.activeElement!==De))return},[ce,B]),be=w.useCallback(()=>he([V,R]),[he,V,R]);w.useEffect(()=>{K&&be()},[K,be]);const{onOpenChange:W,triggerPointerDownPosRef:Z}=E;w.useEffect(()=>{if(R){let oe={x:0,y:0};const Q=Ce=>{var De,Te;oe={x:Math.abs(Math.round(Ce.pageX)-(((De=Z.current)==null?void 0:De.x)??0)),y:Math.abs(Math.round(Ce.pageY)-(((Te=Z.current)==null?void 0:Te.y)??0))}},Ne=Ce=>{oe.x<=10&&oe.y<=10?Ce.preventDefault():R.contains(Ce.target)||W(!1),document.removeEventListener("pointermove",Q),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",Ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",Ne,{capture:!0})}}},[R,W,Z]),w.useEffect(()=>{const oe=()=>W(!1);return window.addEventListener("blur",oe),window.addEventListener("resize",oe),()=>{window.removeEventListener("blur",oe),window.removeEventListener("resize",oe)}},[W]);const[D,O]=OD(oe=>{const Q=ce().filter(De=>!De.disabled),Ne=Q.find(De=>De.ref.current===document.activeElement),Ce=DD(Q,oe,Ne);Ce&&setTimeout(()=>Ce.ref.current.focus())}),U=w.useCallback((oe,Q,Ne)=>{const Ce=!ge.current&&!Ne;(E.value!==void 0&&E.value===Q||Ce)&&(te(oe),Ce&&(ge.current=!0))},[E.value]),ie=w.useCallback(()=>R==null?void 0:R.focus(),[R]),le=w.useCallback((oe,Q,Ne)=>{const Ce=!ge.current&&!Ne;(E.value!==void 0&&E.value===Q||Ce)&&Y(oe)},[E.value]),fe=s==="popper"?T1:vD,me=fe===T1?{side:u,sideOffset:h,align:m,alignOffset:g,arrowPadding:x,collisionBoundary:v,collisionPadding:_,sticky:N,hideWhenDetached:S,avoidCollisions:j}:{};return r.jsx(gD,{scope:n,content:R,viewport:B,onViewportChange:I,itemRefCallback:U,selectedItem:V,onItemLeave:ie,itemTextRefCallback:le,focusSelectedItem:be,selectedItemText:H,position:s,isPositioned:K,searchRef:D,children:r.jsx(Wm,{as:Nde,allowPinchZoom:!0,children:r.jsx(zm,{asChild:!0,trapped:E.open,onMountAutoFocus:oe=>{oe.preventDefault()},onUnmountAutoFocus:Ke(i,oe=>{var Q;(Q=E.trigger)==null||Q.focus({preventScroll:!0}),oe.preventDefault()}),children:r.jsx(Bm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:oe=>oe.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:r.jsx(fe,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:oe=>oe.preventDefault(),...P,...me,onPlaced:()=>q(!0),ref:z,style:{display:"flex",flexDirection:"column",outline:"none",...P.style},onKeyDown:Ke(P.onKeyDown,oe=>{const Q=oe.ctrlKey||oe.altKey||oe.metaKey;if(oe.key==="Tab"&&oe.preventDefault(),!Q&&oe.key.length===1&&O(oe.key),["ArrowUp","ArrowDown","Home","End"].includes(oe.key)){let Ce=ce().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(oe.key)&&(Ce=Ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(oe.key)){const De=oe.target,Te=Ce.indexOf(De);Ce=Ce.slice(Te+1)}setTimeout(()=>he(Ce)),oe.preventDefault()}})})})})})})});xD.displayName=_de;var jde="SelectItemAlignedPosition",vD=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:s,...i}=e,a=Ul(nd,n),l=Vl(nd,n),[u,h]=w.useState(null),[m,g]=w.useState(null),x=qt(t,z=>g(z)),v=lv(n),_=w.useRef(!1),N=w.useRef(!0),{viewport:S,selectedItem:j,selectedItemText:P,focusSelectedItem:E}=l,R=w.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&m&&S&&j&&P){const z=a.trigger.getBoundingClientRect(),V=m.getBoundingClientRect(),te=a.valueNode.getBoundingClientRect(),H=P.getBoundingClientRect();if(a.dir!=="rtl"){const De=H.left-V.left,Te=te.left-De,We=z.left-Te,$e=z.width+We,Et=Math.max($e,V.width),Xt=window.innerWidth-Pi,Zt=bT(Te,[Pi,Math.max(Pi,Xt-Et)]);u.style.minWidth=$e+"px",u.style.left=Zt+"px"}else{const De=V.right-H.right,Te=window.innerWidth-te.right-De,We=window.innerWidth-z.right-Te,$e=z.width+We,Et=Math.max($e,V.width),Xt=window.innerWidth-Pi,Zt=bT(Te,[Pi,Math.max(Pi,Xt-Et)]);u.style.minWidth=$e+"px",u.style.right=Zt+"px"}const Y=v(),ce=window.innerHeight-Pi*2,K=S.scrollHeight,q=window.getComputedStyle(m),ge=parseInt(q.borderTopWidth,10),he=parseInt(q.paddingTop,10),be=parseInt(q.borderBottomWidth,10),W=parseInt(q.paddingBottom,10),Z=ge+he+K+W+be,D=Math.min(j.offsetHeight*5,Z),O=window.getComputedStyle(S),U=parseInt(O.paddingTop,10),ie=parseInt(O.paddingBottom,10),le=z.top+z.height/2-Pi,fe=ce-le,me=j.offsetHeight/2,oe=j.offsetTop+me,Q=ge+he+oe,Ne=Z-Q;if(Q<=le){const De=Y.length>0&&j===Y[Y.length-1].ref.current;u.style.bottom="0px";const Te=m.clientHeight-S.offsetTop-S.offsetHeight,We=Math.max(fe,me+(De?ie:0)+Te+be),$e=Q+We;u.style.height=$e+"px"}else{const De=Y.length>0&&j===Y[0].ref.current;u.style.top="0px";const We=Math.max(le,ge+S.offsetTop+(De?U:0)+me)+Ne;u.style.height=We+"px",S.scrollTop=Q-le+S.offsetTop}u.style.margin=`${Pi}px 0`,u.style.minHeight=D+"px",u.style.maxHeight=ce+"px",s==null||s(),requestAnimationFrame(()=>_.current=!0)}},[v,a.trigger,a.valueNode,u,m,S,j,P,a.dir,s]);Fs(()=>R(),[R]);const[A,B]=w.useState();Fs(()=>{m&&B(window.getComputedStyle(m).zIndex)},[m]);const I=w.useCallback(z=>{z&&N.current===!0&&(R(),E==null||E(),N.current=!1)},[R,E]);return r.jsx(kde,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:_,onScrollButtonChange:I,children:r.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:r.jsx(Pt.div,{...i,ref:x,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});vD.displayName=jde;var Sde="SelectPopperPosition",T1=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:s="start",collisionPadding:i=Pi,...a}=e,l=cv(n);return r.jsx(oN,{...l,...a,ref:t,align:s,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});T1.displayName=Sde;var[kde,hj]=gh(nd,{}),E1="SelectViewport",yD=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:s,...i}=e,a=Vl(E1,n),l=hj(E1,n),u=qt(t,a.onViewportChange),h=w.useRef(0);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),r.jsx(ov.Slot,{scope:n,children:r.jsx(Pt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ke(i.onScroll,m=>{const g=m.currentTarget,{contentWrapper:x,shouldExpandOnScrollRef:v}=l;if(v!=null&&v.current&&x){const _=Math.abs(h.current-g.scrollTop);if(_>0){const N=window.innerHeight-Pi*2,S=parseFloat(x.style.minHeight),j=parseFloat(x.style.height),P=Math.max(S,j);if(P<N){const E=P+_,R=Math.min(N,E),A=E-R;x.style.height=R+"px",x.style.bottom==="0px"&&(g.scrollTop=A>0?A:0,x.style.justifyContent="flex-end")}}}h.current=g.scrollTop})})})]})});yD.displayName=E1;var bD="SelectGroup",[Cde,Pde]=gh(bD),Tde=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,i=ya();return r.jsx(Cde,{scope:n,id:i,children:r.jsx(Pt.div,{role:"group","aria-labelledby":i,...s,ref:t})})});Tde.displayName=bD;var wD="SelectLabel",_D=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,i=Pde(wD,n);return r.jsx(Pt.div,{id:i.id,...s,ref:t})});_D.displayName=wD;var Q0="SelectItem",[Ede,ND]=gh(Q0),jD=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:s,disabled:i=!1,textValue:a,...l}=e,u=Ul(Q0,n),h=Vl(Q0,n),m=u.value===s,[g,x]=w.useState(a??""),[v,_]=w.useState(!1),N=qt(t,E=>{var R;return(R=h.itemRefCallback)==null?void 0:R.call(h,E,s,i)}),S=ya(),j=w.useRef("touch"),P=()=>{i||(u.onValueChange(s),u.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return r.jsx(Ede,{scope:n,value:s,disabled:i,textId:S,isSelected:m,onItemTextChange:w.useCallback(E=>{x(R=>R||((E==null?void 0:E.textContent)??"").trim())},[]),children:r.jsx(ov.ItemSlot,{scope:n,value:s,disabled:i,textValue:g,children:r.jsx(Pt.div,{role:"option","aria-labelledby":S,"data-highlighted":v?"":void 0,"aria-selected":m&&v,"data-state":m?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:N,onFocus:Ke(l.onFocus,()=>_(!0)),onBlur:Ke(l.onBlur,()=>_(!1)),onClick:Ke(l.onClick,()=>{j.current!=="mouse"&&P()}),onPointerUp:Ke(l.onPointerUp,()=>{j.current==="mouse"&&P()}),onPointerDown:Ke(l.onPointerDown,E=>{j.current=E.pointerType}),onPointerMove:Ke(l.onPointerMove,E=>{var R;j.current=E.pointerType,i?(R=h.onItemLeave)==null||R.call(h):j.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ke(l.onPointerLeave,E=>{var R;E.currentTarget===document.activeElement&&((R=h.onItemLeave)==null||R.call(h))}),onKeyDown:Ke(l.onKeyDown,E=>{var A;((A=h.searchRef)==null?void 0:A.current)!==""&&E.key===" "||(pde.includes(E.key)&&P(),E.key===" "&&E.preventDefault())})})})})});jD.displayName=Q0;var Lf="SelectItemText",SD=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:i,...a}=e,l=Ul(Lf,n),u=Vl(Lf,n),h=ND(Lf,n),m=yde(Lf,n),[g,x]=w.useState(null),v=qt(t,P=>x(P),h.onItemTextChange,P=>{var E;return(E=u.itemTextRefCallback)==null?void 0:E.call(u,P,h.value,h.disabled)}),_=g==null?void 0:g.textContent,N=w.useMemo(()=>r.jsx("option",{value:h.value,disabled:h.disabled,children:_},h.value),[h.disabled,h.value,_]),{onNativeOptionAdd:S,onNativeOptionRemove:j}=m;return Fs(()=>(S(N),()=>j(N)),[S,j,N]),r.jsxs(r.Fragment,{children:[r.jsx(Pt.span,{id:h.textId,...a,ref:v}),h.isSelected&&l.valueNode&&!l.valueNodeHasChildren?zl.createPortal(a.children,l.valueNode):null]})});SD.displayName=Lf;var kD="SelectItemIndicator",CD=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return ND(kD,n).isSelected?r.jsx(Pt.span,{"aria-hidden":!0,...s,ref:t}):null});CD.displayName=kD;var A1="SelectScrollUpButton",PD=w.forwardRef((e,t)=>{const n=Vl(A1,e.__scopeSelect),s=hj(A1,e.__scopeSelect),[i,a]=w.useState(!1),l=qt(t,s.onScrollButtonChange);return Fs(()=>{if(n.viewport&&n.isPositioned){let u=function(){const m=h.scrollTop>0;a(m)};const h=n.viewport;return u(),h.addEventListener("scroll",u),()=>h.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?r.jsx(ED,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:h}=n;u&&h&&(u.scrollTop=u.scrollTop-h.offsetHeight)}}):null});PD.displayName=A1;var M1="SelectScrollDownButton",TD=w.forwardRef((e,t)=>{const n=Vl(M1,e.__scopeSelect),s=hj(M1,e.__scopeSelect),[i,a]=w.useState(!1),l=qt(t,s.onScrollButtonChange);return Fs(()=>{if(n.viewport&&n.isPositioned){let u=function(){const m=h.scrollHeight-h.clientHeight,g=Math.ceil(h.scrollTop)<m;a(g)};const h=n.viewport;return u(),h.addEventListener("scroll",u),()=>h.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?r.jsx(ED,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:h}=n;u&&h&&(u.scrollTop=u.scrollTop+h.offsetHeight)}}):null});TD.displayName=M1;var ED=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:s,...i}=e,a=Vl("SelectScrollButton",n),l=w.useRef(null),u=lv(n),h=w.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return w.useEffect(()=>()=>h(),[h]),Fs(()=>{var g;const m=u().find(x=>x.ref.current===document.activeElement);(g=m==null?void 0:m.ref.current)==null||g.scrollIntoView({block:"nearest"})},[u]),r.jsx(Pt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ke(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(s,50))}),onPointerMove:Ke(i.onPointerMove,()=>{var m;(m=a.onItemLeave)==null||m.call(a),l.current===null&&(l.current=window.setInterval(s,50))}),onPointerLeave:Ke(i.onPointerLeave,()=>{h()})})}),Ade="SelectSeparator",AD=w.forwardRef((e,t)=>
vendor: 1,160 bytes, line 801
801{const{__scopeSelect:n,...s}=e;return r.jsx(Pt.div,{"aria-hidden":!0,...s,ref:t})});AD.displayName=Ade;var R1="SelectArrow",Mde=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,i=cv(n),a=Ul(R1,n),l=Vl(R1,n);return a.open&&l.position==="popper"?r.jsx(lN,{...i,...s,ref:t}):null});Mde.displayName=R1;var Rde="SelectBubbleInput",MD=w.forwardRef(({__scopeSelect:e,value:t,...n},s)=>{const i=w.useRef(null),a=qt(s,i),l=aD(t);return w.useEffect(()=>{const u=i.current;if(!u)return;const h=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(h,"value").set;if(l!==t&&g){const x=new Event("change",{bubbles:!0});g.call(u,t),u.dispatchEvent(x)}},[l,t]),r.jsx(Pt.select,{...n,style:{...oD,...n.style},ref:a,defaultValue:t})});MD.displayName=Rde;function RD(e){return e===""||e===void 0}function OD(e){const t=ja(e),n=w.useRef(""),s=w.useRef(0),i=w.useCallback(l=>{const u=n.current+l;t(u),(function h(m){n.current=m,window.clearTimeout(s.current),m!==""&&(s.current=window.setTimeout(()=>h(""),1e3))})(u)},[t]),a=w.useCallback(()=>{n.current="",window.clearTimeout(s.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),[n,i,a]}
801function DD(e,t,n){const i=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let l=Ode(e,Math.max(a,0));i.length===1&&(l=l.filter(m=>m!==n));const h=l.find(m=>m.textValue.toLowerCase().startsWith(i.toLowerCase()));return h!==n?h:void 0}function Ode(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var Dde=lD,ID=dD,Ide=hD,Lde=fD,Fde=mD,LD=pD,Bde=yD,FD=_D,BD=jD,zde=SD,$de=CD,zD=PD,$D=TD,UD=AD;const ys=Dde,bs=Ide,cs=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(ID,{ref:s,className:Ct("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,r.jsx(Lde,{asChild:!0,children:r.jsx(Yu,{className:"h-4 w-4 opacity-50"})})]}));cs.displayName=ID.displayName;const VD=w.forwardRef(({className:e,...t},n)=>r.jsx(zD,{ref:n,className:Ct("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx($1,{className:"h-4 w-4"})}));VD.displayName=zD.displayName;const WD=w.forwardRef(({className:e,...t},n)=>r.jsx($D,{ref:n,className:Ct("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Yu,{className:"h-4 w-4"})}));WD.displayName=$D.displayName;const ds=w.forwardRef(({className:e,children:t,position:n="popper",...s},i)=>r.jsx(Fde,{children:r.jsxs(LD,{ref:i,className:Ct("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[r.jsx(VD,{}),r.jsx(Bde,{className:Ct("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),r.jsx(WD,{})]})}));ds.displayName=LD.displayName;const Ude=w.forwardRef(({className:e,...t},n)=>r.jsx(FD,{ref:n,className:Ct("px-2 py-1.5 text-sm font-semibold",e),...t}));Ude.displayName=FD.displayName;const wt=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(BD,{ref:s,className:Ct("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx($de,{children:r.jsx(Cm,{className:"h-4 w-4"})})}),r.jsx(zde,{children:t})]}));wt.displayName=BD.displayName;const Vde=w.forwardRef(({className:e,...t},n)=>r.jsx(UD,{ref:n,className:Ct("-mx-1 my-1 h-px bg-muted",e),...t}));Vde.displayName=UD.displayName;function Wde(){const e=tn(),{data:t,isLoading:n}=Re({queryKey:["leads"],queryFn:()=>ne.entities.Lead.list()}),s=pt({mutationFn:({id:h,data:m})=>ne.entities.Lead.update(h,m),onSuccess:()=>e.invalidateQueries(["leads"])}),i=pt({mutationFn:h=>ne.entities.Lead.delete(h),onSuccess:()=>e.invalidateQueries(["leads"])});if(n)return r.jsx("div",{className:"py-12 text-center text-slate-500",children:"Loading leads..."});const a=["new","contacted","won","lost"],l=a.map(h=>({id:h,title:h.toUpperCase(),items:(t==null?void 0:t.filter(m=>m.status===h))||[]})),u={new:"bg-blue-50/50",contacted:"bg-amber-50/50",won:"bg-emerald-50/50",lost:"bg-red-50/50"};return r.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-4",children:l.map(h=>r.jsxs("div",{className:`${u[h.id]} rounded-2xl p-4 border border-slate-100`,children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"font-bold text-slate-800 text-sm tracking-tight",children:h.title}),r.jsx("span",{className:"bg-white text-slate-500 text-xs font-bold px-2 py-0.5 rounded-full shadow-sm",children:h.items.length})]}),r.jsxs("div",{className:"space-y-3",children:[h.items.map(m=>r.jsxs("div",{className:"bg-white p-4 rounded-xl shadow-sm border border-slate-200/60 hover:shadow-md transition-shadow",children:[r.jsxs("div",{className:"flex justify-between items-start mb-1.5",children:[r.jsx("h4",{className:"font-semibold text-slate-900 tracking-tight",children:m.name}),r.jsx("button",{onClick:()=>{window.confirm("Delete lead?")&&i.mutate(m.id)},className:"text-slate-300 hover:text-red-500 transition-colors",children:r.jsx(us,{className:"w-4 h-4"})})]}),r.jsxs("a",{href:`mailto:${m.email}`,className:"text-sm text-blue-600 hover:underline flex items-center gap-1.5 mb-1",children:[r.jsx(nx,{className:"w-3.5 h-3.5"}),r.jsx("span",{className:"truncate",children:m.email})]}),m.phone&&r.jsxs("a",{href:`tel:${m.phone}`,className:"text-sm text-slate-600 hover:underline flex items-center gap-1.5 mb-3",children:[r.jsx(rx,{className:"w-3.5 h-3.5"}),r.jsx("span",{className:"truncate",children:m.phone})]}),m.message&&r.jsx("p",{className:"text-sm text-slate-600 bg-slate-50 p-2.5 rounded-lg mb-3 leading-relaxed border border-slate-100",children:m.message}),r.jsxs("div",{className:"flex justify-between items-center mt-3 pt-3 border-t border-slate-50",children:[r.jsx("span",{className:"text-xs font-medium text-slate-400",children:m.created_date?$u(new Date(m.created_date),"MMM d"):""}),r.jsxs(ys,{value:m.status,onValueChange:g=>s.mutate({id:m.id,data:{status:g}}),children:[r.jsx(cs,{className:"w-[110px] h-8 text-xs font-semibold bg-slate-50 border-transparent hover:bg-slate-100",children:r.jsx(bs,{})}),r.jsx(ds,{children:a.map(g=>r.jsx(wt,{value:g,children:g.toUpperCase()},g))})]})]})]},m.id)),h.items.length===0&&r.jsx("div",{className:"text-center py-6 border-2 border-dashed border-slate-200 rounded-xl text-sm font-medium text-slate-400",children:"No leads"})]})]}
801,h.id))})}var dv="Switch",[Hde]=No(dv),[qde,Gde]=Hde(dv),HD=w.forwardRef((e,t)=>{const{__scopeSwitch:n,name:s,checked:i,defaultChecked:a,required:l,disabled:u,value:h="on",onCheckedChange:m,form:g,...x}=e,[v,_]=w.useState(null),N=qt(t,R=>_(R)),S=w.useRef(!1),j=v?g||!!v.closest("form"):!0,[P,E]=Zc({prop:i,defaultProp:a??!1,onChange:m,caller:dv});return r.jsxs(qde,{scope:n,checked:P,disabled:u,children:[r.jsx(Pt.button,{type:"button",role:"switch","aria-checked":P,"aria-required":l,"data-state":KD(P),"data-disabled":u?"":void 0,disabled:u,value:h,...x,ref:N,onClick:Ke(e.onClick,R=>{E(A=>!A),j&&(S.current=R.isPropagationStopped(),S.current||R.stopPropagation())})}),j&&r.jsx(YD,{control:v,bubbles:!S.current,name:s,value:h,checked:P,required:l,disabled:u,form:g,style:{transform:"translateX(-100%)"}})]})});HD.displayName=dv;var qD="SwitchThumb",GD=w.forwardRef((e,t)=>{const{__scopeSwitch:n,...s}=e,i=Gde(qD,n);return r.jsx(Pt.span,{"data-state":KD(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t})});GD.displayName=qD;var Yde="SwitchBubbleInput",YD=w.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:s=!0,...i},a)=>{const l=w.useRef(null),u=qt(l,a),h=aD(n),m=WA(t);return w.useEffect(()=>{const g=l.current;if(!g)return;const x=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(x,"checked").set;if(h!==n&&_){const N=new Event("click",{bubbles:s});_.call(g,n),g.dispatchEvent(N)}},[h,n,s]),r.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:u,style:{...i.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});YD.displayName=Yde;function KD(e){return e?"checked":"unchecked"}var ZD=HD,Kde=GD;const fj=w.forwardRef(({className:e,...t},n)=>r.jsx(ZD,{className:Ct("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:r.jsx(Kde,{className:Ct("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));fj.displayName=ZD.displayName;const wT=[{value:"top_banner",label:"Top Banner"},{value:"inline_content",label:"Inline Content"},{value:"sidebar",label:"Sidebar"},{value:"modal",label:"Modal"},{value:"dashboard_card",label:"Dashboard Card"},{value:"footer",label:"Footer"}],Kb=[{value:"top_banner",label:"Top Banner",position:"top_banner"},{value:"sidebar",label:"Sidebar",position:"sidebar"},{value:"inline_content",label:"Inline Content",position:"inline_content"},{value:"footer",label:"Footer",position:"footer"},{value:"modal",label:"Modal",position:"modal"},{value:"dashboard_card",label:"Dashboard Card",position:"dashboard_card"},{value:"feed_inline",label:"Feed Inline",position:"inline_content"},{value:"header_bar",label:"Header Bar",position:"top_banner"}],Zde=["mobile","desktop","tablet"],_T={mobile:q1,desktop:sx,tablet:G1},Zb={name:"",label:"",position:"top_banner",description:"",media_types:["image"],is_active:!0,max_width:"",max_height:"",default_visibility:{pages:[],roles:[],devices:[]}};function Qde(){var V,te;const e=tn(),[t,n]=w.useState(!1),[s,i]=w.useState(null),[a,l]=w.useState(Zb),[u,h]=w.useState(""),[m,g]=w.useState(""),[x,v]=w.useState(!1),{data:_=[],isLoading:N}=Re({queryKey:["ad-placements"],queryFn:()=>ne.entities.AdPlacement.list()}),S=pt({mutationFn:H=>s?ne.entities.AdPlacement.update(s.id,H):ne.entities.AdPlacement.create(H),onSuccess:()=>{e.invalidateQueries({queryKey:["ad-placements"]}),P()}}),j=pt({mutationFn:H=>ne.entities.AdPlacement.delete(H),onSuccess:()=>e.invalidateQueries({queryKey:["ad-placements"]})}),P=()=>{n(!1),i(null),l(Zb),h(""),g(""),v(!1)},E=H=>{i(H);const Y=Kb.some(ce=>ce.value===H.name);v(!Y),l({name:H.name||"",label:H.label||"",position:H.position||"top_banner",description:H.description||"",media_types:H.media_types||["image"],is_active:H.is_active!==!1,max_width:H.max_width||"",max_height:H.max_height||"",default_visibility:H.default_visibility||{pages:[],roles:[],devices:[]}}),n(!0)},R=H=>{l(Y=>({...Y,media_types:Y.media_types.includes(H)?Y.media_types.filter(ce=>ce!==H):[...Y.media_types,H]}
801))},A=H=>{l(Y=>({...Y,default_visibility:{...Y.default_visibility,devices:Y.default_visibility.devices.includes(H)?Y.default_visibility.devices.filter(ce=>ce!==H):[...Y.default_visibility.devices,H]}}))},B=(H,Y,ce)=>{Y.trim()&&(l(K=>({...K,default_visibility:{...K.default_visibility,[H]:[...K.default_visibility[H]||[],Y.trim()]}})),ce(""))},I=(H,Y)=>{l(ce=>({...ce,default_visibility:{...ce.default_visibility,[H]:ce.default_visibility[H].filter((K,q)=>q!==Y)}}))},z=H=>{H.preventDefault();const Y={...a,max_width:a.max_width?Number(a.max_width):void 0,max_height:a.max_height?Number(a.max_height):void 0};S.mutate(Y)};return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Ad Placements"}),r.jsx("p",{className:"text-sm text-slate-500",children:"Define where ads appear in clone apps"})]}),r.jsxs(_t,{onClick:()=>{l(Zb),n(!0)},children:[r.jsx(Cn,{className:"w-4 h-4 mr-2"})," New Placement"]})]}),N?r.jsx("div",{className:"flex justify-center py-12",children:r.jsx(gt,{className:"w-6 h-6 animate-spin text-slate-400"})}):_.length===0?r.jsxs("div",{className:"bg-white border border-dashed border-slate-200 rounded-2xl p-12 text-center",children:[r.jsx(H6,{className:"w-10 h-10 text-slate-300 mx-auto mb-3"}),r.jsx("p",{className:"text-slate-500 mb-4",children:"No ad placements defined yet"}),r.jsx(_t,{variant:"outline",onClick:()=>n(!0),children:"Create First Placement"})]}):r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:_.map(H=>{var Y,ce,K,q;return r.jsxs("div",{className:"bg-white rounded-2xl border border-slate-100 p-5 shadow-sm hover:shadow-md transition-all",children:[r.jsxs("div",{className:"flex items-start justify-between mb-3",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("h3",{className:"font-semibold text-slate-900",children:H.label||H.name}),r.jsx("span",{className:`px-2 py-0.5 rounded-full text-[11px] font-semibold ${H.is_active!==!1?"bg-emerald-100 text-emerald-700":"bg-slate-100 text-slate-500"}`,children:H.is_active!==!1?"Active":"Inactive"})]}),r.jsx("p",{className:"text-xs text-slate-400 font-mono mt-0.5",children:H.name})]}),r.jsxs("div",{className:"flex gap-1",children:[r.jsx(_t,{variant:"ghost",size:"sm",onClick:()=>E(H),children:r.jsx(Pm,{className:"w-4 h-4"})}),r.jsx(_t,{variant:"ghost",size:"sm",className:"text-red-500 hover:text-red-700",onClick:()=>{window.confirm("Delete this placement?")&&j.mutate(H.id)},children:r.jsx(us,{className:"w-4 h-4"})})]})]}),r.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[r.jsx("span",{className:"bg-indigo-50 text-indigo-700 px-2 py-1 rounded-lg font-medium",children:((Y=wT.find(ge=>ge.value===H.position))==null?void 0:Y.label)||H.position}),(ce=H.media_types)==null?void 0:ce.map(ge=>r.jsx("span",{className:"bg-slate-50 text-slate-600 px-2 py-1 rounded-lg",children:ge},ge)),(q=(K=H.default_visibility)==null?void 0:K.devices)==null?void 0:q.map(ge=>{const he=_T[ge];return r.jsxs("span",{className:"bg-slate-50 text-slate-600 px-2 py-1 rounded-lg flex items-center gap-1",children:[he&&r.jsx(he,{className:"w-3 h-3"}),ge]},ge)})]}),H.description&&r.jsx("p",{className:"text-xs text-slate-400 mt-2 line-clamp-2",children:H.description})]},H.id)})}),r.jsx($i,{open:t,onOpenChange:H=>{H||P()},children:r.jsxs(ci,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[r.jsx(di,{children:r.jsx(ui,{children:s?"Edit Placement":"New Placement"})}),r.jsxs("form",{onSubmit:z,className:"space-y-4 py-2",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Identifier *"}),x?r.jsxs("div",{className:"flex gap-2",children:[r.jsx(sn,{required:!0,value:a.name,onChange:H=>l(Y=>({...Y,name:H.target.value})),placeholder:"my_custom_slot",className:"flex-1"}),r.jsx(_t,{type:"button",variant:"outline",size:"sm",onClick:()=>{v(!1),l(H=>({...H,name:""}))},children:"List"})]}):r.jsxs(ys,{value:a.name||void 0,onValueChange:H=>{if(H==="__custom__")v(!0),l(Y=>({...Y,name:""}));else{const Y=Kb.find(ce=>ce.value===H);l(ce=>({...ce,name:H,label:ce.label||(Y==null?void 0:Y.label)||"",position:(Y==null?void 0:Y.position)||"inline_content"}))}},children:[r.jsx(cs,{children:r.jsx(bs,{placeholder:"Select identifier..."})}),r.jsxs(ds,{children:[Kb.map(H=>r.jsxs(wt,{value:H.value,children:[H.label," ",r.jsxs("span",{className:"text-slate-400 ml-1",children:["(",H.value,")"]})]},H.value)),r.jsx(wt,{value:"__custom__",children:"âï¸ Custom..."})]})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Label"}),r.jsx(sn,{value:a.label,onChange:H=>l(Y=>({...Y,label:H.target.value})),placeholder:"Top Banner"})]})]}),x&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Position *"}),r.jsxs(ys,{value:a.position,onValueChange:H=>l(Y=>({...Y,position:H})),children:[r.jsx(cs,{children:r.jsx(bs,{})}),r.jsx(ds,{children:wT.map(H=>r.jsx(wt,{value:H.value,children:H.label},H.value))})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Description"}),r.jsx(ed,{value:a.description,onChange:H=>l(Y=>({...Y,description:H.target.value})),rows:2})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Supported Media Types"}),r.jsx("div",{className:"flex gap-2",children:["image","video","html"].map(H=>r.jsx("button",{type:"button",onClick:()=>R(H),className:`px-3 py-1.5 rounded-lg text-sm font-medium border transition-colors ${a.media_types.includes(H)?"bg-indigo-50 border-indigo-200 text-indigo-700":"bg-white border-slate-200 text-slate-500"}`,children:H},H))})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Max Width (px)"}),r.jsx(sn,{type:"number",value:a.max_width,onChange:H=>l(Y=>({...Y,max_width:H.target.value}))})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Max Height (px)"}),r.jsx(sn,{type:"number",value:a.max_height,onChange:H=>l(Y=>({...Y,max_height:H.target.value}))})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Device Visibility"}),r.jsx("div",{className:"flex gap-2",children:Zde.map(H=>{const Y=_T[H];return r.jsxs("button",{type:"button",onClick:()=>A(H),className:`px-3 py-1.5 rounded-lg text-sm font-medium border flex items-center gap-1.5 transition-colors ${a.default_visibility.devices.includes(H)?"bg-indigo-50 border-indigo-200 text-indigo-700":"bg-white border-slate-200 text-slate-500"}`,children:[Y&&r.jsx(Y,{className:"w-3.5 h-3.5"}),H]},H)})}),r.jsx("p",{className:"text-[11px] text-slate-400",children:"Leave empty for all devices"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Page Visibility"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(sn,{value:u,onChange:H=>h(H.target.value),placeholder:"e.g. Home",onKeyDown:H=>{H.key==="Enter"&&(H.preventDefault(),B("pages",u,h))}}),r.jsx(_t,{type:"button",variant:"outline",size:"sm",onClick:()=>B("pages",u,h),children:"Add"})]}),r.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:(V=a.default_visibility.pages)==null?void 0:V.map((H,Y)=>r.jsxs("span",{className:"bg-slate-100 text-slate-600 text-xs px-2 py-1 rounded-lg flex items-center gap-1",children:[H,r.jsx("button",{type:"button",onClick:()=>I("pages",Y),className:"text-slate-400 hover:text-red-500",children:"Ã"})]},Y))})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Role Visibility"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(sn,{value:m,onChange:H=>g(H.target.value),placeholder:"e.g. user",onKeyDown:H=>{H.key==="Enter"&&(H.preventDefault(),B("roles",m,g))}}),r.jsx(_t,{type:"button",variant:"outline",size:"sm",onClick:()=>B("roles",m,g),children:"Add"})]}),r.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:(te=a.default_visibility.roles)==null?void 0:te.map((H,Y)=>r.jsxs("span",{className:"bg-slate-100 text-slate-600 text-xs px-2 py-1 rounded-lg flex items-center gap-1",children:[H,r.jsx("button",{type:"button",onClick:()=>I("roles",Y),className:"text-slate-400 hover:text-red-500",children:"Ã"})]},Y))})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(fj,{checked:a.is_active,onCheckedChange:H=>l(Y=>({...Y,is_active:H}))}),r.jsx(mt,{children:"Active"})]}),r.jsxs(lh,{children:[r.jsx(_t,{type:"button",variant:"outline",onClick:P,children:"Cancel"}),r.jsxs(_t,{type:"submit",disabled:S.isPending,children:[S.isPending?r.jsx(gt,{className:"w-4 h-4 animate-spin mr-2"}):null,s?"Update":"Create"]})]})]})]})})]})}const NT=[{key:"desktop",label:"Desktop",icon:sx,width:"100%",maxWidth:1024},{key:"tablet",label:"Tablet",icon:G1,width:768,maxWidth:768},{key:"mobile",label:"Mobile",icon:q1,width:375,maxWidth:375}];function Xde({creative:e,open:t,onClose:n}){const[s,i]=w.useState("desktop"),a=w.useRef(null),l=NT.find(h=>h.key===s);if(w.useEffect(()=>
801{if((e==null?void 0:e.media_type)==="html"&&e.html_content&&a.current){const h=a.current.contentDocument;h.open(),h.write(`<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width,initial-scale=1"><style>*{margin:0;padding:0;box-sizing:border-box}body{font-family:sans-serif;display:flex;justify-content:center;align-items:center;min-height:100vh;background:#f8fafc}</style></head><body>${e.html_content}</body></html>`),h.close()}},[e,s,t]),!e)return null;const u=typeof l.width=="number"?`${l.width}px`:l.width;return r.jsx($i,{open:t,onOpenChange:h=>{h||n()},children:r.jsxs(ci,{className:"max-w-4xl w-[95vw] max-h-[90vh] flex flex-col p-0 gap-0",children:[r.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-100",children:[r.jsxs("div",{children:[r.jsx(di,{className:"p-0",children:r.jsx(ui,{className:"text-base",children:e.title})}),r.jsxs("p",{className:"text-xs text-slate-400 mt-0.5",children:[e.media_type.toUpperCase()," ⢠Priority ",e.priority||1,e.campaign&&` ⢠${e.campaign}`]})]}),r.jsx("div",{className:"flex items-center gap-1 bg-slate-100 rounded-xl p-1",children:NT.map(h=>{const m=h.icon,g=s===h.key;return r.jsxs("button",{onClick:()=>i(h.key),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all ${g?"bg-white text-slate-900 shadow-sm":"text-slate-500 hover:text-slate-700"}`,children:[r.jsx(m,{className:"w-3.5 h-3.5"}),r.jsx("span",{className:"hidden sm:inline",children:h.label})]},h.key)})})]}),r.jsx("div",{className:"flex-1 overflow-auto bg-slate-50 p-6 flex justify-center items-start min-h-[300px]",children:r.jsxs("div",{className:"bg-white rounded-2xl shadow-lg border border-slate-200 overflow-hidden transition-all duration-300",style:{width:u,maxWidth:l.maxWidth},children:[r.jsxs("div",{className:"bg-slate-100 border-b border-slate-200 px-4 py-2 flex items-center gap-2",children:[r.jsxs("div",{className:"flex gap-1.5",children:[r.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-400"}),r.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-amber-400"}),r.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-green-400"})]}),r.jsx("div",{className:"flex-1 bg-white rounded-md px-3 py-1 text-[11px] text-slate-400 truncate ml-2",children:e.destination_url||"client-site.com"})]}),r.jsxs("div",{className:"p-4 space-y-3",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"h-3 bg-slate-100 rounded w-3/4"}),r.jsx("div",{className:"h-3 bg-slate-100 rounded w-full"}),r.jsx("div",{className:"h-3 bg-slate-100 rounded w-5/6"})]}),r.jsxs("div",{className:"relative border-2 border-dashed border-indigo-200 rounded-xl bg-indigo-50/30 p-1",children:[r.jsx("span",{className:"absolute -top-2.5 left-3 bg-indigo-500 text-white text-[9px] font-bold px-2 py-0.5 rounded-full uppercase tracking-wider",children:"Ad Preview"}),e.media_type==="image"&&e.media_url&&r.jsx("img",{src:e.media_url,alt:e.alt_text||e.title,className:"w-full rounded-lg object-contain max-h-[400px]"}),e.media_type==="video"&&e.media_url&&r.jsx("video",{src:e.media_url,controls:!0,className:"w-full rounded-lg max-h-[400px]",playsInline:!0}),e.media_type==="html"&&e.html_content&&r.jsx("iframe",{ref:a,title:"Ad HTML Preview",className:"w-full rounded-lg border-0",style:{minHeight:200,height:300},sandbox:"allow-scripts"}),!e.media_url&&e.media_type!=="html"&&r.jsx("div",{className:"flex items-center justify-center h-40 text-slate-400 text-sm",children:"No media uploaded"}),e.media_type==="html"&&!e.html_content&&r.jsx("div",{className:"flex items-center justify-center h-40 text-slate-400 text-sm",children:"No HTML content"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"h-3 bg-slate-100 rounded w-full"}),r.jsx("div",{className:"h-3 bg-slate-100 rounded w-2/3"})]})]})]})}),r.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-t border-slate-100 bg-white",children:[r.jsxs("p",{className:"text-xs text-slate-400",children:["Viewing as ",l.label," (",typeof l.width=="number"?`${l.width}px`:"full width",")"]}),r.jsxs("div",{className:"flex gap-2",children:[e.destination_url&&r.jsx(_t,{variant:"outline",size:"sm",asChild:!0,children:r.jsxs("a",{href:e.destination_url,target:"_blank",rel:"noopener noreferrer",children:[r.jsx(Iu,{className:"w-3.5 h-3.5 mr-1.5"}),"Open URL"]})}),r.jsx(_t,{variant:"outline",size:"sm",onClick:n,children:"Close"})]})]})]})})}const Jde={image:Qs,video:f0,html:s5},jT={draft:"bg-slate-100 text-slate-600",active:"bg-emerald-100 text-emerald-700",paused:"bg-amber-100 text-amber-700",archived:"bg-red-100 text-red-600"}
801,Qb={title:"",media_type:"image",media_url:"",html_content:"",destination_url:"",alt_text:"",campaign:"",priority:1,status:"draft",notes:"",expiration_mode:"permanent",expires_at:""};function eue(){const e=tn(),[t,n]=w.useState(!1),[s,i]=w.useState(null),[a,l]=w.useState(Qb),[u,h]=w.useState(!1),{data:m=[],isLoading:g}=Re({queryKey:["ad-creatives"],queryFn:()=>ne.entities.AdCreative.list("-created_date")}),x=pt({mutationFn:I=>s?ne.entities.AdCreative.update(s.id,I):ne.entities.AdCreative.create(I),onSuccess:()=>{e.invalidateQueries({queryKey:["ad-creatives"]}),E()}}),{data:v=[]}=Re({queryKey:["ad-assignments"],queryFn:()=>ne.entities.AdAssignment.list()}),[_,N]=w.useState(null),[S,j]=w.useState(null),P=async I=>{if(!window.confirm("Delete this ad and ALL its assignments across every clone?"))return;N(I);const z=v.filter(V=>V.ad_creative_id===I);for(const V of z)await ne.entities.AdAssignment.delete(V.id);await ne.entities.AdCreative.delete(I),e.invalidateQueries({queryKey:["ad-creatives"]}),e.invalidateQueries({queryKey:["ad-assignments"]}),N(null)},E=()=>{n(!1),i(null),l(Qb)},R=I=>{i(I),l({title:I.title||"",media_type:I.media_type||"image",media_url:I.media_url||"",html_content:I.html_content||"",destination_url:I.destination_url||"",alt_text:I.alt_text||"",campaign:I.campaign||"",priority:I.priority||1,status:I.status||"draft",notes:I.notes||"",expiration_mode:I.expiration_mode||"permanent",expires_at:I.expires_at||""}),n(!0)},A=async I=>{var te;const z=(te=I.target.files)==null?void 0:te[0];if(!z)return;h(!0);const{file_url:V}=await ne.integrations.Core.UploadFile({file:z});l(H=>({...H,media_url:V})),h(!1)},B=I=>{I.preventDefault(),x.mutate({...a,priority:Number(a.priority)||1})};return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Ad Creatives"}),r.jsx("p",{className:"text-sm text-slate-500",children:"Manage ad content, media, and campaigns"})]}),r.jsxs(_t,{onClick:()=>{l(Qb),n(!0)},children:[r.jsx(Cn,{className:"w-4 h-4 mr-2"})," New Creative"]})]}),g?r.jsx("div",{className:"flex justify-center py-12",children:r.jsx(gt,{className:"w-6 h-6 animate-spin text-slate-400"})}):m.length===0?r.jsxs("div",{className:"bg-white border border-dashed border-slate-200 rounded-2xl p-12 text-center",children:[r.jsx(Qs,{className:"w-10 h-10 text-slate-300 mx-auto mb-3"}),r.jsx("p",{className:"text-slate-500 mb-4",children:"No ad creatives yet"}),r.jsx(_t,{variant:"outline",onClick:()=>n(!0),children:"Create First Ad"})]}):r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:m.map(I=>{const z=Jde[I.media_type]||Qs;return r.jsxs("div",{className:"bg-white rounded-2xl border border-slate-100 overflow-hidden shadow-sm hover:shadow-md transition-all",children:[I.media_type==="image"&&I.media_url?r.jsx("div",{className:"h-32 bg-slate-50 flex items-center justify-center overflow-hidden",children:r.jsx("img",{src:I.media_url,alt:I.alt_text||I.title,className:"w-full h-full object-cover"})}):r.jsx("div",{className:"h-32 bg-slate-50 flex items-center justify-center",children:r.jsx(z,{className:"w-10 h-10 text-slate-300"})}),r.jsxs("div",{className:"p-4",children:[r.jsxs("div",{className:"flex items-start justify-between mb-2",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-sm text-slate-900 line-clamp-1",children:I.title}),I.campaign&&r.jsx("p",{className:"text-xs text-indigo-600 font-medium",children:I.campaign})]}),r.jsx("span",{className:`px-2 py-0.5 rounded-full text-[11px] font-semibold flex-shrink-0 ${jT[I.status]||jT.draft}`,children:I.status})]}),r.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-400 mb-3 flex-wrap",children:[r.jsx(z,{className:"w-3.5 h-3.5"}),I.media_type,r.jsxs("span",{children:["⢠Priority: ",I.priority||1]}),I.expiration_mode==="scheduled"&&I.expires_at&&r.jsxs("span",{className:`font-medium ${new Date(I.expires_at)<new Date?"text-red-500":"text-amber-600"}`,children:["⢠",new Date(I.expires_at)<new Date?"Expired":`Expires ${new Date(I.expires_at).toLocaleDateString()}`]}),(!I.expiration_mode||I.expiration_mode==="permanent")&&r.jsx("span",{children:"⢠Permanent"})]}),r.jsxs("div",{className:"flex gap-1 border-t border-slate-50 pt-3 -mb-1",children:[r.jsxs(_t,{variant:"ghost",size:"sm",onClick:()=>j(I),children:[r.jsx(V1,{className:"w-3.5 h-3.5 mr-1"}),"Preview"]}),r.jsxs(_t,{variant:"ghost",size:"sm",onClick:()=>R(I),children:[r.jsx(Pm,{className:"w-3.5 h-3.5 mr-1"}),"Edit"]}),r.jsx(_t,{variant:"ghost",size:"sm",className:"text-red-500 hover:text-red-700 ml-auto",disabled:_===I.id,onClick:()=>P(I.id),children:_===I.id?r.jsx(gt,{className:"w-3.5 h-3.5 animate-spin"}):r.jsx(us,{className:"w-3.5 h-3.5"})})]})]})]},I.id)})}),r.jsx($i,{open:t,onOpenChange:I=>{I||E()},children:r.jsxs(ci,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[r.jsx(di,{children:r.jsx(ui,{children:s?"Edit Creative":"New Creative"})}),r.jsxs("form",{onSubmit:B,className:"space-y-4 py-2",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Title *"}),r.jsx(sn,{required:!0,value:a.title,onChange:I=>l(z=>({...z,title:I.target.value})),placeholder:"Summer Sale Banner"})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Media Type"}),r.jsxs(ys,{value:a.media_type,onValueChange:I=>l(z=>({...z,media_type:I})),children:[r.jsx(cs,{children:r.jsx(bs,{})}),r.jsxs(ds,{children:[r.jsx(wt,{value:"image",children:"Image"}),r.jsx(wt,{value:"video",children:"Video"}),r.jsx(wt,{value:"html",children:"HTML"})]})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Status"}),r.jsxs(ys,{value:a.status,onValueChange:I=>l(z=>({...z,status:I})),children:[r.jsx(cs,{children:r.jsx(bs,{})}),r.jsxs(ds,{children:[r.jsx(wt,{value:"draft",children:"Draft"}),r.jsx(wt,{value:"active",children:"Active"}),r.jsx(wt,{value:"paused",children:"Paused"}),r.jsx(wt,{value:"archived",children:"Archived"})]})]})]})]}),a.media_type!=="html"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Media"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(sn,{value:a.media_url,onChange:I=>l(z=>({...z,media_url:I.target.value})),placeholder:"URL or upload",className:"flex-1"}),r.jsxs(_t,{type:"button",variant:"outline",size:"sm",className:"relative",disabled:u,children:[u?r.jsx(gt,{className:"w-4 h-4 animate-spin"}):"Upload",r.jsx("input",{type:"file",accept:"image/*,video/*",onChange:A,className:"absolute inset-0 opacity-0 cursor-pointer"})]})]}),a.media_url&&a.media_type==="image"&&r.jsx("img",{src:a.media_url,alt:"",className:"h-24 rounded-lg mt-2 object-cover"})]}),a.media_type==="html"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"HTML Content"}),r.jsx(ed,{value:a.html_content,onChange:I=>l(z=>({...z,html_content:I.target.value})),rows:4,placeholder:"<div>...</div>"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Destination URL"}),r.jsx(sn,{value:a.destination_url,onChange:I=>l(z=>({...z,destination_url:I.target.value})),placeholder:"https://example.com/landing"})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Campaign"}),r.jsx(sn,{value:a.campaign,onChange:I=>l(z=>({...z,campaign:I.target.value})),placeholder:"Summer 2026"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Priority (1-10)"}),r.jsx(sn,{type:"number",min:"1",max:"10",value:a.priority,onChange:I=>l(z=>({...z,priority:I.target.value}))})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Alt Text"}),r.jsx(sn,{value:a.alt_text,onChange:I=>l(z=>({...z,alt_text:I.target.value}))})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Expiration"}),r.jsxs(ys,{value:a.expiration_mode,onValueChange:I=>l(z=>({...z,expiration_mode:I,expires_at:I==="permanent"?"":z.expires_at})),children:[r.jsx(cs,{children:r.jsx(bs,{})}),r.jsxs(ds,{children:[r.jsx(wt,{value:"permanent",children:"Until I delete it"}),r.jsx(wt,{value:"scheduled",children:"Expires on a date"})]})]})]}),a.expiration_mode==="scheduled"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Expires At *"}),r.jsx(sn,{type:"datetime-local",required:!0,value:a.expires_at?a.expires_at.slice(0,16):"",onCh
801ange:I=>l(z=>({...z,expires_at:I.target.value?new Date(I.target.value).toISOString():""}))}),r.jsxs("p",{className:"text-xs text-amber-600 flex items-center gap-1",children:[r.jsx(Lu,{className:"w-3 h-3"})," Ad will auto-archive on this date everywhere"]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Notes"}),r.jsx(ed,{value:a.notes,onChange:I=>l(z=>({...z,notes:I.target.value})),rows:2})]}),r.jsxs(lh,{children:[r.jsx(_t,{type:"button",variant:"outline",onClick:E,children:"Cancel"}),r.jsxs(_t,{type:"submit",disabled:x.isPending,children:[x.isPending?r.jsx(gt,{className:"w-4 h-4 animate-spin mr-2"}):null,s?"Update":"Create"]})]})]})]})}),r.jsx(Xde,{creative:S,open:!!S,onClose:()=>j(null)})]})}const ST={pending:"bg-slate-100 text-slate-600",delivering:"bg-emerald-100 text-emerald-700",completed:"bg-blue-100 text-blue-700",underperforming:"bg-amber-100 text-amber-700"},Xb={ad_creative_id:"",placement_id:"",clone_ids:[],is_active:!0,start_date:"",end_date:"",visibility_overrides:{pages:[],roles:[],devices:[]}};function tue(){const e=tn(),{toast:t}=z1(),[n,s]=w.useState(!1),[i,a]=w.useState(null),[l,u]=w.useState(Xb),[h,m]=w.useState({}),[g,x]=w.useState("all"),[v,_]=w.useState("all"),[N,S]=w.useState("all"),{data:j=[],isLoading:P}=Re({queryKey:["ad-assignments"],queryFn:()=>ne.entities.AdAssignment.list("-created_date")}),{data:E=[]}=Re({queryKey:["ad-creatives"],queryFn:()=>ne.entities.AdCreative.list()}),{data:R=[]}=Re({queryKey:["ad-placements"],queryFn:()=>ne.entities.AdPlacement.list()}),{data:A=[]}=Re({queryKey:["clones"],queryFn:()=>ne.entities.CloneApp.list()}),B=pt({mutationFn:async q=>{const{clone_ids:ge,...he}=q;if(i)return ne.entities.AdAssignment.update(i.id,{...he,clone_id:he.clone_id});const be=E.find(D=>D.id===q.ad_creative_id),W=R.find(D=>D.id===q.placement_id),Z=ge.map(D=>{const O=A.find(U=>U.id===D);return{...he,clone_id:D,clone_name:(O==null?void 0:O.app_name)||"",ad_creative_title:(be==null?void 0:be.title)||"",placement_name:(W==null?void 0:W.name)||""}});return ne.entities.AdAssignment.bulkCreate(Z)},onSuccess:()=>{e.invalidateQueries({queryKey:["ad-assignments"]}),V()}}),I=pt({mutationFn:q=>ne.entities.AdAssignment.delete(q),onSuccess:()=>e.invalidateQueries({queryKey:["ad-assignments"]})}),z=async q=>{var ge,he;m(be=>({...be,[q]:!0}));try{const be=await ne.functions.invoke("syncAdDataToClone",{clone_id:q});t({title:"Synced!",description:`${be.data.synced} ads pushed to clone.`}),e.invalidateQueries({queryKey:["ad-assignments"]})}catch(be){t({title:"Sync Failed",description:((he=(ge=be.response)==null?void 0:ge.data)==null?void 0:he.error)||be.message,variant:"destructive"})}m(be=>({...be,[q]:!1}))},V=()=>{s(!1),a(null),u(Xb)},te=q=>{a(q),u({ad_creative_id:q.ad_creative_id||"",placement_id:q.placement_id||"",clone_ids:[q.clone_id],is_active:q.is_active!==!1,start_date:q.start_date||"",end_date:q.end_date||"",visibility_overrides:q.visibility_overrides||{pages:[],roles:[],devices:[]}}),s(!0)},H=q=>{u(ge=>({...ge,clone_ids:ge.clone_ids.includes(q)?ge.clone_ids.filter(he=>he!==q):[...ge.clone_ids,q]}))},Y=q=>{if(q.preventDefault(),i){const ge=E.find(W=>W.id===l.ad_creative_id),he=R.find(W=>W.id===l.placement_id),be=A.find(W=>W.id===l.clone_ids[0]);B.mutate({...l,clone_id:l.clone_ids[0],clone_name:(be==null?void 0:be.app_name)||"",ad_creative_title:(ge==null?void 0:ge.title)||"",placement_name:(he==null?void 0:he.name)||""})}else B.mutate(l)},ce=j.filter(q=>!(g!=="all"&&q.clone_id!==g||v!=="all"&&q.placement_id!==v||N!=="all"&&q.performance_status!==N)),K=[...new Set(ce.map(q=>q.clone_id))];return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Ad Assignments"}),r.jsx("p",{className:"text-sm text-slate-500",children:"Link ads to placements and clones"})]}),r.jsxs(_t,{onClick:()=>{u(Xb),s(!0)},children:[r.jsx(Cn,{className:"w-4 h-4 mr-2"})," New Assignment"]})]}),r.jsxs("div",{className:"flex flex-wrap gap-3 mb-6",children:[r.jsxs(ys,{value:g,onValueChange:x,children:[r.jsx(cs,{className:"w-[180px]",children:r.jsx(bs,{placeholder:"All Clones"})}),r.jsxs(ds,{children:[r.jsx(wt,{value:"all",children:"All Clones"}),A.map(q=>r.jsx(wt,{value:q.id,children:q.app_name},q.id))]})]}),r.jsxs(ys,{value:v,onValueChange:_,children:[r.jsx(cs,{className:"w-[180px]",children:r.jsx(bs,{placeholder:"All Placements"})}),r.jsxs(ds,{children:[r.jsx(wt,{value:"all",children:"All Placements"}),R.map(q=>r.jsx(wt,{value:q.id,children:q.label||q.name},q.id))]})]}),r.jsxs(ys,{value:N,onValueChange:S,children:[r.jsx(cs,{className:"w-[160px]",children:r.jsx(bs,{placeholder:"All Status"})}),r.jsxs(ds,{children:[r.jsx(wt,{value:"all",children:"All Status"}),r.jsx(wt,{value:"pending",children:"Pending"}),r.jsx(wt,{value:"delivering",children:"Delivering"}),r.jsx(wt,{value:"completed",children:"Completed"})]})]})]}),K.length>0&&r.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:K.map(q=>{const ge=A.find(he=>he.id===q);return r.jsxs(_t,{variant:"outline",size:"sm",onClick:()=>z(q),disabled:h[q],children:[h[q]?r.jsx(gt,{className:"w-3.5 h-3.5 animate-spin mr-1.5"}):r.jsx(Zf,{className:"w-3.5 h-3.5 mr-1.5"}),"Sync to ",(ge==null?void 0:ge.app_name)||"Clone"]},q)})}),P?r.jsx("div",{className:"flex justify-center py-12",children:r.jsx(gt,{className:"w-6 h-6 animate-spin text-slate-400"})}):ce.length===0?r.jsxs("div",{className:"bg-white border border-dashed border-slate-200 rounded-2xl p-12 text-center",children:[r.jsx("p",{className:"text-slate-500 mb-4",children:"No assignments found"}),r.jsx(_t,{variant:"outline",onClick:()=>s(!0),children:"Create Assignment"})]}):r.jsx("div",{className:"space-y-3",children:ce.map(q=>r.jsxs("div",{className:"bg-white rounded-xl border border-slate-100 p-4 shadow-sm flex items-center gap-4 hover:shadow-md transition-all",children:[r.jsx("div",{className:`w-2 h-10 rounded-full flex-shrink-0 ${q.is_active?"bg-emerald-400":"bg-slate-200"}`}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[r.jsx("span",{className:"font-semibold text-sm text-slate-900",children:q.ad_creative_title||"Untitled Ad"}),r.jsx("span",{className:"text-slate-300",children:"â"}),r.jsx("span",{className:"text-sm font-medium text-indigo-600",children:q.placement_name||"Unknown"}),r.jsx("span",{className:"text-slate-300",children:"â"}),r.jsx("span",{className:"text-sm font-medium text-purple-600",children:q.clone_name||"Unknown Clone"})]}),r.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-400",children:[q.start_date&&r.jsxs("span",{children:["From: ",$u(new Date(q.start_date),"MMM d")]}),q.end_date&&r.jsxs("span",{children:["To: ",$u(new Date(q.end_date),"MMM d")]}),r.jsx("span",{className:`px-2 py-0.5 rounded-full font-semibold ${ST[q.performance_status]||ST.pending}`,children:q.performance_status||"pending"})]})]}),r.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[r.jsx(_t,{variant:"ghost",size:"sm",onClick:()=>te(q),children:r.jsx(Pm,{className:"w-3.5 h-3.5"})}),r.jsx(_t,{variant:"ghost",size:"sm",className:"text-red-500",onClick:()=>{window.confirm("Delete?")&&I.mutate(q.id)},children:r.jsx(us,{className:"w-3.5 h-3.5"})})]})]},q.id))}),r.jsx($i,{open:n,onOpenChange:q=>{q||V()},children:r.jsxs(ci,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[r.jsx(di,{children:r.jsx(ui,{children:i?"Edit Assignment":"New Assignment"})}),r.jsxs("form",{onSubmit:Y,className:"space-y-4 py-2",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Ad Creative *"}),r.jsxs(ys,{value:l.ad_creative_id,onValueChange:q=>u(ge=>({...ge,ad_creative_id:q})),children:[r.jsx(cs,{children:r.jsx(bs,{placeholder:"Select ad..."})}),r.jsx(ds,{children:E.map(q=>r.jsxs(wt,{value:q.id,children:[q.title," (",q.status,")"]},q.id))})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Placement *"}),r.jsxs(ys,{value:l.placement_id,onValueChange:q=>u(ge=>({...ge,placement_id:q})),children:[r.jsx(cs,{children:r.jsx(bs,{placeholder:"Select placement..."})}),r.jsx(ds,{children:R.map(q=>r.jsxs(wt,{value:q.id,children:[q.label||q.name," (",q.position,")"]},q.id))})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:i?"Clone"
801:"Target Clones *"}),i?r.jsxs(ys,{value:l.clone_ids[0]||"",onValueChange:q=>u(ge=>({...ge,clone_ids:[q]})),children:[r.jsx(cs,{children:r.jsx(bs,{placeholder:"Select clone..."})}),r.jsx(ds,{children:A.map(q=>r.jsx(wt,{value:q.id,children:q.app_name},q.id))})]}):r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.jsx("button",{type:"button",onClick:()=>{l.clone_ids.length===A.length?u(q=>({...q,clone_ids:[]})):u(q=>({...q,clone_ids:A.map(ge=>ge.id)}))},className:`px-3 py-1 rounded-lg text-xs font-semibold border transition-colors ${l.clone_ids.length===A.length&&A.length>0?"bg-purple-600 border-purple-600 text-white":"bg-white border-slate-200 text-slate-600 hover:border-purple-300"}`,children:l.clone_ids.length===A.length&&A.length>0?"â All Selected":"Select All Clones"}),l.clone_ids.length>0&&l.clone_ids.length<A.length&&r.jsxs("span",{className:"text-xs text-slate-400",children:[l.clone_ids.length," of ",A.length," selected"]})]}),r.jsxs("div",{className:"flex flex-wrap gap-2 p-3 bg-slate-50 rounded-xl border max-h-40 overflow-y-auto",children:[A.length===0&&r.jsx("p",{className:"text-xs text-slate-400",children:"No clones available"}),A.map(q=>r.jsxs("button",{type:"button",onClick:()=>H(q.id),className:`px-3 py-1.5 rounded-lg text-sm font-medium border transition-colors ${l.clone_ids.includes(q.id)?"bg-purple-50 border-purple-200 text-purple-700":"bg-white border-slate-200 text-slate-500"}`,children:[l.clone_ids.includes(q.id)&&r.jsx(ht,{className:"w-3.5 h-3.5 inline mr-1"}),q.app_name]},q.id))]})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Start Date"}),r.jsx(sn,{type:"date",value:l.start_date,onChange:q=>u(ge=>({...ge,start_date:q.target.value}))})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"End Date"}),r.jsx(sn,{type:"date",value:l.end_date,onChange:q=>u(ge=>({...ge,end_date:q.target.value}))})]})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(fj,{checked:l.is_active,onCheckedChange:q=>u(ge=>({...ge,is_active:q}))}),r.jsx(mt,{children:"Active"})]}),r.jsxs(lh,{children:[r.jsx(_t,{type:"button",variant:"outline",onClick:V,children:"Cancel"}),r.jsxs(_t,{type:"submit",disabled:B.isPending||!i&&l.clone_ids.length===0,children:[B.isPending?r.jsx(gt,{className:"w-4 h-4 animate-spin mr-2"}):null,i?"Update":`Assign to ${l.clone_ids.length} Clone${l.clone_ids.length!==1?"s":""}`]})]})]})]})})]})}const kT={active:"bg-emerald-100 text-emerald-700",draft:"bg-slate-100 text-slate-600",paused:"bg-amber-100 text-amber-700",archived:"bg-red-100 text-red-600"};function nue(){const[e,t]=w.useState("all"),[n,s]=w.useState("all"),[i,a]=w.useState("all"),{data:l=[],isLoading:u}=Re({queryKey:["ad-creatives"],queryFn:()=>ne.entities.AdCreative.list()}),{data:h=[],isLoading:m}=Re({queryKey:["ad-assignments"],queryFn:()=>ne.entities.AdAssignment.list()}),{data:g=[],isLoading:x}=Re({queryKey:["ad-placements"],queryFn:()=>ne.entities.AdPlacement.list()}),{data:v=[]}=Re({queryKey:["clones"],queryFn:()=>ne.entities.CloneApp.list()}),_=u||m||x,N=[...new Set(l.map(z=>z.campaign).filter(Boolean))],S=new Date,j=zq(S,7),P=l.filter(z=>z.status==="active").length,E=h.filter(z=>z.is_active).length,R=h.filter(z=>z.end_date&&qG(new Date(z.end_date),S)&&GG(new Date(z.end_date),j)).length,A=new Set(h.filter(z=>z.is_active).map(z=>z.placement_id)),B=g.filter(z=>!A.has(z.id)),I=l.filter(z=>!(e!=="all"&&z.campaign!==e||i!=="all"&&z.status!==i||n!=="all"&&!h.some(te=>te.ad_creative_id===z.id&&te.clone_id===n)));return _?r.jsx("div",{className:"flex justify-center py-12",children:r.jsx(gt,{className:"w-6 h-6 animate-spin text-slate-400"})}):r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-1",children:"Ad Inventory Overview"}),r.jsx("p",{className:"text-sm text-slate-500 mb-6",children:"Central view of all ads across your clone network"}),r.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[r.jsx(Ig,{label:"Active Ads",value:P,icon:ht,color:"text-emerald-600"}),r.jsx(Ig,{label:"Live Assignments",value:E,icon:bL,color:"text-blue-600"}),r.jsx(Ig,{label:"Expiring Soon",value:R,icon:zn,color:"text-amber-600"}
801),r.jsx(Ig,{label:"Empty Placements",value:B.length,icon:Lu,color:"text-red-500"})]}),B.length>0&&r.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4 mb-6",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.jsx(Lu,{className:"w-4 h-4 text-amber-600"}),r.jsx("span",{className:"text-sm font-semibold text-amber-800",children:"Placements Without Ads"})]}),r.jsx("div",{className:"flex flex-wrap gap-2",children:B.map(z=>r.jsx("span",{className:"bg-white px-3 py-1 rounded-lg text-xs font-medium text-amber-700 border border-amber-200",children:z.label||z.name},z.id))})]}),r.jsxs("div",{className:"flex flex-wrap gap-3 mb-6",children:[r.jsxs(ys,{value:e,onValueChange:t,children:[r.jsx(cs,{className:"w-[180px]",children:r.jsx(bs,{placeholder:"All Campaigns"})}),r.jsxs(ds,{children:[r.jsx(wt,{value:"all",children:"All Campaigns"}),N.map(z=>r.jsx(wt,{value:z,children:z},z))]})]}),r.jsxs(ys,{value:n,onValueChange:s,children:[r.jsx(cs,{className:"w-[180px]",children:r.jsx(bs,{placeholder:"All Clones"})}),r.jsxs(ds,{children:[r.jsx(wt,{value:"all",children:"All Clones"}),v.map(z=>r.jsx(wt,{value:z.id,children:z.app_name},z.id))]})]}),r.jsxs(ys,{value:i,onValueChange:a,children:[r.jsx(cs,{className:"w-[150px]",children:r.jsx(bs,{placeholder:"All Status"})}),r.jsxs(ds,{children:[r.jsx(wt,{value:"all",children:"All Status"}),r.jsx(wt,{value:"active",children:"Active"}),r.jsx(wt,{value:"draft",children:"Draft"}),r.jsx(wt,{value:"paused",children:"Paused"}),r.jsx(wt,{value:"archived",children:"Archived"})]})]})]}),r.jsx("div",{className:"bg-white rounded-2xl border border-slate-100 overflow-hidden shadow-sm",children:r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-slate-100 bg-slate-50/50",children:[r.jsx("th",{className:"text-left px-4 py-3 font-semibold text-slate-600",children:"Ad"}),r.jsx("th",{className:"text-left px-4 py-3 font-semibold text-slate-600",children:"Campaign"}),r.jsx("th",{className:"text-left px-4 py-3 font-semibold text-slate-600",children:"Status"}),r.jsx("th",{className:"text-left px-4 py-3 font-semibold text-slate-600",children:"Assigned To"}),r.jsx("th",{className:"text-left px-4 py-3 font-semibold text-slate-600",children:"Placements"})]})}),r.jsxs("tbody",{children:[I.map(z=>{const V=h.filter(Y=>Y.ad_creative_id===z.id),te=[...new Set(V.map(Y=>Y.clone_name).filter(Boolean))],H=[...new Set(V.map(Y=>Y.placement_name).filter(Boolean))];return r.jsxs("tr",{className:"border-b border-slate-50 hover:bg-slate-50/50 transition-colors",children:[r.jsx("td",{className:"px-4 py-3",children:r.jsxs("div",{className:"flex items-center gap-3",children:[z.media_type==="image"&&z.media_url?r.jsx("img",{src:z.media_url,alt:"",className:"w-10 h-10 rounded-lg object-cover bg-slate-100 flex-shrink-0"}):r.jsx("div",{className:"w-10 h-10 rounded-lg bg-slate-100 flex items-center justify-center text-xs text-slate-400 flex-shrink-0",children:z.media_type}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold text-slate-900 line-clamp-1",children:z.title}),r.jsxs("p",{className:"text-xs text-slate-400",children:["Priority: ",z.priority||1]})]})]})}),r.jsx("td",{className:"px-4 py-3 text-slate-600",children:z.campaign||"â"}),r.jsx("td",{className:"px-4 py-3",children:r.jsx("span",{className:`px-2 py-0.5 rounded-full text-[11px] font-semibold ${kT[z.status]||kT.draft}`,children:z.status})}),r.jsx("td",{className:"px-4 py-3",children:te.length===0?r.jsx("span",{className:"text-slate-300",children:"Unassigned"}):r.jsx("div",{className:"flex flex-wrap gap-1",children:te.map(Y=>r.jsx("span",{className:"bg-purple-50 text-purple-700 px-2 py-0.5 rounded text-xs font-medium",children:Y},Y))})}),r.jsx("td",{className:"px-4 py-3",children:H.length===0?r.jsx("span",{className:"text-slate-300",children:"None"}):r.jsx("div",{className:"flex flex-wrap gap-1",children:H.map(Y=>r.jsx("span",{className:"bg-indigo-50 text-indigo-700 px-2 py-0.5 rounded text-xs font-medium",children:Y},Y))})})]},z.id)}),I.length===0&&r.jsx("tr",{children:r.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-slate-400",children:"No ads match the filters"})})]})]})})})]})}function Ig({label:e,value:t,icon:n,color:s}){return r.jsxs("div",{className:"bg-white p-5 rounded-2xl border border-slate-100 shadow-sm",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx(n,{className:`w-4 h-4 ${s}`}),r.jsx("p",{className:"text-sm text-slate-500 font-medium",children:e})]}),r.jsx("p",{className:`text-3xl font-semibold tracking-tight ${s}`,children:t})]})}function sue({clone:e,open:t,onClose:n}){const s=tn(),{toast:i}=z1(),[a,l]=w.useState(!1),{data:u=[],isLoading:h}=Re({queryKey:["clone-ad-settings",e==null?void 0:e.id],queryFn:()=>ne.entities.CloneAdSettings.filter({clone_id:e.id}),enabled:!!(e!=null&&e.id)&&t}),m=u[0]||null,[g,x]=w.useState({api_endpoint:"",api_key:"",notes:""});w.useEffect(()=>{x(m?{api_endpoint:m.api_endpoint||"",api_key:m.api_key||"",notes:m.notes||""}:{api_endpoint:"",api_key:"",notes:""})},[m]);const v=pt({mutationFn:j=>{const P={...j,clone_id:e.id,clone_name:e.app_name};return m?ne.entities.CloneAdSettings.update(m.id,P):ne.entities.CloneAdSettings.create(P)},onSuccess:()=>{s.invalidateQueries({queryKey:["clone-ad-settings",e==null?void 0:e.id]}),i({title:"Saved",description:"API settings updated for this clone."}),n()}}),_=async()=>
801{if(!g.api_endpoint){i({title:"Enter an endpoint first",variant:"destructive"});return}l(!0);try{const j=await fetch(g.api_endpoint,{method:"POST",headers:{"Content-Type":"application/json","X-Ad-API-Key":g.api_key||""},body:JSON.stringify({test:!0})});j.ok?(i({title:"Connection Successful",description:"Clone API is reachable."}),m&&(await ne.entities.CloneAdSettings.update(m.id,{connection_status:"connected"}),s.invalidateQueries({queryKey:["clone-ad-settings",e==null?void 0:e.id]}))):(i({title:"Connection Failed",description:`Status: ${j.status}`,variant:"destructive"}),m&&(await ne.entities.CloneAdSettings.update(m.id,{connection_status:"failed"}),s.invalidateQueries({queryKey:["clone-ad-settings",e==null?void 0:e.id]})))}catch(j){i({title:"Connection Failed",description:j.message,variant:"destructive"})}l(!1)},N=j=>{j.preventDefault(),v.mutate(g)},S=(m==null?void 0:m.connection_status)==="connected"?r.jsx(ht,{className:"w-4 h-4 text-emerald-500"}):(m==null?void 0:m.connection_status)==="failed"?r.jsx(qF,{className:"w-4 h-4 text-red-500"}):r.jsx(fw,{className:"w-4 h-4 text-slate-400"});return r.jsx($i,{open:t,onOpenChange:j=>{j||n()},children:r.jsxs(ci,{className:"max-w-md",children:[r.jsx(di,{children:r.jsxs(ui,{className:"flex items-center gap-2",children:[S," API Settings â ",e==null?void 0:e.app_name]})}),h?r.jsx("div",{className:"flex justify-center py-8",children:r.jsx(gt,{className:"w-6 h-6 animate-spin text-slate-400"})}):r.jsxs("form",{onSubmit:N,className:"space-y-4 py-2",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"API Endpoint *"}),r.jsx(sn,{required:!0,value:g.api_endpoint,onChange:j=>x(P=>({...P,api_endpoint:j.target.value})),placeholder:"https://clone-app.com/api/ads"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"API Key"}),r.jsx(sn,{value:g.api_key,onChange:j=>x(P=>({...P,api_key:j.target.value})),placeholder:"Secret key for auth",type:"password"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(mt,{children:"Notes"}),r.jsx(ed,{value:g.notes,onChange:j=>x(P=>({...P,notes:j.target.value})),rows:2})]}),m&&r.jsxs("div",{className:"text-xs text-slate-400 flex items-center gap-2",children:["Status: ",r.jsx("span",{className:`font-semibold ${m.connection_status==="connected"?"text-emerald-600":m.connection_status==="failed"?"text-red-500":"text-slate-500"}`,children:m.connection_status||"untested"}),m.last_sync_date&&r.jsxs("span",{children:["· Last sync: ",new Date(m.last_sync_date).toLocaleString()]})]}),r.jsxs(lh,{className:"flex gap-2",children:[r.jsxs(_t,{type:"button",variant:"outline",onClick:_,disabled:a,children:[a?r.jsx(gt,{className:"w-4 h-4 animate-spin mr-2"}):r.jsx(fw,{className:"w-4 h-4 mr-2"}),"Validate"]}),r.jsxs(_t,{type:"submit",disabled:v.isPending,children:[v.isPending?r.jsx(gt,{className:"w-4 h-4 animate-spin mr-2"}):null,"Save"]})]})]})]})})}const CT=[{id:"top_banner",name:"Top Banner",description:"Full-width banner displayed at the top of pages. Great for announcements, promotions, or brand awareness.",recommended:{width:1200,height:250},mobile:{width:600,height:200},mediaTypes:["image","html"],bestFor:"Brand awareness, promotions, announcements",tips:["Use landscape-oriented images (wide, not tall)","Keep text minimal and readable at small sizes","Ensure mobile version is readable without zooming"],pages:["Home","Explore","Trips"]},{id:"sidebar",name:"Sidebar",description:"Vertical ad slot in the desktop sidebar. Only visible on desktop/tablet layouts.",recommended:{width:300,height:250},mobile:null,mediaTypes:["image","html"],bestFor:"Targeted promotions, partner ads, persistent visibility",tips:["Square or vertical formats work best","This slot is desktop-only â mobile users won't see it","Keep file size under 200KB for fast loading"],pages:["All pages (via layout sidebar)"]},{id:"inline_content",name:"Inline Content / Feed Inline",description:"Inserted between content items in the feed. Blends naturally with posts for high engagement.",recommended:{width:600,height:400},mobile:{width:400,height:300},mediaTypes:["image","video","html"],bestFor:"Sponsored content, product promotions, engagement campaigns",tips:["Match the visual style of regular feed content","Videos auto-play muted â add captions or text overlays","Square (1:1) or 4:3 aspect ratios perform best"],pages:["Explore (feed)"]},{id:"footer",name:"Footer",description:"Banner at the bottom of pages. Lower visibility but always present.",recommended:{width:1200,height:150},mobile:{width:600,height:120},mediaTypes:["image","html"],bestFor:"Secondary promotions, disclaimers, persistent branding",tips:["Slim horizontal format works best","Don't rely on this for critical campaigns â lower engagement","Good for partner/sponsor logos"],pages:["Home","Explore"]},{id:"modal",name:"Modal / Popup",description:"Full-screen overlay that demands attention. Use sparingly to avoid annoying users.",recommended:{width:600,height:500},mobile:{width:400,height:500},mediaTypes:["image","video","html"],bestFor:"Major announcements, limited-time offers, onboarding promos",tips:["Use VERY sparingly â max once per session","Always include a clear close button","Vertical formats work best on mobile"],pages:["Any page"]},{id:"dashboard_card",name:"Dashboard Card",description:"Card-style ad that fits within the dashboard grid alongside regular content cards.",recommended:{width:400,height:300},mobile:{width:350,height:250},mediaTypes:["image","html"],bestFor:"Subtle promotions, feature highlights, upsells",tips:["Match the card style of the dashboard for seamless integration","Square or 4:3 formats blend best","Keep it visually consistent with surrounding c
801ards"],pages:["Home (dashboard)"]},{id:"header_bar",name:"Header Bar",description:"Slim bar above or inside the page header. Subtle but persistent.",recommended:{width:1200,height:60},mobile:{width:600,height:50},mediaTypes:["image","html"],bestFor:"Alerts, limited-time banners, minimal branding",tips:["Very slim â text-based HTML works great here","Keep height under 80px to avoid being intrusive","Great for countdown timers or promo codes"],pages:["All pages"]}],rue=[{type:"image",icon:Qs,color:"bg-blue-50 text-blue-600 border-blue-200",formats:"JPG, PNG, WebP, GIF",maxSize:"2MB recommended, 5MB max",tips:["Use WebP for best quality-to-size ratio","Always provide 2x resolution for retina displays","Compress images before uploading (use TinyPNG or similar)","PNG for text-heavy/transparent images, JPG for photos"]},{type:"video",icon:f0,color:"bg-purple-50 text-purple-600 border-purple-200",formats:"MP4 (H.264)",maxSize:"10MB recommended, 30MB max",tips:["Videos auto-play MUTED â add text/captions for context","Keep videos short: 5-15 seconds for best engagement","Loop-friendly endings work best (seamless loop)","Use 720p resolution minimum, 1080p for quality","MP4 with H.264 codec has best browser support"]},{type:"html",icon:s5,color:"bg-amber-50 text-amber-600 border-amber-200",formats:"HTML/CSS (inline)",maxSize:"Keep markup under 10KB",tips:["Use inline CSS only â external stylesheets won't load","No JavaScript â HTML content is rendered as static markup","Test responsiveness at all breakpoints","Great for text-based ads, countdown timers, styled CTAs","Use relative units (%, vw) for responsive sizing"]}];function Lg({title:e,icon:t,children:n,defaultOpen:s=!1}){const[i,a]=w.useState(s);return r.jsxs("div",{className:"border border-slate-200 rounded-2xl overflow-hidden bg-white",children:[r.jsxs("button",{onClick:()=>a(!i),className:"w-full flex items-center justify-between px-5 py-4 hover:bg-slate-50 transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[t&&r.jsx(t,{className:"w-5 h-5 text-slate-400"}),r.jsx("span",{className:"font-semibold text-slate-900",children:e})]}),i?r.jsx($1,{className:"w-4 h-4 text-slate-400"}):r.jsx(Yu,{className:"w-4 h-4 text-slate-400"})]}),i&&r.jsx("div",{className:"px-5 pb-5 border-t border-slate-100",children:n})]})}function iue({spec:e}){const[t,n]=w.useState(!1);return r.jsxs("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden hover:shadow-md transition-all",children:[r.jsxs("div",{className:"p-5",children:[r.jsxs("div",{className:"flex items-start justify-between mb-2",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-slate-900 text-base",children:e.name}),r.jsx("p",{className:"text-xs font-mono text-slate-400 mt-0.5",children:e.id})]}),r.jsx("div",{className:"flex gap-1",children:e.mediaTypes.map(s=>r.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-slate-100 text-slate-500 font-medium",children:s},s))})]}),r.jsx("p",{className:"text-sm text-slate-500 mb-4",children:e.description}),r.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-3",children:[r.jsxs("div",{className:"bg-slate-50 rounded-xl p-3",children:[r.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[r.jsx(sx,{className:"w-3.5 h-3.5 text-slate-400"}),r.jsx("span",{className:"text-xs font-semibold text-slate-500",children:"Desktop"})]}),r.jsxs("p",{className:"text-sm font-semibold text-slate-900",children:[e.recommended.width," Ã ",e.recommended.height,"px"]})]}),r.jsxs("div",{className:"bg-slate-50 rounded-xl p-3",children:[r.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[r.jsx(q1,{className:"w-3.5 h-3.5 text-slate-400"}),r.jsx("span",{className:"text-xs font-semibold text-slate-500",children:"Mobile"})]}),e.mobile?r.jsxs("p",{className:"text-sm font-semibold text-slate-900",children:[e.mobile.width," Ã ",e.mobile.height,"px"]}):r.jsx("p",{className:"text-sm text-slate-400 italic",children:"Not shown on mobile"})]})]}),r.jsxs("button",{onClick:()=>n(!t),className:"text-xs text-indigo-600 font-medium hover:text-indigo-700 flex items-center gap-1",children:[t?"Less details":"More details",t?r.jsx($1,{className:"w-3 h-3"}):r.jsx(Yu,{className:"w-3 h-3"})]})]}),t&&r.jsxs("div",{className:"px-5 pb-5 space-y-3 border-t border-slate-100 pt-4",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-semibold text-slate-500 uppercase mb-1",children:"Best for"}),r.jsx("p",{className:"text-sm text-slate-700",children:e.bestFor})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-semibold text-slate-500 uppercase mb-1",children:"Shows on pages"}),r.jsx("div",{className:"flex flex-wrap gap-1",children:e.pages.map(s=>r.jsx("span",{className:"text-xs bg-indigo-50 text-indigo-600 px-2 py-0.5 rounded-lg font-medium",children:s},s))})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-semibold text-slate-500 uppercase mb-2",children:"Tips"}),r.jsx("ul",{className:"space-y-1.5",children:e.tips.map((s,i)=>r.jsxs("li",{className:"flex items-start gap-2 text-sm text-slate-600",children:[r.jsx(ht,{className:"w-3.5 h-3.5 text-emerald-500 mt-0.5 shrink-0"}),s]},i))})]})]})]})}function aue(){return r.jsxs("div",{className:"space-y-8",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-1",children:"Ad Help Center"}),r.jsx("p",{className:"text-sm text-slate-500",children:"Everything you need to know about creating and managing ads across clone apps."})]}),r.jsxs("div",{className:"bg-gradient-to-br from-indigo-50 to-blue-50 border border-indigo-100 rounded-2xl p-6",children:[r.jsxs("h3",{className:"font-semibold text-indigo-900 mb-3 flex items-center gap-2",children:[r.jsx(tx,{className:"w-5 h-5"})," Quick Start â How Ads Work"]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 text-sm",children:[{step:"1",title:"Create Placement",desc:"Define WHERE ads appear (sidebar, banner, feed, etc.)"},{step:"2",title:"Upload Creative",desc:"Create the ad content â image, video, or HTML"},{step:"3",title:"Assign to Clone",desc:"Link a creative to a placement on specific clone apps"},{step:"4",title:"Sync & Go Live",desc:"Sync ad data to the clone â ads appear automatically"}].map(e=>r.jsxs("div",{className:"flex gap-3",children:[r.jsx("div",{className:"w-7 h-7 rounded-full bg-indigo-600 text-white flex items-center justify-center text-xs font-bold shrink-0",children:e.step}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold text-indigo-900",children:e.title}),r.jsx("p",{className:"text-indigo-700/70 mt-0.5",children:e.desc})]})]},e.step))})]}),r.jsx(Lg,{title:"Placement Specifications & Sizes",icon:sx,defaultOpen:!0,children:r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:CT.map(e=>r.jsx(iue,{spec:e},e.id))})}),r.jsx(Lg,{title:"Media Type Guidelines",icon:Qs,defaultOpen:!0,children:r.jsx("div",{className:"space-y-4 mt
801-4",children:rue.map(e=>{const t=e.icon;return r.jsxs("div",{className:`border rounded-2xl p-5 ${e.color}`,children:[r.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[r.jsx(t,{className:"w-6 h-6"}),r.jsxs("div",{children:[r.jsx("h4",{className:"font-semibold capitalize text-base",children:e.type}),r.jsxs("p",{className:"text-xs opacity-70",children:[e.formats," ⢠",e.maxSize]})]})]}),r.jsx("ul",{className:"space-y-1.5 ml-9",children:e.tips.map((n,s)=>r.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[r.jsx(wa,{className:"w-3 h-3 mt-1 shrink-0 opacity-50"}),n]},s))})]},e.type)})})}),r.jsx(Lg,{title:"Quick Size Reference Table",icon:G1,children:r.jsx("div",{className:"mt-4 overflow-x-auto",children:r.jsxs("table",{className:"w-full text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-slate-200",children:[r.jsx("th",{className:"text-left py-2 px-3 font-semibold text-slate-500 text-xs uppercase",children:"Placement"}),r.jsx("th",{className:"text-left py-2 px-3 font-semibold text-slate-500 text-xs uppercase",children:"Desktop (px)"}),r.jsx("th",{className:"text-left py-2 px-3 font-semibold text-slate-500 text-xs uppercase",children:"Mobile (px)"}),r.jsx("th",{className:"text-left py-2 px-3 font-semibold text-slate-500 text-xs uppercase",children:"Media Types"})]})}),r.jsx("tbody",{children:CT.map(e=>r.jsxs("tr",{className:"border-b border-slate-50 hover:bg-slate-50",children:[r.jsx("td",{className:"py-2.5 px-3 font-medium text-slate-900",children:e.name}),r.jsxs("td",{className:"py-2.5 px-3 font-mono text-slate-600",children:[e.recommended.width,"Ã",e.recommended.height]}),r.jsx("td",{className:"py-2.5 px-3 font-mono text-slate-600",children:e.mobile?`${e.mobile.width}Ã${e.mobile.height}`:"â"}),r.jsx("td",{className:"py-2.5 px-3",children:r.jsx("div",{className:"flex gap-1",children:e.mediaTypes.map(t=>r.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-slate-100 text-slate-500",children:t},t))})})]},e.id))})]})})}),r.jsx(Lg,{title:"Common Mistakes & Troubleshooting",icon:Lu,children:r.jsx("div",{className:"space-y-3 mt-4",children:[{mistake:"Ad not showing",fix:'Check: Creative status is "active", Assignment is active, Placement is active, page/role/device visibility matches the user context.'},{mistake:"Image looks blurry",fix:"Upload at 2x the recommended size (e.g., 2400Ã500 for a 1200Ã250 banner). Use PNG for crisp text, WebP for photos."},{mistake:"Video won't play",fix:"Ensure format is MP4 with H.264 codec. Other formats may not work across all browsers. Keep under 10MB."},{mistake:"HTML ad looks broken",fix:"Use only inline CSS. External stylesheets, fonts, and JavaScript are not supported. Test at all screen widths."},{mistake:"Ad shows on wrong pages",fix:"Check Page Visibility settings on the placement AND the assignment's visibility overrides."},{mistake:"Expired ad still showing",fix:"Expiration is checked on each request. Clear browser cache or wait for the 2-minute cache to expire."}].map((e,t)=>r.jsxs("div",{className:"bg-amber-50/50 border border-amber-100 rounded-xl p-4",children:[r.jsxs("p",{className:"font-semibold text-amber-900 text-sm mb-1",children:["â ",e.mistake]}),r.jsxs("p",{className:"text-sm text-amber-800/70",children:["â
",e.fix]})]},t))})})]})}function oue(){const e=Kn(),t=tn(),[n,s]=w.useState(!1),[i,a]=w.useState(!1),[l,u]=w.useState(null),[h,m]=w.useState("clones"),[g,x]=w.useState(null),[v,_]=w.useState({customer_name:"",customer_email:"",app_name:"",main_url:"",builder_url:"",api_key:"",status:"active",payment_status:"paid",monthly_price:"",notes:"",go_live_date:""}),{data:N,isLoading:S}=Re({queryKey:["user"],queryFn:()=>ne.auth.me()}),{data:j,isLoading:P}=Re({queryKey:["clones"],queryFn:()=>ne.entities.CloneApp.list(),enabled:!!N&&N.role==="superadmin"}),E=pt({mutationFn:K=>ne.entities.CloneApp.create(K),onSuccess:()=>{t.invalidateQueries(["clones"]),s(!1),z()}}),R=pt({mutationFn:({id:K,data:q})=>ne.entities.CloneApp.update(K,q),onSuccess:()=>{t.invalidateQueries(["clones"]),a(!1),u(null),z()}}),A=pt({mutationFn:K=>ne.entities.CloneApp.delete(K),onSuccess:()=>{t.invalidateQueries(["clones"])}}),B=K=>{const{name:q,value:ge}=K.target;_(he=>({...he,[q]:ge}))},I=(K,q)=>{_(ge=>({...ge,[K]:q}))},z=()=>{_({customer_name:"",customer_email:"",app_name:"",main_url:"",builder_url:"",api_key:"",status:"active",payment_status:"paid",monthly_price:"",n
801otes:"",go_live_date:""})},V=K=>{u(K),_({customer_name:K.customer_name||"",customer_email:K.customer_email||"",app_name:K.app_name||"",main_url:K.main_url||"",builder_url:K.builder_url||"",api_key:K.api_key||"",status:K.status||"active",payment_status:K.payment_status||"paid",monthly_price:K.monthly_price||"",notes:K.notes||"",go_live_date:K.go_live_date||""}),a(!0)},te=K=>{K.preventDefault();const q={...v,monthly_price:v.monthly_price?parseFloat(v.monthly_price):0};l?R.mutate({id:l.id,data:q}):E.mutate(q)},H=K=>{navigator.clipboard.writeText(K)};if(S)return r.jsx("div",{className:"min-h-screen flex items-center justify-center",children:r.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(!N||N.role!=="superadmin")return r.jsx("div",{className:"min-h-screen flex items-center justify-center bg-slate-50 p-6",children:r.jsxs("div",{className:"bg-white rounded-3xl p-10 text-center max-w-sm shadow-xl border border-slate-100",children:[r.jsx("div",{className:"w-16 h-16 bg-red-50 rounded-2xl flex items-center justify-center mx-auto mb-5",children:r.jsx(Os,{className:"w-8 h-8 text-red-500"})}),r.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-slate-900 mb-2",children:"Access Denied"}),r.jsx("p",{className:"text-slate-500 text-sm mb-6",children:"You need SUPER ADMIN privileges to access this panel."}),r.jsx("button",{onClick:()=>e(Xe("Home")),className:"bg-slate-900 text-white font-semibold tracking-tight px-6 py-3 rounded-xl hover:bg-black transition-colors",children:"Go Home"})]})});const Y={active:"bg-emerald-100 text-emerald-800",in_progress:"bg-blue-100 text-blue-800",suspended:"bg-amber-100 text-amber-800",cancelled:"bg-red-100 text-red-800"},ce={paid:"bg-emerald-100 text-emerald-800",pending:"bg-amber-100 text-amber-800",overdue:"bg-red-100 text-red-800"};return r.jsxs(re.div,{initial:{opacity:0}
801,animate:{opacity:1},className:"min-h-screen bg-[#f4f6f8] pb-24 md:pb-8",children:[r.jsxs("div",{className:"bg-slate-900 text-white border-b border-slate-800 px-6 pt-10 pb-6 md:pt-14 relative overflow-hidden",children:[r.jsx("div",{className:"absolute top-0 right-0 p-12 opacity-5 pointer-events-none",children:r.jsx(Os,{className:"w-64 h-64 -mt-20 -mr-20"})}),r.jsxs("div",{className:"max-w-5xl mx-auto relative z-10",children:[r.jsxs("div",{className:"flex items-center justify-between mb-1",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:()=>e(Xe("Home")),className:"p-2 -ml-2 hover:bg-slate-800 rounded-xl transition-colors",children:r.jsx(gr,{className:"w-5 h-5 text-slate-300"})}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-purple-500 to-indigo-600 rounded-xl flex items-center justify-center shadow-lg",children:r.jsx(Os,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-semibold tracking-tight tracking-tight text-white",children:"Super Admin Center"}),r.jsx("p",{className:"text-xs text-slate-400 font-medium",children:"Manage Clone Apps & Customers"})]})]})]}),h==="clones"&&r.jsxs(_t,{onClick:()=>{z(),s(!0)},className:"bg-white text-slate-900 hover:bg-slate-100",children:[r.jsx(Cn,{className:"w-4 h-4 mr-2"}),"New Clone App"]})]}),r.jsx("div",{className:"flex gap-2 mt-4 overflow-x-auto pb-0.5 [&::-webkit-scrollbar]:hidden",style:{scrollbarWidth:"none"},children:[{key:"clones",label:"Clone Apps"},{key:"inventory",label:"Ad Inventory"},{key:"placements",label:"Placements"},{key:"creatives",label:"Creatives"},{key:"assignments",label:"Assignments"},{key:"leads",label:"Leads"},{key:"help",label:"â Ad Help"}].map(K=>r.jsx("button",{onClick:()=>m(K.key),className:`pb-3 px-4 text-sm font-semibold tracking-tight transition-colors whitespace-nowrap ${h===K.key?"text-white border-b-2 border-white":"text-slate-400 hover:text-slate-200"}`,children:K.label},K.key))})]})]}),r.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-8",children:[h==="clones"&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-8",children:[r.jsxs("div",{className:"bg-white p-5 rounded-2xl border border-slate-100 shadow-sm",children:[r.jsx("p",{className:"text-sm text-slate-500 font-medium mb-1",children:"Total Clones"}),r.jsx("p",{className:"text-3xl font-semibold tracking-tight text-slate-900",children:(j==null?void 0:j.length)||0})]}),r.jsxs("div",{className:"bg-white p-5 rounded-2xl border border-slate-100 shadow-sm",children:[r.jsx("p",{className:"text-sm text-slate-500 font-medium mb-1",children:"Active Installs"}),r.jsx("p",{className:"text-3xl font-semibold tracking-tight text-emerald-600",children:(j==null?void 0:j.filter(K=>K.status==="active").length)||0})]}),r.jsxs("div",{className:"bg-white p-5 rounded-2xl border border-slate-100 shadow-sm",children:[r.jsx("p",{className:"text-sm text-slate-500 font-medium mb-1",children:"MRR (Est)"}),r.jsxs("p",{className:"text-3xl font-semibold tracking-tight text-blue-600",children:["$",(j==null?void 0:j.filter(K=>K.status==="active").reduce((K,q)=>K+(q.monthly_price||0),0))||0]})]}),r.jsxs("div",{className:"bg-white p-5 rounded-2xl border border-slate-100 shadow-sm",children:[r.jsx("p",{className:"text-sm text-slate-500 font-medium mb-1",children:"Overdue Payments"}),r.jsx("p",{className:"text-3xl font-semibold tracking-tight text-red-600",children:(j==null?void 0:j.filter(K=>K.payment_status==="overdue").length)||0})]})]}),P?r.jsx("div",{className:"flex justify-center py-12",children:r.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-purple-600 rounded-full animate-spin"})}):(j==null?void 0:j.length)===0?r.jsxs("div",{className:"bg-white border border-slate-200 border-dashed rounded-3xl p-12 text-center",children:[r.jsx("div",{className:"w-16 h-16 bg-slate-50 rounded-full flex items-center justify-center mx-auto mb-4",children:r.jsx(Os,{className:"w-8 h-8 text-slate-300"})}),r.jsx("h3",{className:"text-xl font-semibold tracking-tight text-slate-900 mb-2",children:"No clone apps yet"}),r.jsx("p",{className:"text-slate-500 max-w-md mx-auto mb-6",children:"Track your white-label installations, customers, and payments all in one place."}),r.jsx(_t,{onClick:()=>s(!0),children:"Add Your First Clone"})]}):r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:j==null?void 0:j.map(K=>r.jsxs("div",{className:"bg-white rounded-2xl border border-slate-100 shadow-sm overflow-hidden flex flex-col transition-all hover:shadow-md",children:[r.jsxs("div",{className:"p-5 border-b border-slate-50 flex justify-between items-start",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold tracking-tight text-lg text-slate-900 mb-1",children:K.app_name}),r.jsxs("p",{className:"text-sm text-slate-500 font-medium flex items-center gap-1",children:[K.customer_name,K.customer_email&&r.jsx("span",{className:"text-slate-300",children:"â¢"}),K.customer_email&&r.jsx("a",{href:`mailto:${K.customer_email}`,className:"hover:text-blue-600",children:K.customer_email})]})]}),r.jsxs("div",{className:"flex flex-col gap-2 items-end",children:[r.jsx("span",{className:`px-2.5 py-1 rounded-full text-xs font-semibold ${Y[K.status]||"bg-slate-100 text-slate-800"}`,children:K.status.toUpperCase()}),r.jsx("span",{className:`px-2.5 py-1 rounded-full text-xs font-semibold ${ce[K.payment_status]||"bg-slate-100 text-slate-800"}`,children:K.payment_status.toUpperCase()})]})]}),r.jsxs("div",{className:"p-5 flex-1 flex flex-col gap-4 bg-slate-50/50",children:[r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider mb-1.5",children:"Main App URL"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("a",{href:K.main_url,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-blue-600 hover:underline flex items-center gap-1.5 truncate",children:[K.main_url," ",r.jsx(Iu,{className:"w-3.5 h-3.5"})]}),r.jsx("button",{onClick:()=>H(K.main_url),className:"p-1.5 text-slate-400 hover:text-slate-700 hover:bg-slate-100 rounded-md",children:r.jsx(cS,{className:"w-3.5 h-3.5"})})]})]}),K.builder_url&&r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider mb-1.5",children:"Base44 Builder"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("a",{href:K.builder_url,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-purple-600 hover:underline flex items-center gap-1.5 truncate",children:[K.builder_url," ",r.jsx(Iu,{className:"w-3.5 h-3.5"})]}),r.jsx("button",{onClick:()=>H(K.builder_url),className:"p-1.5 text-slate-400 hover:text-slate-700 hover:bg-slate-100 rounded-md",children:r.jsx(cS,{className:"w-3.5 h-3.5"})})]})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-3 border-t border-slate-100 mt-auto",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider mb-1",children:"Monthly"}),r.jsxs("p",{className:"text-sm font-semibold tracking-tight text-slate-700",children:["$",K.monthly_price||0]})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider mb-1",children:"Go Live"}),r.jsx("p",{className:"text-sm font-semibold tracking-tight text-slate-700",children:K.go_live_date?$u(new Date(K.go_live_date),"MMM d, yyyy"):"TBD"})]})]})]}),r.jsxs("div",{className:"p-3 border-t border-slate-100 bg-white flex justify-end gap-2",children:[r.jsxs(_t,{variant:"ghost",size:"sm",onClick:()=>x(K),className:"h-8 text-indigo-600 hover:text-indigo-700 hover:bg-indigo-50",children:[r.jsx(fw,{className:"w-4 h-4 mr-1.5"})," API"]}),r.jsxs(_t,{variant:"ghost",size:"sm",onClick:()=>V(K),className:"h-8",children:[r.jsx(Pm,{className:"w-4 h-4 mr-1.5"})," Edit"]}),r.jsxs(_t,{variant:"ghost",size:"sm",onClick:()=>{window.confirm("Are you sure you want to delete this clone record?")&&A.mutate(K.id)},className:"h-8 text-red-600 hover:text-red-700 hover:bg-red-50",children:[r.jsx(us,{className:"w-4 h-4 mr-1.5"})," Delete"]})]})]},K.id))})]}),h==="inventory"&&r.jsx(nue,{}),h==="placements"&&r.jsx(Qde,{}),h==="creatives"&&r.jsx(eue,{}),h==="assignments"&&r.jsx(tue,{}),h==="leads"&&r.jsx(Wde,{}),h==="help"&&r.jsx(aue,{})]}),r.jsx($i,{open:n||i,onOpenChange:K=>
801{K||(s(!1),a(!1),u(null))},children:r.jsxs(ci,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[r.jsxs(di,{children:[r.jsx(ui,{children:l?"Edit Clone App":"Add New Clone App"}),r.jsx(Vu,{children:"Enter the details for this white-label installation."})]}),r.jsxs("form",{onSubmit:te,className:"space-y-6 py-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(mt,{htmlFor:"app_name",children:"App Name *"}),r.jsx(sn,{required:!0,id:"app_name",name:"app_name",value:v.app_name,onChange:B,placeholder:"e.g. Acme Adventures"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(mt,{htmlFor:"customer_name",children:"Customer Name *"}),r.jsx(sn,{required:!0,id:"customer_name",name:"customer_name",value:v.customer_name,onChange:B,placeholder:"e.g. John Doe"})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(mt,{htmlFor:"customer_email",children:"Customer Email"}),r.jsx(sn,{type:"email",id:"customer_email",name:"customer_email",value:v.customer_email,onChange:B,placeholder:"[email protected]"})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(mt,{htmlFor:"main_url",children:"Main App URL *"}),r.jsx(sn,{required:!0,type:"url",id:"main_url",name:"main_url",value:v.main_url,onChange:B,placeholder:"https://acme-app.com"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(mt,{htmlFor:"builder_url",children:"Base44 Builder URL"}),r.jsx(sn,{type:"url",id:"builder_url",name:"builder_url",value:v.builder_url,onChange:B,placeholder:"https://app.base44.com/..."})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(mt,{htmlFor:"api_key",children:"API Key"}),r.jsxs("div",{className:"relative",children:[r.jsx(b6,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-400"}),r.jsx(sn,{id:"api_key",name:"api_key",value:v.api_key,onChange:B,placeholder:"Secret key for ad delivery auth",type:"password",className:"pl-10"})]}),r.jsx("p",{className:"text-xs text-slate-400",children:"Used to authenticate ad data pushed to this clone"})]}),r.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(mt,{children:"Status"}),r.jsxs(ys,{value:v.status,onValueChange:K=>I("status",K),children:[r.jsx(cs,{children:r.jsx(bs,{})}),r.jsxs(ds,{children:[r.jsx(wt,{value:"active",children:"Active"}),r.jsx(wt,{value:"in_progress",children:"In Progress"}),r.jsx(wt,{value:"suspended",children:"Suspended"}),r.jsx(wt,{value:"cancelled",children:"Cancelled"})]})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(mt,{children:"Payment Status"}),r.jsxs(ys,{value:v.payment_status,onValueChange:K=>I("payment_status",K),children:[r.jsx(cs,{children:r.jsx(bs,{})}),r.jsxs(ds,{children:[r.jsx(wt,{value:"paid",children:"Paid"}),r.jsx(wt,{value:"pending",children:"Pending"}),r.jsx(wt,{value:"overdue",children:"Overdue"})]})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(mt,{htmlFor:"monthly_price",children:"Monthly Price ($)"}),r.jsx(sn,{type:"number",id:"monthly_price",name:"monthly_price",value:v.monthly_price,onChange:B,placeholder:"0.00"})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(mt,{htmlFor:"go_live_date",children:"Go Live Date"}),r.jsx(sn,{type:"date",id:"go_live_date",name:"go_live_date",value:v.go_live_date,onChange:B})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(mt,{htmlFor:"notes",children:"Notes / Additional Info"}),r.jsx(ed,{id:"notes",name:"notes",value:v.notes,onChange:B,rows:3,placeholder:"Hosting credentials, special requirements..."})]}),r.jsxs(lh,{children:[r.jsx(_t,{type:"button",variant:"outline",onClick:()=>{s(!1),a(!1)},children:"Cancel"}),r.jsx(_t,{type:"submit",disabled:E.isPending||R.isPending,children:l?"Update Clone":"Save Clone"})]})]})]})}),g&&r.jsx(sue,{clone:g,open:!!g,onClose:()=>x(null)})]})}const lue={initial:{x:"calc(100% + 100px)"},enter:{x:"0",transition:{duration:.8,ease:[.76,0,.24,1]}},exit:{x:"calc(100% + 100px)",transition:{duration:.8,ease:[.76,0,.24,1]}}},cue=({heading:e,onClick:t,setIsActive:n,index:s})=>{const i=w.useRef(null),a=n1(0),l=n1(0),u=m=>{if(!i.current)return;const g=i.current.getBoundingClientRect(),x=m.clientX-g.left,v=m.clientY-g.top;a.set(x/g.width-.5),l.set(v/g.height-.5)},h=m=>{m.preventDefault(),t&&t(),n(!1)};return r.jsx(re.div,{onClick:h,initial:"initial",whileHover:"whileHover",className:"group relative flex items-center justify-between border-b border-white/20 py-3 md:py-4 transition-colors duration-500 uppercase cursor-pointer",children:r.jsx("div",{ref:i,onMouseMove:u,className:"w-full",children:r.jsxs("div",{className:"relative flex items-start items-center",children:[r.jsxs("span",{className:"text-white/60 transition-colors duration-500 text-lg sm:text-xl md:text-2xl font-thin mr-3 md:mr-4 shrink-0",children:["0",s,"."]}),r.jsx("div",{className:"flex flex-row gap-2 overflow-hidden",children:r.jsx(re.span,{variants:{initial:{x:0},whileHover:{x:-16}},transition:{type:"spring",staggerChildren:.05,delayChildren:.1},className:"relative z-10 block text-xl sm:text-2xl md:text-4xl font-extralight text-white transition-colors duration-500 leading-none whitespace-nowrap",children:e.split("").map((m,g)=>r.jsx(re.span,{variants:{initial:{x:0},whileHover:{x:16}},transition:{type:"spring"},className:"inline-block",children:m===" "?"Â ":m},g))})})]})})})},due=()=>{const e=`M100 0 L200 0 L200 ${window.innerHeight} L100 ${window.innerHeight} Q-100 ${window.innerHeight/2} 100 0`,t=`M100 0 L200 0 L200 ${window.innerHeight} L100 ${window.innerHeight} Q100 ${window.innerHeight/2} 100 0`,n={initial:{d:e}
801,enter:{d:t,transition:{duration:1,ease:[.76,0,.24,1]}},exit:{d:e,transition:{duration:.8,ease:[.76,0,.24,1]}}};return r.jsx("svg",{className:"absolute top-0 -left-[99px] w-[100px] stroke-none h-full pointer-events-none",style:{fill:"#1c1917"},children:r.jsx(re.path,{variants:n,initial:"initial",animate:"enter",exit:"exit"})})},uue=({setIsActive:e,navItems:t,footer:n})=>r.jsxs(re.div,{variants:lue,initial:"initial",animate:"enter",exit:"exit",className:"h-[100dvh] w-screen max-w-md fixed right-0 top-0 z-[100] bg-stone-900 shadow-2xl",children:[r.jsx("div",{className:"absolute top-6 right-6 md:hidden z-50",children:r.jsx("div",{onClick:()=>e(!1),className:"w-12 h-12 rounded-full flex items-center justify-center cursor-pointer bg-white/10 hover:bg-white/20 transition-colors",children:r.jsxs("div",{className:"relative w-5 h-5 flex items-center justify-center",children:[r.jsx("span",{className:"absolute w-5 h-0.5 bg-white rotate-45"}),r.jsx("span",{className:"absolute w-5 h-0.5 bg-white -rotate-45"})]})})}),r.jsx("div",{className:"h-full pt-24 pb-12 flex flex-col justify-between overflow-hidden",children:r.jsxs("div",{className:"flex flex-col gap-2 md:gap-4 px-10 md:px-16 h-full justify-center",children:[r.jsxs("div",{className:"text-white/60 border-b border-white/20 uppercase text-xs tracking-widest font-semibold pb-3 mb-2 flex items-center gap-3 shrink-0",children:[r.jsx(Or,{className:"w-6 h-6",color:"#ffffff"}),r.jsx("p",{children:"Navigation"})]}),r.jsx("section",{className:"bg-transparent mt-0 flex-1 flex flex-col justify-center max-h-full",children:r.jsx("div",{className:"mx-auto w-full flex flex-col gap-1 md:gap-3",children:t.map((s,i)=>r.jsx(cue,{heading:s.label,onClick:s.onClick,setIsActive:e,index:i+1},s.label))})}),n&&r.jsx("div",{className:"mt-6 shrink-0",children:typeof n=="function"?n(()=>e(!1)):n})]})}),r.jsx(due,{})]}),hue=({navItems:e=[],footer:t,customLogoActions:n,belowLogo:s})=>{const[i,a]=w.useState(!1),l=()=>{a(!i)};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed top-0 left-0 right-0 z-[90] pointer-events-none",children:r.jsxs("div",{className:"w-full flex justify-between items-center p-6 md:p-8 pointer-events-auto",children:[r.jsxs("div",{className:"flex flex-col items-start gap-2",children:[r.jsxs("div",{className:"flex items-center gap-3 cursor-pointer group bg-white/80 backdrop-blur-xl px-5 py-3 rounded-full border border-stone-200/50 shadow-sm",onClick:n||(()=>window.scrollTo({top:0,behavior:"smooth"})),children:[r.jsx(Or,{className:"w-8 h-8 group-hover:scale-110 transition-transform",color:"#1c1917"}),r.jsx("span",{className:"font-semibold tracking-tight text-xl text-stone-900 hidden sm:block",children:"WeAllCamp"})]}),s]}),r.jsx("div",{onClick:l,className:"w-14 h-14 rounded-full flex items-center justify-center cursor-pointer bg-stone-900 shadow-lg shadow-stone-900/20 hover:scale-105 transition-transform",children:r.jsxs("div",{className:"relative w-6 h-5 flex flex-col justify-between items-center",children:[r.jsx("span",{className:`block h-0.5 w-6 bg-white transition-transform duration-300 ${i?"rotate-45 translate-y-2.5":""}`}),r.jsx("span",{className:`block h-0.5 w-6 bg-white transition-opacity duration-300 ${i?"opacity-0":""}`}),r.jsx("span",{className:`block h-0.5 w-6 bg-white transition-transform duration-300 ${i?"-rotate-45 -translate-y-2":""}`})]})})]})}),r.jsx(Lt,{mode:"wait",children:i&&r.jsxs(r.Fragment,{children:[r.jsx(re.div,{initial:{opacity:0}
801,animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},className:"fixed inset-0 bg-stone-900/20 backdrop-blur-sm z-[95]",onClick:()=>a(!1)}),r.jsx(uue,{setIsActive:a,navItems:e,footer:t})]})})]})};var Jb={exports:{}},ew,PT;function fue(){if(PT)return ew;PT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ew=e,ew}var tw,TT;function mue(){if(TT)return tw;TT=1;var e=fue();function t(){}function n(){}return n.resetWarningCache=t,tw=function(){function s(l,u,h,m,g,x){if(x!==e){var v=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 v.name="Invariant Violation",v}}s.isRequired=s;function i(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:i,element:s,elementType:s,instanceOf:i,node:s,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},tw}var ET;function pue(){return ET||(ET=1,Jb.exports=mue()()),Jb.exports}var gue=pue();const yn=Ll(gue);var nw,AT;function xue(){if(AT)return nw;AT=1;function e(u){return u&&typeof u=="object"&&"default"in u?u.default:u}var t=km(),n=e(t);function s(u,h,m){return h in u?Object.defineProperty(u,h,{value:m,enumerable:!0,configurable:!0,writable:!0}):u[h]=m,u}function i(u,h){u.prototype=Object.create(h.prototype),u.prototype.constructor=u,u.__proto__=h}var a=!!(typeof window<"u"&&window.document&&window.document.createElement);function l(u,h,m){if(typeof u!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof h!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof m<"u"&&typeof m!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function g(x){return x.displayName||x.name||"Component"}return function(v){if(typeof v!="function")throw new Error("Expected WrappedComponent to be a React component.");var _=[],N;function S(){N=u(_.map(function(P){return P.props})),j.canUseDOM?h(N):m&&(N=m(N))}var j=(function(P){i(E,P);function E(){return P.apply(this,arguments)||this}E.peek=function(){return N},E.rewind=function(){if(E.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var B=N;return N=void 0,_=[],B};var R=E.prototype;return R.UNSAFE_componentWillMount=function(){_.push(this),S()},R.componentDidUpdate=function(){S()},R.componentWillUnmount=function(){var B=_.indexOf(this);_.splice(B,1),S()},R.render=function(){return n.createElement(v,this.props)},E})(t.PureComponent);return s(j,"displayName","SideEffect("+g(v)+")"),s(j,"canUseDOM",a),j}}return nw=l,nw}var vue=xue();const yue=Ll(vue);var sw,MT;function bue(){if(MT)return sw;MT=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",s=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(a,l){if(a===l)return!0;if(a&&l&&typeof a=="object"&&typeof l=="object"){if(a.constructor!==l.constructor)return!1;var u,h,m;if(Array.isArray(a)){if(u=a.length,u!=l.length)return!1;for(h=u;h--!==0;)if(!i(a[h],l[h]))return!1;return!0}var g;if(t&&a instanceof Map&&l instanceof Map){if(a.size!==l.size)return!1;for(g=a.entries();!(h=g.next()).done;)if(!l.has(h.value[0]))return!1;for(g=a.entries();!(h=g.next()).done;)if(!i(h.value[1],l.get(h.value[0])))return!1;return!0}if(n&&a instanceof Set&&l instanceof Set){if(a.size!==l.size)return!1;for(g=a.entries();!(h=g.next()).done;)if(!l.has(h.value[0]))return!1;return!0}if(s&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(l)){if(u=a.length,u!=l.length)return!1;for(h=u;h--!==0;)if(a[h]!==l[h])return!1;return!0}if(a.constructor===RegExp)return a.source===l.source&&a.flags===l.flags;if(a.valueOf!==Object.prototype.valueOf&&typeof a.valueOf=="function"&&typeof l.valueOf=="function")return a.valueOf()===l.valueOf();if(a.toString!==Object.prototype.toString&&typeof a.toString=="function"&&typeof l.toString=="function")return a.toString()===l.toString();if(m=Object.keys(a),u=m.length,u!==Object.keys(l).length)return!1;for(h=u;h--!==0;)if(!Object.prototype.hasOwnProperty.call(l,m[h]))return!1;if(e&&a instanceof Element)return!1;for(h=u;h--!==0;)if(!((m[h]==="_owner"||m[h]==="__v"||m[h]==="__o")&&a.$$typeof)&&!i(a[m[h]],l[m[h]]))return!1;return!0}return a!==a&&l!==l}return sw=function(l,u){try{return i(l,u)}catch(h){if((h.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw h}},sw}var wue=bue();const _ue=Ll(wue);/* 802object-assign 803(c) Sindre Sorhus 804@license MIT
805*/var rw,RT;function Nue(){if(RT)return rw;RT=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function s(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var l={},u=0;u<10;u++)l["_"+String.fromCharCode(u)]=u;var h=Object.getOwnPropertyNames(l).map(function(g){return l[g]});if(h.join("")!=="0123456789")return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach(function(g){m[g]=g}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return rw=i()?Object.assign:function(a,l){for(var u,h=s(a),m,g=1;g<arguments.length;g++){u=Object(arguments[g]);for(var x in u)t.call(u,x)&&(h[x]=u[x]);if(e){m=e(u);for(var v=0;v<m.length;v++)n.call(u,m[v])&&(h[m[v]]=u[m[v]])}}return h},rw}var jue=Nue();const Sue=Ll(jue);var Hc={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},vt={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(vt).map(function(e){return vt[e]});var wn={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},X0={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},bm={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},kue=Object.keys(X0).reduce(function(e,t){return e[X0[t]]=t,e},{}),Cue=[vt.NOSCRIPT,vt.SCRIPT,vt.STYLE],Oi="data-react-helmet",Pue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tue=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Eue=(function(){function e(t,n){for(var s=0;s<n.length;s++){var i=n[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}})(),dr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Aue=function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},OT=function(e,t){var n={};for(var s in e)t.indexOf(s)>=0||Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s]);return n},Mue=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e},O1=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n===!1?String(t):String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},Rue=function(t){var n=_u(t,vt.TITLE),s=_u(t,bm.TITLE_TEMPLATE);if(s&&n)return s.replace(/%s/g,function(){return Array.isArray(n)?n.join(""):n});var i=_u(t,bm.DEFAULT_TITLE);return n||i||void 0},Oue=function(t){return _u(t,bm.ON_CHANGE_CLIENT_STATE)||function(){}},iw=function(t,n){return n.filter(function(s){return typeof s[t]<"u"}).map(function(s){return s[t]}).reduce(function(s,i){return dr({},s,i)},{})},Due=function(t,n){return n.filter(function(s){return typeof s[vt.BASE]<"u"}).map(function(s){return s[vt.BASE]}).reverse().reduce(function(s,i){if(!s.length)for(var a=Object.keys(i),l=0;l<a.length;l++){var u=a[l],h=u.toLowerCase();if(t.indexOf(h)!==-1&&i[h])return s.concat(i)}return s},[])},Sf=function(t,n,s){var i={};return s.filter(function(a){return Array.isArray(a[t])?!0:(typeof a[t]<"u"&&Bue("Helmet: "+t+' should be of type "Array". Instead found type "'+Pue(a[t])+'"'),!1)}).map(function(a){return a[t]}).reverse().reduce(function(a,l){var u={};l.filter(function(v){for(var _=void 0,N=Object.keys(v),S=0;S<N.length;S++){var j=N[S],P=j.toLowerCase();n.indexOf(P)!==-1&&!(_===wn.REL&&v[_].toLowerCase()==="canonical")&&!(P===wn.REL&&v[P].toLowerCase()==="stylesheet")&&(_=P),n.indexOf(j)!==-1&&(j===wn.INNER_HTML||j===wn.CSS_TEXT||j===wn.ITEM_PROP)&&(_=j)}if(!_||!v[_])return!1;var E=v[_].toLowerCase();return i[_]||(i[_]={}),u[_]||(u[_]={}),i[_][E]?!1:(u[_][E]=!0,!0)}
805).reverse().forEach(function(v){return a.push(v)});for(var h=Object.keys(u),m=0;m<h.length;m++){var g=h[m],x=Sue({},i[g],u[g]);i[g]=x}return a},[]).reverse()},_u=function(t,n){for(var s=t.length-1;s>=0;s--){var i=t[s];if(i.hasOwnProperty(n))return i[n]}return null},Iue=function(t){return{baseTag:Due([wn.HREF,wn.TARGET],t),bodyAttributes:iw(Hc.BODY,t),defer:_u(t,bm.DEFER),encode:_u(t,bm.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:iw(Hc.HTML,t),linkTags:Sf(vt.LINK,[wn.REL,wn.HREF],t),metaTags:Sf(vt.META,[wn.NAME,wn.CHARSET,wn.HTTPEQUIV,wn.PROPERTY,wn.ITEM_PROP],t),noscriptTags:Sf(vt.NOSCRIPT,[wn.INNER_HTML],t),onChangeClientState:Oue(t),scriptTags:Sf(vt.SCRIPT,[wn.SRC,wn.INNER_HTML],t),styleTags:Sf(vt.STYLE,[wn.CSS_TEXT],t),title:Rue(t),titleAttributes:iw(Hc.TITLE,t)}},D1=(function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout(function(){D1(t)},0)}})(),DT=function(t){return clearTimeout(t)},Lue=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||D1:global.requestAnimationFrame||D1,Fue=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||DT:global.cancelAnimationFrame||DT,Bue=function(t){return console&&typeof console.warn=="function"&&console.warn(t)},kf=null,zue=function(t){kf&&Fue(kf),t.defer?kf=Lue(function(){IT(t,function(){kf=null})}):(IT(t),kf=null)},IT=function(t,n){var s=t.baseTag,i=t.bodyAttributes,a=t.htmlAttributes,l=t.linkTags,u=t.metaTags,h=t.noscriptTags,m=t.onChangeClientState,g=t.scriptTags,x=t.styleTags,v=t.title,_=t.titleAttributes;I1(vt.BODY,i),I1(vt.HTML,a),$ue(v,_);var N={baseTag:ru(vt.BASE,s),linkTags:ru(vt.LINK,l),metaTags:ru(vt.META,u),noscriptTags:ru(vt.NOSCRIPT,h),scriptTags:ru(vt.SCRIPT,g),styleTags:ru(vt.STYLE,x)},S={},j={};Object.keys(N).forEach(function(P){var E=N[P],R=E.newTags,A=E.oldTags;R.length&&(S[P]=R),A.length&&(j[P]=N[P].oldTags)}),n&&n(),m(t,S,j)},QD=function(t){return Array.isArray(t)?t.join(""):t},$ue=function(t,n){typeof t<"u"&&document.title!==t&&(document.title=QD(t)),I1(vt.TITLE,n)},I1=function(t,n){var s=document.getElementsByTagName(t)[0];if(s){for(var i=s.getAttribute(Oi),a=i?i.split(","):[],l=[].concat(a),u=Object.keys(n),h=0;h<u.length;h++){var m=u[h],g=n[m]||"";s.getAttribute(m)!==g&&s.setAttribute(m,g),a.indexOf(m)===-1&&a.push(m);var x=l.indexOf(m);x!==-1&&l.splice(x,1)}for(var v=l.length-1;v>=0;v--)s.removeAttribute(l[v]);a.length===l.length?s.removeAttribute(Oi):s.getAttribute(Oi)!==u.join(",")&&s.setAttribute(Oi,u.join(","))}},ru=function(t,n){var s=document.head||document.querySelector(vt.HEAD),i=s.querySelectorAll(t+"["+Oi+"]"),a=Array.prototype.slice.call(i),l=[],u=void 0;return n&&n.length&&n.forEach(function(h){var m=document.createElement(t);for(var g in h)if(h.hasOwnProperty(g))if(g===wn.INNER_HTML)m.innerHTML=h.innerHTML;else if(g===wn.CSS_TEXT)m.styleSheet?m.styleSheet.cssText=h.cssText:m.appendChild(document.createTextNode(h.cssText));else{var x=typeof h[g]>"u"?"":h[g];m.setAttribute(g,x)}m.setAttribute(Oi,"true"),a.some(function(v,_){return u=_,m.isEqualNode(v)})?a.splice(u,1):l.push(m)}),a.forEach(function(h){return h.parentNode.removeChild(h)}),l.forEach(function(h){return s.appendChild(h)}),{oldTags:a,newTags:l}},XD=function(t){return Object.keys(t).reduce(function(n,s){var i=typeof t[s]<"u"?s+'="'+t[s]+'"':""+s;return n?n+" "+i:i},"")},Uue=function(t,n,s,i){var a=XD(s),l=QD(n);return a?"<"+t+" "+Oi+'="true" '+a+">"+O1(l,i)+"</"+t+">":"<"+t+" "+Oi+'="true">'+O1(l,i)+"</"+t+">"},Vue=function(t,n,s){return n.reduce(function(i,a){var l=Object.keys(a).filter(function(m){return!(m===wn.INNER_HTML||m===wn.CSS_TEXT)}).reduce(function(m,g){var x=typeof a[g]>"u"?g:g+'="'+O1(a[g],s)+'"';return m?m+" "+x:x},""),u=a.innerHTML||a.cssText||"",h=Cue.indexOf(t)===-1;return i+"<"+t+" "+Oi+'="true" '+l+(h?"/>":">"+u+"</"+t+">")},"")},JD=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(s,i){return s[X0[i]||i]=t[i],s},n)},Wue=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(s,i){return s[kue[i]||i]=t[i],s},n)},Hue=function(t,n,s){var i,a=(i={key:n},i[Oi]=!0,i),l=JD(s,a);
805return[dt.createElement(vt.TITLE,l,n)]},que=function(t,n){return n.map(function(s,i){var a,l=(a={key:i},a[Oi]=!0,a);return Object.keys(s).forEach(function(u){var h=X0[u]||u;if(h===wn.INNER_HTML||h===wn.CSS_TEXT){var m=s.innerHTML||s.cssText;l.dangerouslySetInnerHTML={__html:m}}else l[h]=s[u]}),dt.createElement(t,l)})},to=function(t,n,s){switch(t){case vt.TITLE:return{toComponent:function(){return Hue(t,n.title,n.titleAttributes)},toString:function(){return Uue(t,n.title,n.titleAttributes,s)}};case Hc.BODY:case Hc.HTML:return{toComponent:function(){return JD(n)},toString:function(){return XD(n)}};default:return{toComponent:function(){return que(t,n)},toString:function(){return Vue(t,n,s)}}}},eI=function(t){var n=t.baseTag,s=t.bodyAttributes,i=t.encode,a=t.htmlAttributes,l=t.linkTags,u=t.metaTags,h=t.noscriptTags,m=t.scriptTags,g=t.styleTags,x=t.title,v=x===void 0?"":x,_=t.titleAttributes;return{base:to(vt.BASE,n,i),bodyAttributes:to(Hc.BODY,s,i),htmlAttributes:to(Hc.HTML,a,i),link:to(vt.LINK,l,i),meta:to(vt.META,u,i),noscript:to(vt.NOSCRIPT,h,i),script:to(vt.SCRIPT,m,i),style:to(vt.STYLE,g,i),title:to(vt.TITLE,{title:v,titleAttributes:_},i)}},Gue=function(t){var n,s;return s=n=(function(i){Aue(a,i);function a(){return Tue(this,a),Mue(this,i.apply(this,arguments))}return a.prototype.shouldComponentUpdate=function(u){return!_ue(this.props,u)},a.prototype.mapNestedChildrenToProps=function(u,h){if(!h)return null;switch(u.type){case vt.SCRIPT:case vt.NOSCRIPT:return{innerHTML:h};case vt.STYLE:return{cssText:h}}throw new Error("<"+u.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},a.prototype.flattenArrayTypeChildren=function(u){var h,m=u.child,g=u.arrayTypeChildren,x=u.newChildProps,v=u.nestedChildren;return dr({},g,(h={},h[m.type]=[].concat(g[m.type]||[],[dr({},x,this.mapNestedChildrenToProps(m,v))]),h))},a.prototype.mapObjectTypeChildren=function(u){var h,m,g=u.child,x=u.newProps,v=u.newChildProps,_=u.nestedChildren;switch(g.type){case vt.TITLE:return dr({},x,(h={},h[g.type]=_,h.titleAttributes=dr({},v),h));case vt.BODY:return dr({},x,{bodyAttributes:dr({},v)});case vt.HTML:return dr({},x,{htmlAttributes:dr({},v)})}return dr({},x,(m={},m[g.type]=dr({},v),m))},a.prototype.mapArrayTypeChildrenToProps=function(u,h){var m=dr({},h);return Object.keys(u).forEach(function(g){var x;m=dr({},m,(x={},x[g]=u[g],x))}),m}
805,a.prototype.warnOnInvalidChildren=function(u,h){return!0},a.prototype.mapChildrenToProps=function(u,h){var m=this,g={};return dt.Children.forEach(u,function(x){if(!(!x||!x.props)){var v=x.props,_=v.children,N=OT(v,["children"]),S=Wue(N);switch(m.warnOnInvalidChildren(x,_),x.type){case vt.LINK:case vt.META:case vt.NOSCRIPT:case vt.SCRIPT:case vt.STYLE:g=m.flattenArrayTypeChildren({child:x,arrayTypeChildren:g,newChildProps:S,nestedChildren:_});break;default:h=m.mapObjectTypeChildren({child:x,newProps:h,newChildProps:S,nestedChildren:_});break}}}),h=this.mapArrayTypeChildrenToProps(g,h),h},a.prototype.render=function(){var u=this.props,h=u.children,m=OT(u,["children"]),g=dr({},m);return h&&(g=this.mapChildrenToProps(h,g)),dt.createElement(t,g)},Eue(a,null,[{key:"canUseDOM",set:function(u){t.canUseDOM=u}}]),a})(dt.Component),n.propTypes={base:yn.object,bodyAttributes:yn.object,children:yn.oneOfType([yn.arrayOf(yn.node),yn.node]),defaultTitle:yn.string,defer:yn.bool,encodeSpecialCharacters:yn.bool,htmlAttributes:yn.object,link:yn.arrayOf(yn.object),meta:yn.arrayOf(yn.object),noscript:yn.arrayOf(yn.object),onChangeClientState:yn.func,script:yn.arrayOf(yn.object),style:yn.arrayOf(yn.object),title:yn.string,titleAttributes:yn.object,titleTemplate:yn.string},n.defaultProps={defer:!0,encodeSpecialCharacters:!0},n.peek=t.peek,n.rewind=function(){var i=t.rewind();return i||(i=eI({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),i},s},Yue=function(){return null},Kue=yue(Iue,zue,eI)(Yue),L1=Gue(Kue);L1.renderStatic=L1.rewind;function Zue({reduce:e}){return r.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none","aria-hidden":"true",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.04]",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")`}}),r.jsx("div",{className:"absolute -top-[20%] -left-[10%] w-[55%] h-[55%] bg-emerald-300/25 rounded-full blur-[140px]"}),r.jsx("div",{className:"absolute top-[30%] -right-[10%] w-[50%] h-[50%] bg-amber-300/20 rounded-full blur-[140px]"}),r.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.12]",viewBox:"0 0 1200 800",preserveAspectRatio:"xMidYMid slice",children:[r.jsx("defs",{children:r.jsxs("radialGradient",{id:"topoFade",cx:"50%",cy:"50%",r:"60%",children:[r.jsx("stop",{offset:"0%",stopColor:"#047857",stopOpacity:"0.9"}),r.jsx("stop",{offset:"100%",stopColor:"#047857",stopOpacity:"0"})]})}),[...Array(9)].map((t,n)=>{const s=1+n*.08;return r.jsx(re.ellipse,{cx:"600",cy:"400",rx:140*s,ry:90*s,fill:"none",stroke:"url(#topoFade)",strokeWidth:"1",initial:e?!1:{opacity:0},animate:e?!1:{opacity:1},transition:{duration:1.2,delay:n*.08}},n)})]})]})}const LT=[{icon:Dn,text:"2,400+ trips planned this month",color:"text-emerald-700"},{icon:Li,text:"Trusted by 80+ outdoor communities",color:"text-amber-700"},{icon:Os,text:"All members checked in safely",color:"text-emerald-700"}];function Que({reduce:e}){const[t,n]=w.useState(0);w.useEffect(()=>{if(e)return;const a=setInterval(()=>n(l=>(l+1)%LT.length),3500);return()=>clearInterval(a)},[e]);const s=LT[t],i=s.icon;return r.jsx("div",{className:"flex items-center gap-2.5 h-6 overflow-hidden",children:r.jsx(Lt,{mode:"wait",children:r.jsxs(re.div,{initial:{y:14,opacity:0},animate:{y:0,opacity:1},exit:{y:-14,opacity:0},transition:{duration:.4},className:"flex items-center gap-2.5",children:[r.jsx(i,{className:`w-4 h-4 ${s.color}`,strokeWidth:2.2}),r.jsx("span",{className:"text-sm font-medium text-stone-600 tracking-tight",children:s.text})]},t)})})}function Xue({formHighlight:e}){const[t,n]=w.useState({name:"",email:"",phone:"",message:""}),[s,i]=w.useState(!1),[a,l]=w.useState({}),u=pt({mutationFn:_=>ne.entities.Lead.create(_),onSuccess:()=>{i(!0),setTimeout(()=>{i(!1),n({name:"",email:"",phone:"",message:""}),l({})},4e3)}}),h=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.email),m=t.name.trim().length>=2,g=[m,h,t.phone.length>0,t.message.length>
80510].filter(Boolean).length,x=Math.round(g/4*100),v=_=>{if(_.preventDefault(),!m||!h){l({name:!0,email:!0});return}u.mutate(t)};return r.jsxs("div",{id:"lets-talk-form",className:`bg-white rounded-[32px] overflow-hidden shadow-2xl shadow-emerald-900/10 border transition-all duration-700 ${e?"form-highlight-pulse scale-[1.02]":"border-stone-200/60"}`,children:[r.jsxs("div",{className:"bg-stone-900 px-8 pt-7 pb-6 text-white relative overflow-hidden",children:[r.jsx("div",{className:"absolute top-0 right-0 p-8 opacity-[0.08] pointer-events-none","aria-hidden":"true",children:r.jsx(da,{className:"w-32 h-32 -mt-10 -mr-10"})}),r.jsxs("div",{className:"relative z-10",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsx("h3",{className:"text-2xl md:text-[26px] font-semibold tracking-tight",children:"Let's talk"}),r.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-emerald-300 bg-emerald-500/15 border border-emerald-500/30 px-2.5 py-1 rounded-full",children:[r.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[r.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),r.jsx("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-emerald-400"})]}),"Replies within 24h"]})]}),r.jsx("p",{className:"text-stone-300 text-[15px] leading-relaxed",children:"Tell us about your community and we'll spin up your branded workspace."}),r.jsx("div",{className:"mt-5 h-1 bg-white/10 rounded-full overflow-hidden",children:r.jsx(re.div,{className:"h-full bg-gradient-to-r from-emerald-400 to-emerald-300 rounded-full",initial:{width:0},animate:{width:`${x}%`},transition:{type:"spring",stiffness:120,damping:20}})})]})]}),r.jsx("div",{className:"p-7 bg-white",children:r.jsx(Lt,{mode:"wait",children:s?r.jsxs(re.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"py-10 flex flex-col items-center text-center",children:[r.jsxs(re.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:300,damping:18},className:"w-20 h-20 bg-emerald-50 rounded-full flex items-center justify-center mb-6 relative",children:[r.jsx(ht,{className:"w-10 h-10 text-emerald-600"}),r.jsx(re.div,{className:"absolute inset-0 rounded-full border-2 border-emerald-400",initial:{scale:1,opacity:1},animate:{scale:1.8,opacity:0}
805,transition:{duration:1.2,repeat:1/0}})]}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight text-stone-900 mb-2",children:"Message sent"}),r.jsx("p",{className:"text-stone-500 font-medium",children:"We'll be in touch shortly. Check your inbox."})]},"success"):r.jsxs(re.form,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onSubmit:v,className:"space-y-4",noValidate:!0,children:[r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[r.jsx(aw,{id:"name",label:"Your name",placeholder:"Jane Doe",value:t.name,onChange:_=>n({...t,name:_}),onBlur:()=>l({...a,name:!0}),error:a.name&&!m?"At least 2 characters":"",required:!0}),r.jsx(aw,{id:"email",type:"email",label:"Email",placeholder:"[email protected]",value:t.email,onChange:_=>n({...t,email:_}),onBlur:()=>l({...a,email:!0}),error:a.email&&!h?"Enter a valid email":"",required:!0})]}),r.jsx(aw,{id:"phone",type:"tel",label:"Phone",optional:!0,placeholder:"(555) 123-4567",value:t.phone,onChange:_=>n({...t,phone:_})}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(mt,{htmlFor:"message",className:"text-stone-700 font-semibold text-[13px]",children:"About your community"}),r.jsxs("span",{className:"text-[11px] text-stone-400 font-medium",children:[t.message.length," / 300"]})]}),r.jsx(ed,{id:"message",placeholder:"Size, platform you use today, vibe of the group...",rows:3,maxLength:300,value:t.message,onChange:_=>n({...t,message:_.target.value}),className:"bg-stone-50 border-stone-200 focus:bg-white focus:border-emerald-500 focus:ring-2 focus:ring-emerald-500/20 rounded-xl resize-none transition-all"})]}),r.jsx(_t,{type:"submit",disabled:u.isPending,className:"group w-full h-12 rounded-xl text-[15px] font-semibold tracking-tight bg-emerald-700 hover:bg-emerald-800 text-white shadow-lg shadow-emerald-700/25 transition-all active:scale-[0.98] disabled:opacity-70",children:u.isPending?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Sending..."]}):r.jsxs("span",{className:"flex items-center justify-center gap-2",children:["Send message",r.jsx(wa,{className:"w-4 h-4 transition-transform group-hover:translate-x-0.5"})]})}),r.jsx("p",{className:"text-center text-[11px] text-stone-400 font-medium pt-1",children:"No spam. We'll only contact you about your community setup."})]},"form")})})]})}function aw({id:e,label:t,type:n="text",placeholder:s,value:i,onChange:a,onBlur:l,error:u,required:h,optional:m}){return r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs(mt,{htmlFor:e,className:"text-stone-700 font-semibold text-[13px] flex items-center gap-1.5",children:[t,m&&r.jsx("span",{className:"text-stone-400 font-normal",children:"(optional)"})]}),r.jsx(sn,{id:e,type:n,required:h,placeholder:s,value:i,onChange:g=>a(g.target.value),onBlur:l,className:`bg-stone-50 focus:bg-white h-11 rounded-xl transition-all focus:ring-2 ${u?"border-red-300 focus:border-red-500 focus:ring-red-500/20":"border-stone-200 focus:border-emerald-500 focus:ring-emerald-500/20"}`}),r.jsx(Lt,{children:u&&r.jsx(re.p,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"text-[11px] font-medium text-red-500",children:u})})]})}function Jue({onScrollToForm:e,onScrollToSection:t,formHighlight:n}){const s=aA(),i=w.useRef(null),{scrollY:a}=MH(),l=LH(a,[0,500],[0,s?0:40]);return r.jsxs("section",{ref:i,"aria-labelledby":"hero-heading",className:"relative pt-28 pb-16 lg:pt-24 lg:pb-24 overflow-hidden px-6 lg:px-8",children:[r.jsx(re.div,{style:{y:l},className:"absolute inset-0 z-0",children:r.jsx(Zue,{reduce:s})}),r.jsx("div",{className:"max-w-7xl mx-auto relative z-10",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1.1fr_1fr] gap-12 lg:gap-14 items-center",children:[r.jsxs("div",{className:"text-left max-w-2xl mx-auto lg:mx-0",children:[r.jsxs(re.div,{initial:s?!1:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.5},className:"inline-flex items-center gap-2 pl-1.5 pr-4 py-1.5 rounded-full bg-white/80 backdrop-blur-sm border border-stone-200 shadow-sm shadow-stone-900/5 mb-8",children:[r.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-stone-900 text-white text-[11px] font-semibold tracking-wide",children:[r.jsx(l5,{className:"w-3 h-3 text-amber-400",strokeWidth:2.5}),"Ben Franklin"]}),r.jsx("span",{className:"text-[12px] font-medium text-stone-600 tracking-tight",children:"on group trip planning, probably"})]}),r.jsxs(re.h1,{id:"hero-heading",initial:s?!1:{opacity:0,y:20}
805,animate:{opacity:1,y:0},transition:{duration:.6,delay:.1},className:"text-[2.5rem] md:text-6xl lg:text-[4.5rem] font-semibold tracking-tighter text-stone-900 mb-6 leading-[1.02]",children:[r.jsx("span",{className:"relative z-10 block",children:'"If you fail to plan,'}),r.jsx(re.span,{initial:s?{opacity:1}:{clipPath:"polygon(-20% -100%, -20% -100%, -20% 200%, -20% 200%)"},animate:s?!1:{clipPath:"polygon(-20% -100%, 120% -100%, 120% 200%, -20% 200%)"},transition:{duration:2.2,delay:.9,ease:"linear"},className:"block text-[2.25rem] md:text-5xl lg:text-[4rem] text-emerald-700 -mt-1 md:-mt-6 ml-6 md:ml-28 -rotate-2 relative z-20 font-medium drop-shadow-xl w-max",style:{fontFamily:"'Caveat', cursive"},children:'you are planning to fail."'})]}),r.jsxs(re.p,{initial:s?!1:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},className:"text-lg md:text-xl text-stone-600 font-medium mb-8 leading-relaxed max-w-[540px]",children:["The all-in-one command center for outdoor crews."," ",r.jsx("span",{className:"text-stone-900 font-semibold",children:"Coordinate. Pack. Camp."})," ","Without the spreadsheets and lost group chats."]}),r.jsxs(re.div,{initial:s?!1:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-3 mb-7",children:[r.jsxs("button",{onClick:e,className:"group inline-flex items-center justify-center gap-2 bg-stone-900 hover:bg-stone-800 text-white px-7 py-3.5 rounded-full font-semibold tracking-tight text-[15px] transition-all active:scale-[0.97] shadow-lg shadow-stone-900/20 hover:shadow-xl hover:shadow-stone-900/30",children:[r.jsx(mo,{className:"w-4 h-4 text-amber-400",strokeWidth:2.4}),"Get your free workspace",r.jsx(wa,{className:"w-4 h-4 transition-transform group-hover:translate-x-0.5"})]}),r.jsx("button",{onClick:()=>t("how-it-works"),className:"inline-flex items-center justify-center gap-2 bg-white hover:bg-stone-50 text-stone-900 px-7 py-3.5 rounded-full font-semibold tracking-tight text-[15px] transition-all active:scale-[0.97] border border-stone-200 shadow-sm",children:"See how it works"})]}),r.jsxs(re.div,{initial:s?!1:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.5},className:"flex items-center gap-4 flex-wrap",children:[r.jsxs("div",{className:"flex -space-x-2",children:[[1,2,3,4].map(u=>r.jsx("img",{src:`https://api.dicebear.com/7.x/avataaars/svg?seed=hero${u}`,alt:"",className:"w-8 h-8 rounded-full border-2 border-[#fcfbf6] bg-stone-200 shadow-sm"},u)),r.jsx("div",{className:"w-8 h-8 rounded-full border-2 border-[#fcfbf6] bg-emerald-700 text-white text-[10px] font-bold flex items-center justify-center shadow-sm",children:"+2k"})]}),r.jsx("div",{className:"h-6 w-px bg-stone-300 hidden sm:block"}),r.jsx(Que,{reduce:s})]}),r.jsxs(re.div,{initial:s?!1:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.6},className:"mt-8 flex items-center gap-2 text-sm font-medium text-stone-500",children:[r.jsxs("span",{className:"relative flex h-2.5 w-2.5 shrink-0",children:[r.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-amber-400 opacity-75"}),r.jsx("span",{className:"relative inline-flex rounded-full h-2.5 w-2.5 bg-amber-500"})]}),"Community leader?"," ",r.jsx("button",{onClick:()=>t("community-free"),className:"text-emerald-700 font-semibold hover:underline cursor-pointer",children:"Get the whole thing 100% free â"})]})]}),r.jsx(re.div,{initial:s?!1:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.8,delay:.4},className:"w-full max-w-[500px] mx-auto lg:ml-auto lg:mr-0",children:r.jsx(Xue,{formHighlight:n})})]})})]})}const Fg=({className:e,children:t,delay:n=0})=>r.jsx(re.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:n},className:`bg-white rounded-[32px] overflow-hidden border border-slate-200/60 shadow-xl shadow-slate-200/20 group hover:shadow-2xl hover:-translate-y-1 transition-all duration-500 ${e}`,children:t});function FT(){w.useEffect(()=>
805{if(!document.getElementById("caveat-font")){const m=document.createElement("link");m.id="caveat-font",m.href="https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&display=swap",m.rel="stylesheet",document.head.appendChild(m)}},[]);const[e,t]=w.useState(!1),[n,s]=w.useState(!1),[i,a]=w.useState(!1),{data:l}=Re({queryKey:["about-auth-check"],queryFn:()=>ne.auth.isAuthenticated(),initialData:!1}),u=m=>{const g=document.getElementById(m);if(g){const x=g.getBoundingClientRect().top+window.scrollY-100;window.scrollTo({top:x,behavior:"smooth"})}},h=m=>{m==null||m.preventDefault(),u("lets-talk-form"),setTimeout(()=>{a(!0),setTimeout(()=>{var g;return(g=document.getElementById("name"))==null?void 0:g.focus()},500),setTimeout(()=>a(!1),3e3)},800)};return r.jsxs("div",{className:"min-h-screen bg-[#fcfbf6] font-sans selection:bg-emerald-200 text-stone-900 overflow-x-hidden",children:[r.jsxs(L1,{children:[r.jsx("title",{children:"WeAllCamp | Plan together. Pack together. Camp together."}),r.jsx("meta",{name:"description",content:"Coordinate group trips, manage shared gear, chat in real-time, and keep everyone safe with the ultimate outdoor planner."}),r.jsx("meta",{property:"og:title",content:"WeAllCamp | Plan together. Pack together. Camp together."}),r.jsx("meta",{property:"og:description",content:"Coordinate group trips, manage shared gear, chat in real-time, and keep everyone safe with the ultimate outdoor planner."}),r.jsx("meta",{property:"og:type",content:"website"})]}),r.jsx("style",{children:` 806 @keyframes pulse-ring { 807 0% { box-shadow: 0 0 0 0 rgba(4, 120, 87, 0.7); } 808 70% { box-shadow: 0 0 0 20px rgba(4, 120, 87, 0); } 809 100% { box-shadow: 0 0 0 0 rgba(4, 120, 87, 0); } 810 } 811 .form-highlight-pulse { 812 animation: pulse-ring 1s cubic-bezier(0.215, 0.61, 0.355, 1) 3; 813 border-color: #047857 !important; 814 } 815 `}),r.jsx(hue,{navItems:[{label:"The Problem",onClick:()=>u("the-problem")},{label:"Features",onClick:()=>u("features")},{label:"How it Works",onClick:()=>u("how-it-works")},{label:"Trip Anatomy",onClick:()=>u("anatomy-of-a-trip")},{label:"Communities",onClick:()=>u("community-free")}],footer:m=>r.jsxs("div",{className:"px-10 md:px-16 mt-8 space-y-3",children:[r.jsx(_t,{onClick:g=>{m(),h(g)},className:"w-full rounded-2xl shadow-lg shadow-emerald-700/20 bg-emerald-700 hover:bg-emerald-800 text-white font-semibold h-14 text-lg border-0",children:"Get Started"}),!l&&r.jsx("a",{href:"/auth",className:"w-full flex items-center justify-center h-12 rounded-2xl bg-white/10 border border-white/20 text-white font-semibold text-base hover:bg-white/20 transition-colors",children:"Sign In"})]}),belowLogo:l?r.jsxs("a",{href:"/Home",className:"flex items-center gap-2 bg-white/80 backdrop-blur-xl px-4 py-2.5 rounded-full border border-stone-200/50 shadow-sm hover:bg-stone-50 transition-all active:scale-95 group",children:[r.jsx(W1,{className:"w-4 h-4 text-emerald-700"}),r.jsx("span",{className:"font-semibold tracking-tight text-sm text-stone-700",children:"Dashboard"})]}):null}),r.jsx(Jue,{onScrollToForm:h,onScrollToSection:u,formHighlight:i}),r.jsx("section",{className:"pb-24 px-6 lg:px-8 relative overflow-hidden hidden lg:block",children:r.jsx("div",{className:"max-w-6xl mx-auto relative z-10",children:r.jsx(re.div,{initial:{opacity:0,y:60},animate:{opacity:1,y:0},transition:{duration:.8,delay:.5},className:"mt-24 relative z-10 hidden sm:block",children:r.jsxs("div",{className:"relative mx-auto w-full max-w-[1000px]",children:[r.jsx("div",{className:"absolute inset-0 bg-gradient-to-tr from-emerald-500/20 to-amber-500/20 rounded-[40px] blur-3xl -z-10"}),r.jsx("div",{className:"relative bg-white/60 backdrop-blur-2xl border border-stone-200/60 p-3 rounded-[40px] shadow-2xl shadow-emerald-900/10",children:r.jsxs("div",{className:"bg-[#fcfbf9] rounded-[32px] overflow-hidden border border-stone-200/80 shadow-inner h-[440px] relative flex",children:[r.jsxs("div",{className:"w-64 bg-white border-r border-stone-100 flex flex-col p-6 z-10",children:[r.jsxs("div",{className:"flex items-center gap-2.5 mb-10",children:[r.jsx(Or,{className:"w-9 h-9",color:"#0f172a"}),r.jsx("div",{className:"h-6 w-24 bg-stone-200 rounded-md"})]}),r.jsx("div",{className:"space-y-4",children:[pa,Dn,ri,dw].map((m,g)=>r.jsxs("div",{className:`flex items-center gap-3 p-3 rounded-xl transition-colors ${g===0?"bg-emerald-50 text-emerald-700 shadow-sm":"text-stone-400"}`,children:[r.jsx(m,{className:"w-5 h-5"}),r.jsx("div",{className:`h-3 w-24 rounded-md ${g===0?"bg-emerald-200":"bg-stone-200"}`})]},g))})]}),r.jsxs("div",{className:"flex-1 p-8 relative overflow-hidden bg-stone-50/50",children:[r.jsxs("div",{className:"flex justify-between items-start mb-10",children:[r.jsxs("div",{children:[r.jsx("div",{className:"h-10 w-56 bg-stone-200 rounded-lg mb-3"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("div",{className:"h-6 w-24 bg-stone-200 rounded-md"}),r.jsx("div",{className:"h-6 w-32 bg-stone-200 rounded-md"})]})]}
815),r.jsx("div",{className:"flex -space-x-3",children:[1,2,3,4].map(m=>r.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-white bg-stone-300 shadow-sm"},m))})]}),r.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[r.jsxs("div",{className:"col-span-2 space-y-4",children:[r.jsxs("div",{className:"bg-white p-5 rounded-2xl border border-stone-100 shadow-sm flex gap-4 items-center",children:[r.jsx("div",{className:"w-12 h-12 rounded-xl bg-amber-100 text-amber-600 flex items-center justify-center",children:r.jsx(ht,{className:"w-6 h-6"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"h-4 w-32 bg-stone-200 rounded-md mb-2"}),r.jsx("div",{className:"h-3 w-48 bg-stone-100 rounded-md"})]})]}),r.jsxs("div",{className:"bg-white p-5 rounded-2xl border border-stone-100 shadow-sm flex gap-4 items-center",children:[r.jsx("div",{className:"w-12 h-12 rounded-xl bg-emerald-100 text-emerald-700 flex items-center justify-center",children:r.jsx(da,{className:"w-6 h-6"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"h-4 w-28 bg-stone-200 rounded-md mb-2"}),r.jsx("div",{className:"h-3 w-40 bg-stone-100 rounded-md"})]})]})]}),r.jsx("div",{className:"col-span-1",children:r.jsxs("div",{className:"bg-white p-5 rounded-2xl border border-stone-100 shadow-sm h-full flex flex-col",children:[r.jsx("div",{className:"h-4 w-24 bg-stone-200 rounded-md mb-4"}),r.jsxs("div",{className:"flex-1 rounded-xl bg-stone-50 border-2 border-dashed border-stone-200 flex items-center justify-center overflow-hidden relative",children:[r.jsx("div",{className:"absolute inset-0 bg-[url('https://images.unsplash.com/photo-1524661135-423995f22d0b?q=80&w=400&auto=format&fit=crop')] bg-cover opacity-20"}),r.jsx(Zs,{className:"w-8 h-8 text-stone-400 relative z-10"})]})]})})]}),r.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-32 bg-gradient-to-t from-stone-50 to-transparent pointer-events-none"})]})]})}),r.jsxs(re.div,{animate:{y:[0,-12,0]},transition:{duration:4,repeat:1/0,ease:"easeInOut"},className:"absolute -right-6 md:-right-12 top-24 bg-white p-4 md:p-5 rounded-2xl shadow-xl shadow-stone-200/50 border border-stone-100 flex items-center gap-4 z-20",children:[r.jsx("div",{className:"w-12 h-12 bg-emerald-50 text-emerald-600 rounded-full flex items-center justify-center shadow-inner",children:r.jsx(Al,{className:"w-6 h-6"})}),r.jsxs("div",{children:[r.jsx("div",{className:"text-sm md:text-base font-semibold tracking-tight text-stone-900 tracking-tight",children:"Everyone is safe"}),r.jsx("div",{className:"text-xs md:text-sm font-medium text-stone-500",children:"All members checked in"})]})]}),r.jsxs(re.div,{animate:{y:[0,12,0]},transition:{duration:5,repeat:1/0,ease:"easeInOut",delay:1},className:"absolute -left-6 md:-left-12 bottom-24 bg-white p-4 md:p-5 rounded-2xl shadow-xl shadow-stone-200/50 border border-stone-100 flex items-center gap-4 z-20",children:[r.jsx("div",{className:"w-12 h-12 bg-amber-50 text-amber-600 rounded-full flex items-center justify-center shadow-inner",children:r.jsx(ri,{className:"w-6 h-6"})}),r.jsxs("div",{children:[r.jsx("div",{className:"text-sm md:text-base font-semibold tracking-tight text-stone-900 tracking-tight",children:"Gear sorted"}),r.jsx("div",{className:"text-xs md:text-sm font-medium text-stone-500",children:"No forgotten items"})]})]})]})})})}),r.jsx("section",{className:"py-12 border-y border-slate-200/60 bg-white/50",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-6 text-center",children:[r.jsx("p",{className:"text-sm font-semibold tracking-tight text-slate-400 tracking-widest uppercase mb-8",children:"Trusted by outdoor communities"}),r.jsxs("div",{className:"flex flex-wrap justify-center items-center gap-8 md:gap-16 opacity-60 grayscale",children:[r.jsxs("div",{className:"flex items-center gap-2 font-semibold tracking-tight text-xl",children:[r.jsx(ws,{})," AlpineClub"]}),r.jsxs("div",{className:"flex items-center gap-2 font-semibold tracking-tight text-xl",children:[r.jsx(Zs,{})," TrailBlazers"]}),r.jsxs("div",{className:"flex items-center gap-2 font-semibold tracking-tight text-xl",children:[r.jsx(kc,{})," SummitSeekers"]}),r.jsxs("div",{className:"flex items-center gap-2 font-semibold tracking-tight text-xl",children:[r.jsx(ri,{})," CampCo"]})]})]})}),r.jsxs("section",{id:"the-problem",className:"py-24 bg-stone-900 text-white relative overflow-hidden",children:[r.jsx("div",{className:"absolute inset-0 bg-[url('https://images.unsplash.com/photo-1516939884455-1445c8652f83?q=80&w=2000&auto=format&fit=crop')] bg-cover bg-center opacity-10 mix-blend-overlay"}),r.jsxs("div",{className:"max-w-5xl mx-auto px-6 relative z-10",children:[r.jsxs(re.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-16",children:[r.jsx("h2",{className:"text-3xl md:text-5xl font-semibold tracking-tight mb-6",children:"Planning group trips is broken."}),r.jsx("p",{className:"text-lg md:text-xl text-stone-400 font-medium max-w-2xl mx-auto",children:"You want to spend your time exploring the outdoors, but instead, you are stuck dealing with:"})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[r.jsxs(re.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1},className:"bg-white/5 border border-white/10 p-8 rounded-[32px] backdrop-blur-md",children:[r.jsx("div",{className:"w-14 h-14 bg-red-500/20 text-red-400 rounded-2xl flex items-center justify-center mb-6",children:r.jsx(Vg,{className:"w-7 h-7"})}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight mb-3",children:"Scattered Comms"}),r.jsx("p",{className:"text-stone-400 leading-relaxed font-medium",children:"Important details get lost in endless group chats. No one knows exactly what time to meet or where."})]}),r.jsxs(re.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.2},className:"bg-white/5 border border-white/10 p-8 rounded-[32px] backdrop-blur-md",children:[r.jsx("div",{className:"w-14 h-14 bg-amber-500/20 text-amber-400 rounded-2xl flex items-center justify-center mb-6",children:r.jsx(da,{className:"w-7 h-7"})}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight mb-3",children:"Messy Spreadsheets"}),r.jsx("p",{className:"text-stone-400 leading-relaxed font-medium",children:"Tracking who brings what gear on Google Sheets is a hassle, leading to duplicated or forgotten items."})]}),r.jsxs(re.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.3},className:"bg-white/5 border border-white/10 p-8 rounded-[32px] backdrop-blur-md",children:[r.jsx("div",{className:"w-14 h-14 bg-emerald-500/20 text-emerald-400 rounded-2xl flex items-center justify-center mb-6",children:r.jsx(ws,{className:"w-7 h-7"})}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight mb-3",children:"Safety Concerns"}),r.jsx("p",{className:"text-stone-400 leading-relaxed font-medium",children:"Without a centralized itinerary and check-in system, it's hard to ensure everyone makes it home safely."})]})]})]})]}),r.jsxs("section",{id:"features",className:"py-24 md:py-32 px-6 lg:px-8 max-w-7xl mx-auto",children:[r.jsxs("div",{className:"text-center mb-16 md:mb-24",children:[r.jsxs("h2",{className:"text-4xl md:text-5xl font-semibold tracking-tight text-slate-900 mb-6",children:["Everything you need. ",r.jsx("br",{className:"hidden md:block"})," Nothing you don't."]}),r.jsx("p",{className:"text-lg md:text-xl text-slate-500 font-medium max-w-2xl mx-auto",children:"Say goodbye to messy spreadsheets and chaotic group chats. We've combined all the essential tools into one beautiful platform."})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 md:gap-8",children:[r.jsxs(Fg,{className:"md:col-span-2 relative p-8 md:p-12 flex flex-col justify-between min-h-[400px]",delay:.1,children:[r.jsxs("div",{className:"relative z-10 max-w-md",children:[r.jsx("div",{className:"w-14 h-14 bg-emerald-100 text-emerald-700 rounded-2xl flex items-center justify-center mb-6",children:r.jsx(Zs,{className:"w-7 h-7"})}),r.jsx("h3",{className:"text-2xl md:text-3xl font-semibold tracking-tight text-stone-900 mb
815-4",children:"Interactive Itineraries"}),r.jsx("p",{className:"text-stone-500 font-medium text-lg leading-relaxed mb-8",children:"Build detailed routes with daily stops, integrated maps, GPS coordinates, and real-time weather forecasts."})]}),r.jsxs("div",{className:"absolute right-0 bottom-0 translate-x-1/4 translate-y-1/4 md:translate-x-10 md:translate-y-10 w-[200px] h-[200px] md:w-[300px] md:h-[300px] bg-stone-50 rounded-full border-8 border-white shadow-2xl flex items-center justify-center group-hover:scale-105 transition-transform duration-500",children:[r.jsx("div",{className:"absolute inset-4 border-2 border-dashed border-stone-200 rounded-full animate-[spin_60s_linear_infinite]"}),r.jsx(Dn,{className:"w-12 h-12 md:w-16 md:h-16 text-emerald-600 absolute top-1/4 left-1/4"}),r.jsx(Hy,{className:"w-8 h-8 md:w-12 md:h-12 text-amber-600 absolute bottom-1/3 right-1/4"})]})]}),r.jsxs(Fg,{className:"md:col-span-1 p-8 md:p-12 min-h-[400px] bg-stone-900 text-white flex flex-col",delay:.2,children:[r.jsx("div",{className:"w-14 h-14 bg-stone-800 text-emerald-400 rounded-2xl flex items-center justify-center mb-6",children:r.jsx(ri,{className:"w-7 h-7"})}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight mb-4",children:"Smart Gear"}),r.jsx("p",{className:"text-stone-400 font-medium leading-relaxed mb-8",children:"Split group gear fairly, claim items, and manage your personal packing checklist effortlessly."}),r.jsxs("div",{className:"space-y-3 mt-auto",children:[r.jsxs("div",{className:"bg-stone-800 rounded-xl p-3 flex items-center gap-3",children:[r.jsx("div",{className:"w-5 h-5 rounded-md bg-emerald-500 flex items-center justify-center",children:r.jsx(ht,{className:"w-3 h-3 text-stone-900"})}),r.jsx("div",{className:"h-2 w-24 bg-stone-600 rounded-full"})]}),r.jsxs("div",{className:"bg-stone-800 rounded-xl p-3 flex items-center gap-3 opacity-60",children:[r.jsx("div",{className:"w-5 h-5 rounded-md border-2 border-stone-600"}),r.jsx("div",{className:"h-2 w-32 bg-stone-600 rounded-full"})]})]})]}),r.jsxs(Fg,{className:"md:col-span-1 p-8 md:p-12 min-h-[400px] flex flex-col",delay:.3,children:[r.jsx("div",{className:"w-14 h-14 bg-amber-100 text-amber-700 rounded-2xl flex items-center justify-center mb-6",children:r.jsx(Vg,{className:"w-7 h-7"})}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight text-stone-900 mb-4",children:"Rich Crew Chat"}),r.jsx("p",{className:"text-stone-500 font-medium leading-relaxed",children:"Stay connected around the digital campfire. Share photos, voice notes, and live locations."}),r.jsxs("div",{className:"mt-auto pt-8 space-y-4",children:[r.jsx("div",{className:"bg-stone-100 rounded-2xl rounded-tl-sm p-4 w-3/4",children:r.jsx("div",{className:"h-2 w-full bg-stone-200 rounded-full"})}),r.jsx("div",{className:"bg-emerald-700 rounded-2xl rounded-tr-sm p-4 w-3/4 ml-auto",children:r.jsx("div",{className:"h-2 w-3/4 bg-emerald-500 rounded-full ml-auto"})})]})]}),r.jsxs(Fg,{className:"md:col-span-2 p-8 md:p-12 flex flex-col md:flex-row gap-8 items-center",delay:.4,children:[r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"w-14 h-14 bg-emerald-100 text-emerald-600 rounded-2xl flex items-center justify-center mb-6",children:r.jsx(Al,{className:"w-7 h-7"})}),r.jsx("h3",{className:"text-2xl md:text-3xl font-semibold tracking-tight text-slate-900 mb-4",children:"Safety & Logistics"}),r.jsx("p",{className:"text-slate-500 font-medium text-lg leading-relaxed",children:`Track RSVPs, assign trip difficulties, and use the "I'm Home" check-in feature to ensure everyone returns safely. Plus, a centralized gallery for all your memories.`})]}),r.jsx("div",{className:"flex-1 w-full flex justify-center mt-6 md:mt-0",children:r.jsxs("div",{className:"grid grid-cols-2 gap-3 w-full max-w-[280px]",children:[r.jsx("div",{className:"bg-slate-100 aspect-square rounded-2xl overflow-hidden relative",children:r.jsx("img",{src:"https://images.unsplash.com/photo-1501555088652-021faa106b9b?w=400",className:"object-cover w-full h-full opacity-80",alt:"Hike"})}),r.jsx("div",{className:"bg-slate-100 aspect-square rounded-2xl overflow-hidden relative mt-6",children:r.jsx("img",{src:"https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=400",className:"object-cover w-full h-full opacity-80",alt:"Mountains"})})]})})]})]}),r.jsx("div",{className:"mt-16 text-center",children:r.jsx(_t,{onClick:()=>s(!0),className:"rounded-full px-8 bg-white border border-slate-200 text-slate-700 hover:bg-slate-50 hover:text-slate-900 font-semibold h-12 shadow-sm",children:"See all features"})})]}),r.jsx("section",{id:"how-it-works",className:"py-24 bg-[#fcfbf9] border-y border-stone-200/60",children:r.jsxs("div",{className:"max-w-4xl mx-auto px-6",children:[r.jsxs("div",{className:"text-center mb-20",children:[r.jsx("h2",{className:"text-4xl font-semibold tracking-tight text-stone-900 mb
815-4",children:"How it works"}),r.jsx("p",{className:"text-lg text-stone-500 font-medium",children:"From an idea to returning home safely, we've got you covered in 4 simple steps."})]}),r.jsxs("div",{className:"space-y-12 relative",children:[r.jsx("div",{className:"absolute left-[27px] md:left-1/2 top-4 bottom-4 w-0.5 bg-stone-200 md:-translate-x-1/2 hidden sm:block"}),[{step:"1",title:"Create a Trip",desc:"Set dates, add a cover photo, and define the difficulty level.",icon:kc},{step:"2",title:"Invite the Crew",desc:"Send invites to your friends. They can RSVP and jump into the planning.",icon:Hy},{step:"3",title:"Plan the Details",desc:"Add stops to the interactive map and start claiming group gear items.",icon:da},{step:"4",title:"Embark & Share",desc:"Use the chat for live updates and check-in safely once you return home.",icon:ws}].map((m,g)=>r.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.5,delay:g*.1},className:`relative flex flex-col sm:flex-row items-start sm:items-center gap-6 md:gap-12 ${g%2===0?"md:flex-row-reverse":""}`,children:[r.jsx("div",{className:"absolute left-0 sm:left-auto sm:static md:absolute md:left-1/2 md:-translate-x-1/2 w-14 h-14 bg-[#fcfbf9] border-4 border-stone-100 rounded-2xl shadow-lg flex items-center justify-center z-10 hidden sm:flex",children:r.jsx("div",{className:"w-full h-full bg-emerald-700 rounded-xl flex items-center justify-center text-white font-semibold tracking-tight",children:r.jsx(m.icon,{className:"w-5 h-5"})})}),r.jsx("div",{className:`w-full sm:w-1/2 sm:pl-20 md:pl-0 ${g%2===0?"md:text-left":"md:text-right"}`,children:r.jsxs("div",{className:`bg-white p-6 md:p-8 rounded-[24px] border border-stone-200 shadow-sm hover:shadow-md transition-shadow relative ${g%2===0?"md:mr-12":"md:ml-12"}`,children:[r.jsx("div",{className:"sm:hidden w-12 h-12 bg-emerald-700 rounded-xl flex items-center justify-center text-white font-semibold tracking-tight mb-4",children:r.jsx(m.icon,{className:"w-5 h-5"})}),r.jsx("h4",{className:"text-2xl font-semibold tracking-tight text-stone-900 mb-3",children:m.title}),r.jsx("p",{className:"text-stone-500 font-medium leading-relaxed",children:m.desc})]})})]},m.step))]})]})}),r.jsx("section",{id:"anatomy-of-a-trip",className:"py-24 bg-white border-y border-slate-200/60 overflow-hidden relative",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-6 lg:px-8 relative z-10",children:[r.jsxs("div",{className:"text-center mb-16 md:mb-24",children:[r.jsx("h2",{className:"text-4xl md:text-5xl font-semibold tracking-tight text-slate-900 mb-6",children:"The Anatomy of a Trip"}),r.jsx("p",{className:"text-lg md:text-xl text-slate-500 font-medium max-w-2xl mx-auto",children:"Your Trip Details page is the ultimate command center. From the first idea to the final photo, here is how a trip evolves."})]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[r.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"bg-white rounded-[32px] p-8 border border-stone-200/60 shadow-sm relative overflow-hidden group",children:[r.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-amber-100/50 rounded-full blur-3xl -mr-10 -mt-10 transition-all group-hover:bg-amber-200/40"}),r.jsx("div",{className:"w-12 h-12 bg-stone-50 rounded-2xl flex items-center justify-center shadow-sm mb-6 relative z-10",children:r.jsx(kc,{className:"w-6 h-6 text-amber-700"})}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight text-stone-900 mb-4 relative z-10",children:"Before The Trip"}),r.jsxs("ul",{className:"space-y-4 relative z-10",children:[r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"mt-1 w-5 h-5 rounded-full bg-amber-50 flex items-center justify-center shrink-0",children:r.jsx(ht,{className:"w-3 h-3 text-amber-700"})}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{className:"text-stone-900",children:"Itinerary Building:"})," Map out the route with interactive maps and stops."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"mt-1 w-5 h-5 rounded-full bg-amber-50 flex items-center justify-center shrink-0",children:r.jsx(ht,{className:"w-3 h-3 text-amber-700"})}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{className:"text-stone-900",children:"AI Gear Planner:"})," Generate the perfect packing list instantly."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"mt-1 w-5 h-5 rounded-full bg-amber-50 flex items-center justify-center shrink-0",children:r.jsx(ht,{className:"w-3 h-3 text-amber-700"})}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{className:"text-stone-900",children:"RSVPs & Crew:"})," See who's coming, who's maybe, and who can't make it."]})]})]})]}),r.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1},className:"bg-emerald-700 rounded-[32px] p-8 border border-emerald-600 shadow-xl shadow-emerald-700/20 relative overflow-hidden group text-white transform lg:-translate-y-4",children:[r.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-white/10 rounded-full blur-3xl -mr-10 -mt-10 transition-all group-hover:bg-white/20"}),r.jsx("div",{className:"w-12 h-12 bg-white/20 backdrop-blur-md border border-white/20 rounded-2xl flex items-center justify-center shadow-sm mb-6 relative z-10",children:r.jsx(Cf,{className:"w-6 h-6 text-white"})}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight mb-4 relative z-10",children:"During The Adventure"}),r.jsxs("ul",{className:"space-y-4 relative z-10",children:[r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"mt-1 w-5 h-5 rounded-full bg-white/20 flex items-center justify-center shrink-0",children:r.jsx(ht,{className:"w-3 h-3 text-white"})}),r.jsxs("span",{className:"text-emerald-50 font-medium",children:[r.jsx("strong",{className:"text-white",children:"Live Coordination:"})," Use the dedicated trip chat for on-the-fly updates."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"mt-1 w-5 h-5 rounded-full bg-white/20 flex items-center justify-center shrink-0",children:r.jsx(ht,{className:"w-3 h-3 text-white"})}),r.jsxs("span",{className:"text-emerald-50 font-medium",children:[r.jsx("strong",{className:"text-white",children:"Location Sharing:"})," Drop your live coordinates directly into the chat."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"mt-1 w-5 h-5 rounded-full bg-white/20 flex items-center justify-center shrink-0",children:r.jsx(ht,{className:"w-3 h-3 text-white"})}),r.jsxs("span",{className:"text-emerald-50 font-medium",children:[r.jsx("strong",{className:"text-white",children:"Activity Feed:"})," Keep track of everything happening in real time."]})]})]})]}),r.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.2},className:"bg-white rounded-[32px] p-8 border border-stone-200/60 shadow-sm relative overflow-hidden group",children:[r.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-stone-200/40 rounded-full blur-3xl -mr-10 -mt-10 transition-all group-hover:bg-stone-300/50"}),r.jsx("div",{className:"w-12 h-12 bg-stone-50 rounded-2xl flex items-center justify-center shadow-sm mb-6 relative z-10",children:r.jsx(da,{className:"w-6 h-6 text-stone-600"})}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight text-stone-900 mb
815-4 relative z-10",children:"After It Ends"}),r.jsxs("ul",{className:"space-y-4 relative z-10",children:[r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"mt-1 w-5 h-5 rounded-full bg-stone-100 flex items-center justify-center shrink-0",children:r.jsx(ht,{className:"w-3 h-3 text-stone-600"})}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{className:"text-stone-900",children:"Safety First:"}),` The "I'm Home" button makes sure everyone returns safely.`]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"mt-1 w-5 h-5 rounded-full bg-stone-100 flex items-center justify-center shrink-0",children:r.jsx(ht,{className:"w-3 h-3 text-stone-600"})}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{className:"text-stone-900",children:"Memories Tab:"})," A permanent gallery containing all media shared during the trip."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"mt-1 w-5 h-5 rounded-full bg-stone-100 flex items-center justify-center shrink-0",children:r.jsx(ht,{className:"w-3 h-3 text-stone-600"})}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{className:"text-stone-900",children:"Forever Archived:"})," Relive the itinerary, gear lists, and chats anytime."]})]})]})]})]})]})}),r.jsxs("section",{id:"community-free",className:"py-24 bg-gradient-to-br from-emerald-50/50 to-stone-100/50 border-y border-stone-200 overflow-hidden relative",children:[r.jsx("div",{className:"absolute inset-0 bg-[url('https://images.unsplash.com/photo-1516939884455-1445c8652f83?q=80&w=2000&auto=format&fit=crop')] bg-cover bg-center opacity-5 mix-blend-overlay"}),r.jsx("div",{className:"max-w-6xl mx-auto px-6 lg:px-8 relative z-10",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-center",children:[r.jsxs(re.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"text-left",children:[r.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-amber-100 text-amber-800 font-semibold text-sm mb-6",children:[r.jsx(Hy,{className:"w-4 h-4"}),r.jsx("span",{children:"For Outdoor Communities"})]}),r.jsxs("h2",{className:"text-4xl md:text-5xl font-semibold tracking-tight text-stone-900 mb-6 leading-tight",children:["Your own branded app. ",r.jsx("br",{}),r.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-emerald-700 to-emerald-500",children:"Zero cost to you."})]}),r.jsxs("p",{className:"text-lg text-stone-600 font-medium mb-6 leading-relaxed",children:["We believe the outdoors should be accessible. If you run an outdoor community, club, or organization, we will set up and host this entire platform for youâcompletely ",r.jsx("strong",{className:"text-stone-900",children:"FOR FREE"}),"."]}),r.jsxs("ul",{className:"space-y-4 mb-8",children:[r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"w-6 h-6 rounded-full bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0 mt-0.5",children:r.jsx(ht,{className:"w-4 h-4"})}),r.jsxs("span",{className:"text-stone-700 font-medium",children:[r.jsx("strong",{children:"We do the heavy lifting:"})," We'll set up your environment and get everything ready."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"w-6 h-6 rounded-full bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0 mt-0.5",children:r.jsx(ht,{className:"w-4 h-4"})}),r.jsxs("span",{className:"text-stone-700 font-medium",children:[r.jsx("strong",{children:"Your brand, your rules:"})," Customized experience for your members."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"w-6 h-6 rounded-full bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0 mt-0.5",children:r.jsx(ht,{className:"w-4 h-4"})}),r.jsxs("span",{className:"text-stone-700 font-medium",children:[r.jsx("strong",{children:"A few simple requirements:"})," Just a quick chat to verify your community size and needs, and you're good to go."]})]})]}),r.jsxs("button",{onClick:h,className:"inline-flex items-center justify-center gap-2 bg-emerald-700 hover:bg-emerald-800 text-white px-8 py-4 rounded-full font-semibold tracking-tight text-lg transition-all active:scale-95 shadow-lg shadow-emerald-700/20",children:["Claim Your Free App ",r.jsx(wa,{className:"w-5 h-5"})]})]}),r.jsx(re.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"relative",children:r.jsxs("div",{className:"relative w-full aspect-square max-w-[500px] mx-auto",children:[r.jsx("div",{className:"absolute inset-0 bg-gradient-to-tr from-emerald-400 to-amber-400 rounded-full opacity-20 blur-3xl animate-pulse"}),r.jsxs("div",{className:"relative h-full bg-white rounded-[40px] border border-white shadow-2xl p-8 flex flex-col justify-center items-center text-center overflow-hidden",children:[r.jsx("div",{className:"absolute top-0 right-0 -mr-16 -mt-16 w-64 h-64 bg-emerald-50 rounded-full blur-3xl"}),r.jsx("div",{className:"absolute bottom-0 left-0 -ml-16 -mb-16 w-64 h-64 bg-amber-50 rounded-full blur-3xl"}),r.jsxs("div",{className:"relative z-10 flex flex-col items-center",children:[r.jsx("div",{className:"flex -sp
815ace-x-4 justify-center mb-8",children:[1,2,3,4,5].map(m=>r.jsx("div",{className:"w-20 h-20 rounded-full border-4 border-white bg-stone-200 shadow-md overflow-hidden hover:scale-110 transition-transform",children:r.jsx("img",{src:`https://api.dicebear.com/7.x/avataaars/svg?seed=community${m}`,alt:"Avatar",className:"w-full h-full object-cover"})},m))}),r.jsx("h3",{className:"text-2xl font-bold text-stone-900 mb-3",children:"Build Your Community"}),r.jsx("p",{className:"text-stone-500 font-medium mb-8",children:"Stop juggling apps. Give your members a single home for all their adventures."}),r.jsx("div",{className:"inline-block bg-amber-100 text-amber-800 font-bold px-6 py-3 rounded-full tracking-widest uppercase border border-amber-200 shadow-sm",children:"100% Free Forever"})]})]})]})})]})})]}),r.jsx("section",{className:"py-24 md:py-32 px-6 lg:px-8",children:r.jsxs(re.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},viewport:{once:!0},className:"max-w-5xl mx-auto text-center bg-stone-900 rounded-[48px] p-8 md:p-20 text-white relative overflow-hidden shadow-2xl shadow-stone-900/30",children:[r.jsx("div",{className:"absolute top-0 right-0 p-12 opacity-5 pointer-events-none hidden md:block",children:r.jsx(kc,{className:"w-96 h-96 -mt-32 -mr-32"})}),r.jsx("div",{className:"absolute bottom-0 left-0 p-12 opacity-5 pointer-events-none hidden md:block",children:r.jsx(da,{className:"w-64 h-64 -mb-20 -ml-20"})}),r.jsxs("h2",{className:"text-4xl md:text-6xl font-semibold tracking-tight mb-6 relative z-10 leading-tight",children:["Ready for your ",r.jsx("br",{className:"hidden md:block"})," next adventure?"]}),r.jsx("p",{className:"text-stone-400 font-medium text-lg md:text-xl mb-12 max-w-2xl mx-auto relative z-10 leading-relaxed",children:"Join thousands of outdoor enthusiasts. Start planning, and make your outdoor trips seamless and unforgettable."}),r.jsxs("button",{onClick:h,className:"inline-flex items-center justify-center gap-3 bg-emerald-600 text-white hover:bg-emerald-500 hover:scale-105 px-8 md:px-10 py-4 md:py-5 rounded-full font-semibold tracking-tight text-lg transition-all relative z-10 shadow-xl shadow-emerald-900/50",children:["Start Planning For Free ",r.jsx(wa,{className:"w-5 h-5"})]})]})}),r.jsx("footer",{className:"bg-white border-t border-stone-200/60 pt-16 pb-8 px-6 lg:px-8",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex flex-col md:flex-row justify-between items-center gap-6",children:[r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx(Or,{className:"w-8 h-8",color:"#1c1917"}),r.jsx("span",{className:"font-semibold tracking-tight text-lg text-stone-900",children:"WeAllCamp"})]}),r.jsx("button",{onClick:()=>t(!0),className:"text-sm font-semibold tracking-tight text-stone-500 hover:text-stone-900 transition-colors bg-stone-100 px-4 py-2 rounded-full border border-stone-200",children:"How to install on mobile"}),r.jsxs("div",{className:"text-stone-400 text-sm font-medium",children:["© ",new Date().getFullYear()," WeAllCamp. Built for the outdoors."]})]})}),r.jsx($i,{open:n,onOpenChange:s,children:r.jsxs(ci,{className:"sm:max-w-[700px] p-0 overflow-hidden bg-white border-none shadow-2xl rounded-[32px]",children:[r.jsx("div",{className:"bg-stone-900 p-8 text-white relative overflow-hidden",children:r.jsxs(di,{className:"relative z-10",children:[r.jsx(ui,{className:"text-3xl font-semibold tracking-tight mb-2",children:"Platform Features"}),r.jsx(Vu,{className:"text-stone-300 text-base",children:"Everything you need to plan, coordinate, and execute the perfect trip."})]})}),r.jsxs("div",{className:"p-8 bg-white max-h-[70vh] overflow-y-auto",children:[r.jsxs("div",{className:"space-y-8",children:[r.jsxs("div",{children:[r.jsxs("h3",{className:"text-xl font-semibold tracking-tight text-stone-900 mb-4 flex items-center gap-2",children:[r.jsx(Zs,{className:"w-5 h-5 text-emerald-600"})," Trip & Itinerary Planning"]}),r.jsxs("ul",{className:"space-y-3",children:[r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-amber-500 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"Interactive Maps:"})," Add stops, trailheads, and campsites with GPS coordinates."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-amber-500 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"Drag-and-Drop:"})," Easily reorder your daily itinerary."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-amber-500 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"Custom Templates:"})," Quick start with templates for Camping, Overlanding, etc."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-amber-500 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"Privacy Controls:"})," Make trips public for the community or private for just your crew."]})]})]})]}),r.jsxs("div",{children:[r.jsxs("h3",{className:"text-xl font-semibold tracking-tight text-stone-900 mb
815-4 flex items-center gap-2",children:[r.jsx(ri,{className:"w-5 h-5 text-amber-600"})," Gear & Inventory"]}),r.jsxs("ul",{className:"space-y-3",children:[r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-emerald-600 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"Group Gear Lists:"})," Add items needed and let members claim what they are bringing."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-emerald-600 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"My Gear:"})," A dedicated personal checklist to manage your own items across all trips."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-emerald-600 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"AI Gear Planner:"})," Automatically generate comprehensive gear and food lists tailored to your specific trip type."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-emerald-600 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"Categorization:"})," Sort gear by Shelter, Cooking, Safety, Navigation, and more."]})]})]})]}),r.jsxs("div",{children:[r.jsxs("h3",{className:"text-xl font-semibold tracking-tight text-stone-900 mb-4 flex items-center gap-2",children:[r.jsx(Vg,{className:"w-5 h-5 text-amber-500"})," Communication"]}),r.jsxs("ul",{className:"space-y-3",children:[r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-amber-500 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"Real-time Group Chat:"})," Dedicated chat room for every trip."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-amber-500 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"Rich Media:"})," Send photos, voice notes, and share your live location in chat."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-amber-500 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"Direct Messaging:"})," Private 1-on-1 conversations with other members."]})]})]})]}),r.jsxs("div",{children:[r.jsxs("h3",{className:"text-xl font-semibold tracking-tight text-stone-900 mb-4 flex items-center gap-2",children:[r.jsx(ws,{className:"w-5 h-5 text-emerald-500"})," Safety & Community"]}),r.jsxs("ul",{className:"space-y-3",children:[r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-emerald-600 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"I'm Home Check-in:"})," Post-trip safety feature to ensure everyone makes it back."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-emerald-600 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"Explore Feed:"})," Discover public trips, view community posts, like, and comment."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-emerald-600 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"Activity Feed:"})," See a complete timeline of everything happening in your trip."]})]}),r.jsxs("li",{className:"flex items-start gap-3",children:[r.jsx(ht,{className:"w-5 h-5 text-emerald-600 shrink-0"}),r.jsxs("span",{className:"text-stone-600 font-medium",children:[r.jsx("strong",{children:"Push Notifications:"})," Stay updated on important trip changes and messages."]})]})]})]})]}),r.jsx("div",{className:"mt-10 flex justify-end",children:r.jsx(_t,{onClick:()=>s(!1),className:"rounded-full px-8 bg-stone-900 hover:bg-stone-800 text-white font-semibold h-10",children:"Close"})})]})]})}),r.jsx($i,{open:e,onOpenChange:t,children:r.jsxs(ci,{className:"sm:max-w-[700px] p-0 overflow-hidden bg-white border-none shadow-2xl rounded-[32px]",children:[r.jsx("div",{className:"bg-stone-900 p-8 text-white relative overflow-hidden",children:r.jsxs(di,{className:"relative z-10",children:[r.jsx(ui,{className:"text-3xl font-semibold tracking-tight mb-2",children:"Install WeAllCamp"}),r.jsx(Vu,{className:"text-stone-300 text-base",children:"Get the app on your mobile device for quick access."})]})}),r.jsxs("div",{className:"p-8 bg-white max-h-[70vh] overflow-y-auto",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[r.jsxs("div",{className:"space-y-4",children:[r.jsx("h3",{className:"text-xl font-semibold tracking-tight text-stone-900",children:"Apple (iOS)"}),r.jsx("div",{className:"bg-stone-50 rounded-2xl overflow-hidden border border-stone-100 aspect-square flex items-center justify-center",children:r.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/69b0acbeed53c67ca62169c9/2cc33cdc3_generated_image.png",alt:"iOS Install Tutorial",className:"w-full h-full object-cover"})}),r.jsxs("ol",{className:"list-decimal list-inside text-stone-600 font-medium space-y-2 pl-2 text-sm",children:[r.jsx("li",{children:"Open Safari and navigate to WeAllCamp."}),r.jsxs("li",{children:["Tap the ",r.jsx("strong",{children:"Share"})," icon at the bottom."]}),r.jsxs("li",{children:["Scroll down and tap ",r.jsx("strong",{children:"Add to Home Screen"}),"."]})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsx("h3",{className:"text-xl font-semibold tracking-tight text-stone-900",children:"Android"}),r.jsx("div",{className:"bg-stone-50 rounded-2xl overflow-hidden border border-stone-100 aspect-square flex items-center justify-center",children:r.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/69b0acbeed53c67ca62169c9/e34f35bcd_generated_image.png",alt:"Android Install Tutorial",className:"w-full h-full object-cover"})}),r.jsxs("ol",{className:"list-decimal list-inside text-stone-600 font-medium space-y-2 pl-2 text-sm",children:[r.jsx("li",{children:"Open Chrome and navigate to WeAllCamp."}),r.jsxs("li",{children:["Tap the ",r.jsx("strong",{children:"Menu"})," (three dots) at the top right."]}),r.jsxs("li",{children:["Tap ",r.jsx("strong",{children:"Add to Home screen"})," or ",r.jsx("strong",{children:"Install app"}),"."]})]})]})]}),r.jsx("div",{className:"mt-8 flex justify-end",children:r.jsx(_t,{onClick:()=>t(!1),className:"rounded-full px-8 bg-stone-900 hover:bg-stone-800 text-white font-semibold h-10",children:"Got it!"})})]})]})})]})}
815const ehe=()=>r.jsxs("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),r.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),r.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),r.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),iu=[{text:"WeAllCamp completely changed how we organize our weekend getaways. No more messy spreadsheets or lost packing lists!",author:"Sarah J.",role:"Outdoor Enthusiast"},{text:"The gear coordination alone is a lifesaver. Everyone knows exactly what to bring and who's bringing what.",author:"Mike T.",role:"Trip Leader"},{text:"Beautiful interface and so easy to use. Planning a group trip is actually fun now instead of a chore.",author:"Emily R.",role:"Trail Guide"}],ow=({id:e,type:t="text",label:n,value:s,onChange:i,icon:a,rightElement:l,disabled:u})=>{const[h,m]=w.useState(!1),g=h||s.length>0;return r.jsxs("div",{className:`relative flex items-center bg-white border rounded-2xl transition-all duration-300 ${h?"border-emerald-500 shadow-[0_0_0_4px_rgba(16,185,129,0.1)]":"border-stone-200 hover:border-stone-300 shadow-sm"}`,children:[r.jsx("div",{className:`pl-4 pr-2 transition-colors duration-300 ${h?"text-emerald-600":"text-stone-400"}`,children:r.jsx(a,{className:"w-5 h-5"})}),r.jsxs("div",{className:"relative flex-1 py-1.5",children:[r.jsx("label",{htmlFor:e,className:`absolute left-0 transition-all duration-300 pointer-events-none ${g?"top-1 text-[11px] text-stone-500 font-semibold uppercase tracking-wider":"top-3.5 text-[15px] text-stone-400 font-medium"}`,children:n}),r.jsx("input",{id:e,type:t,value:s,onChange:i,disabled:u,required:!0,onFocus:()=>m(!0),onBlur:()=>m(!1),className:"w-full bg-transparent border-none outline-none text-[15px] font-medium text-stone-900 transition-all duration-300 pt-5 pb-1 disabled:opacity-50"})]}),l&&r.jsx("div",{className:"pr-2",children:l})]})};function tI(){const[e,t]=w.useState("login"),[n,s]=w.useState(""),[i,a]=w.useState(""),[l,u]=w.useState(""),[h,m]=w.useState(!1),[g,x]=w.useState(!1),[v,_]=w.useState(!1),[N,S]=w.useState(""),[j,P]=w.useState(""),[E,R]=w.useState(0),B=new URLSearchParams(window.location.search).get("next")||"/Home",I=(()=>{try{return decodeURIComponent(B)}catch{return"/Home"}})(),z=e==="login";w.useEffect(()=>{const Y=setInterval(()=>{R(ce=>(ce+1)%iu.length)},5e3);return()=>clearInterval(Y)},[]);const V=async()=>{_(!0),S("");try{await ne.auth.loginWithProvider("google",I)}catch{S("Google sign-in failed. Please try again."),_(!1)}},te=async Y=>{Y.preventDefault(),x(!0),S(""),P("");try{z?(await ne.auth.login({email:n,password:i}),window.location.href=I):(await ne.auth.signUp({email:n,password:i,full_name:l}),P("Account created! Check your email to verify, then sign in."),t("login"),s(""),a(""),u(""))}catch(ce){S((ce==null?void 0:ce.message)||(z?"Invalid email or password.":"Sign up failed. Try again."))}finally{x(!1)}},H=()=>{t(Y=>Y==="login"?"signup":"login"),S(""),P(""),s(""),a(""),u("")};return r.jsxs("div",{className:"min-h-screen w-full flex overflow-hidden bg-[#fafbf9]",style:{fontFamily:'"Inter", sans-serif'},children:[r.jsxs("div",{className:"hidden lg:flex flex-col relative w-[45%] xl:w-[50%] bg-stone-900 overflow-hidden",children:[r.jsx("img",{src:"https://images.unsplash.com/photo-1523987355523-c7b5b0dd90a7?auto=format&fit=crop&w=1600&q=80",alt:"Camping under stars",className:"absolute inset-0 w-full h-full object-cover opacity-80"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-stone-900/60 via-stone-900/20 to-stone-900/90"}),r.jsxs("div",{className:"relative z-10 flex flex-col h-full p-12",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-11 h-11 bg-white/20 backdrop-blur-xl rounded-2xl flex items-center justify-center border border-white/30 shadow-lg",children:r.jsx(Or,{className:"w-6 h-6",color:"#ffffff"})}),r.jsx("span",{className:"font-bold text-white text-2xl tracking-tight",children:"WeAllCamp"})]}),r.jsxs("a",{href:"/",className:"flex items-center gap-2 text-white/70 hover:text-white transition-colors text-sm font-semibold group bg-white/10 px-5 py-2.5 rounded-full backdrop-blur-md border border-white/10 hover:bg-white/20",children:[r.jsx(oS,{className:"w-4 h-4 group-hover:-translate-x-1 transition-transform"}),"Back to site"]})]}),r.jsx("div",{className:"mt-auto",children:r.jsxs("div",{className:"bg-white/10 backdrop-blur-md border border-white/20 rounded-[2rem] p-8 max-w-lg shadow-2xl",children:[r.jsx(l5,{className:"w-8 h-8 text-emerald-400 mb-6 opacity-80"}),r.jsx(Lt,{mode:"wait",children:r.jsxs(re.div,{initial:{opacity:0,y:10}
815,animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.5},children:[r.jsxs("p",{className:"text-xl text-white font-medium leading-relaxed mb-8",children:['"',iu[E].text,'"']}),r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("div",{className:"w-12 h-12 rounded-full bg-emerald-500/20 border border-emerald-500/30 flex items-center justify-center text-emerald-300 font-bold text-lg shadow-inner",children:iu[E].author.charAt(0)}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-semibold text-lg",children:iu[E].author}),r.jsx("div",{className:"text-emerald-300/80 text-sm font-medium",children:iu[E].role})]})]})]},E)}),r.jsx("div",{className:"flex items-center gap-2 mt-8",children:iu.map((Y,ce)=>r.jsx("button",{onClick:()=>R(ce),className:`h-1.5 rounded-full transition-all duration-500 ${ce===E?"w-8 bg-emerald-400":"w-2 bg-white/30 hover:bg-white/50"}`},ce))})]})})]})]}),r.jsxs("div",{className:"flex-1 flex flex-col relative overflow-y-auto",children:[r.jsxs("div",{className:"lg:hidden absolute top-0 left-0 right-0 h-72 overflow-hidden",children:[r.jsx("img",{src:"https://images.unsplash.com/photo-1523987355523-c7b5b0dd90a7?auto=format&fit=crop&w=800&q=80",alt:"Camping",className:"w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-stone-900/70 via-stone-900/40 to-[#fafbf9]"})]}),r.jsxs("div",{className:"relative z-10 flex-1 flex flex-col items-center justify-center p-6 sm:p-12 w-full mt-12 lg:mt-0",children:[r.jsxs("div",{className:"lg:hidden w-full max-w-[420px] flex items-center justify-between mb-8 text-white",children:[r.jsxs("a",{href:"/",className:"flex items-center gap-1 text-white/80 hover:text-white transition-colors text-sm font-semibold bg-white/10 px-3 py-1.5 rounded-full backdrop-blur-md border border-white/20",children:[r.jsx(oS,{className:"w-4 h-4"}),"Back"]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-8 h-8 bg-white/20 backdrop-blur-md rounded-lg flex items-center justify-center border border-white/20 shadow-sm",children:r.jsx(Or,{className:"w-5 h-5",color:"#ffffff"})}),r.jsx("span",{className:"font-bold tracking-tight text-lg",children:"WeAllCamp"})]})]}),r.jsxs("div",{className:"w-full max-w-[420px] bg-white lg:bg-transparent p-8 lg:p-0 rounded-[2rem] shadow-2xl shadow-stone-200/50 lg:shadow-none border border-stone-100 lg:border-none relative z-20",children:[r.jsx(Lt,{mode:"wait",children:r.jsxs(re.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3},className:"mb-8",children:[r.jsx("h2",{className:"text-3xl sm:text-4xl font-bold tracking-tight text-stone-900 mb-3",children:z?"Welcome back":"Create an account"}),r.jsxs("p",{className:"text-stone-500 font-medium text-base",children:[z?"New to WeAllCamp? ":"Already have an account? ",r.jsx("button",{onClick:H,className:"text-emerald-600 font-semibold hover:text-emerald-700 transition-colors",children:z?"Sign up for free":"Sign in"})]})]},e+"-header")}),r.jsxs("button",{onClick:V,disabled:v||g,className:"w-full flex items-center justify-center gap-3 bg-white border-2 border-stone-100 hover:bg-stone-50 hover:border-stone-200 text-stone-800 font-semibold text-base py-3.5 rounded-2xl transition-all active:scale-[0.98] shadow-sm disabled:opacity-60 disabled:cursor-not-allowed mb-6 group",children:[v?r.jsx("div",{className:"w-5 h-5 border-2 border-stone-300 border-t-stone-600 rounded-full animate-spin"}):r.jsx(ehe,{}),v?"Connecting to Googleâ¦":"Continue with Google"]}),r.jsxs("div",{className:"flex items-center gap-4 mb-6 opacity-70",children:[r.jsx("div",{className:"flex-1 h-px bg-stone-200"}),r.jsx("span",{className:"text-[11px] font-bold text-stone-400 uppercase tracking-widest",children:"or continue with email"}),r.jsx("div",{className:"flex-1 h-px bg-stone-200"})]}),r.jsx(Lt,{mode:"wait",children:r.jsxs(re.form,{initial:{opacity:0,x:z?-20:20},animate:{opacity:1,x:0},exit:{opacity:0},transition:{duration:.3},onSubmit:te,className:"space-y-4",children:[r.jsx(Lt,{children:!z&&r.jsx(re.div,{initial:{opacity:0,height:0,marginBottom:0}
815,animate:{opacity:1,height:"auto",marginBottom:16},exit:{opacity:0,height:0,marginBottom:0},transition:{duration:.3},className:"overflow-hidden",children:r.jsx(ow,{id:"name",label:"Full Name",value:l,onChange:Y=>u(Y.target.value),icon:rd,disabled:g})})}),r.jsx(ow,{id:"email",type:"email",label:"Email Address",value:n,onChange:Y=>s(Y.target.value),icon:nx,disabled:g}),r.jsx(ow,{id:"password",type:h?"text":"password",label:"Password",value:i,onChange:Y=>a(Y.target.value),icon:i5,disabled:g,rightElement:r.jsx("button",{type:"button",tabIndex:-1,onClick:()=>m(Y=>!Y),className:"p-2 text-stone-400 hover:text-stone-600 transition-colors rounded-xl hover:bg-stone-100",children:h?r.jsx(t6,{className:"w-5 h-5"}):r.jsx(V1,{className:"w-5 h-5"})})}),r.jsxs(Lt,{children:[N&&r.jsx(re.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden",children:r.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm font-medium px-4 py-3 rounded-xl mt-2",children:N})}),j&&r.jsx(re.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden",children:r.jsxs("div",{className:"flex items-start gap-3 bg-emerald-50 border border-emerald-200 text-emerald-800 text-sm font-medium px-4 py-3 rounded-xl mt-2",children:[r.jsx(ht,{className:"w-5 h-5 text-emerald-500 shrink-0 mt-0.5"}),r.jsx("p",{children:j})]})})]}),r.jsx("button",{type:"submit",disabled:g||v,className:"w-full bg-emerald-600 hover:bg-emerald-700 disabled:bg-stone-300 disabled:text-stone-500 text-white font-bold text-base py-4 rounded-2xl transition-all active:scale-[0.98] shadow-lg shadow-emerald-600/20 flex items-center justify-center gap-2 mt-6",children:g?r.jsx("div",{className:"w-5 h-5 border-2 border-white/40 border-t-white rounded-full animate-spin"}):r.jsxs(r.Fragment,{children:[z?"Sign In":"Create Account",r.jsx(wa,{className:"w-5 h-5"})]})})]},e+"-form")}),r.jsxs("p",{className:"text-center text-[13px] text-stone-400 font-medium mt-8 leading-relaxed max-w-xs mx-auto",children:["By continuing, you agree to our"," ",r.jsx("a",{href:"/",className:"underline hover:text-stone-700 transition-colors",children:"Terms of Service"})," and"," ",r.jsx("a",{href:"/",className:"underline hover:text-stone-700 transition-colors",children:"Privacy Policy"}),"."]})]})]})]})]})}function the(){const e=rh(),t=Kn(),s=new URLSearchParams(e.search).get("id"),{data:i}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),{data:a,isLoading:l}=Re({queryKey:["post",s],queryFn:async()=>s?await ne.entities.FeedPost.get(s):null,enabled:!!s}),{data:u=[]}=Re({queryKey:["post-likes",s],queryFn:()=>ne.entities.PostLike.filter({post_id:s}),enabled:!!s});if(l)return r.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:r.jsx(gt,{className:"w-8 h-8 animate-spin text-slate-400"})});if(!a)return r.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[50vh]",children:[r.jsx("p",{className:"text-slate-500 mb-4",children:"Post not found"}),r.jsx("button",{onClick:()=>t(-1),className:"text-blue-600 hover:underline",children:"Go back"})]});const h=i?u.some(m=>m.user_email===i.email):!1;return r.jsxs("div",{className:"w-full max-w-5xl mx-auto pt-4 pb-20 md:pb-8 px-4",children:[r.jsxs("button",{onClick:()=>t(-1),className:"flex items-center gap-2 text-slate-600 hover:text-slate-900 mb-6 transition-colors",children:[r.jsx(gr,{className:"w-5 h-5"}),r.jsx("span",{className:"font-medium",children:"Back"})]}),r.jsx(v3,{post:a,user:i,isLiked:h,likesCount:a.likes_count||0,postLikes:u,forceOpenComments:!0,desktopSplit:!0})]})}function nhe(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Array(12).fill(0);let F1=1;class she{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>
vendor: 3,675 bytes, line 815
815{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:s,...i}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:F1++,l=this.toasts.find(h=>h.id===a),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),l?this.toasts=this.toasts.map(h=>h.id===a?(this.publish({...h,...t,id:a,title:s}),{...h,...t,id:a,dismissible:u,title:s}):h):this.addToast({title:s,...i,dismissible:u,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(s=>s({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let s;n.loading!==void 0&&(s=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let a=s!==void 0,l;const u=i.then(async m=>{if(l=["resolve",m],dt.isValidElement(m))a=!1,this.create({id:s,type:"default",message:m});else if(ihe(m)&&!m.ok){a=!1;const x=typeof n.error=="function"?await n.error(`HTTP error! status: ${m.status}`):n.error,v=typeof n.description=="function"?await n.description(`HTTP error! status: ${m.status}`):n.description,N=typeof x=="object"&&!dt.isValidElement(x)?x:{message:x};this.create({id:s,type:"error",description:v,...N})}else if(m instanceof Error){a=!1;const x=typeof n.error=="function"?await n.error(m):n.error,v=typeof n.description=="function"?await n.description(m):n.description,N=typeof x=="object"&&!dt.isValidElement(x)?x:{message:x};this.create({id:s,type:"error",description:v,...N})}else if(n.success!==void 0){a=!1;const x=typeof n.success=="function"?await n.success(m):n.success,v=typeof n.description=="function"?await n.description(m):n.description,N=typeof x=="object"&&!dt.isValidElement(x)?x:{message:x};this.create({id:s,type:"success",description:v,...N})}}).catch(async m=>{if(l=["reject",m],n.error!==void 0){a=!1;const g=typeof n.error=="function"?await n.error(m):n.error,x=typeof n.description=="function"?await n.description(m):n.description,_=typeof g=="object"&&!dt.isValidElement(g)?g:{message:g};this.create({id:s,type:"error",description:x,..._})}}).finally(()=>{a&&(this.dismiss(s),s=void 0),n.finally==null||n.finally.call(n)}),h=()=>new Promise((m,g)=>u.then(()=>l[0]==="reject"?g(l[1]):m(l[1])).catch(g));return typeof s!="string"&&typeof s!="number"?{unwrap:h}:Object.assign(s,{unwrap:h})},this.custom=(t,n)=>{const s=(n==null?void 0:n.id)||F1++;return this.create({jsx:t(s),id:s,...n}),s},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Jr=new she,rhe=(e,t)=>{const n=(t==null?void 0:t.id)||F1++;return Jr.addToast({title:e,...t,id:n}),n},ihe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ahe=rhe,ohe=()=>Jr.toasts,lhe=()=>Jr.getActiveToasts(),Bg=Object.assign(ahe,{success:Jr.success,info:Jr.info,warning:Jr.warning,error:Jr.error,custom:Jr.custom,message:Jr.message,promise:Jr.promise,dismiss:Jr.dismiss,loading:Jr.loading},{getHistory:ohe,getToasts:lhe});nh
vendor: 4,788 bytes, line 815
815e("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);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;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
vendor: 10,077 bytes, line 815
815left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
815var mj={};(function e(t,n,s,i){var a=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),l=typeof Path2D=="function"&&typeof DOMMatrix=="function",u=(function(){if(!t.OffscreenCanvas)return!1;try{var D=new OffscreenCanvas(1,1),O=D.getContext("2d");O.fillRect(0,0,1,1);var U=D.transferToImageBitmap();O.createPattern(U,"no-repeat")}catch{return!1}return!0})();function h(){}function m(D){var O=n.exports.Promise,U=O!==void 0?O:t.Promise;return typeof U=="function"?new U(D):(D(h,h),null)}
vendor: 8,826 bytes, lines 815-816
815var g=(function(D,O){return{transform:function(U){if(D)return U;if(O.has(U))return O.get(U);var ie=new OffscreenCanvas(U.width,U.height),le=ie.getContext("2d");return le.drawImage(U,0,0),O.set(U,ie),ie},clear:function(){O.clear()}}})(u,new Map),x=(function(){var D=Math.floor(16.666666666666668),O,U,ie={},le=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(O=function(fe){var me=Math.random();return ie[me]=requestAnimationFrame(function oe(Q){le===Q||le+D-1<Q?(le=Q,delete ie[me],fe()):ie[me]=requestAnimationFrame(oe)}),me},U=function(fe){ie[fe]&&cancelAnimationFrame(ie[fe])}):(O=function(fe){return setTimeout(fe,D)},U=function(fe){return clearTimeout(fe)}),{frame:O,cancel:U}})(),v=(function(){var D,O,U={};function ie(le){function fe(me,oe){le.postMessage({options:me||{},callback:oe})}le.init=function(oe){var Q=oe.transferControlToOffscreen();le.postMessage({canvas:Q},[Q])},le.fire=function(oe,Q,Ne){if(O)return fe(oe,null),O;var Ce=Math.random().toString(36).slice(2);return O=m(function(De){function Te(We){We.data.callback===Ce&&(delete U[Ce],le.removeEventListener("message",Te),O=null,g.clear(),Ne(),De())}le.addEventListener("message",Te),fe(oe,Ce),U[Ce]=Te.bind(null,{data:{callback:Ce}})}),O},le.reset=function(){le.postMessage({reset:!0});for(var oe in U)U[oe](),delete U[oe]}}return function(){if(D)return D;if(!s&&a){var le=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(` 816`);try{D=new Worker(URL.createObjectURL(new Blob([le])))}catch(fe){return typeof console<"u"&&typeof console.warn=="function"&&console.warn("ð Could not load worker",fe),null}ie(D)}return D}})(),_={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function N(D,O){return O?O(D):D}function S(D){return D!=null}function j(D,O,U){return N(D&&S(D[O])?D[O]:_[O],U)}function P(D){return D<0?0:Math.floor(D)}function E(D,O){return Math.floor(Math.random()*(O-D))+D}function R(D){return parseInt(D,16)}function A(D){return D.map(B)}function B(D){var O=String(D).replace(/[^0-9a-f]/gi,"");return O.length<6&&(O=O[0]+O[0]+O[1]+O[1]+O[2]+O[2]),{r:R(O.substring(0,2)),g:R(O.substring(2,4)),b:R(O.substring(4,6))}}function I(D){var O=j(D,"origin",Object);return O.x=j(O,"x",Number),O.y=j(O,"y",Number),O}function z(D){D.width=document.documentElement.clientWidth,D.height=document.documentElement.clientHeight}function V(D){var O=D.getBoundingClientRect();D.width=O.width,D.height=O.height}function te(D){var O=document.createElement("canvas");return O.style.position="fixed",O.style.top="0px",O.style.left="0px",O.style.pointerEvents="none",O.style.zIndex=D,O}function H(D,O,U,ie,le,fe,me,oe,Q){D.save(),D.translate(O,U),D.rotate(fe),D.scale(ie,le),D.arc(0,0,1,me,oe,Q),D.restore()}function Y(D){var O=D.angle*(Math.PI/180),U=D.spread*(Math.PI/180);return{x:D.x,y:D.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:D.startVelocity*.5+Math.random()*D.startVelocity,angle2D:-O+(.5*U-Math.random()*U),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:D.color,shape:D.shape,tick:0,totalTicks:D.ticks,decay:D.decay,drift:D.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:D.gravity*3,ovalScalar:.6,scalar:D.scalar,flat:D.flat}}function ce(D,O){O.x+=Math.cos(O.angle2D)*O.velocity+O.drift,O.y+=Math.sin(O.angle2D)*O.velocity+O.gravity,O.velocity*=O.decay,O.flat?(O.wobble=0,O.wobbleX=O.x+10*O.scalar,O.wobbleY=O.y+10*O.scalar,O.tiltSin=0,O.tiltCos=0,O.random=1):(O.wobble+=O.wobbleSpeed,O.wobbleX=O.x+10*O.scalar*Math.cos(O.wobble),O.wobbleY=O.y+10*O.scalar*Math.sin(O.wobble),O.tiltAngle+=.1,O.tiltSin=Math.sin(O.tiltAngle),O.tiltCos=Math.cos(O.tiltAngle),O.random=Math.random()+2);var U=O.tick++/O.totalTicks,ie=O.x+O.random*O.tiltCos,le=O.y+O.random*O.tiltSin,fe=O.wobbleX+O.random*O.tiltCos,me=O.wobbleY+O.random*O.tiltSin;if(D.fillStyle="rgba("+O.color.r+", "+O.color.g+", "+O.color.b+", "+(1-U)+")",D.beginPath(),l&&O.shape.type==="path"&&typeof O.shape.path=="string"&&Array.isArray(O.shape.matrix))D.fill(be(O.shape.path,O.shape.matrix,O.x,O.y,Math.abs(fe-ie)*.1,Math.abs(me-le)*.1,Math.PI/10*O.wobble));else if(O.shape.type==="bitmap"){var oe=Math.PI/10*O.wobble,Q=Math.abs(fe-ie)*.1,Ne=Math.abs(me-le)*.1,Ce=O.shape.bitmap.width*O.scalar,De=O.shape.bitmap.height*O.scalar,Te=new DOMMatrix([Math.cos(oe)*Q,Math.sin(oe)*Q,-Math.sin(oe)*Ne,Math.cos(oe)*Ne,O.x,O.y]);Te.multiplySelf(new DOMMatrix(O.shape.matrix));var We=D.createPattern(g.transform(O.shape.bitmap),"no-repeat");We.setTransform(Te),D.globalAlpha=1-U,D.fillStyle=We,D.fillRect(O.x-Ce/2,O.y-De/2,Ce,De),D.globalAlpha=1}else if(O.shape==="circle")D.ellipse?D.ellipse(O.x,O.y,Math.abs(fe-ie)*O.ovalScalar,Math.abs(me-le)*O.ovalScalar,Math.PI/10*O.wobble,0,2*Math.PI):H(D,O.x,O.y,Math.abs(fe-ie)*O.ovalScalar,Math.abs(me-le)*O.ovalScalar,Math.PI/10*O.wobble,0,2*Math.PI);else if(O.shape==="star")for(var $e=Math.PI/2*3,Et=4*O.scalar,Xt=8*O.scalar,Zt=O.x,Pn=O.y,In=5,pn=Math.PI/In;In--;)Zt=O.x+Math.cos($e)*Xt,Pn=O.y+Math.sin($e)*Xt,D.lineTo(Zt,Pn),$e+=pn,Zt=O.x+Math.cos($e)*Et,Pn=O.y+Math.sin($e)*Et,D.lineTo(Zt,Pn),$e+=pn;else D.moveTo(Math.floor(O.x),Math.floor(O.y)),D.lineTo(Math.floor(O.wobbleX),Math.floor(le)),D.lineTo(Math.floor(fe),Math.floor(me)),D.lineTo(Math.floor(ie),Math.floor(O.wobbleY));return D.closePath(),D.fill(),O.tick<O.totalTicks}function K(D,O,U,ie,le){var fe=O.slice(),me=D.getContext("2d"),oe,Q,Ne=m(function(Ce){function De(){oe=Q=null,me.clearRect(0,0,ie.width,ie.height),g.clear(),le(),Ce()}function Te(){s&&!(ie.width===i.width&&ie.height===i.height)&&(ie.width=D.width=i.width,ie.height=D.height=i.height),!ie.width&&!ie.height&&(U(D),ie.width=D.width,ie.height=D.height),me.clearRect(0,0,ie.width,ie.height),fe=fe.filter(function(We){return ce(me,We)}),fe.length?oe=x.frame(Te):De()}oe=x.frame(Te),Q=De});return{addFettis:function(Ce){return fe=fe.concat(Ce),Ne},canvas:D,promise:Ne,reset:function(){oe&&x.cancel(oe),Q&&Q()}}}function q(D,O){var U=!D,ie=!!j(O||{},"resize"),le=!1,fe=j(O,"disableForReducedMotion",Boolean),me=a&&!!j(O||{},"useWorker"),oe=me?v():null,Q=U?z:V,Ne=D&&oe?!!D.__confetti_initialized:!1,Ce=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,De;function Te($e,Et,Xt){for(var Zt=j($e,"particleCount",P),Pn=j($e,"angle",Number),In=j($e,"spread",Number),pn=j($e,"startVelocity",Number),Tn=j($e,"decay",Number),ms=j($e,"gravity",Number),ae=j($e,"drift",Number),Se=j($e,"colors",A),Ve=j($e,"ticks",Number),Nt=j($e,"shapes"),gn=j($e,"scalar"),Mt=!!j($e,"flat"),En=I($e),Rt=Zt,xn=[],Vn=D.width*En.x,Ir=D.height*En.y;Rt--;)xn.push(Y({x:Vn,y:Ir,angle:Pn,spread:In,startVelocity:pn,color:Se[Rt%Se.length],shape:Nt[E(0,Nt.length)],ticks:Ve,decay:Tn,gravity:ms,drift:ae,scalar:gn,flat:Mt}));return De?De.addFettis(xn):(De=K(D,xn,Q,Et,Xt),De.promise)}function We($e){var Et=fe||j($e,"disableForReducedMotion",Boolean),Xt=j($e,"zIndex",Number);if(Et&&Ce)return m(function(pn){pn()});U&&De?D=De.canvas:U&&!D&&(D=te(Xt),document.body.appendChild(D)),ie&&!Ne&&Q(D);var Zt={width:D.width,height:D.height};oe&&!Ne&&oe.init(D),Ne=!0,oe&&(D.__confetti_initialized=!0);function Pn(){if(oe){var pn={getBoundingClientRect:function(){if(!U)return D.getBoundingClientRect()}};Q(pn),oe.postMessage({resize:{width:pn.width,height:pn.height}});return}Zt.width=Zt.height=null}function In(){De=null,ie&&(le=!1,t.removeEventListener("resize",Pn)),U&&D&&(document.body.contains(D)&&document.body.removeChild(D),D=null,Ne=!1)}return ie&&!le&&(le=!0,t.addEventListener("resize",Pn,!1)),oe?oe.fire($e,Zt,In):Te($e,Zt,In)}return We.reset=function(){oe&&oe.reset(),De&&De.reset()},We}var ge;function he(){return ge||(ge=q(null,{useWorker:!0,resize:!0})),ge}function be(D,O,U,ie,le,fe,me){var oe=new Path2D(D),Q=new Path2D;Q.addPath(oe,new DOMMatrix(O));var Ne=new Path2D;return Ne.addPath(Q,new DOMMatrix([Math.cos(me)*le,Math.sin(me)*le,-Math.sin(me)*fe,Math.cos(me)*fe,U,ie])),Ne}function W(D){if(!l)throw new Error("path confetti are not supported in this browser");var O,U;
816typeof D=="string"?O=D:(O=D.path,U=D.matrix);var ie=new Path2D(O),le=document.createElement("canvas"),fe=le.getContext("2d");if(!U){for(var me=1e3,oe=me,Q=me,Ne=0,Ce=0,De,Te,We=0;We<me;We+=2)for(var $e=0;$e<me;$e+=2)fe.isPointInPath(ie,We,$e,"nonzero")&&(oe=Math.min(oe,We),Q=Math.min(Q,$e),Ne=Math.max(Ne,We),Ce=Math.max(Ce,$e));De=Ne-oe,Te=Ce-Q;var Et=10,Xt=Math.min(Et/De,Et/Te);U=[Xt,0,0,Xt,-Math.round(De/2+oe)*Xt,-Math.round(Te/2+Q)*Xt]}return{type:"path",path:O,matrix:U}}function Z(D){var O,U=1,ie="#000000",le='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof D=="string"?O=D:(O=D.text,U="scalar"in D?D.scalar:U,le="fontFamily"in D?D.fontFamily:le,ie="color"in D?D.color:ie);var fe=10*U,me=""+fe+"px "+le,oe=new OffscreenCanvas(fe,fe),Q=oe.getContext("2d");Q.font=me;var Ne=Q.measureText(O),Ce=Math.ceil(Ne.actualBoundingBoxRight+Ne.actualBoundingBoxLeft),De=Math.ceil(Ne.actualBoundingBoxAscent+Ne.actualBoundingBoxDescent),Te=2,We=Ne.actualBoundingBoxLeft+Te,$e=Ne.actualBoundingBoxAscent+Te;Ce+=Te+Te,De+=Te+Te,oe=new OffscreenCanvas(Ce,De),Q=oe.getContext("2d"),Q.font=me,Q.fillStyle=ie,Q.fillText(O,We,$e);var Et=1/U;return{type:"bitmap",bitmap:oe.transferToImageBitmap(),matrix:[Et,0,0,Et,-Ce*Et/2,-De*Et/2]}}n.exports=function(){return he().apply(this,arguments)},n.exports.reset=function(){he().reset()},n.exports.create=q,n.exports.shapeFromPath=W,n.exports.shapeFromText=Z})((function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}})(),mj,!1);const che=mj.exports;mj.exports.create;const lw=768;function dhe(){const[e,t]=w.useState(void 0);return w.useEffect(()=>{const n=window.matchMedia(`(max-width: ${lw-1}px)`),s=()=>{t(window.innerWidth<lw)};return n.addEventListener("change",s),t(window.innerWidth<lw),()=>n.removeEventListener("change",s)},[]),!!e}const cw=["SHELTER","COOKING","SAFETY","NAVIGATION","CLOTHING","HYGIENE","OTHER"],BT=e=>{switch(e){case"SHELTER":return r.jsx(da,{className:"w-5 h-5"});case"COOKING":return r.jsx(VF,{className:"w-5 h-5"});case"SAFETY":return r.jsx(Os,{className:"w-5 h-5"});case"NAVIGATION":return r.jsx(Zs,{className:"w-5 h-5"});case"CLOTHING":return r.jsx(gF,{className:"w-5 h-5"});case"HYGIENE":return r.jsx(KL,{className:"w-5 h-5"});case"OTHER":return r.jsx(ri,{className:"w-5 h-5"});default:return r.jsx(m6,{className:"w-5 h-5"})}},zT=e=>{switch(e){case"SHELTER":return"text-orange-600 bg-orange-100 border-orange-200";case"COOKING":return"text-red-600 bg-red-100 border-red-200";case"SAFETY":return"text-rose-600 bg-rose-100 border-rose-200";case"NAVIGATION":return"text-blue-600 bg-blue-100 border-blue-200";case"CLOTHING":return"text-indigo-600 bg-indigo-100 border-indigo-200";case"HYGIENE":return"text-cyan-600 bg-cyan-100 border-cyan-200";case"OTHER":return"text-slate-600 bg-slate-100 border-slate-200";default:return"text-emerald-600 bg-emerald-100 border-emerald-200"}};function uhe(){const e=dhe(),t=tn(),{data:n}=Re({queryKey:["user"],queryFn:()=>ne.auth.me().catch(()=>null)}),s=(n==null?void 0:n.email)||"[email protected]",{data:i=[],isLoading:a}=Re({queryKey:["myGearItems",s],queryFn:()=>ne.entities.MyGearItem.filter({user_email:s}).catch(()=>[]),enabled:!0}),[l,u]=w.useState(!1),[h,m]=w.useState(null),[g,x]=w.useState(""),[v,_]=w.useState("SHELTER"),[N,S]=w.useState(""),[j,P]=w.useState(""),[E,R]=w.useState(""),[A,B]=w.useState(!1),[I,z]=w.useState(!1),V=pt({mutationFn:U=>ne.entities.MyGearItem.create(U),onSuccess:()=>{t.invalidateQueries(["myGearItems",s]),he(),Bg.success("Gear item added successfully")}}),te=pt({mutationFn:({id:U,data:ie})=>ne.entities.MyGearItem.update(U,ie),onSuccess:()=>t.invalidateQueries(["myGearItems",s])}),H=pt({mutationFn:U=>ne.entities.MyGearItem.delete(U),onSuccess:()=>{t.invalidateQueries(["myGearItems",s]),Bg.success("Gear item removed")}}),Y=pt({mutationFn:async()=>{const U=i.filter(ie=>ie.is_packed);await Promise.all(U.map(ie=>ne.entities.MyGearItem.update(ie.id,{is_packed:!1})))},onSuccess:()=>{t.invalidateQueries(["myGearItems",s]),B(!1),Bg.success("Checklist reset for your next trip!")}}),ce=i.length,K=i.filter(U=>U.is_packed).length,q=ce===0?0:Math.round(K/ce*100);w.useEffect(()=>{ce>0&&K===ce&&!I?(che({particleCount:150,spread:70,origin:{y:.6},colors:["#0d9488","#14b8a6","#2dd4bf","#ffffff"]}),B(!0),z(!0)):K<ce&&z(!1)},[K,ce,I]);const ge=U=>{te.mutate({id:U.id,data:{is_packed:!U.is_packed}})},he=()=>{u(!1),m(null),x(""),_("SHELTER"),S(""),P("")},be=()=>{if(!g.trim())return;const U=v==="custom"?(N.trim()||"OTHER").toUpperCase():v;h?te.mutate({id:h.id,data:{name:g,category:U,notes:j}},{onSuccess:()=>{he(),Bg.success("Gear updated")}}):V.mutate({user_email:s,name:g,category:U,is_packed:!1,notes:j})},W=U=>{m(U),x(U.name),P(U.notes||""),cw.includes(U.category)?(_(U.category),S("")):(_("custom"),S(U.category)),u(!0)},Z=i.filter(U=>U.name.toLowerCase().includes(E.toLowerCase())||U.notes&&U.notes.toLowerCase().includes(E.toLowerCase())||U.category.toLowerCase().includes(E.toLowerCase())),D=[...new Set(Z.map(U=>
816U.category))],O=[...new Set(i.map(U=>U.category))];return r.jsxs("div",{className:"min-h-screen bg-[#fafcff] pb-24 md:pb-12 font-sans selection:bg-teal-200",children:[r.jsxs("div",{className:"bg-slate-900 px-6 pt-12 pb-32 md:pt-20 md:pb-36 rounded-b-[48px] relative overflow-hidden text-white shadow-2xl shadow-slate-900/20",children:[r.jsx("div",{className:"absolute inset-0 bg-[url('https://images.unsplash.com/photo-1504280650505-72847a98816c?q=80&w=2000&auto=format&fit=crop')] bg-cover bg-center opacity-10 mix-blend-overlay pointer-events-none"}),r.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-teal-500/20 rounded-full blur-3xl pointer-events-none -mr-20 -mt-20"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-80 h-80 bg-emerald-500/20 rounded-full blur-3xl pointer-events-none -ml-20 -mb-20"}),r.jsxs("div",{className:"max-w-6xl mx-auto relative z-10 flex flex-col md:flex-row md:items-end justify-between gap-8",children:[r.jsxs("div",{className:"max-w-2xl",children:[r.jsxs(re.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-4xl md:text-6xl font-semibold tracking-tight mb-4 flex items-center gap-4",children:["My ",r.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-teal-400 to-emerald-400",children:"Gear"})]}),r.jsx(re.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"text-slate-300 font-medium text-lg",children:"Organize, track, and manage your equipment. Never forget an essential item on your next adventure."})]}),ce>0&&r.jsx(re.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:.2},children:r.jsxs("button",{onClick:()=>Y.mutate(),disabled:Y.isPending,className:"bg-white/10 hover:bg-white/20 backdrop-blur-md border border-white/10 text-white px-6 py-3.5 rounded-2xl font-semibold text-sm transition-all flex items-center justify-center gap-2 active:scale-95 w-full md:w-auto",children:[r.jsx(uw,{className:"w-4 h-4"})," Reset Checklist"]})})]})]}),r.jsx("div",{className:"max-w-6xl mx-auto px-4 md:px-8 -mt-20 relative z-20",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8",children:[r.jsxs("div",{className:"lg:col-span-4 space-y-6",children:[r.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"bg-white rounded-[32px] p-8 shadow-xl shadow-slate-200/50 border border-slate-100 relative overflow-hidden",children:[r.jsx("div",{className:"absolute -right-10 -top-10 w-40 h-40 bg-teal-50 rounded-full blur-3xl pointer-events-none"}),r.jsx("h3",{className:"font-semibold text-slate-900 text-lg mb-6 relative z-10",children:"Packing Progress"}),r.jsxs("div",{className:"flex items-end justify-between mb-5 relative z-10",children:[r.jsxs("div",{className:"text-5xl font-semibold tracking-tight text-slate-900",children:[q,r.jsx("span",{className:"text-3xl text-slate-400 font-medium",children:"%"})]}),r.jsxs("div",{className:"text-[15px] font-medium text-slate-500 mb-1.5 bg-slate-50 px-3 py-1 rounded-lg border border-slate-100",children:[K," / ",ce," ",r.jsx("span",{className:"hidden sm:inline",children:"items"})]})]}),r.jsx("div",{className:"h-4 w-full bg-slate-100 rounded-full overflow-hidden relative z-10 shadow-inner",children:r.jsx("div",{className:"h-full bg-gradient-to-r from-teal-400 to-emerald-500 rounded-full transition-all duration-1000 ease-out",style:{width:`${q}%`}})})]}),O.length>0&&r.jsxs(re.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.4},className:"bg-white rounded-[32px] p-6 shadow-xl shadow-slate-200/50 border border-slate-100 hidden lg:block sticky top-28",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-6 px-2",children:[r.jsx("div",{className:"w-8 h-8 rounded-xl bg-slate-50 flex items-center justify-center text-slate-500 border border-slate-100",children:r.jsx(W1,{className:"w-4 h-4"})}),r.jsx("h3",{className:"font-semibold text-slate-900",children:"Inventory Overview"})]}),r.jsx("div",{className:"space-y-1.5",children:O.map(U=>{const ie=i.filter(le=>le.category===U);return r.jsxs("div",{className:"flex items-center justify-between p-3 rounded-2xl hover:bg-slate-50 transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center border border-white/50 shadow-sm ${zT(U)}`,children:dt.cloneElement(BT(U),{className:"w-4 h-4"})}),r.jsx("span",{className:"text-sm font-semibold text-slate-700 capitalize tracking-tight",children:U.toLowerCase()})]}),r.jsx("span",{className:"text-xs font-bold text-slate-400 bg-white border border-slate-200 px-2.5 py-1 rounded-lg shadow-sm",children:ie.length})]},U)})})]})]}),r.jsxs("div",{className:"lg:col-span-8 space-y-6",children:[r.jsxs(re.div,{initial:{opacity:0,y:20}
816,animate:{opacity:1,y:0},transition:{delay:.3},className:"bg-white p-3 rounded-[28px] shadow-xl shadow-slate-200/50 border border-slate-100 flex flex-col sm:flex-row items-center gap-3 relative z-30",children:[r.jsxs("div",{className:"flex-1 w-full flex items-center bg-slate-50 rounded-2xl px-4 py-3.5 relative transition-colors focus-within:bg-slate-100 focus-within:ring-2 focus-within:ring-teal-500/20",children:[r.jsx(ai,{className:"w-5 h-5 text-slate-400 mr-3 shrink-0"}),r.jsx("input",{type:"text",placeholder:"Search your gear...",value:E,onChange:U=>R(U.target.value),className:"flex-1 bg-transparent text-[15px] font-medium text-slate-900 placeholder:text-slate-400 outline-none w-full"}),E&&r.jsx("button",{onClick:()=>R(""),className:"p-1 hover:bg-slate-200 rounded-full transition-colors ml-2",children:r.jsx(hn,{className:"w-4 h-4 text-slate-500"})})]}),r.jsxs("button",{onClick:()=>u(!0),className:"w-full sm:w-auto bg-slate-900 hover:bg-slate-800 text-white px-6 py-4 sm:py-3.5 rounded-2xl font-semibold text-sm flex items-center justify-center gap-2 shadow-lg shadow-slate-900/20 transition-all active:scale-95 shrink-0",children:[r.jsx(Cn,{className:"w-5 h-5"})," ",r.jsx("span",{children:"Add Gear"})]})]}),a?r.jsx("div",{className:"space-y-4",children:[1,2,3].map(U=>r.jsx("div",{className:"h-40 bg-white rounded-[32px] animate-pulse border border-slate-100"},U))}):Z.length===0?r.jsxs(re.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"flex flex-col items-center justify-center py-24 text-center bg-white rounded-[40px] border border-slate-200/60 shadow-sm",children:[r.jsx("div",{className:"w-24 h-24 bg-slate-50 rounded-full flex items-center justify-center mb-6 border-8 border-white shadow-xl shadow-slate-200/50",children:r.jsx(ou,{className:"w-10 h-10 text-slate-400"})}),r.jsx("h3",{className:"text-2xl font-semibold tracking-tight text-slate-900 mb-3",children:E?"No items found":"Your gear list is empty"}),r.jsx("p",{className:"text-slate-500 font-medium max-w-sm mb-8 text-[15px] leading-relaxed",children:E?`We couldn't find anything matching "${E}".`:"Add the personal gear you usually pack for trips. Check them off as you pack, and reset the list for your next adventure."}),!E&&r.jsxs("button",{onClick:()=>u(!0),className:"bg-teal-600 hover:bg-teal-700 text-white font-semibold text-[15px] px-8 py-3.5 rounded-full flex items-center gap-2 shadow-xl shadow-teal-600/20 active:scale-95 transition-all",children:[r.jsx(Cn,{className:"w-5 h-5"})," Add Your First Item"]})]}):r.jsx("div",{className:"space-y-6",children:D.map((U,ie)=>{const le=Z.filter(oe=>oe.category===U),fe=le.filter(oe=>oe.is_packed).length,me=le.length>0&&fe===le.length;return r.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1+ie*.05},className:"bg-white rounded-[32px] overflow-hidden shadow-sm hover:shadow-md transition-shadow border border-slate-100",children:[r.jsxs("div",{className:"bg-slate-50/50 p-4 sm:p-5 border-b border-slate-100 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-3.5",children:[r.jsx("div",{className:`w-12 h-12 rounded-2xl flex items-center justify-center shadow-sm border border-white/50 ${zT(U)}`,children:BT(U)}),r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-slate-900 tracking-tight text-[17px] capitalize",children:U.toLowerCase()}),r.jsxs("p",{className:"text-xs text-slate-500 font-medium",children:[le.length," ",le.length===1?"item":"items"]})]})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[me&&r.jsxs("span",{className:"hidden sm:flex text-[11px] font-bold text-emerald-600 bg-emerald-50 px-2.5 py-1.5 rounded-lg uppercase tracking-widest items-center gap-1.5 border border-emerald-100/50",children:[r.jsx(ht,{className:"w-3.5 h-3.5"})," Packed"]}),r.jsxs("div",{className:"text-sm font-semibold text-slate-600 bg-white border border-slate-200 px-3.5 py-2 rounded-xl shadow-sm",children:[fe," / ",le.length]})]})]}),r.jsx("div",{className:"p-2 sm:p-3 space-y-1",children:le.map(oe=>r.jsxs("div",{onClick:()=>ge(oe),className:"group flex items-center p-3 sm:p-4 hover:bg-slate-50 rounded-[20px] cursor-pointer transition-all border border-transparent hover:border-slate-100",children:[r.jsx("div",{className:"mr-4 sm:mr-5",children:r.jsx("div",{className:`w-7 h-7 rounded-full flex items-center justify-center transition-all duration-300 ${oe.is_packed?"bg-teal-500 text-white scale-110 shadow-md shadow-teal-500/30":"border-2 border-slate-300 text-transparent group-hover:border-teal-400"}`,children:r.jsx(ht,{className:`w-4 h-4 ${oe.is_packed?"opacity-100":"opacity-0"}`})})}),r.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[r.jsx("p",{className:`font-semibold tracking-tight text-[16px] truncate transition-all duration-300 ${oe.is_packed?"text-slate-400 line-through":"text-slate-800"}`,children:oe.name}),oe.notes&&r.jsx("p",{className:`text-[13px] truncate mt-0.5 transition-all duration-300 ${oe.is_packed?"text-slate-300 line-through":"text-slate-500 font-medium"}`,children:oe.notes})]}),r.jsxs("div",{className:"hidden md:flex items-center gap-1.5 opacity-0 group-hover:opacity-100 transition-opacity ml-auto shrink-0",children:[r.jsx("button",{onClick:Q=>{Q.stopPropagation(),W(oe)},className:"p-2.5 bg-white hover:bg-blue-50 rounded-xl text-slate-400 hover:text-blue-600 transition-colors shadow-sm border border-slate-200 hover:border-blue-200",children:r.jsx(lu,{className:"w-4 h-4"})}),r.jsx("button",{onClick:Q=>{Q.stopPropagation(),window.confirm("Delete this item?")&&H.mutate(oe.id)},className:"p-2.5 bg-white hover:bg-red-50 rounded-xl text-slate-400 hover:text-red-600 transition-colors shadow-sm border border-slate-200 hover:border-red-200",children:r.jsx(us,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"flex md:hidden items-center gap-2 ml-auto shrink-0",children:[r.jsx("button",{onClick:Q=>{Q.stopPropagation(),W(oe)},className:"p-2.5 bg-slate-100 rounded-xl text-slate-600 active:bg-slate-200 transition-colors",children:r.jsx(lu,{className:"w-4 h-4"})}),r.jsx("button",{onClick:Q=>{Q.stopPropagation(),window.confirm("Delete this item?")&&H.mutate(oe.id)},className:"p-2.5 bg-rose-50 rounded-xl text-rose-600 active:bg-rose-100 transition-colors",children:r.jsx(us,{className:"w-4 h-4"})})]})]},oe.id))})]},U)})})]})]})}),r.jsx(re.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>
816u(!0),className:"md:hidden fixed bottom-[104px] right-6 w-[60px] h-[60px] bg-slate-900 text-white rounded-[24px] flex items-center justify-center shadow-xl shadow-slate-900/30 z-40",children:r.jsx(Cn,{className:"w-7 h-7 stroke-[2.5]"})}),e?r.jsx(Lt,{children:l&&r.jsxs(r.Fragment,{children:[r.jsx(re.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-slate-900/40 backdrop-blur-sm z-[60]",onClick:he}),r.jsxs(re.div,{initial:{y:"100%",opacity:0},animate:{y:0,opacity:1},exit:{y:"100%",opacity:0},transition:{type:"spring",damping:30,stiffness:300},className:"fixed bottom-0 left-0 right-0 bg-white rounded-t-[40px] p-6 sm:p-8 pb-10 z-[61] w-full shadow-2xl",children:[r.jsx("div",{className:"w-12 h-1.5 bg-slate-200 rounded-full mx-auto mb-8"}),r.jsxs("div",{className:"flex justify-between items-center mb-8",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-12 h-12 bg-teal-50 text-teal-600 rounded-2xl flex items-center justify-center",children:h?r.jsx(lu,{className:"w-5 h-5"}):r.jsx(ou,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold tracking-tight text-xl text-slate-900",children:h?"Edit Gear":"Add New Gear"}),r.jsx("p",{className:"text-[13px] text-slate-500 font-medium",children:"Keep your inventory organized."})]})]}),r.jsx("button",{onClick:he,className:"p-2.5 bg-slate-50 hover:bg-slate-100 text-slate-500 rounded-full transition-colors",children:r.jsx(hn,{className:"w-5 h-5"})})]}),r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-widest mb-2 block",children:"Item Name"}),r.jsx("input",{type:"text",placeholder:"e.g. Sleeping Bag, Headlamp",value:g,onChange:U=>x(U.target.value),className:"w-full bg-slate-50 border border-slate-200 rounded-2xl p-4 font-semibold tracking-tight text-[15px] text-slate-900 focus:outline-none focus:ring-2 focus:ring-teal-500/50 focus:border-teal-500 focus:bg-white transition-all placeholder:text-slate-400"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-widest mb-2 block",children:"Category"}),r.jsxs("div",{className:"relative",children:[r.jsxs("select",{value:v,onChange:U=>_(U.target.value),className:"w-full bg-slate-50 border border-slate-200 rounded-2xl p-4 font-semibold tracking-tight text-[15px] text-slate-900 focus:outline-none focus:ring-2 focus:ring-teal-500/50 focus:border-teal-500 focus:bg-white transition-all appearance-none cursor-pointer capitalize",children:[cw.map(U=>r.jsx("option",{value:U,children:U.toLowerCase()},U)),r.jsx("option",{value:"custom",children:"Create Custom Category..."})]}),r.jsx("div",{className:"absolute right-4 top-1/2 -translate-y-1/2 pointer-events-none text-slate-400",children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"m6 9 6 6 6-6"})})})]})]}),r.jsx(Lt,{children:v==="custom"&&r.jsxs(re.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:[r.jsx("label",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-widest mb-2 block mt-5",children:"Custom Category Name"}),r.jsx("input",{type:"text",placeholder:"e.g. CAMERA GEAR",value:N,onChange:U=>S(U.target.value.toUpperCase()),className:"w-full bg-slate-50 border border-slate-200 rounded-2xl p-4 font-semibold tracking-tight text-[15px] text-slate-900 focus:outline-none focus:ring-2 focus:ring-teal-500/50 focus:border-teal-500 focus:bg-white transition-all placeholder:text-slate-400 uppercase"})]})}),r.jsxs("div",{children:[r.jsxs("label",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-widest mb-2 block",children:["Notes ",r.jsx("span",{className:"text-slate-400 font-medium normal-case tracking-normal",children:"(Optional)"})]}),r.jsx("input",{type:"text",placeholder:"e.g. Check batteries before trip",value:j,onChange:U=>P(U.target.value),className:"w-full bg-slate-50 border border-slate-200 rounded-2xl p-4 font-semibold tracking-tight text-[15px] text-slate-900 focus:outline-none focus:ring-2 focus:ring-teal-500/50 focus:border-teal-500 focus:bg-white transition-all placeholder:text-slate-400"})]}),r.jsx("div",{className:"pt-4",children:r.jsx("button",{onClick:be,disabled:V.isPending||te.isPending||!g.trim()||v==="custom"&&!N.trim(),className:"w-full bg-slate-900 hover:bg-slate-800 disabled:bg-slate-300 disabled:text-slate-500 text-white font-semibold tracking-tight py-4 rounded-2xl transition-all shadow-xl shadow-slate-900/20 active:scale-[0.98] flex items-center justify-center gap-2",children:h?"Save Changes":"Add to Inventory"})})]})]})]})}):r.jsx($i,{open:l,onOpenChange:U=>!U&&he(),children:r.jsxs(ci,{className:"sm:max-w-md rounded-[32px] p-8 border-slate-100 shadow-2xl",children:[r.jsx(di,{className:"mb-4 text-left",children:r.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[r.jsx("div",{className:"w-14 h-14 bg-teal-50 text-teal-600 rounded-2xl flex items-center justify-center border border-teal-100 shadow-sm",children:h?r.jsx(lu,{className:"w-6 h-6"}):r.jsx(ou,{className:"w-6 h-6"})}),r.jsxs("div",{children:[r.jsx(ui,{className:"font-semibold tracking-tight text-2xl text-slate-900 m-0 p-0 mb-1",children:h?"Edit Gear":"Add New Gear"}),r.jsx(Vu,{className:"text-sm text-slate-500 font-medium m-0 p-0",children:"Keep your inventory organized."})]})]})}),r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-widest mb-2 block ml-1",children:"Item Name"}),r.jsx("input",{type:"text",placeholder:"e.g. Sleeping Bag, Headlamp",value:g,onChange:U=>x(U.target.value),className:"w-full bg-slate-50 border border-slate-200/60 rounded-2xl p-4 font-semibold tracking-tight text-[15px] text-slate-900 focus:outline-none focus:ring-2 focus:ring-teal-500/30 focus:border-teal-500 focus:bg-white transition-all placeholder:text-slate-400"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-widest mb-2 block ml-1",children:"Category"}),r.jsxs("div",{className:"relative",children:[r.jsxs("select",{value:v,onCh
816ange:U=>_(U.target.value),className:"w-full bg-slate-50 border border-slate-200/60 rounded-2xl p-4 font-semibold tracking-tight text-[15px] text-slate-900 focus:outline-none focus:ring-2 focus:ring-teal-500/30 focus:border-teal-500 focus:bg-white transition-all appearance-none cursor-pointer capitalize",children:[cw.map(U=>r.jsx("option",{value:U,children:U.toLowerCase()},U)),r.jsx("option",{value:"custom",children:"Create Custom Category..."})]}),r.jsx("div",{className:"absolute right-4 top-1/2 -translate-y-1/2 pointer-events-none text-slate-400",children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"m6 9 6 6 6-6"})})})]})]}),r.jsx(Lt,{children:v==="custom"&&r.jsxs(re.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:[r.jsx("label",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-widest mb-2 block mt-5 ml-1",children:"Custom Category Name"}),r.jsx("input",{type:"text",placeholder:"e.g. CAMERA GEAR",value:N,onChange:U=>S(U.target.value.toUpperCase()),className:"w-full bg-slate-50 border border-slate-200/60 rounded-2xl p-4 font-semibold tracking-tight text-[15px] text-slate-900 focus:outline-none focus:ring-2 focus:ring-teal-500/30 focus:border-teal-500 focus:bg-white transition-all placeholder:text-slate-400 uppercase"})]})}),r.jsxs("div",{children:[r.jsxs("label",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-widest mb-2 block ml-1",children:["Notes ",r.jsx("span",{className:"text-slate-400 font-medium normal-case tracking-normal",children:"(Optional)"})]}),r.jsx("input",{type:"text",placeholder:"e.g. Check batteries before trip",value:j,onChange:U=>P(U.target.value),className:"w-full bg-slate-50 border border-slate-200/60 rounded-2xl p-4 font-semibold tracking-tight text-[15px] text-slate-900 focus:outline-none focus:ring-2 focus:ring-teal-500/30 focus:border-teal-500 focus:bg-white transition-all placeholder:text-slate-400"})]}),r.jsx("div",{className:"pt-4",children:r.jsx("button",{onClick:be,disabled:V.isPending||te.isPending||!g.trim()||v==="custom"&&!N.trim(),className:"w-full bg-slate-900 hover:bg-slate-800 disabled:bg-slate-300 disabled:text-slate-500 text-white font-semibold tracking-tight py-4 rounded-2xl transition-all shadow-xl shadow-slate-900/20 active:scale-[0.98] flex items-center justify-center gap-2 text-base",children:h?"Save Changes":"Add to Inventory"})})]})]})}),r.jsx(Lt,{children:A&&r.jsxs(r.Fragment,{children:[r.jsx(re.div,{initial:{opacity:0}
816,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-slate-900/40 backdrop-blur-sm z-[70]"}),r.jsxs(re.div,{initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:20},className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white rounded-[40px] p-8 sm:p-10 z-[71] w-[90%] max-w-sm text-center shadow-2xl border border-slate-100",children:[r.jsx("div",{className:"w-24 h-24 bg-teal-50 text-teal-600 rounded-[28px] flex items-center justify-center mx-auto mb-6 shadow-inner border-8 border-white",children:r.jsx(ou,{className:"w-12 h-12"})}),r.jsx("h2",{className:"text-3xl font-semibold tracking-tight text-slate-900 mb-3",children:"All packed up!"}),r.jsx("p",{className:"text-slate-500 mb-8 font-medium text-[15px] leading-relaxed",children:"You've checked off every item on your gear list. Have an amazing adventure!"}),r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("button",{onClick:()=>Y.mutate(),className:"w-full bg-teal-600 hover:bg-teal-700 text-white font-semibold tracking-tight py-4 rounded-2xl transition-colors shadow-xl shadow-teal-600/20 active:scale-95",children:"Reset List for Next Trip"}),r.jsx("button",{onClick:()=>B(!1),className:"w-full bg-slate-50 hover:bg-slate-100 text-slate-600 font-semibold tracking-tight py-4 rounded-2xl transition-colors",children:"Keep it as is"})]})]})]})})]})}function hhe(){const e=aA(),[t,n]=w.useState(0),s=["Acquiring signal","Triangulating","Ready"];w.useEffect(()=>{if(e)return;const u=setTimeout(()=>n(1),700),h=setTimeout(()=>n(2),1800);return()=>{clearTimeout(u),clearTimeout(h)}},[e]);const i=70,a=[{x:100,y:100-i},{x:100+i*Math.cos(Math.PI/6),y:100+i*Math.sin(Math.PI/6)},{x:100-i*Math.cos(Math.PI/6),y:100+i*Math.sin(Math.PI/6)}],l=[.22,1,.36,1];return r.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-[#fafbf9] overflow-hidden",style:{fontFamily:'"Inter", sans-serif',backgroundImage:"radial-gradient(circle at 1px 1px, rgba(120, 113, 108, 0.12) 1px, transparent 0)",backgroundSize:"24px 24px"},children:[r.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"radial-gradient(ellipse 55% 55% at 50% 50%, transparent 0%, #fafbf9 75%)"}}),r.jsxs("div",{className:"relative z-10 flex flex-col items-center",children:[r.jsxs("div",{className:"relative w-[220px] h-[220px] mb-10",children:[r.jsxs("svg",{viewBox:"0 0 200 200",className:"absolute inset-0 w-full h-full","aria-hidden":"true",children:[r.jsx(re.circle,{cx:"100",cy:"100",r:"0",fill:"#059669",initial:{r:0,opacity:0},animate:e?{r:30,opacity:.08}:{r:[0,38,32],opacity:[0,.12,.08]},transition:{duration:1.6,delay:1,ease:l,times:[0,.6,1]}}),a.map((u,h)=>r.jsx(re.line,{x1:u.x,y1:u.y,x2:100,y2:100,stroke:"#059669",strokeWidth:"1",strokeLinecap:"round",strokeDasharray:"2 3",initial:{pathLength:0,opacity:0},animate:e?{pathLength:1,opacity:.5}:{pathLength:1,opacity:[0,.55,.25]},transition:{duration:.9,delay:.3+h*.12,ease:l,times:[0,.7,1]}},`line-${h}`)),r.jsx(re.polygon,{points:a.map(u=>`${u.x},${u.y}`).join(" "),fill:"none",stroke:"#0c0a09",strokeWidth:"0.6",strokeLinejoin:"round",initial:{pathLength:0,opacity:0},animate:e?{pathLength:1,opacity:.25}:{pathLength:1,opacity:.18},transition:{duration:1.2,delay:.1,ease:l}}),a.map((u,h)=>r.jsxs("g",{children:[!e&&r.jsx(re.circle,{cx:u.x,cy:u.y,r:"4",fill:"none",stroke:"#059669",strokeWidth:"1",initial:{r:3,opacity:0},animate:{r:[3,14],opacity:[.7,0]},transition:{duration:1.4,delay:.2+h*.15,ease:"easeOut",repeat:1}}),r.jsx(re.circle,{cx:u.x,cy:u.y,r:"3",fill:"#059669",initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.4,delay:.15+h*.1,ease:l},style:{transformOrigin:`${u.x}px ${u.y}px`}})]},`marker-${h}`))]}),r.jsx(re.div,{className:"absolute inset-0 flex items-center justify-center",initial:{scale:.4,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.6,delay:1.05,ease:l},style:{willChange:"transform, opacity"},children:r.jsx("div",{className:"w-[68px] h-[68px] rounded-2xl bg-white shadow-[0_8px_24px_rgba(5,150,105,0.18),0_2px_6px_rgba(12,10,9,0.06)] border border-stone-100 flex items-center justify-center",children:r.jsx(Or,{className:"w-9 h-9",color:"#0c0a09"})})})]}),r.jsxs(re.div,{initial:{y:12,opacity:0}
816,animate:{y:0,opacity:1},transition:{duration:.6,delay:1.2,ease:l},className:"flex items-center gap-3 mb-3",children:[r.jsx("div",{className:"h-px w-6 bg-stone-300"}),r.jsx("h1",{className:"text-[22px] font-bold tracking-tight text-stone-900",children:"WeAllCamp"}),r.jsx("div",{className:"h-px w-6 bg-stone-300"})]}),r.jsxs(re.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.4,delay:1.35},className:"flex items-center gap-2 h-5",children:[r.jsxs("span",{className:"relative flex w-1.5 h-1.5",children:[!e&&r.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-emerald-500 opacity-60 animate-ping"}),r.jsx("span",{className:"relative inline-flex w-1.5 h-1.5 rounded-full bg-emerald-600"})]}),r.jsx(Lt,{mode:"wait",children:r.jsx(re.span,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.25},className:"text-[10px] font-semibold tracking-[0.22em] text-stone-500 uppercase",children:s[t]},t)})]})]})]})}const{Pages:nI,Layout:$T,mainPage:fhe}=zce,sI=fhe,mhe=nI[sI],wc=({children:e,currentPageName:t})=>$T?r.jsx($T,{currentPageName:t,children:e}):r.jsx(r.Fragment,{children:e}),phe=()=>{const{isAuthenticated:e,isLoadingAuth:t,isLoadingPublicSettings:n,authError:s,navigateToLogin:i}=Hce(),[a,l]=w.useState(!0);if(w.useEffect(()=>{const h=setTimeout(()=>{l(!1)},2500);return()=>clearTimeout(h)},[]),n||t||a)return r.jsx(hhe,{});if(s){if(s.type==="user_not_registered")return r.jsx(qce,{});if(s.type==="auth_required")return i(),null}return e?r.jsxs(yA,{children:[r.jsx(Ys,{path:"/",element:r.jsx(wc,{currentPageName:sI,children:r.jsx(mhe,{})})}),Object.entries(nI).map(([h,m])=>r.jsx(Ys,{path:`/${h}`,element:r.jsx(wc,{currentPageName:h,children:r.jsx(m,{})})},h)),r.jsx(Ys,{path:"/Explore",element:r.jsx(wc,{currentPageName:"Explore",children:r.jsx(y3,{})})}),r.jsx(Ys,{path:"/AdminPanel",element:r.jsx(wc,{currentPageName:"AdminPanel",children:r.jsx(kA,{})})}),r.jsx(Ys,{path:"/SuperAdminPanel",element:r.jsx(wc,{currentPageName:"SuperAdminPanel",children:r.jsx(oue,{})})}),r.jsx(Ys,{path:"/Post",element:r.jsx(wc,{currentPageName:"Post",children:r.jsx(the,{})})}),r.jsx(Ys,{path:"/MyGear",element:r.jsx(wc,{currentPageName:"MyGear",children:r.jsx(uhe,{})})}),r.jsx(Ys,{path:"/Onboarding",element:r.jsx(w3,{})}),r.jsx(Ys,{path:"/auth",element:r.jsx(tI,{})}),r.jsx(Ys,{path:"*",element:r.jsx(Vce,{})})]}):(i(),null)};function ghe(){return r.jsx(Wce,{children:r.jsxs(mB,{client:kB,children:[r.jsx(Iq,{children:r.jsxs(yA,{children:[r.jsx(Ys,{path:"/",element:r.jsx(FT,{})}),r.jsx(Ys,{path:"/About",element:r.jsx(FT,{})}),r.jsx(Ys,{path:"/auth",element:r.jsx(tI,{})}),r.jsx(Ys,{path:"*",element:r.jsx(phe,{})})]})}),r.jsx(U8,{})]})})}YI.createRoot(document.getElementById("root")).render(r.jsx(ghe,{}));export{Ll as g};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.