From a0316e346d645920f9ad78e80188cc3a11b00434 Mon Sep 17 00:00:00 2001 From: baleinegris Date: Sun, 27 Oct 2024 10:52:55 -0400 Subject: [PATCH] Updates --- assets/{index-CPMLOr2u.js => index-DcEJVh1J.js} | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename assets/{index-CPMLOr2u.js => index-DcEJVh1J.js} (98%) diff --git a/assets/index-CPMLOr2u.js b/assets/index-DcEJVh1J.js similarity index 98% rename from assets/index-CPMLOr2u.js rename to assets/index-DcEJVh1J.js index beab9b6..f3cba84 100644 --- a/assets/index-CPMLOr2u.js +++ b/assets/index-DcEJVh1J.js @@ -146,4 +146,4 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var l="",s=0;s{e=Sn(e,"spinner");const u=`${e}-${n}`;return A.jsx(o,{ref:a,...s,className:xn(l,u,r&&`${u}-${r}`,t&&`text-${t}`)})});M0.displayName="Spinner";function QE(){return A.jsx(M0,{animation:"border",role:"status",children:A.jsx("span",{className:"visually-hidden",children:"Loading..."})})}var XE=Function.prototype.bind.call(Function.prototype.call,[].slice);function Zp(e,t){return XE(e.querySelectorAll(t))}const O0=!!(typeof window<"u"&&window.document&&window.document.createElement);var sc=!1,ac=!1;try{var eu={get passive(){return sc=!0},get once(){return ac=sc=!0}};O0&&(window.addEventListener("test",eu,eu),window.removeEventListener("test",eu,!0))}catch{}function _0(e,t,n,r){if(r&&typeof r!="boolean"&&!ac){var o=r.once,l=r.capture,s=n;!ac&&o&&(s=n.__once||function a(u){this.removeEventListener(t,a,l),n.call(this,u)},n.__once=s),e.addEventListener(t,s,sc?r:l)}e.addEventListener(t,n,r)}function YE(e,t,n){const r=C.useRef(e!==void 0),[o,l]=C.useState(t),s=e!==void 0,a=r.current;return r.current=s,!s&&a&&o!==t&&l(t),[s?e:o,C.useCallback((...u)=>{const[c,...f]=u;let d=n==null?void 0:n(c,...f);return l(c),d},[n])]}function qE(e){const t=C.useRef(null);return C.useEffect(()=>{t.current=e}),t.current}function ZE(){const[,e]=C.useReducer(t=>!t,!1);return e}function JE(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e},[e]),t}function dn(e){const t=JE(e);return C.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function eb(e,t,n,r=!1){const o=dn(n);C.useEffect(()=>{const l=typeof e=="function"?e():e;return l.addEventListener(t,o,r),()=>l.removeEventListener(t,o,r)},[e])}const ya=C.createContext(null);function tb(){return C.useState(null)}var Jp=Object.prototype.hasOwnProperty;function eh(e,t,n){for(n of e.keys())if(si(n,t))return n}function si(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&si(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(o=r,o&&typeof o=="object"&&(o=eh(t,o),!o)||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(o=r[0],o&&typeof o=="object"&&(o=eh(t,o),!o)||!si(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Jp.call(e,n)&&++r&&!Jp.call(t,n)||!(n in t)||!si(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function nb(){const e=C.useRef(!0),t=C.useRef(()=>e.current);return C.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function rb(e){const t=nb();return[e[0],C.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}const ob=zE({defaultModifiers:[CE,$E,sE,uE,bE,xE,AE,rE]}),ib=["enabled","placement","strategy","modifiers"];function lb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const sb={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},ab={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(o=>o.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,o=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&o==="tooltip"&&"setAttribute"in r){const l=r.getAttribute("aria-describedby");if(l&&l.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",l?`${l},${n.id}`:n.id)}}},ub=[];function cb(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:l="absolute",modifiers:s=ub}=n,a=lb(n,ib);const u=C.useRef(s),c=C.useRef(),f=C.useCallback(()=>{var E;(E=c.current)==null||E.update()},[]),d=C.useCallback(()=>{var E;(E=c.current)==null||E.forceUpdate()},[]),[p,y]=rb(C.useState({placement:o,update:f,forceUpdate:d,attributes:{},styles:{popper:{},arrow:{}}})),w=C.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:E})=>{const g={},m={};Object.keys(E.elements).forEach(v=>{g[v]=E.styles[v],m[v]=E.attributes[v]}),y({state:E,styles:g,attributes:m,update:f,forceUpdate:d,placement:E.placement})}}),[f,d,y]),x=C.useMemo(()=>(si(u.current,s)||(u.current=s),u.current),[s]);return C.useEffect(()=>{!c.current||!r||c.current.setOptions({placement:o,strategy:l,modifiers:[...x,w,sb]})},[l,o,w,r,x]),C.useEffect(()=>{if(!(!r||e==null||t==null))return c.current=ob(e,t,Object.assign({},a,{placement:o,strategy:l,modifiers:[...x,ab,w]})),()=>{c.current!=null&&(c.current.destroy(),c.current=void 0,y(E=>Object.assign({},E,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),p}function th(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function fb(e,t,n,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}function wl(e,t,n,r){return _0(e,t,n,r),function(){fb(e,t,n,r)}}function db(e){return e&&e.ownerDocument||document}var pb=function(){},hb=pb;const mb=ws(hb),nh=()=>{};function gb(e){return e.button===0}function yb(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const tu=e=>e&&("current"in e?e.current:e),rh={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function vb(e,t=nh,{disabled:n,clickTrigger:r="click"}={}){const o=C.useRef(!1),l=C.useRef(!1),s=C.useCallback(c=>{const f=tu(e);mb(!!f,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),o.current=!f||yb(c)||!gb(c)||!!th(f,c.target)||l.current,l.current=!1},[e]),a=dn(c=>{const f=tu(e);f&&th(f,c.target)&&(l.current=!0)}),u=dn(c=>{o.current||t(c)});C.useEffect(()=>{var c,f;if(n||e==null)return;const d=db(tu(e)),p=d.defaultView||window;let y=(c=p.event)!=null?c:(f=p.parent)==null?void 0:f.event,w=null;rh[r]&&(w=wl(d,rh[r],a,!0));const x=wl(d,r,s,!0),E=wl(d,r,m=>{if(m===y){y=void 0;return}u(m)});let g=[];return"ontouchstart"in d.documentElement&&(g=[].slice.call(d.body.children).map(m=>wl(m,"mousemove",nh))),()=>{w==null||w(),x(),E(),g.forEach(m=>m())}},[e,n,r,s,a,u])}function wb(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function xb(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function Sb({enabled:e,enableEvents:t,placement:n,flip:r,offset:o,fixed:l,containerPadding:s,arrowElement:a,popperConfig:u={}}){var c,f,d,p,y;const w=wb(u.modifiers);return Object.assign({},u,{placement:n,enabled:e,strategy:l?"fixed":u.strategy,modifiers:xb(Object.assign({},w,{eventListeners:{enabled:t,options:(c=w.eventListeners)==null?void 0:c.options},preventOverflow:Object.assign({},w.preventOverflow,{options:s?Object.assign({padding:s},(f=w.preventOverflow)==null?void 0:f.options):(d=w.preventOverflow)==null?void 0:d.options}),offset:{options:Object.assign({offset:o},(p=w.offset)==null?void 0:p.options)},arrow:Object.assign({},w.arrow,{enabled:!!a,options:Object.assign({},(y=w.arrow)==null?void 0:y.options,{element:a})}),flip:Object.assign({enabled:!!r},w.flip)}))})}const Cb=["children","usePopper"];function kb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const Eb=()=>{};function I0(e={}){const t=C.useContext(ya),[n,r]=tb(),o=C.useRef(!1),{flip:l,offset:s,rootCloseEvent:a,fixed:u=!1,placement:c,popperConfig:f={},enableEventListeners:d=!0,usePopper:p=!!t}=e,y=(t==null?void 0:t.show)==null?!!e.show:t.show;y&&!o.current&&(o.current=!0);const w=b=>{t==null||t.toggle(!1,b)},{placement:x,setMenu:E,menuElement:g,toggleElement:m}=t||{},v=cb(m,g,Sb({placement:c||x||"bottom-start",enabled:p,enableEvents:d??y,offset:s,flip:l,fixed:u,arrowElement:n,popperConfig:f})),S=Object.assign({ref:E||Eb,"aria-labelledby":m==null?void 0:m.id},v.attributes.popper,{style:v.styles.popper}),k={show:y,placement:x,hasShown:o.current,toggle:t==null?void 0:t.toggle,popper:p?v:null,arrowProps:p?Object.assign({ref:r},v.attributes.arrow,{style:v.styles.arrow}):{}};return vb(g,w,{clickTrigger:a,disabled:!y}),[S,k]}function L0(e){let{children:t,usePopper:n=!0}=e,r=kb(e,Cb);const[o,l]=I0(Object.assign({},r,{usePopper:n}));return A.jsx(A.Fragment,{children:t(o,l)})}L0.displayName="DropdownMenu";const vs={prefix:String(Math.round(Math.random()*1e10)),current:0},N0=pe.createContext(vs),bb=pe.createContext(!1);let Pb=!!(typeof window<"u"&&window.document&&window.document.createElement),nu=new WeakMap;function $b(e=!1){let t=C.useContext(N0),n=C.useRef(null);if(n.current===null&&!e){var r,o;let l=(o=pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(r=o.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(l){let s=nu.get(l);s==null?nu.set(l,{id:t.current,state:l.memoizedState}):l.memoizedState!==s.state&&(t.current=s.id,nu.delete(l))}n.current=++t.current}return n.current}function Tb(e){let t=C.useContext(N0);t===vs&&!Pb&&console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let n=$b(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function Rb(e){let t=pe.useId(),[n]=C.useState(Ib()),r=n?"react-aria":`react-aria${vs.prefix}`;return e||`${r}-${t}`}const Ab=typeof pe.useId=="function"?Rb:Tb;function Mb(){return!1}function Ob(){return!0}function _b(e){return()=>{}}function Ib(){return typeof pe.useSyncExternalStore=="function"?pe.useSyncExternalStore(_b,Mb,Ob):C.useContext(bb)}const j0=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},oh=()=>{};function D0(){const e=Ab(),{show:t=!1,toggle:n=oh,setToggle:r,menuElement:o}=C.useContext(ya)||{},l=C.useCallback(a=>{n(!t,a)},[t,n]),s={id:e,ref:r||oh,onClick:l,"aria-expanded":!!t};return o&&j0(o)&&(s["aria-haspopup"]=!0),[s,{show:t,toggle:n}]}function z0({children:e}){const[t,n]=D0();return A.jsx(A.Fragment,{children:e(t,n)})}z0.displayName="DropdownToggle";const uc=C.createContext(null),ih=(e,t=null)=>e!=null?String(e):t||null,B0=C.createContext(null);B0.displayName="NavContext";const Lb=["as","disabled"];function Nb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jb(e){return!e||e.trim()==="#"}function zf({tagName:e,disabled:t,href:n,target:r,rel:o,role:l,onClick:s,tabIndex:a=0,type:u}){e||(n!=null||r!=null||o!=null?e="a":e="button");const c={tagName:e};if(e==="button")return[{type:u||"button",disabled:t},c];const f=p=>{if((t||e==="a"&&jb(n))&&p.preventDefault(),t){p.stopPropagation();return}s==null||s(p)},d=p=>{p.key===" "&&(p.preventDefault(),f(p))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:l??"button",disabled:void 0,tabIndex:t?void 0:a,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?o:void 0,onClick:f,onKeyDown:d},c]}const F0=C.forwardRef((e,t)=>{let{as:n,disabled:r}=e,o=Nb(e,Lb);const[l,{tagName:s}]=zf(Object.assign({tagName:n,disabled:r},o));return A.jsx(s,Object.assign({},o,l,{ref:t}))});F0.displayName="Button";const Db="data-rr-ui-";function W0(e){return`${Db}${e}`}const zb=["eventKey","disabled","onClick","active","as"];function Bb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function U0({key:e,href:t,active:n,disabled:r,onClick:o}){const l=C.useContext(uc),s=C.useContext(B0),{activeKey:a}=s||{},u=ih(e,t),c=n==null&&e!=null?ih(a)===u:n;return[{onClick:dn(d=>{r||(o==null||o(d),l&&!d.isPropagationStopped()&&l(u,d))}),"aria-disabled":r||void 0,"aria-selected":c,[W0("dropdown-item")]:""},{isActive:c}]}const V0=C.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:l,as:s=F0}=e,a=Bb(e,zb);const[u]=U0({key:n,href:a.href,disabled:r,onClick:o,active:l});return A.jsx(s,Object.assign({},a,{ref:t},u))});V0.displayName="DropdownItem";const H0=C.createContext(O0?window:void 0);H0.Provider;function Fb(){return C.useContext(H0)}function lh(){const e=ZE(),t=C.useRef(null),n=C.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function Hi({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${W0("dropdown-item")}]`,focusFirstItemOnShow:l,placement:s="bottom-start",children:a}){const u=Fb(),[c,f]=YE(t,e,r),[d,p]=lh(),y=d.current,[w,x]=lh(),E=w.current,g=qE(c),m=C.useRef(null),v=C.useRef(!1),S=C.useContext(uc),k=C.useCallback(($,_,R=_==null?void 0:_.type)=>{f($,{originalEvent:_,source:R})},[f]),b=dn(($,_)=>{n==null||n($,_),k(!1,_,"select"),_.isPropagationStopped()||S==null||S($,_)}),P=C.useMemo(()=>({toggle:k,placement:s,show:c,menuElement:y,toggleElement:E,setMenu:p,setToggle:x}),[k,s,c,y,E,p,x]);y&&g&&!c&&(v.current=y.contains(y.ownerDocument.activeElement));const T=dn(()=>{E&&E.focus&&E.focus()}),O=dn(()=>{const $=m.current;let _=l;if(_==null&&(_=d.current&&j0(d.current)?"keyboard":!1),_===!1||_==="keyboard"&&!/^key.+$/.test($))return;const R=Zp(d.current,o)[0];R&&R.focus&&R.focus()});C.useEffect(()=>{c?O():v.current&&(v.current=!1,T())},[c,v,T,O]),C.useEffect(()=>{m.current=null});const h=($,_)=>{if(!d.current)return null;const R=Zp(d.current,o);let L=R.indexOf($)+_;return L=Math.max(0,Math.min(L,R.length)),R[L]};return eb(C.useCallback(()=>u.document,[u]),"keydown",$=>{var _,R;const{key:L}=$,U=$.target,H=(_=d.current)==null?void 0:_.contains(U),K=(R=w.current)==null?void 0:R.contains(U);if(/input|textarea/i.test(U.tagName)&&(L===" "||L!=="Escape"&&H||L==="Escape"&&U.type==="search")||!H&&!K||L==="Tab"&&(!d.current||!c))return;m.current=$.type;const j={originalEvent:$,source:$.type};switch(L){case"ArrowUp":{const D=h(U,-1);D&&D.focus&&D.focus(),$.preventDefault();return}case"ArrowDown":if($.preventDefault(),!c)f(!0,j);else{const D=h(U,1);D&&D.focus&&D.focus()}return;case"Tab":_0(U.ownerDocument,"keyup",D=>{var W;(D.key==="Tab"&&!D.target||!((W=d.current)!=null&&W.contains(D.target)))&&f(!1,j)},{once:!0});break;case"Escape":L==="Escape"&&($.preventDefault(),$.stopPropagation()),f(!1,j);break}}),A.jsx(uc.Provider,{value:b,children:A.jsx(ya.Provider,{value:P,children:a})})}Hi.displayName="Dropdown";Hi.Menu=L0;Hi.Toggle=z0;Hi.Item=V0;function sh(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function Wb(e){var t=Ub(e,"string");return typeof t=="symbol"?t:String(t)}function Ub(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Vb(e,t,n){var r=C.useRef(e!==void 0),o=C.useState(t),l=o[0],s=o[1],a=e!==void 0,u=r.current;return r.current=a,!a&&u&&l!==t&&s(t),[a?e:l,C.useCallback(function(c){for(var f=arguments.length,d=new Array(f>1?f-1:0),p=1;p(t=Sn(t,"dropdown-divider"),A.jsx(n,{ref:l,className:xn(e,t),role:r,...o})));K0.displayName="DropdownDivider";const G0=C.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},l)=>(t=Sn(t,"dropdown-header"),A.jsx(n,{ref:l,className:xn(e,t),role:r,...o})));G0.displayName="DropdownHeader";const Kb=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Gb=typeof document<"u",Qb=Gb||Kb?C.useLayoutEffect:C.useEffect,Xb=["onKeyDown"];function Yb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qb(e){return!e||e.trim()==="#"}const Q0=C.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=Yb(e,Xb);const[o]=zf(Object.assign({tagName:"a"},r)),l=dn(s=>{o.onKeyDown(s),n==null||n(s)});return qb(r.href)||r.role==="button"?A.jsx("a",Object.assign({ref:t},r,o,{onKeyDown:l})):A.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});Q0.displayName="Anchor";const X0=C.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:l,as:s=Q0,...a},u)=>{const c=Sn(e,"dropdown-item"),[f,d]=U0({key:n,href:a.href,disabled:r,onClick:o,active:l});return A.jsx(s,{...a,...f,ref:u,className:xn(t,c,d.isActive&&"active",r&&"disabled")})});X0.displayName="DropdownItem";const Y0=C.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=Sn(t,"dropdown-item-text"),A.jsx(n,{ref:o,className:xn(e,t),...r})));Y0.displayName="DropdownItemText";const ah=e=>!e||typeof e=="function"?e:t=>{e.current=t};function Zb(e,t){const n=ah(e),r=ah(t);return o=>{n&&n(o),r&&r(o)}}function q0(e,t){return C.useMemo(()=>Zb(e,t),[e,t])}const Ff=C.createContext(null);Ff.displayName="InputGroupContext";const Z0=C.createContext(null);Z0.displayName="NavbarContext";function J0(e,t){return e}const zr=Ce.oneOf(["start","end"]),Jb=Ce.oneOfType([zr,Ce.shape({sm:zr}),Ce.shape({md:zr}),Ce.shape({lg:zr}),Ce.shape({xl:zr}),Ce.shape({xxl:zr}),Ce.object]);function ey(e,t,n){const r=n?"top-end":"top-start",o=n?"top-start":"top-end",l=n?"bottom-end":"bottom-start",s=n?"bottom-start":"bottom-end",a=n?"right-start":"left-start",u=n?"right-end":"left-end",c=n?"left-start":"right-start",f=n?"left-end":"right-end";let d=e?s:l;return t==="up"?d=e?o:r:t==="end"?d=e?f:c:t==="start"?d=e?u:a:t==="down-centered"?d="bottom":t==="up-centered"&&(d="top"),d}const Wf=C.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:o=!0,show:l,renderOnMount:s,as:a="div",popperConfig:u,variant:c,...f},d)=>{let p=!1;const y=C.useContext(Z0),w=Sn(e,"dropdown-menu"),{align:x,drop:E,isRTL:g}=C.useContext(Bf);n=n||x;const m=C.useContext(Ff),v=[];if(n)if(typeof n=="object"){const $=Object.keys(n);if($.length){const _=$[0],R=n[_];p=R==="start",v.push(`${w}-${_}-${R}`)}}else n==="end"&&(p=!0);const S=ey(p,E,g),[k,{hasShown:b,popper:P,show:T,toggle:O}]=I0({flip:o,rootCloseEvent:r,show:l,usePopper:!y&&v.length===0,offset:[0,2],popperConfig:u,placement:S});if(k.ref=q0(J0(d),k.ref),Qb(()=>{T&&(P==null||P.update())},[T]),!b&&!s&&!m)return null;typeof a!="string"&&(k.show=T,k.close=()=>O==null?void 0:O(!1),k.align=n);let h=f.style;return P!=null&&P.placement&&(h={...f.style,...k.style},f["x-placement"]=P.placement),A.jsx(a,{...f,...k,style:h,...(v.length||y)&&{"data-bs-popper":"static"},className:xn(t,w,T&&"show",p&&`${w}-end`,c&&`${w}-${c}`,...v)})});Wf.displayName="DropdownMenu";const ty=C.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:l=!1,className:s,...a},u)=>{const c=Sn(t,"btn"),[f,{tagName:d}]=zf({tagName:e,disabled:l,...a}),p=d;return A.jsx(p,{...f,...a,ref:u,disabled:l,className:xn(s,c,o&&"active",n&&`${c}-${n}`,r&&`${c}-${r}`,a.href&&l&&"disabled")})});ty.displayName="Button";const Uf=C.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:o=ty,...l},s)=>{const a=Sn(e,"dropdown-toggle"),u=C.useContext(ya);r!==void 0&&(l.bsPrefix=r);const[c]=D0();return c.ref=q0(c.ref,J0(s)),A.jsx(o,{className:xn(n,a,t&&`${a}-split`,(u==null?void 0:u.show)&&"show"),...c,...l})});Uf.displayName="DropdownToggle";const ny=C.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:o,className:l,align:s="start",onSelect:a,onToggle:u,focusFirstItemOnShow:c,as:f="div",navbar:d,autoClose:p=!0,...y}=Hb(e,{show:"onToggle"}),w=C.useContext(Ff),x=Sn(n,"dropdown"),E=GE(),g=P=>p===!1?P==="click":p==="inside"?P!=="rootClose":p==="outside"?P!=="select":!0,m=dn((P,T)=>{var O;!((O=T.originalEvent)==null||(O=O.target)==null)&&O.classList.contains("dropdown-toggle")&&T.source==="mousedown"||(T.originalEvent.currentTarget===document&&(T.source!=="keydown"||T.originalEvent.key==="Escape")&&(T.source="rootClose"),g(T.source)&&(u==null||u(P,T)))}),S=ey(s==="end",r,E),k=C.useMemo(()=>({align:s,drop:r,isRTL:E}),[s,r,E]),b={down:x,"down-centered":`${x}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return A.jsx(Bf.Provider,{value:k,children:A.jsx(Hi,{placement:S,show:o,onSelect:a,onToggle:m,focusFirstItemOnShow:c,itemSelector:`.${x}-item:not(.disabled):not(:disabled)`,children:w?y.children:A.jsx(f,{...y,ref:t,className:xn(l,o&&"show",b[r])})})})});ny.displayName="Dropdown";const jl=Object.assign(ny,{Toggle:Uf,Menu:Wf,Item:X0,ItemText:Y0,Divider:K0,Header:G0}),eP={id:Ce.string,href:Ce.string,onClick:Ce.func,title:Ce.node.isRequired,disabled:Ce.bool,align:Jb,menuRole:Ce.string,renderMenuOnMount:Ce.bool,rootCloseEvent:Ce.string,menuVariant:Ce.oneOf(["dark"]),flip:Ce.bool,bsPrefix:Ce.string,variant:Ce.string,size:Ce.string},Vf=C.forwardRef(({title:e,children:t,bsPrefix:n,rootCloseEvent:r,variant:o,size:l,menuRole:s,renderMenuOnMount:a,disabled:u,href:c,id:f,menuVariant:d,flip:p,...y},w)=>A.jsxs(jl,{ref:w,...y,children:[A.jsx(Uf,{id:f,href:c,size:l,variant:o,disabled:u,childBsPrefix:n,children:e}),A.jsx(Wf,{role:s,renderOnMount:a,rootCloseEvent:r,variant:d,flip:p,children:t})]}));Vf.displayName="DropdownButton";Vf.propTypes=eP;const tP="http://localhost:1234/get-data",nP=[{featureType:"all",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{visibility:"on"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"transit",elementType:"geometry",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"poi",elementType:"geometry",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"geometry",stylers:[{visibility:"on"}]}];function rP(){const[e,t]=C.useState(!1);let n=0;const[r,o]=C.useState({}),l=C.useContext(Df),s=l.reportView,a=l.setReportView,u=l.setActiveReport;l.activeReport;const c=C.useRef(null),[f,d]=C.useState(""),[p,y]=C.useState(""),w=C.useRef(null),[x,E]=C.useState(null),[g,m]=C.useState(null),[v,S]=C.useState("SSP245"),k=T=>{d(T.target.value)};async function b(T){let O={lat:T.lat(),lon:T.lng(),addr:f,scenario:v};console.log(O);try{const $=await(await fetch(tP,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)})).json();return console.log($),o($),t(!1),$}catch(h){return console.error("Error:",h),null}}const P=()=>{window.google&&window.google.maps&&f&&new window.google.maps.Geocoder().geocode({address:f},(O,h)=>{if(h==="OK"&&O[0]){console.log(O[0]);const $=O[0].geometry.location,_=O[0].formatted_address;if(a(!0),t(!0),b($),d(_),y(_),mapInstance){console.log("test"),mapInstance.panTo($),mapInstance.setZoom(15),g&&g.setMap(null);const R=new window.google.maps.Marker({id:n,position:$,map:mapInstance,label:{text:_,className:"map-label",fontSize:"16px",fontWeight:"bold"}});i+=1,m(R),R.addListener("click",()=>{u(R.id)})}}else console.error("Geocode was not successful for the following reason: "+h)})};return C.useEffect(()=>{new sr({apiKey:"AIzaSyD7nKTP-BuFskqfyroaasPKelA5k71LcsQ",version:"weekly",libraries:["places"]}).load().then(()=>{if(w.current){const O=new window.google.maps.Map(w.current,{center:{lat:43.6532,lng:-79.3832},zoom:13,mapTypeId:"hybrid",mapTypeControl:!1,styles:nP});E(O);const h=new window.google.maps.places.Autocomplete(c.current);h.bindTo("bounds",O),h.addListener("place_changed",()=>{const $=h.getPlace();if(!$.geometry||!$.geometry.location){console.log("No details available for input: "+$.name);return}const _=$.geometry.location;a(!0),t(!0),b(_);const R=$.formatted_address;if(y(R),d(R),O){console.log("test"),O.panTo(_),O.setZoom(15),g&&g.setMap(null);const L=new window.google.maps.Marker({id:n,position:_,map:O,label:{text:R,className:"map-label",fontSize:"16px",fontWeight:"bold"}});i+=1,m(L),L.addListener("click",()=>{u(L.id)})}})}}).catch(O=>{console.error("Error loading Google Maps API:",O)})},[w]),A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"bg-white backdrop-blur-sm m-2 px-5 pb-5 rounded-lg border-black border-[1px] left-0",children:[A.jsxs("div",{className:"flex justify-left items-center",children:[A.jsx("input",{className:"mx-4 p-2 z-10 relative bg-slate-500 border-black border-2 text-black",ref:c,type:"text",placeholder:"Type in an address!",onChange:k}),A.jsxs(Vf,{id:"dropdown-basic-button",title:v,className:"relative",children:[A.jsx(jl.Item,{onClick:()=>S("SSP126"),children:"SSP126"}),A.jsx(jl.Item,{onClick:()=>S("SSP245"),children:"SSP245"}),A.jsx(jl.Item,{onClick:()=>S("SSP585"),children:"SSP585"})]}),A.jsx("button",{className:"relative border-black border-1 m-2 rounded-lg",onClick:P,children:" Search! "})]}),A.jsx("div",{ref:w,style:{width:"60vw",height:"70vh"}})]}),s&&A.jsx("div",{className:"flex w-full h-full justify-center items-center",children:e?A.jsx(QE,{}):A.jsx(WE,{name:p,data:r})})]})}function oP(){return A.jsx("div",{id:"app",className:"w-[100vw] bg-slate-300 ",children:A.jsx(UE,{children:A.jsxs(U1,{apiKey:"AIzaSyD7nKTP-BuFskqfyroaasPKelA5k71LcsQ",onLoad:()=>console.log("Maps API has loaded."),children:[A.jsx(I1,{}),A.jsxs("div",{className:"flex items-center w-[100%] relative justify-left",children:[A.jsx(rP,{}),A.jsx(iP,{})]})]})})})}const iP=()=>{const{reportView:e}=pe.useContext(Df);return!e&&A.jsx("div",{className:"relative text-white m-2 p-6 rounded-xl bg-purple-950 font-bold border-black border-4",children:"Welcome to Flood Fill! Enter a location to generate a report of its expected flood risk in the future!"})};Cg(document.getElementById("root")).render(A.jsx(C.StrictMode,{children:A.jsx(oP,{})})); +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var l="",s=0;s{e=Sn(e,"spinner");const u=`${e}-${n}`;return A.jsx(o,{ref:a,...s,className:xn(l,u,r&&`${u}-${r}`,t&&`text-${t}`)})});M0.displayName="Spinner";function QE(){return A.jsx(M0,{animation:"border",role:"status",children:A.jsx("span",{className:"visually-hidden",children:"Loading..."})})}var XE=Function.prototype.bind.call(Function.prototype.call,[].slice);function Zp(e,t){return XE(e.querySelectorAll(t))}const O0=!!(typeof window<"u"&&window.document&&window.document.createElement);var sc=!1,ac=!1;try{var eu={get passive(){return sc=!0},get once(){return ac=sc=!0}};O0&&(window.addEventListener("test",eu,eu),window.removeEventListener("test",eu,!0))}catch{}function _0(e,t,n,r){if(r&&typeof r!="boolean"&&!ac){var o=r.once,l=r.capture,s=n;!ac&&o&&(s=n.__once||function a(u){this.removeEventListener(t,a,l),n.call(this,u)},n.__once=s),e.addEventListener(t,s,sc?r:l)}e.addEventListener(t,n,r)}function YE(e,t,n){const r=C.useRef(e!==void 0),[o,l]=C.useState(t),s=e!==void 0,a=r.current;return r.current=s,!s&&a&&o!==t&&l(t),[s?e:o,C.useCallback((...u)=>{const[c,...f]=u;let d=n==null?void 0:n(c,...f);return l(c),d},[n])]}function qE(e){const t=C.useRef(null);return C.useEffect(()=>{t.current=e}),t.current}function ZE(){const[,e]=C.useReducer(t=>!t,!1);return e}function JE(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e},[e]),t}function dn(e){const t=JE(e);return C.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function eb(e,t,n,r=!1){const o=dn(n);C.useEffect(()=>{const l=typeof e=="function"?e():e;return l.addEventListener(t,o,r),()=>l.removeEventListener(t,o,r)},[e])}const ya=C.createContext(null);function tb(){return C.useState(null)}var Jp=Object.prototype.hasOwnProperty;function eh(e,t,n){for(n of e.keys())if(si(n,t))return n}function si(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&si(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(o=r,o&&typeof o=="object"&&(o=eh(t,o),!o)||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(o=r[0],o&&typeof o=="object"&&(o=eh(t,o),!o)||!si(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Jp.call(e,n)&&++r&&!Jp.call(t,n)||!(n in t)||!si(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function nb(){const e=C.useRef(!0),t=C.useRef(()=>e.current);return C.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function rb(e){const t=nb();return[e[0],C.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}const ob=zE({defaultModifiers:[CE,$E,sE,uE,bE,xE,AE,rE]}),ib=["enabled","placement","strategy","modifiers"];function lb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const sb={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},ab={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(o=>o.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,o=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&o==="tooltip"&&"setAttribute"in r){const l=r.getAttribute("aria-describedby");if(l&&l.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",l?`${l},${n.id}`:n.id)}}},ub=[];function cb(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:l="absolute",modifiers:s=ub}=n,a=lb(n,ib);const u=C.useRef(s),c=C.useRef(),f=C.useCallback(()=>{var E;(E=c.current)==null||E.update()},[]),d=C.useCallback(()=>{var E;(E=c.current)==null||E.forceUpdate()},[]),[p,y]=rb(C.useState({placement:o,update:f,forceUpdate:d,attributes:{},styles:{popper:{},arrow:{}}})),w=C.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:E})=>{const g={},m={};Object.keys(E.elements).forEach(v=>{g[v]=E.styles[v],m[v]=E.attributes[v]}),y({state:E,styles:g,attributes:m,update:f,forceUpdate:d,placement:E.placement})}}),[f,d,y]),x=C.useMemo(()=>(si(u.current,s)||(u.current=s),u.current),[s]);return C.useEffect(()=>{!c.current||!r||c.current.setOptions({placement:o,strategy:l,modifiers:[...x,w,sb]})},[l,o,w,r,x]),C.useEffect(()=>{if(!(!r||e==null||t==null))return c.current=ob(e,t,Object.assign({},a,{placement:o,strategy:l,modifiers:[...x,ab,w]})),()=>{c.current!=null&&(c.current.destroy(),c.current=void 0,y(E=>Object.assign({},E,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),p}function th(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function fb(e,t,n,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}function wl(e,t,n,r){return _0(e,t,n,r),function(){fb(e,t,n,r)}}function db(e){return e&&e.ownerDocument||document}var pb=function(){},hb=pb;const mb=ws(hb),nh=()=>{};function gb(e){return e.button===0}function yb(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const tu=e=>e&&("current"in e?e.current:e),rh={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function vb(e,t=nh,{disabled:n,clickTrigger:r="click"}={}){const o=C.useRef(!1),l=C.useRef(!1),s=C.useCallback(c=>{const f=tu(e);mb(!!f,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),o.current=!f||yb(c)||!gb(c)||!!th(f,c.target)||l.current,l.current=!1},[e]),a=dn(c=>{const f=tu(e);f&&th(f,c.target)&&(l.current=!0)}),u=dn(c=>{o.current||t(c)});C.useEffect(()=>{var c,f;if(n||e==null)return;const d=db(tu(e)),p=d.defaultView||window;let y=(c=p.event)!=null?c:(f=p.parent)==null?void 0:f.event,w=null;rh[r]&&(w=wl(d,rh[r],a,!0));const x=wl(d,r,s,!0),E=wl(d,r,m=>{if(m===y){y=void 0;return}u(m)});let g=[];return"ontouchstart"in d.documentElement&&(g=[].slice.call(d.body.children).map(m=>wl(m,"mousemove",nh))),()=>{w==null||w(),x(),E(),g.forEach(m=>m())}},[e,n,r,s,a,u])}function wb(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function xb(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function Sb({enabled:e,enableEvents:t,placement:n,flip:r,offset:o,fixed:l,containerPadding:s,arrowElement:a,popperConfig:u={}}){var c,f,d,p,y;const w=wb(u.modifiers);return Object.assign({},u,{placement:n,enabled:e,strategy:l?"fixed":u.strategy,modifiers:xb(Object.assign({},w,{eventListeners:{enabled:t,options:(c=w.eventListeners)==null?void 0:c.options},preventOverflow:Object.assign({},w.preventOverflow,{options:s?Object.assign({padding:s},(f=w.preventOverflow)==null?void 0:f.options):(d=w.preventOverflow)==null?void 0:d.options}),offset:{options:Object.assign({offset:o},(p=w.offset)==null?void 0:p.options)},arrow:Object.assign({},w.arrow,{enabled:!!a,options:Object.assign({},(y=w.arrow)==null?void 0:y.options,{element:a})}),flip:Object.assign({enabled:!!r},w.flip)}))})}const Cb=["children","usePopper"];function kb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const Eb=()=>{};function I0(e={}){const t=C.useContext(ya),[n,r]=tb(),o=C.useRef(!1),{flip:l,offset:s,rootCloseEvent:a,fixed:u=!1,placement:c,popperConfig:f={},enableEventListeners:d=!0,usePopper:p=!!t}=e,y=(t==null?void 0:t.show)==null?!!e.show:t.show;y&&!o.current&&(o.current=!0);const w=b=>{t==null||t.toggle(!1,b)},{placement:x,setMenu:E,menuElement:g,toggleElement:m}=t||{},v=cb(m,g,Sb({placement:c||x||"bottom-start",enabled:p,enableEvents:d??y,offset:s,flip:l,fixed:u,arrowElement:n,popperConfig:f})),S=Object.assign({ref:E||Eb,"aria-labelledby":m==null?void 0:m.id},v.attributes.popper,{style:v.styles.popper}),k={show:y,placement:x,hasShown:o.current,toggle:t==null?void 0:t.toggle,popper:p?v:null,arrowProps:p?Object.assign({ref:r},v.attributes.arrow,{style:v.styles.arrow}):{}};return vb(g,w,{clickTrigger:a,disabled:!y}),[S,k]}function L0(e){let{children:t,usePopper:n=!0}=e,r=kb(e,Cb);const[o,l]=I0(Object.assign({},r,{usePopper:n}));return A.jsx(A.Fragment,{children:t(o,l)})}L0.displayName="DropdownMenu";const vs={prefix:String(Math.round(Math.random()*1e10)),current:0},N0=pe.createContext(vs),bb=pe.createContext(!1);let Pb=!!(typeof window<"u"&&window.document&&window.document.createElement),nu=new WeakMap;function $b(e=!1){let t=C.useContext(N0),n=C.useRef(null);if(n.current===null&&!e){var r,o;let l=(o=pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(r=o.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(l){let s=nu.get(l);s==null?nu.set(l,{id:t.current,state:l.memoizedState}):l.memoizedState!==s.state&&(t.current=s.id,nu.delete(l))}n.current=++t.current}return n.current}function Tb(e){let t=C.useContext(N0);t===vs&&!Pb&&console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let n=$b(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function Rb(e){let t=pe.useId(),[n]=C.useState(Ib()),r=n?"react-aria":`react-aria${vs.prefix}`;return e||`${r}-${t}`}const Ab=typeof pe.useId=="function"?Rb:Tb;function Mb(){return!1}function Ob(){return!0}function _b(e){return()=>{}}function Ib(){return typeof pe.useSyncExternalStore=="function"?pe.useSyncExternalStore(_b,Mb,Ob):C.useContext(bb)}const j0=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},oh=()=>{};function D0(){const e=Ab(),{show:t=!1,toggle:n=oh,setToggle:r,menuElement:o}=C.useContext(ya)||{},l=C.useCallback(a=>{n(!t,a)},[t,n]),s={id:e,ref:r||oh,onClick:l,"aria-expanded":!!t};return o&&j0(o)&&(s["aria-haspopup"]=!0),[s,{show:t,toggle:n}]}function z0({children:e}){const[t,n]=D0();return A.jsx(A.Fragment,{children:e(t,n)})}z0.displayName="DropdownToggle";const uc=C.createContext(null),ih=(e,t=null)=>e!=null?String(e):t||null,B0=C.createContext(null);B0.displayName="NavContext";const Lb=["as","disabled"];function Nb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jb(e){return!e||e.trim()==="#"}function zf({tagName:e,disabled:t,href:n,target:r,rel:o,role:l,onClick:s,tabIndex:a=0,type:u}){e||(n!=null||r!=null||o!=null?e="a":e="button");const c={tagName:e};if(e==="button")return[{type:u||"button",disabled:t},c];const f=p=>{if((t||e==="a"&&jb(n))&&p.preventDefault(),t){p.stopPropagation();return}s==null||s(p)},d=p=>{p.key===" "&&(p.preventDefault(),f(p))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:l??"button",disabled:void 0,tabIndex:t?void 0:a,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?o:void 0,onClick:f,onKeyDown:d},c]}const F0=C.forwardRef((e,t)=>{let{as:n,disabled:r}=e,o=Nb(e,Lb);const[l,{tagName:s}]=zf(Object.assign({tagName:n,disabled:r},o));return A.jsx(s,Object.assign({},o,l,{ref:t}))});F0.displayName="Button";const Db="data-rr-ui-";function W0(e){return`${Db}${e}`}const zb=["eventKey","disabled","onClick","active","as"];function Bb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function U0({key:e,href:t,active:n,disabled:r,onClick:o}){const l=C.useContext(uc),s=C.useContext(B0),{activeKey:a}=s||{},u=ih(e,t),c=n==null&&e!=null?ih(a)===u:n;return[{onClick:dn(d=>{r||(o==null||o(d),l&&!d.isPropagationStopped()&&l(u,d))}),"aria-disabled":r||void 0,"aria-selected":c,[W0("dropdown-item")]:""},{isActive:c}]}const V0=C.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:l,as:s=F0}=e,a=Bb(e,zb);const[u]=U0({key:n,href:a.href,disabled:r,onClick:o,active:l});return A.jsx(s,Object.assign({},a,{ref:t},u))});V0.displayName="DropdownItem";const H0=C.createContext(O0?window:void 0);H0.Provider;function Fb(){return C.useContext(H0)}function lh(){const e=ZE(),t=C.useRef(null),n=C.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function Hi({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${W0("dropdown-item")}]`,focusFirstItemOnShow:l,placement:s="bottom-start",children:a}){const u=Fb(),[c,f]=YE(t,e,r),[d,p]=lh(),y=d.current,[w,x]=lh(),E=w.current,g=qE(c),m=C.useRef(null),v=C.useRef(!1),S=C.useContext(uc),k=C.useCallback(($,_,R=_==null?void 0:_.type)=>{f($,{originalEvent:_,source:R})},[f]),b=dn(($,_)=>{n==null||n($,_),k(!1,_,"select"),_.isPropagationStopped()||S==null||S($,_)}),P=C.useMemo(()=>({toggle:k,placement:s,show:c,menuElement:y,toggleElement:E,setMenu:p,setToggle:x}),[k,s,c,y,E,p,x]);y&&g&&!c&&(v.current=y.contains(y.ownerDocument.activeElement));const T=dn(()=>{E&&E.focus&&E.focus()}),O=dn(()=>{const $=m.current;let _=l;if(_==null&&(_=d.current&&j0(d.current)?"keyboard":!1),_===!1||_==="keyboard"&&!/^key.+$/.test($))return;const R=Zp(d.current,o)[0];R&&R.focus&&R.focus()});C.useEffect(()=>{c?O():v.current&&(v.current=!1,T())},[c,v,T,O]),C.useEffect(()=>{m.current=null});const h=($,_)=>{if(!d.current)return null;const R=Zp(d.current,o);let L=R.indexOf($)+_;return L=Math.max(0,Math.min(L,R.length)),R[L]};return eb(C.useCallback(()=>u.document,[u]),"keydown",$=>{var _,R;const{key:L}=$,U=$.target,H=(_=d.current)==null?void 0:_.contains(U),K=(R=w.current)==null?void 0:R.contains(U);if(/input|textarea/i.test(U.tagName)&&(L===" "||L!=="Escape"&&H||L==="Escape"&&U.type==="search")||!H&&!K||L==="Tab"&&(!d.current||!c))return;m.current=$.type;const j={originalEvent:$,source:$.type};switch(L){case"ArrowUp":{const D=h(U,-1);D&&D.focus&&D.focus(),$.preventDefault();return}case"ArrowDown":if($.preventDefault(),!c)f(!0,j);else{const D=h(U,1);D&&D.focus&&D.focus()}return;case"Tab":_0(U.ownerDocument,"keyup",D=>{var W;(D.key==="Tab"&&!D.target||!((W=d.current)!=null&&W.contains(D.target)))&&f(!1,j)},{once:!0});break;case"Escape":L==="Escape"&&($.preventDefault(),$.stopPropagation()),f(!1,j);break}}),A.jsx(uc.Provider,{value:b,children:A.jsx(ya.Provider,{value:P,children:a})})}Hi.displayName="Dropdown";Hi.Menu=L0;Hi.Toggle=z0;Hi.Item=V0;function sh(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function Wb(e){var t=Ub(e,"string");return typeof t=="symbol"?t:String(t)}function Ub(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Vb(e,t,n){var r=C.useRef(e!==void 0),o=C.useState(t),l=o[0],s=o[1],a=e!==void 0,u=r.current;return r.current=a,!a&&u&&l!==t&&s(t),[a?e:l,C.useCallback(function(c){for(var f=arguments.length,d=new Array(f>1?f-1:0),p=1;p(t=Sn(t,"dropdown-divider"),A.jsx(n,{ref:l,className:xn(e,t),role:r,...o})));K0.displayName="DropdownDivider";const G0=C.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},l)=>(t=Sn(t,"dropdown-header"),A.jsx(n,{ref:l,className:xn(e,t),role:r,...o})));G0.displayName="DropdownHeader";const Kb=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Gb=typeof document<"u",Qb=Gb||Kb?C.useLayoutEffect:C.useEffect,Xb=["onKeyDown"];function Yb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qb(e){return!e||e.trim()==="#"}const Q0=C.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=Yb(e,Xb);const[o]=zf(Object.assign({tagName:"a"},r)),l=dn(s=>{o.onKeyDown(s),n==null||n(s)});return qb(r.href)||r.role==="button"?A.jsx("a",Object.assign({ref:t},r,o,{onKeyDown:l})):A.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});Q0.displayName="Anchor";const X0=C.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:l,as:s=Q0,...a},u)=>{const c=Sn(e,"dropdown-item"),[f,d]=U0({key:n,href:a.href,disabled:r,onClick:o,active:l});return A.jsx(s,{...a,...f,ref:u,className:xn(t,c,d.isActive&&"active",r&&"disabled")})});X0.displayName="DropdownItem";const Y0=C.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=Sn(t,"dropdown-item-text"),A.jsx(n,{ref:o,className:xn(e,t),...r})));Y0.displayName="DropdownItemText";const ah=e=>!e||typeof e=="function"?e:t=>{e.current=t};function Zb(e,t){const n=ah(e),r=ah(t);return o=>{n&&n(o),r&&r(o)}}function q0(e,t){return C.useMemo(()=>Zb(e,t),[e,t])}const Ff=C.createContext(null);Ff.displayName="InputGroupContext";const Z0=C.createContext(null);Z0.displayName="NavbarContext";function J0(e,t){return e}const zr=Ce.oneOf(["start","end"]),Jb=Ce.oneOfType([zr,Ce.shape({sm:zr}),Ce.shape({md:zr}),Ce.shape({lg:zr}),Ce.shape({xl:zr}),Ce.shape({xxl:zr}),Ce.object]);function ey(e,t,n){const r=n?"top-end":"top-start",o=n?"top-start":"top-end",l=n?"bottom-end":"bottom-start",s=n?"bottom-start":"bottom-end",a=n?"right-start":"left-start",u=n?"right-end":"left-end",c=n?"left-start":"right-start",f=n?"left-end":"right-end";let d=e?s:l;return t==="up"?d=e?o:r:t==="end"?d=e?f:c:t==="start"?d=e?u:a:t==="down-centered"?d="bottom":t==="up-centered"&&(d="top"),d}const Wf=C.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:o=!0,show:l,renderOnMount:s,as:a="div",popperConfig:u,variant:c,...f},d)=>{let p=!1;const y=C.useContext(Z0),w=Sn(e,"dropdown-menu"),{align:x,drop:E,isRTL:g}=C.useContext(Bf);n=n||x;const m=C.useContext(Ff),v=[];if(n)if(typeof n=="object"){const $=Object.keys(n);if($.length){const _=$[0],R=n[_];p=R==="start",v.push(`${w}-${_}-${R}`)}}else n==="end"&&(p=!0);const S=ey(p,E,g),[k,{hasShown:b,popper:P,show:T,toggle:O}]=I0({flip:o,rootCloseEvent:r,show:l,usePopper:!y&&v.length===0,offset:[0,2],popperConfig:u,placement:S});if(k.ref=q0(J0(d),k.ref),Qb(()=>{T&&(P==null||P.update())},[T]),!b&&!s&&!m)return null;typeof a!="string"&&(k.show=T,k.close=()=>O==null?void 0:O(!1),k.align=n);let h=f.style;return P!=null&&P.placement&&(h={...f.style,...k.style},f["x-placement"]=P.placement),A.jsx(a,{...f,...k,style:h,...(v.length||y)&&{"data-bs-popper":"static"},className:xn(t,w,T&&"show",p&&`${w}-end`,c&&`${w}-${c}`,...v)})});Wf.displayName="DropdownMenu";const ty=C.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:l=!1,className:s,...a},u)=>{const c=Sn(t,"btn"),[f,{tagName:d}]=zf({tagName:e,disabled:l,...a}),p=d;return A.jsx(p,{...f,...a,ref:u,disabled:l,className:xn(s,c,o&&"active",n&&`${c}-${n}`,r&&`${c}-${r}`,a.href&&l&&"disabled")})});ty.displayName="Button";const Uf=C.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:o=ty,...l},s)=>{const a=Sn(e,"dropdown-toggle"),u=C.useContext(ya);r!==void 0&&(l.bsPrefix=r);const[c]=D0();return c.ref=q0(c.ref,J0(s)),A.jsx(o,{className:xn(n,a,t&&`${a}-split`,(u==null?void 0:u.show)&&"show"),...c,...l})});Uf.displayName="DropdownToggle";const ny=C.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:o,className:l,align:s="start",onSelect:a,onToggle:u,focusFirstItemOnShow:c,as:f="div",navbar:d,autoClose:p=!0,...y}=Hb(e,{show:"onToggle"}),w=C.useContext(Ff),x=Sn(n,"dropdown"),E=GE(),g=P=>p===!1?P==="click":p==="inside"?P!=="rootClose":p==="outside"?P!=="select":!0,m=dn((P,T)=>{var O;!((O=T.originalEvent)==null||(O=O.target)==null)&&O.classList.contains("dropdown-toggle")&&T.source==="mousedown"||(T.originalEvent.currentTarget===document&&(T.source!=="keydown"||T.originalEvent.key==="Escape")&&(T.source="rootClose"),g(T.source)&&(u==null||u(P,T)))}),S=ey(s==="end",r,E),k=C.useMemo(()=>({align:s,drop:r,isRTL:E}),[s,r,E]),b={down:x,"down-centered":`${x}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return A.jsx(Bf.Provider,{value:k,children:A.jsx(Hi,{placement:S,show:o,onSelect:a,onToggle:m,focusFirstItemOnShow:c,itemSelector:`.${x}-item:not(.disabled):not(:disabled)`,children:w?y.children:A.jsx(f,{...y,ref:t,className:xn(l,o&&"show",b[r])})})})});ny.displayName="Dropdown";const jl=Object.assign(ny,{Toggle:Uf,Menu:Wf,Item:X0,ItemText:Y0,Divider:K0,Header:G0}),eP={id:Ce.string,href:Ce.string,onClick:Ce.func,title:Ce.node.isRequired,disabled:Ce.bool,align:Jb,menuRole:Ce.string,renderMenuOnMount:Ce.bool,rootCloseEvent:Ce.string,menuVariant:Ce.oneOf(["dark"]),flip:Ce.bool,bsPrefix:Ce.string,variant:Ce.string,size:Ce.string},Vf=C.forwardRef(({title:e,children:t,bsPrefix:n,rootCloseEvent:r,variant:o,size:l,menuRole:s,renderMenuOnMount:a,disabled:u,href:c,id:f,menuVariant:d,flip:p,...y},w)=>A.jsxs(jl,{ref:w,...y,children:[A.jsx(Uf,{id:f,href:c,size:l,variant:o,disabled:u,childBsPrefix:n,children:e}),A.jsx(Wf,{role:s,renderOnMount:a,rootCloseEvent:r,variant:d,flip:p,children:t})]}));Vf.displayName="DropdownButton";Vf.propTypes=eP;const tP="http://localhost:1234/get-data",nP=[{featureType:"all",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{visibility:"on"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"transit",elementType:"geometry",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"poi",elementType:"geometry",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"geometry",stylers:[{visibility:"on"}]}];function rP(){const[e,t]=C.useState(!1);let n=0;const[r,o]=C.useState({}),l=C.useContext(Df),s=l.reportView,a=l.setReportView,u=l.setActiveReport;l.activeReport;const c=C.useRef(null),[f,d]=C.useState(""),[p,y]=C.useState(""),w=C.useRef(null),[x,E]=C.useState(null),[g,m]=C.useState(null),[v,S]=C.useState("SSP245"),k=T=>{d(T.target.value)};async function b(T){let O={lat:T.lat(),lon:T.lng(),addr:f,scenario:v};try{const h=await fetch(tP,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)});if(!h.ok)return alert("No data available"),t(!1),a(!1),null;const $=await h.json();return console.log($),o($),t(!1),$}catch{return console.error("Error"),null}}const P=()=>{window.google&&window.google.maps&&f&&new window.google.maps.Geocoder().geocode({address:f},(O,h)=>{if(h==="OK"&&O[0]){console.log(O[0]);const $=O[0].geometry.location,_=O[0].formatted_address;if(a(!0),t(!0),b($),d(_),y(_),mapInstance){console.log("test"),mapInstance.panTo($),mapInstance.setZoom(15),g&&g.setMap(null);const R=new window.google.maps.Marker({id:n,position:$,map:mapInstance,label:{text:_,className:"map-label",fontSize:"16px",fontWeight:"bold"}});i+=1,m(R),R.addListener("click",()=>{u(R.id)})}}else console.error("Geocode was not successful for the following reason: "+h)})};return C.useEffect(()=>{new sr({apiKey:"AIzaSyD7nKTP-BuFskqfyroaasPKelA5k71LcsQ",version:"weekly",libraries:["places"]}).load().then(()=>{if(w.current){const O=new window.google.maps.Map(w.current,{center:{lat:43.6532,lng:-79.3832},zoom:13,mapTypeId:"hybrid",mapTypeControl:!1,styles:nP});E(O);const h=new window.google.maps.places.Autocomplete(c.current);h.bindTo("bounds",O),h.addListener("place_changed",()=>{const $=h.getPlace();if(!$.geometry||!$.geometry.location){console.log("No details available for input: "+$.name);return}const _=$.geometry.location;a(!0),t(!0),b(_);const R=$.formatted_address;if(y(R),d(R),O){console.log("test"),console.log($),O.panTo(_),O.setZoom(15),g&&g.setMap(null);const L=new window.google.maps.Marker({id:n,position:_,map:O,label:{text:R,className:"map-label",fontSize:"16px",fontWeight:"bold"}});i+=1,m(L),L.addListener("click",()=>{u(L.id)})}})}}).catch(O=>{console.error("Error loading Google Maps API:",O)})},[w]),A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"bg-white backdrop-blur-sm m-2 px-5 pb-5 rounded-lg border-black border-[1px] left-0",children:[A.jsxs("div",{className:"flex justify-left items-center",children:[A.jsx("input",{className:"mx-4 p-2 z-10 relative bg-slate-500 border-black border-2 text-black",ref:c,type:"text",placeholder:"Type in an address!",onChange:k}),A.jsxs(Vf,{id:"dropdown-basic-button",title:v,className:"relative",children:[A.jsx(jl.Item,{onClick:()=>S("SSP126"),children:"SSP126"}),A.jsx(jl.Item,{onClick:()=>S("SSP245"),children:"SSP245"}),A.jsx(jl.Item,{onClick:()=>S("SSP585"),children:"SSP585"})]}),A.jsx("button",{className:"relative border-black border-1 m-2 rounded-lg",onClick:P,children:" Search! "})]}),A.jsx("div",{ref:w,style:{width:"60vw",height:"70vh"}})]}),s&&A.jsx("div",{className:"flex w-full h-full justify-center items-center",children:e?A.jsx(QE,{}):A.jsx(WE,{name:p,data:r})})]})}function oP(){return A.jsx("div",{id:"app",className:"w-[100vw] bg-slate-300 ",children:A.jsx(UE,{children:A.jsxs(U1,{apiKey:"AIzaSyD7nKTP-BuFskqfyroaasPKelA5k71LcsQ",onLoad:()=>console.log("Maps API has loaded."),children:[A.jsx(I1,{}),A.jsxs("div",{className:"flex items-center w-[100%] relative justify-left",children:[A.jsx(rP,{}),A.jsx(iP,{})]})]})})})}const iP=()=>{const{reportView:e}=pe.useContext(Df);return!e&&A.jsx("div",{className:"relative text-white m-2 p-6 rounded-xl bg-purple-950 font-bold border-black border-4",children:"Welcome to Flood Fill! Enter a location to generate a report of its expected flood risk in the future!"})};Cg(document.getElementById("root")).render(A.jsx(C.StrictMode,{children:A.jsx(oP,{})})); diff --git a/index.html b/index.html index 1ef4b0d..de7cfe0 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Flood Fill - +