diff --git a/starter/assets/2AaRyeKOjg4f.js b/starter/assets/2AaRyeKOjg4f.js new file mode 100644 index 000000000..43836c37f --- /dev/null +++ b/starter/assets/2AaRyeKOjg4f.js @@ -0,0 +1,95 @@ +var C_=Object.defineProperty;var Id=i=>{throw TypeError(i)};var S_=(i,t,e)=>t in i?C_(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var Ct=(i,t,e)=>S_(i,typeof t!="symbol"?t+"":t,e),ch=(i,t,e)=>t.has(i)||Id("Cannot "+e);var C=(i,t,e)=>(ch(i,t,"read from private field"),e?e.call(i):t.get(i)),Y=(i,t,e)=>t.has(i)?Id("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),rt=(i,t,e,n)=>(ch(i,t,"write to private field"),n?n.call(i,e):t.set(i,e),e),lt=(i,t,e)=>(ch(i,t,"access private method"),e);var Rd=(i,t,e,n)=>({set _(s){rt(i,t,s,e)},get _(){return C(i,t,n)}});import{i as Qc,e as I_,f as R_,g as T_,r as b,h as P_,k as nc,l as L_,m as tu,n as A_,o as Zn,p as eu,q as wl,j as R,b as Oe,s as Ks,I as Cl,t as O_,v as Pa,w as Kg,x as D_,y as k_,z as F_,A as N_,C as Ri,D as sc,E as G_,F as Er,G as z_,J as V_,K as j_,L as B_,M as U_,N as di,O as rc,P as W_,Q as Zg,B as Mt,u as iu,R as Td,S as Pd,U as $_,V as Ld,W as X_,X as H_,_ as Ad,c as Y_,Y as Jg,a as Jn,Z as Un,T as Sl,$ as q_,a0 as J,a1 as Q,a2 as Qg,a3 as K_,a4 as Od,a5 as Z_,d as J_}from"./BUVr5rEhM7JP.js";import{u as De,c as nu,T as Dd,S as kd}from"./D_NXjk9T_0pm.js";import{u as t0,a as Q_,s as tv,b as e0,d as ev,B as i0,F as n0,H as iv}from"./7klUr-ROEMCm.js";const Za=Symbol("EventEmitterState");class s0{[Za]=new nv;on(t,e){return this[Za].on(t,{listener:e})}once(t,e){return this[Za].on(t,{listener:e,once:!0})}emit(t,...e){this[Za].emit(t,e[0])}}class nv{handlers=new Map;on(t,e){let n=this.handlers.get(t);return n||(n=new Set,this.handlers.set(t,n)),n.add(e),{destroy(){e.removed=!0,n?.delete(e),n=void 0}}}emit(t,e){const n=this.handlers.get(t);if(!n)return;const s=[...n];for(const r of s)r.removed||(r.once&&(r.removed=!0,n.delete(r)),r.listener(e))}}function sv(i){return r0(i)?.defaultView??window}function r0(i){return Qc(i)?i.ownerDocument:document}function rv(i){return r0(i).activeElement}const a0=i=>i.hasAttribute("tabindex"),av=i=>a0(i)&&i.tabIndex===-1;function ov(i){if(!Qc(i)||I_(i)||R_(i))return!1;const{localName:t}=i;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const n={a:()=>i.hasAttribute("href"),audio:()=>i.hasAttribute("controls"),video:()=>i.hasAttribute("controls")};return t in n?n[t]():T_(i)?!0:a0(i)}function lv(i){return i?Qc(i)&&ov(i)&&!av(i):!1}function hv(i){const{isOpen:t,ref:e}=i,[n,s]=b.useState(t),[r,a]=b.useState(!1);return b.useEffect(()=>{r||(s(t),a(!0))},[t,r,n]),P_(()=>e.current,"animationend",()=>{s(t)}),{present:!(t?!1:!n),onComplete(){const l=sv(e.current),h=new l.CustomEvent("animationend",{bubbles:!0});e.current?.dispatchEvent(h)}}}function cv(i){const t=i.current;if(!t)return!1;const e=rv(t);return!e||t.contains(e)?!1:!!lv(e)}function uv(i,t){const{shouldFocus:e,visible:n,focusRef:s}=t,r=e&&!n;nc(()=>{if(!r||cv(i))return;const a=s?.current||i.current;let o;if(a)return o=requestAnimationFrame(()=>{a.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(o)}},[r,i,s])}function dv(i,t){const e=b.useId();return b.useMemo(()=>i||[t,e].filter(Boolean).join("-"),[i,t,e])}function fv(i,...t){const e=dv(i);return b.useMemo(()=>t.map(n=>`${n}-${e}`),[e,t])}function gv(i){const{ref:t,handler:e,enabled:n=!0}=i,s=L_(e),a=b.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;b.useEffect(()=>{if(!n)return;const o=u=>{uh(u,t)&&(a.isPointerDown=!0)},l=u=>{if(a.ignoreEmulatedMouseEvents){a.ignoreEmulatedMouseEvents=!1;return}a.isPointerDown&&e&&uh(u,t)&&(a.isPointerDown=!1,s(u))},h=u=>{a.ignoreEmulatedMouseEvents=!0,e&&a.isPointerDown&&uh(u,t)&&(a.isPointerDown=!1,s(u))},c=o0(t.current);return c.addEventListener("mousedown",o,!0),c.addEventListener("mouseup",l,!0),c.addEventListener("touchstart",o,!0),c.addEventListener("touchend",h,!0),()=>{c.removeEventListener("mousedown",o,!0),c.removeEventListener("mouseup",l,!0),c.removeEventListener("touchstart",o,!0),c.removeEventListener("touchend",h,!0)}},[e,t,s,a,n])}function uh(i,t){const e=i.target;return e&&!o0(e).contains(e)?!1:!t.current?.contains(i.composedPath?.()[0]??e)}function o0(i){return i?.ownerDocument??document}function Fd(i){return i.sort((t,e)=>{const n=t.compareDocumentPosition(e);if(n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}const mv=i=>typeof i=="object"&&"nodeType"in i&&i.nodeType===Node.ELEMENT_NODE;function Nd(i,t,e){let n=i+1;return e&&n>=t&&(n=0),n}function Gd(i,t,e){let n=i-1;return e&&n<0&&(n=t),n}const dh=typeof window<"u"?b.useLayoutEffect:b.useEffect,zd=i=>i;var pv=Object.defineProperty,_v=(i,t,e)=>t in i?pv(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Lt=(i,t,e)=>(_v(i,typeof t!="symbol"?t+"":t,e),e);class vv{constructor(){Lt(this,"descendants",new Map),Lt(this,"register",t=>{if(t!=null)return mv(t)?this.registerNode(t):e=>{this.registerNode(e,t)}}),Lt(this,"unregister",t=>{this.descendants.delete(t);const e=Fd(Array.from(this.descendants.keys()));this.assignIndex(e)}),Lt(this,"destroy",()=>{this.descendants.clear()}),Lt(this,"assignIndex",t=>{this.descendants.forEach(e=>{const n=t.indexOf(e.node);e.index=n,e.node.dataset.index=e.index.toString()})}),Lt(this,"count",()=>this.descendants.size),Lt(this,"enabledCount",()=>this.enabledValues().length),Lt(this,"values",()=>Array.from(this.descendants.values()).sort((e,n)=>e.index-n.index)),Lt(this,"enabledValues",()=>this.values().filter(t=>!t.disabled)),Lt(this,"item",t=>{if(this.count()!==0)return this.values()[t]}),Lt(this,"enabledItem",t=>{if(this.enabledCount()!==0)return this.enabledValues()[t]}),Lt(this,"first",()=>this.item(0)),Lt(this,"firstEnabled",()=>this.enabledItem(0)),Lt(this,"last",()=>this.item(this.descendants.size-1)),Lt(this,"lastEnabled",()=>{const t=this.enabledValues().length-1;return this.enabledItem(t)}),Lt(this,"indexOf",t=>t?this.descendants.get(t)?.index??-1:-1),Lt(this,"enabledIndexOf",t=>t==null?-1:this.enabledValues().findIndex(e=>e.node.isSameNode(t))),Lt(this,"next",(t,e=!0)=>{const n=Nd(t,this.count(),e);return this.item(n)}),Lt(this,"nextEnabled",(t,e=!0)=>{const n=this.item(t);if(!n)return;const s=this.enabledIndexOf(n.node),r=Nd(s,this.enabledCount(),e);return this.enabledItem(r)}),Lt(this,"prev",(t,e=!0)=>{const n=Gd(t,this.count()-1,e);return this.item(n)}),Lt(this,"prevEnabled",(t,e=!0)=>{const n=this.item(t);if(!n)return;const s=this.enabledIndexOf(n.node),r=Gd(s,this.enabledCount()-1,e);return this.enabledItem(r)}),Lt(this,"registerNode",(t,e)=>{if(!t||this.descendants.has(t))return;const n=Array.from(this.descendants.keys()).concat(t),s=Fd(n);e?.disabled&&(e.disabled=!!e.disabled);const r={node:t,index:-1,...e};this.descendants.set(t,r),this.assignIndex(s)})}}function yv(){const[i,t]=tu({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});return[i,t,()=>{const s=b.useRef(new vv);return dh(()=>()=>s.current.destroy()),s.current},s=>{const r=t(),[a,o]=b.useState(-1),l=b.useRef(null);dh(()=>()=>{l.current&&r.unregister(l.current)},[]),dh(()=>{if(!l.current)return;const c=Number(l.current.dataset.index);a!=c&&!Number.isNaN(c)&&o(c)});const h=zd(s?r.register(s):r.register);return{descendants:r,index:a,enabledIndex:r.enabledIndexOf(l.current),register:A_(h,l)}}]}const su=Zn(function(t,e){const{borderLeftWidth:n,borderBottomWidth:s,borderTopWidth:r,borderRightWidth:a,borderWidth:o,borderStyle:l,borderColor:h,...c}=eu("Divider",t),{className:u,orientation:d="horizontal",__css:g,...f}=wl(t),m={vertical:{borderLeftWidth:n||a||o||"1px",height:"100%"},horizontal:{borderBottomWidth:s||r||o||"1px",width:"100%"}};return R.jsx(Oe.hr,{ref:e,"aria-orientation":d,...f,__css:{...c,border:"0",borderColor:h,borderStyle:l,...m[d],...g},className:Ks("chakra-divider",u)})});su.displayName="Divider";const Ms=Zn(function(t,e){const{direction:n,align:s,justify:r,wrap:a,basis:o,grow:l,shrink:h,...c}=t,u={display:"flex",flexDirection:n,alignItems:s,justifyContent:r,flexWrap:a,flexBasis:o,flexGrow:l,flexShrink:h};return R.jsx(Oe.div,{ref:e,__css:u,...c})});Ms.displayName="Flex";function xv(i,t){if(i==null)return{};var e={};for(var n in i)if({}.hasOwnProperty.call(i,n)){if(t.includes(n))continue;e[n]=i[n]}return e}function ac(i,t){return ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},ac(i,t)}function $n(i){"@babel/helpers - typeof";return $n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$n(i)}function Mv(i,t){if($n(i)!="object"||!i)return i;var e=i[Symbol.toPrimitive];if(e!==void 0){var n=e.call(i,t||"default");if($n(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(i)}function l0(i){var t=Mv(i,"string");return $n(t)=="symbol"?t:t+""}function bs(i,t,e){return(t=l0(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}const ru=Zn(function(t,e){const n=eu("FormLabel",t),s=wl(t),{className:r,children:a,requiredIndicator:o=R.jsx(h0,{}),optionalIndicator:l=null,...h}=s,c=t0(),u=c?.getLabelProps(h,e)??{ref:e,...h};return R.jsxs(Oe.label,{...u,className:Ks("chakra-form__label",s.className),__css:{display:"block",textAlign:"start",...n},children:[a,c?.isRequired?o:l]})});ru.displayName="FormLabel";const h0=Zn(function(t,e){const n=t0(),s=Q_();if(!n?.isRequired)return null;const r=Ks("chakra-form__required-indicator",t.className);return R.jsx(Oe.span,{...n?.getRequiredIndicatorProps(t,e),__css:s.requiredIndicator,className:r})});h0.displayName="RequiredIndicator";function bv(i){const{viewBox:t="0 0 24 24",d:e,displayName:n,defaultProps:s={}}=i,r=b.Children.toArray(i.path),a=Zn((o,l)=>R.jsx(Cl,{ref:l,viewBox:t,...s,...o,children:r.length?r:R.jsx("path",{fill:"currentColor",d:e})}));return a.displayName=n,a}function Ev(i,t={}){const{ssr:e=!0,fallback:n}=t,{getWindow:s}=O_(),r=Array.isArray(i)?i:[i];let a=Array.isArray(n)?n:[n];a=a.filter(h=>h!=null);const[o,l]=b.useState(()=>r.map((h,c)=>({media:h,matches:e?!!a[c]:s().matchMedia(h).matches})));return b.useEffect(()=>{const h=s();l(r.map(d=>({media:d,matches:h.matchMedia(d).matches})));const c=r.map(d=>h.matchMedia(d)),u=d=>{l(g=>g.slice().map(f=>f.media===d.media?{...f,matches:d.matches}:f))};return c.forEach(d=>{typeof d.addListener=="function"?d.addListener(u):d.addEventListener("change",u)}),()=>{c.forEach(d=>{typeof d.removeListener=="function"?d.removeListener(u):d.removeEventListener("change",u)})}},[s]),o.map(h=>h.matches)}function wv(i){const t=Kg(i)?i:{fallback:i??"base"},n=Pa().__breakpoints.details.map(({minMaxQuery:o,breakpoint:l})=>({breakpoint:l,query:o.replace("@media screen and ","")})),s=n.map(o=>o.breakpoint===t.fallback),a=Ev(n.map(o=>o.query),{fallback:s,ssr:t.ssr}).findIndex(o=>o==!0);return n[a]?.breakpoint??t.fallback}function Cv(i,t,e=D_){let n=Object.keys(i).indexOf(t);if(n!==-1)return i[t];let s=e.indexOf(t);for(;s>=0;){const r=e[s];if(i.hasOwnProperty(r)){n=s;break}s-=1}if(n!==-1){const r=e[n];return i[r]}}function Sv(i,t){const e=Kg(t)?t:{fallback:t??"base"},n=wv(e),s=Pa();if(!n)return;const r=Array.from(s.__breakpoints?.keys||[]),a=Array.isArray(i)?Object.fromEntries(Object.entries(k_(i,r)).map(([o,l])=>[o,l])):i;return Cv(a,n,r)}const[Iv,IO,Rv,RO]=yv(),[Tv,TO]=tu({strict:!1,name:"MenuContext"});function Pv(i){return i?.ownerDocument??document}function Lv(i={}){const{id:t,closeOnSelect:e=!0,closeOnBlur:n=!0,initialFocusRef:s,autoSelect:r=!0,isLazy:a,isOpen:o,defaultIsOpen:l,onClose:h,onOpen:c,placement:u="bottom-start",lazyBehavior:d="unmount",direction:g,computePositionOnMount:f=!1,...m}=i,p=b.useRef(null),_=b.useRef(null),v=b.useRef(!0),x=Rv(),y=b.useCallback(()=>{requestAnimationFrame(()=>{p.current?.focus({preventScroll:!1})})},[]),M=b.useCallback(()=>{const X=setTimeout(()=>{if(s)s.current?.focus();else if(!x.count())p.current?.focus({preventScroll:!1});else{const A=x.firstEnabled();A&&G(A.index)}});q.current.add(X)},[x,s]),w=b.useCallback(()=>{const X=setTimeout(()=>{if(!x.count())p.current?.focus({preventScroll:!1});else{const A=x.lastEnabled();A&&G(A.index)}});q.current.add(X)},[x]),I=b.useCallback(()=>{c?.(),r?M():y()},[r,M,y,c]),{isOpen:E,onOpen:S,onClose:T,onToggle:O}=F_({isOpen:o,defaultIsOpen:l,onClose:h,onOpen:I});gv({enabled:E&&n,ref:p,handler:X=>{const A=X.composedPath?.()?.[0]??X.target;_.current?.contains(A)||T()}});const P=N_({...m,enabled:E||f,placement:u,direction:g}),[N,G]=b.useState(-1);uv(p,{focusRef:_,visible:E,shouldFocus:!0});const k=hv({isOpen:E,ref:p}),[D,z]=fv(t,"menu-button","menu-list"),U=b.useCallback(()=>{S(),y()},[S,y]),q=b.useRef(new Set([]));b.useEffect(()=>{const X=q.current;return()=>{X.forEach(A=>clearTimeout(A)),X.clear()}},[]),nc(()=>{E||(G(-1),p.current?.scrollTo(0,0))},[E]),nc(()=>{E&&N===-1&&y()},[N,E]),b.useEffect(()=>{if(!E)return;x.item(N)?.node?.focus({preventScroll:!v.current})},[x,N,E]);const V=b.useCallback(()=>{S(),M()},[M,S]),$=b.useCallback(()=>{v.current=!0,S(),w()},[S,w]),H=b.useCallback(()=>{const X=Pv(p.current),A=p.current?.contains(X.activeElement);if(!(E&&!A))return;x.item(N)?.node?.focus({preventScroll:!v.current})},[E,N,x]);return{openAndFocusMenu:U,openAndFocusFirstItem:V,openAndFocusLastItem:$,onTransitionEnd:H,unstable__animationState:k,descendants:x,popper:P,buttonId:D,menuId:z,forceUpdate:P.forceUpdate,orientation:"vertical",isOpen:E,onToggle:O,onOpen:S,onClose:T,menuRef:p,buttonRef:_,focusedIndex:N,closeOnSelect:e,closeOnBlur:n,autoSelect:r,setFocusedIndex:G,isLazy:a,lazyBehavior:d,initialFocusRef:s,scrollIntoViewRef:v}}const[Av,Ov]=tu({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),c0=i=>{const{children:t}=i,e=Ri("Menu",i),n=wl(i),{direction:s}=Pa(),{descendants:r,...a}=Lv({...n,direction:s}),o=b.useMemo(()=>a,[a]),{isOpen:l,onClose:h,forceUpdate:c}=o;return R.jsx(Iv,{value:r,children:R.jsx(Tv,{value:o,children:R.jsx(Av,{value:e,children:sc(t,{isOpen:l,onClose:h,forceUpdate:c})})})})};c0.displayName="Menu";const u0=i=>{const{className:t,children:e,...n}=i,s=Ov(),r=b.Children.only(e),a=b.isValidElement(r)?b.cloneElement(r,{focusable:"false","aria-hidden":!0,className:Ks("chakra-menu__icon",r.props.className)}):null,o=Ks("chakra-menu__icon-wrapper",t);return R.jsx(Oe.span,{className:o,...n,__css:s.icon,children:a})};u0.displayName="MenuIcon";const d0=Zn(function(t,e){const{children:n,placeholder:s,className:r,...a}=t;return R.jsxs(Oe.select,{...a,ref:e,className:Ks("chakra-select",r),children:[s&&R.jsx("option",{value:"",children:s}),n]})});d0.displayName="SelectField";const f0=Zn((i,t)=>{const e=Ri("Select",i),{rootProps:n,placeholder:s,icon:r,color:a,height:o,h:l,minH:h,minHeight:c,iconColor:u,iconSize:d,...g}=wl(i),[f,m]=tv(g,G_),p=e0(m),_={width:"100%",height:"fit-content",position:"relative",color:a},v={paddingEnd:"2rem",...e.field,_focus:{zIndex:"unset",...e.field?._focus}};return R.jsxs(Oe.div,{className:"chakra-select__wrapper",__css:_,...f,...n,children:[R.jsx(d0,{ref:t,height:l??o,minH:h??c,placeholder:s,...p,__css:v,children:i.children}),R.jsx(g0,{"data-disabled":ev(p.disabled),...(u||a)&&{color:u||a},__css:e.icon,...d&&{fontSize:d},children:r})]})});f0.displayName="Select";const Dv=i=>R.jsx("svg",{viewBox:"0 0 24 24",...i,children:R.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),kv=Oe("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),g0=i=>{const{children:t=R.jsx(Dv,{}),...e}=i,n=b.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return R.jsx(kv,{...e,className:"chakra-select__icon-wrapper",children:b.isValidElement(t)?n:null})};g0.displayName="SelectIcon";function Fv(i,t){const e=i??"bottom";return{"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[e]?.[t]??e}function Nv(i,t){const e=s=>({...t,...s,position:Fv(s?.position??t?.position,i)}),n=s=>{const r=e(s),a=z_(r);return Er.notify(a,r)};return n.update=(s,r)=>{Er.update(s,e(r))},n.promise=(s,r)=>{const a=n({...r.loading,status:"loading",duration:null});s.then(o=>n.update(a,{status:"success",duration:5e3,...sc(r.success,o)})).catch(o=>n.update(a,{status:"error",duration:5e3,...sc(r.error,o)}))},n.closeAll=Er.closeAll,n.close=Er.close,n.isActive=Er.isActive,n}function Gv(i){const{theme:t}=V_(),e=j_();return b.useMemo(()=>Nv(t.direction,{...e,...i}),[i,t.direction,e])}function oc(i){const t=b.useRef(null);return b.useLayoutEffect(()=>{t.current=i}),b.useCallback((...n)=>{const s=t.current;return s(...n)},[])}const zv=B_({},U_);var Vv=Symbol.for("preact-signals");function Il(){if(_n>1)_n--;else{for(var i,t=!1;Br!==void 0;){var e=Br;for(Br=void 0,lc++;e!==void 0;){var n=e.o;if(e.o=void 0,e.f&=-3,!(8&e.f)&&p0(e))try{e.c()}catch(s){t||(i=s,t=!0)}e=n}}if(lc=0,_n--,t)throw i}}function jv(i){if(_n>0)return i();_n++;try{return i()}finally{Il()}}var xt=void 0;function La(i){var t=xt;xt=void 0;try{return i()}finally{xt=t}}var Br=void 0,_n=0,lc=0,Fo=0;function m0(i){if(xt!==void 0){var t=i.n;if(t===void 0||t.t!==xt)return t={i:0,S:i,p:xt.s,n:void 0,t:xt,e:void 0,x:void 0,r:t},xt.s!==void 0&&(xt.s.n=t),xt.s=t,i.n=t,32&xt.f&&i.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=xt.s,t.n=void 0,xt.s.n=t,xt.s=t),t}}function ue(i){this.v=i,this.i=0,this.n=void 0,this.t=void 0}ue.prototype.brand=Vv;ue.prototype.h=function(){return!0};ue.prototype.S=function(i){this.t!==i&&i.e===void 0&&(i.x=this.t,this.t!==void 0&&(this.t.e=i),this.t=i)};ue.prototype.U=function(i){if(this.t!==void 0){var t=i.e,e=i.x;t!==void 0&&(t.x=e,i.e=void 0),e!==void 0&&(e.e=t,i.x=void 0),i===this.t&&(this.t=e)}};ue.prototype.subscribe=function(i){var t=this;return x0(function(){var e=t.value,n=xt;xt=void 0;try{i(e)}finally{xt=n}})};ue.prototype.valueOf=function(){return this.value};ue.prototype.toString=function(){return this.value+""};ue.prototype.toJSON=function(){return this.value};ue.prototype.peek=function(){var i=xt;xt=void 0;try{return this.value}finally{xt=i}};Object.defineProperty(ue.prototype,"value",{get:function(){var i=m0(this);return i!==void 0&&(i.i=this.i),this.v},set:function(i){if(i!==this.v){if(lc>100)throw new Error("Cycle detected");this.v=i,this.i++,Fo++,_n++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Il()}}}});function au(i){return new ue(i)}function p0(i){for(var t=i.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function _0(i){for(var t=i.s;t!==void 0;t=t.n){var e=t.S.n;if(e!==void 0&&(t.r=e),t.S.n=t,t.i=-1,t.n===void 0){i.s=t;break}}}function v0(i){for(var t=i.s,e=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):e=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}i.s=e}function dr(i){ue.call(this,void 0),this.x=i,this.s=void 0,this.g=Fo-1,this.f=4}(dr.prototype=new ue).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Fo))return!0;if(this.g=Fo,this.f|=1,this.i>0&&!p0(this))return this.f&=-2,!0;var i=xt;try{_0(this),xt=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return xt=i,v0(this),this.f&=-2,!0};dr.prototype.S=function(i){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ue.prototype.S.call(this,i)};dr.prototype.U=function(i){if(this.t!==void 0&&(ue.prototype.U.call(this,i),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};dr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;i!==void 0;i=i.x)i.t.N()}};Object.defineProperty(dr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var i=m0(this);if(this.h(),i!==void 0&&(i.i=this.i),16&this.f)throw this.v;return this.v}});function ou(i){return new dr(i)}function y0(i){var t=i.u;if(i.u=void 0,typeof t=="function"){_n++;var e=xt;xt=void 0;try{t()}catch(n){throw i.f&=-2,i.f|=8,lu(i),n}finally{xt=e,Il()}}}function lu(i){for(var t=i.s;t!==void 0;t=t.n)t.S.U(t);i.x=void 0,i.s=void 0,y0(i)}function Bv(i){if(xt!==this)throw new Error("Out-of-order effect");v0(this),xt=i,this.f&=-2,8&this.f&&lu(this),Il()}function Aa(i){this.x=i,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Aa.prototype.c=function(){var i=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{i()}};Aa.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,y0(this),_0(this),_n++;var i=xt;return xt=this,Bv.bind(this,i)};Aa.prototype.N=function(){2&this.f||(this.f|=2,this.o=Br,Br=this)};Aa.prototype.d=function(){this.f|=8,1&this.f||lu(this)};function x0(i){var t=new Aa(i);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}function Uv(i){let t;return{destroy:x0(function(){this[Wv]=i.bind(void 0),t=this[$v].bind(this)}),start:t}}var Wv="N",$v="S",Vd="S",jd="U";function Xv(i,t){const e=ou(i),n=e[Vd],s=e[jd];let r=0,a;return e[Vd]=function(l){n.call(this,l),r++===0&&(a=t())},e[jd]=function(l){s.call(this,l),--r===0&&(a?.(),a=void 0)},e}function ri(i,t){return new qv(i,t?.equal)}function Zr(i,t){return new Yv(i,t?.equal)}function Hv(i,t){const e=au(!1),n=()=>{e.value=!e.peek()},s=Zr(()=>(e.value,La(()=>i())),t);return s.trigger=n,s}function Ur(i,t){return new Zv(i,t)}function M0(i){return jv(i)}function b0(i){return La(i)}var ms=Symbol("signal"),Wr=Symbol("equals"),hu=class{[ms];constructor(i){this[ms]=i}get value(){return this[ms].value}set value(i){throw new Error("Cannot update a readonly reactive object.")}trigger(){throw new Error("Cannot trigger this reactive object.")}peek(){return this[ms].peek()}toJSON(){return this.value}toString(){return`Reactive[value=${Qv(this[ms].value)}]`}},Yv=class extends hu{[Wr];constructor(i,t){const e=ou(t?Jv(i,t):i);super(e),this[Wr]=t}},qv=class extends hu{[Wr];constructor(i,t){super(au(i)),this[Wr]=t}get value(){return super.value}set value(i){La(()=>this[Wr]?.(this.value,i))||(this[ms].value=i)}},Ja=Symbol("invalidate_signal"),Qa=Symbol("is_watched"),Kv=Symbol("has_scheduled_invalidate"),Ug,Wg,$g,Xg,Gs,Hg,Zv=(Hg=class extends(Xg=hu,$g=Ja,Wg=Qa,Ug=Kv,Xg){constructor(t,e){const n=Xv(()=>(this[Ja].value,this[Qa]||C(this,Gs).call(this),La(()=>t())),()=>{this[Qa]=!0;const s=e(C(this,Gs));return()=>{this[Qa]=!1,s(),C(this,Gs).call(this)}});super(n);Ct(this,$g,au(!1));Ct(this,Wg,!1);Ct(this,Ug,!1);Y(this,Gs,()=>{this[Ja].value=!this[Ja].peek()})}},Gs=new WeakMap,Hg);function Jv(i,t){let e=!0,n;return function(){const r=i();return La(()=>((e||!t(n,r))&&(n=r,e=!1),n))}}function Qv(i){return typeof i=="string"?JSON.stringify(i):String(i)}function ty(i,t){return i===t?!0:i.length===t.length&&i.every((e,n)=>e===t[n])}function ey(i,t,e,n){const s=ou(t),r=n?.immediate??!1,a=n?.equal??iy;let o=!0,l,h;function c(){const g=h;h=void 0;try{g?.()}catch(f){throw d.destroy(),f}}const u=i(()=>{const g=s.value;b0(()=>{const f=l,m=o&&r||!o&&!a(f,g);(m||o)&&(l=g,o=!1),m&&(c(),h=e(g,f))})}),d={destroy(){try{c()}finally{u.destroy()}}};return d}function iy(i,t){return i===t}function E0(i){Promise.reject(new Error("Error in effect or watch callback",{cause:i}))}var ny=class{queue=[];channel=new MessageChannel;constructor(){this.channel.port2.start()}enqueue(i){const t={fn:i,destroyed:!1};return this.queue.push(t),this.queue.length===1&&this.scheduleIteration(),{destroy(){t.destroyed||(t.destroyed=!0)}}}messageHandler=()=>this.runIteration();scheduleIteration(){const i=this.channel;i.port2.addEventListener("message",this.messageHandler),i.port1.postMessage("")}runIteration(){this.channel.port2.removeEventListener("message",this.messageHandler);const i=this.queue;this.queue=[];for(const t of i)if(!t.destroyed)try{t.fn()}catch(e){E0(e)}}};function sy(i){const t=new ry(i);return{destroy:t.destroy.bind(t)}}var ry=class{callback;cleanup;watcher;scheduledExecution;isDestroyed=!1;initialExecution=!0;isExecuting=!1;constructor(i){this.callback=i,this.watcher=Uv(this.scheduleExecution),this.execute(),this.initialExecution=!1}destroy(){if(!this.isDestroyed){this.isDestroyed=!0;try{this.triggerCleanup()}finally{this.watcher?.destroy(),this.watcher=void 0,this.scheduledExecution?.destroy(),this.scheduledExecution=void 0}}}execute(){const i=this.watcher;if(!i)return;this.isExecuting=!0;const t=i.start();try{if(this.initialExecution)try{this.triggerCallback()}catch(e){throw this.destroy(),e}else try{this.triggerCallback()}catch(e){E0(e)}}finally{t(),this.isExecuting=!1}this.isDestroyed&&this.triggerCleanup()}triggerCallback(){if(!this.isDestroyed){this.triggerCleanup();const i=this.callback();typeof i=="function"&&(this.cleanup=i)}}triggerCleanup(){const i=this.cleanup;this.cleanup=void 0;try{i&&b0(i)}catch(t){throw this.destroy(),t}}scheduleExecution=()=>{if(!this.isDestroyed){if(this.isExecuting)throw new Error("Cycle detected");this.scheduledExecution||(this.scheduledExecution=ly(()=>{try{this.execute()}finally{this.scheduledExecution=void 0}}))}}};function ay(i,t,e){return ey(sy,i,t,{equal:ty,...e})}var oy=new ny;function ly(i){return oy.enqueue(i)}function cu(i){return new hy(i)}var ie,zs,Yt,nn,So,w0,C0,Yg,hy=(Yg=class{constructor(i){Y(this,Yt);Y(this,ie,new Map);Y(this,zs,ri(!1));if(i)for(const[t,e]of i)C(this,ie).set(t,ri(e))}get size(){return lt(this,Yt,nn).call(this),C(this,ie).size}forEach(i){lt(this,Yt,nn).call(this);const t=C(this,ie).entries();for(const[e,n]of t)i(n.value,e)}entries(){return lt(this,Yt,nn).call(this),lt(this,Yt,w0).call(this)}keys(){return lt(this,Yt,nn).call(this),C(this,ie).keys()}values(){return lt(this,Yt,nn).call(this),lt(this,Yt,C0).call(this)}[Symbol.iterator](){return this.entries()}clear(){const i=!!C(this,ie).size;C(this,ie).clear(),i&<(this,Yt,So).call(this)}delete(i){const t=C(this,ie).delete(i);return t&<(this,Yt,So).call(this),t}get(i){return lt(this,Yt,nn).call(this),C(this,ie).get(i)?.value}has(i){return lt(this,Yt,nn).call(this),C(this,ie).has(i)}set(i,t){const e=C(this,ie).get(i);return e?e.value=t:(C(this,ie).set(i,ri(t)),lt(this,Yt,So).call(this)),this}},ie=new WeakMap,zs=new WeakMap,Yt=new WeakSet,nn=function(){C(this,zs).value},So=function(){C(this,zs).value=!C(this,zs).peek()},w0=function*(){const i=C(this,ie).entries();for(const[t,e]of i)yield[t,e.value]},C0=function*(){const i=C(this,ie).values();for(const t of i)yield t.value},Yg);function cy(i){return new uy(i)}var Je,qg,uy=(qg=class{constructor(i){Y(this,Je);rt(this,Je,cu(i?dy(i):void 0))}get size(){return C(this,Je).size}clear(){C(this,Je).clear()}has(i){return C(this,Je).has(i)}add(i){return C(this,Je).set(i,void 0),this}delete(i){return C(this,Je).delete(i)}forEach(i){C(this,Je).forEach((t,e)=>i(e,e))}entries(){return fy(this.values())}values(){return C(this,Je).keys()}[Symbol.iterator](){return this.values()}},Je=new WeakMap,qg);function*dy(i){for(const t of i)yield[t,void 0]}function*fy(i){for(const t of i)yield[t,t]}class Rl{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}class fi{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}function gy(i,t,e){let n,s;e=e||ji;let r=0,a=i.length,o=!1;for(;r>1),s=+e(i[n],t),s<0?r=n+1:(a=n,o=!s);return o?r:~r}function ji(i,t){return i>t?1:it?-1:0}function uu(i,t,e){if(i[0]<=t)return 0;const n=i.length;if(t<=i[n-1])return n-1;if(typeof e=="function"){for(let s=1;s0?s-1:s}return n-1}if(e>0){for(let s=1;s0||a===0)})}function Zs(){return!0}function fr(){return!1}function Js(){}function S0(i){let t,e,n;return function(){const s=Array.prototype.slice.call(arguments);return(!e||this!==n||!En(s,e))&&(n=this,e=s,t=i.apply(this,arguments)),t}}function vy(i){function t(){let e;try{e=i()}catch(n){return Promise.reject(n)}return e instanceof Promise?e:Promise.resolve(e)}return t()}function Oa(i){for(const t in i)delete i[t]}function Qs(i){let t;for(t in i)return!1;return!t}class Tl extends Rl{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const n=this.listeners_||(this.listeners_={}),s=n[t]||(n[t]=[]);s.includes(e)||s.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,s=this.listeners_&&this.listeners_[n];if(!s)return;const r=e?new fi(t):t;r.target||(r.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),o=this.pendingRemovals_||(this.pendingRemovals_={});n in a||(a[n]=0,o[n]=0),++a[n];let l;for(let h=0,c=s.length;h0:!1}removeEventListener(t,e){if(!this.listeners_)return;const n=this.listeners_[t];if(!n)return;const s=n.indexOf(e);s!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[s]=Js,++this.pendingRemovals_[t]):(n.splice(s,1),n.length===0&&delete this.listeners_[t]))}}const it={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function ct(i,t,e,n,s){if(s){const a=e;e=function(){i.removeEventListener(t,e),a.apply(n??this,arguments)}}else n&&n!==i&&(e=e.bind(n));const r={target:i,type:t,listener:e};return i.addEventListener(t,e),r}function Jr(i,t,e,n){return ct(i,t,e,n,!0)}function Et(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),Oa(i))}class Da extends Tl{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(it.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,s=new Array(n);for(let r=0;r1?(e=s,n=r):l>0&&(e+=a*l,n+=o*l)}return Bi(i,t,e,n)}function Bi(i,t,e,n){const s=e-i,r=n-t;return s*s+r*r}function My(i){const t=i.length;for(let n=0;nr&&(r=l,s=o)}if(r===0)return null;const a=i[s];i[s]=i[n],i[n]=a;for(let o=n+1;o=0;n--){e[n]=i[n][t]/i[n][n];for(let s=n-1;s>=0;s--)i[s][t]-=i[s][n]*e[n]}return e}function No(i){return i*180/Math.PI}function Me(i){return i*Math.PI/180}function Ls(i,t){const e=i%t;return e*t<0?e+t:e}function Ae(i,t,e){return i+e*(t-i)}function Pl(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function to(i,t){return Math.floor(Pl(i,t))}function eo(i,t){return Math.ceil(Pl(i,t))}function hc(i,t,e){if(i>=t&&i1?e:2,n=n??e,t===void 0&&(e>2?t=i.slice():t=new Array(s));for(let r=0;rio?a=io:a<-io&&(a=-io),t[r+1]=a}return t}function Sy(i,t,e,n){const s=i.length;e=e>1?e:2,n=n??e,t===void 0&&(e>2?t=i.slice():t=new Array(s));for(let r=0;rs&&(l=l|$t.RIGHT),or&&(l=l|$t.ABOVE),l===$t.UNKNOWN&&(l=$t.INTERSECTING),l}function Ee(){return[1/0,1/0,-1/0,-1/0]}function $i(i,t,e,n,s){return s?(s[0]=i,s[1]=t,s[2]=e,s[3]=n,s):[i,t,e,n]}function Fa(i){return $i(1/0,1/0,-1/0,-1/0,i)}function T0(i,t){const e=i[0],n=i[1];return $i(e,n,e,n,t)}function mu(i,t,e,n,s){const r=Fa(s);return P0(r,i,t,e,n)}function ir(i,t){return i[0]==t[0]&&i[2]==t[2]&&i[1]==t[1]&&i[3]==t[3]}function Al(i,t){return t[0]i[2]&&(i[2]=t[2]),t[1]i[3]&&(i[3]=t[3]),i}function $r(i,t){t[0]i[2]&&(i[2]=t[0]),t[1]i[3]&&(i[3]=t[1])}function P0(i,t,e,n,s){for(;et[0]?n[0]=i[0]:n[0]=t[0],i[1]>t[1]?n[1]=i[1]:n[1]=t[1],i[2]=t[0]&&i[1]<=t[3]&&i[3]>=t[1]}function kl(i){return i[2]=a&&m<=l),!n&&r&$t.RIGHT&&!(s&$t.RIGHT)&&(p=g-(d-l)*f,n=p>=o&&p<=h),!n&&r&$t.BELOW&&!(s&$t.BELOW)&&(m=d-(g-o)/f,n=m>=a&&m<=l),!n&&r&$t.LEFT&&!(s&$t.LEFT)&&(p=g-(d-a)*f,n=p>=o&&p<=h)}return n}function L0(i,t){const e=t.getExtent(),n=ci(i);if(t.canWrapX()&&(n[0]=e[2])){const s=ht(e),a=Math.floor((n[0]-e[0])/s)*s;i[0]-=a,i[2]-=a}return i}function _u(i,t,e){if(t.canWrapX()){const n=t.getExtent();if(!isFinite(i[0])||!isFinite(i[2]))return[[n[0],i[1],n[2],i[3]]];L0(i,t);const s=ht(n);if(ht(i)>s&&!e)return[[n[0],i[1],n[2],i[3]]];if(i[0]n[2])return[[i[0],i[1],n[2],i[3]],[n[0],i[1],i[2]-s,i[3]]]}return[i]}function Fy(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function Go(i,t){let e=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=t[n]){e=!1;break}return e}function vu(i,t){const e=Math.cos(t),n=Math.sin(t),s=i[0]*e-i[1]*n,r=i[1]*e+i[0]*n;return i[0]=s,i[1]=r,i}function Ny(i,t){return i[0]*=t,i[1]*=t,i}function A0(i,t){const e=i[0]-t[0],n=i[1]-t[1];return e*e+n*n}function O0(i,t){return Math.sqrt(A0(i,t))}function D0(i,t){if(t.canWrapX()){const e=ht(t.getExtent()),n=k0(i,t,e);n&&(i[0]-=n*e)}return i}function k0(i,t,e){const n=t.getExtent();let s=0;return t.canWrapX()&&(i[0]n[2])&&(e=e||ht(n),s=Math.floor((i[0]-n[0])/e)),s}const Fl=63710088e-1;function gc(i,t,e){e=e||Fl;const n=Me(i[1]),s=Me(t[1]),r=(s-n)/2,a=Me(t[0]-i[0])/2,o=Math.sin(r)*Math.sin(r)+Math.sin(a)*Math.sin(a)*Math.cos(n)*Math.cos(s);return 2*e*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))}function fh(i,t){let e=0;for(let n=0,s=i.length;nYd&&(t=Yd);const n=Me(t),s=Math.sin(n),r=Math.cos(n),a=s/r,o=a*a,l=o*o,h=Me(i),c=j0(e.number),u=Me(c),d=Vo/Math.sqrt(1-Xe*s**2),g=On*r**2,f=r*hc(h-u,-Math.PI,Math.PI),m=f*f,p=m*f,_=p*f,v=_*f,x=v*f,y=Vo*(V0*n-zy*Math.sin(2*n)+Vy*Math.sin(4*n)-jy*Math.sin(6*n)),M=zo*d*(f+p/6*(1-o+g)+v/120*(5-18*o+l+72*g-58*On))+5e5;let w=zo*(y+d*a*(m/2+_/24*(5-o+9*g+4*g**2)+x/720*(61-58*o+l+600*g-330*On)));return e.north||(w+=1e7),[M,w]}function j0(i){return(i-1)*6-180+3}const Ky=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function B0(i){let t=0;for(const s of Ky){const r=i.match(s);if(r){t=parseInt(r[1]);break}}if(!t)return null;let e=0,n=!1;return t>32700&&t<32761?e=t-32700:t>32600&&t<32661&&(n=!0,e=t-32600),e?{number:e,north:n}:null}function qd(i,t){return function(e,n,s,r){const a=e.length;s=s>1?s:2,r=r??s,n||(s>2?n=e.slice():n=new Array(a));for(let o=0;o=l?t[a+h]:o[h]}return e}}function r1(i,t,e,n){const s=Gt(i),r=Gt(t);Hn(s,r,_c(e)),Hn(r,s,_c(n))}function gh(i,t){if(i===t)return!0;const e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||zl(i,t)===Mu)&&e}function zl(i,t){const e=i.getCode(),n=t.getCode();let s=Ro(e,n);if(s)return s;let r=null,a=null;for(const l of Qy)r||(r=l(i)),a||(a=l(t));if(!r&&!a)return null;const o="EPSG:4326";if(a)if(r)s=mh(r.inverse,a.forward);else{const l=Ro(e,o);l&&(s=mh(l,a.forward))}else{const l=Ro(o,n);l&&(s=mh(r.inverse,l))}return s&&(jo(i),jo(t),Hn(i,t,s)),s}function mh(i,t){return function(e,n,s,r){return n=i(e,n,s,r),t(n,n,s,r)}}function Bo(i,t){const e=Gt(i),n=Gt(t);return zl(e,n)}function Eu(i,t,e){const n=Bo(t,e);if(!n){const s=Gt(t).getCode(),r=Gt(e).getCode();throw new Error(`No transform available between ${s} and ${r}`)}return n(i,void 0,i.length)}function vc(i,t){return i}function Ze(i,t){return mc&&!Go(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(mc=!1,U0("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function W0(i,t){return i}function gn(i,t){return i}function Kd(i,t,e){return function(n){let s,r;if(i.canWrapX()){const a=i.getExtent(),o=ht(a);n=n.slice(0),r=k0(n,i,o),r&&(n[0]=n[0]-r*o),n[0]=It(n[0],a[0],a[2]),n[1]=It(n[1],a[1],a[3]),s=e(n)}else s=e(n);return r&&t.canWrapX()&&(s[0]+=r*ht(t.getExtent())),s}}function a1(){pc(Ud),pc($d),s1($d,Ud,Cy,Sy)}a1();function Zd(i,t,e){return function(n,s,r,a,o){if(!n)return;if(!s&&!t)return n;const l=t?0:r[0]*s,h=t?0:r[1]*s,c=o?o[0]:0,u=o?o[1]:0;let d=i[0]+l/2+c,g=i[2]-l/2+c,f=i[1]+h/2+u,m=i[3]-h/2+u;d>g&&(d=(g+d)/2,g=d),f>m&&(f=(m+f)/2,m=f);let p=It(n[0],d,g),_=It(n[1],f,m);if(a&&e&&s){const v=30*s;p+=-v*Math.log(1+Math.max(0,d-n[0])/v)+v*Math.log(1+Math.max(0,n[0]-g)/v),_+=-v*Math.log(1+Math.max(0,f-n[1])/v)+v*Math.log(1+Math.max(0,n[1]-m)/v)}return[p,_]}}function o1(i){return i}function wu(i,t,e,n){const s=ht(t)/e[0],r=Ft(t)/e[1];return n?Math.min(i,Math.max(s,r)):Math.min(i,Math.min(s,r))}function Cu(i,t,e){let n=Math.min(i,t);const s=50;return n*=Math.log(1+s*Math.max(0,i/t-1))/s+1,e&&(n=Math.max(n,e),n/=Math.log(1+s*Math.max(0,e/i-1))/s+1),It(n,e/2,t*2)}function l1(i,t,e,n){return t=t!==void 0?t:!0,function(s,r,a,o){if(s!==void 0){const l=i[0],h=i[i.length-1],c=e?wu(l,e,a,n):l;if(o)return t?Cu(s,c,h):It(s,h,c);const u=Math.min(c,s),d=Math.floor(uu(i,u,r));return i[d]>c&&dMath.round(e*tf[n])/tf[n]).join(", ")+")"}function vn(i,t,e,n,s,r,a){r=r||[],a=a||2;let o=0;for(let l=t;l{if(!n)return this.getSimplifiedGeometry(e);const s=this.clone();return s.applyTransform(n),s.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return ft()}closestPointXY(t,e,n,s){return ft()}containsXY(t,e){const n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return ft()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Fa(e),this.extentRevision_=this.getRevision()}return Oy(this.extent_,t)}rotate(t,e){ft()}scale(t,e,n){ft()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return ft()}getType(){return ft()}applyTransform(t){ft()}intersectsExtent(t){return ft()}translate(t,e){ft()}transform(t,e){const n=Gt(t),s=n.getUnits()=="tile-pixels"?function(r,a,o){const l=n.getExtent(),h=n.getWorldExtent(),c=Ft(h)/Ft(l);Xi(ef,h[0],h[3],c,-c,0,0,0);const u=vn(r,0,r.length,o,ef,a),d=Bo(n,e);return d?d(u,u,o):u}:Bo(n,e);return this.applyTransform(s),this}}class wn extends H0{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return mu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return ft()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length1)u=e;else if(d>0){for(let g=0;gs&&(s=h),r=o,a=l}return s}function Tu(i,t,e,n,s){for(let r=0,a=e.length;r0;){const u=h.pop(),d=h.pop();let g=0;const f=i[d],m=i[d+1],p=i[u],_=i[u+1];for(let v=d+n;vg&&(c=v,g=M)}g>s&&(l[(c-t)/n]=1,d+n0&&m>g)&&(f<0&&p0&&p>f)){h=u,c=d;continue}r[a++]=h,r[a++]=c,o=h,l=c,h=u,c=d}return r[a++]=h,r[a++]=c,a}function Ou(i,t,e,n,s,r,a,o){for(let l=0,h=e.length;lr&&(h-o)*(r-l)-(s-o)*(c-l)>0&&a++:c<=r&&(h-o)*(r-l)-(s-o)*(c-l)<0&&a--,o=h,l=c}return a!==0}function Du(i,t,e,n,s,r){if(e.length===0||!Dn(i,t,e[0],n,s,r))return!1;for(let a=1,o=e.length;a_&&(h=(c+u)/2,Du(i,t,e,n,h,f)&&(p=h,_=v)),c=u}return isNaN(p)&&(p=s[r]),a?(a.push(p,f,_),a):[p,f,_]}function Q0(i,t,e,n,s){let r=[];for(let a=0,o=e.length;a=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:tm(i,t,e,n,function(a,o){return ky(s,a,o)}):!1}function T1(i,t,e,n,s){for(let r=0,a=e.length;r0}function nm(i,t,e,n,s){s=s!==void 0?s:!1;for(let r=0,a=e.length;r1&&typeof arguments[e-1]=="function"&&(n=arguments[e-1],--e);let s=0;for(;s0}getInteracting(){return this.hints_[ne.INTERACTING]>0}cancelAnimations(){this.setHint(ne.ANIMATING,-this.hints_[ne.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e=0;--n){const s=this.animations_[n];let r=!0;for(let a=0,o=s.length;a0?h/l.duration:1;c>=1?(l.complete=!0,c=1):r=!1;const u=l.easing(c);if(l.sourceCenter){const d=l.sourceCenter[0],g=l.sourceCenter[1],f=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const p=d+u*(f-d),_=g+u*(m-g);this.targetCenter_=[p,_]}if(l.sourceResolution&&l.targetResolution){const d=u===1?l.targetResolution:l.sourceResolution+u*(l.targetResolution-l.sourceResolution);if(l.anchor){const g=this.getViewportSize_(this.getRotation()),f=this.constraints_.resolution(d,0,g,!0);this.targetCenter_=this.calculateCenterZoom(f,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=d,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const d=u===1?Ls(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+u*(l.targetRotation-l.sourceRotation);if(l.anchor){const g=this.constraints_.rotation(d,!0);this.targetCenter_=this.calculateCenterRotate(g,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=d}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(r){this.animations_[n]=null,this.setHint(ne.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const a=s[0].callback;a&&so(a,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let n;const s=this.getCenterInternal();return s!==void 0&&(n=[s[0]-e[0],s[1]-e[1]],vu(n,t-this.getRotation()),Fy(n,e)),n}calculateCenterZoom(t,e){let n;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const a=e[0]-t*(e[0]-s[0])/r,o=e[1]-t*(e[1]-s[1])/r;n=[a,o]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],s=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(s*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(s*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&vc(t,this.getProjection())}getCenterInternal(){return this.get(Le.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return W0(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();gt(e,"The view center is not defined");const n=this.getResolution();gt(n!==void 0,"The view resolution is not defined");const s=this.getRotation();return gt(s!==void 0,"The view rotation is not defined"),fc(e,n,s,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Le.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(gn(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=ht(t)/e[0],s=Ft(t)/e[1];return Math.max(n,s)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(e/n)/Math.log(t);return function(r){return e/Math.pow(t,r*s)}}getRotation(){return this.get(Le.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(n/s)/e;return function(a){return Math.log(n/a)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),n=this.getRotation();let s=this.getCenterInternal();const r=this.padding_;if(r){const a=this.getViewportSizeMinusPadding_();s=_h(s,this.getViewportSize_(),[a[0]/2+r[3],a[1]/2+r[0]],e,n)}return{center:s.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,n,s;if(this.resolutions_){const r=uu(this.resolutions_,t,1);e=r,n=this.resolutions_[r],r==this.resolutions_.length-1?s=2:s=n/this.resolutions_[r+1]}else n=this.maxResolution_,s=this.zoomFactor_;return e+Math.log(n/t)/Math.log(s)}getResolutionForZoom(t){if(this.resolutions_?.length){if(this.resolutions_.length===1)return this.resolutions_[0];const e=It(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,It(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(gt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){gt(!kl(t),"Cannot fit empty extent provided as `geometry`");const s=gn(t,this.getProjection());n=Mc(s)}else if(t.getType()==="Circle"){const s=gn(t.getExtent(),this.getProjection());n=Mc(s),n.rotate(this.getRotation(),ci(s))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),s=Math.sin(-e),r=t.getFlatCoordinates(),a=t.getStride();let o=1/0,l=1/0,h=-1/0,c=-1/0;for(let u=0,d=r.length;u{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e;const n=this.getMapInternal();!t&&n&&(t=n.getView()),t instanceof _e?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&n&&(e.layerStatesArray=n.getLayerGroup().getLayerStatesArray());let s;if(e.layerStatesArray){if(s=e.layerStatesArray.find(a=>a.layer===this),!s)return!1}else s=this.getLayerState();const r=this.getExtent();return Nu(s,e.viewState)&&(!r||he(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];const e=this.getSource()?.getAttributions();if(!e)return[];const n=t instanceof _e?t.getViewStateAndExtent():t;let s=e(n);return Array.isArray(s)||(s=[s]),s}render(t,e){const n=this.getRenderer();return n.prepareFrame(t)?(this.rendered=!0,n.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(bt.MAP,t)}getMapInternal(){return this.get(bt.MAP)}setMap(t){this.mapPrecomposeKey_&&(Et(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Et(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=ct(t,Ue.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=ct(this,it.CHANGE,t.render,t),this.changed())}handlePrecompose_(t){const e=t.frameState.layerStatesArray,n=this.getLayerState(!1);gt(!e.some(s=>s.layer===n.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(n)}setSource(t){this.set(bt.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}}function Nu(i,t){if(!i.visible)return!1;const e=t.resolution;if(e=i.maxResolution)return!1;const n=t.zoom;return n>i.minZoom&&n<=i.maxZoom}var qt=[];for(var vh=0;vh<256;++vh)qt.push((vh+256).toString(16).slice(1));function z1(i,t=0){return(qt[i[t+0]]+qt[i[t+1]]+qt[i[t+2]]+qt[i[t+3]]+"-"+qt[i[t+4]]+qt[i[t+5]]+"-"+qt[i[t+6]]+qt[i[t+7]]+"-"+qt[i[t+8]]+qt[i[t+9]]+"-"+qt[i[t+10]]+qt[i[t+11]]+qt[i[t+12]]+qt[i[t+13]]+qt[i[t+14]]+qt[i[t+15]]).toLowerCase()}var ro,V1=new Uint8Array(16);function j1(){if(!ro&&(ro=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ro))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ro(V1)}var B1=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const rf={randomUUID:B1};function U1(i,t,e){if(rf.randomUUID&&!t&&!i)return rf.randomUUID();i=i||{};var n=i.random||(i.rng||j1)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,z1(n)}const W1=di("map:AbstractLayerModel");var Vs,rn,ga,js,Bs,Us,ma,Ws;class $1 extends s0{constructor(e){super();Y(this,Vs);Y(this,rn);Y(this,ga);Y(this,js);Y(this,Bs);Y(this,Us,cu());Y(this,ma);Y(this,Ws,!1);rt(this,ga,e.id??U1()),rt(this,ma,Zr(()=>Object.fromEntries(C(this,Us).entries()))),rt(this,js,ri(e.title)),rt(this,Bs,ri(e.description??"")),e.attributes&&this.updateAttributes(e.attributes)}get __destroyed(){return C(this,Ws)}get map(){const e=C(this,Vs);if(!e)throw new Error(`Layer '${this.id}' has not been attached to a map yet.`);return e}get id(){return C(this,ga)}get title(){return C(this,js).value}get description(){return C(this,Bs).value}get attributes(){return C(this,ma).value}get parent(){return C(this,rn)}get children(){return this.layers??this.sublayers??void 0}destroy(){if(!C(this,Ws)){rt(this,Ws,!0),this.sublayers?.destroy(),this.layers?.destroy();try{this.emit("destroy")}catch(e){W1.warn("Unexpected error from event listener during layer destruction:",e)}}}__attachToMap(e){if(C(this,Vs))throw new Error(`Layer '${this.id}' has already been attached to the map '${this.map.id}'`);rt(this,Vs,e)}__attachToGroup(e){if(C(this,rn))throw new Error(`Layer '${this.id}' has already been attached to the group layer '${C(this,rn).id}'`);rt(this,rn,e)}__detachFromGroup(){rt(this,rn,void 0)}setTitle(e){C(this,js).value=e}setDescription(e){C(this,Bs).value=e}updateAttributes(e){const n=Reflect.ownKeys(e);M0(()=>{for(const s of n)C(this,Us).set(s,e[s])})}deleteAttribute(e){C(this,Us).delete(e)}}Vs=new WeakMap,rn=new WeakMap,ga=new WeakMap,js=new WeakMap,Bs=new WeakMap,Us=new WeakMap,ma=new WeakMap,Ws=new WeakMap;const To=di("map:AbstractLayer");var bi,pa,_a,$s,Nn,Gn,Xs;class Wo extends $1{constructor(e){super(e);Y(this,bi);Y(this,pa);Y(this,_a);Y(this,$s);Y(this,Nn);Y(this,Gn);Y(this,Xs);rt(this,bi,e.olLayer),rt(this,pa,e.isBaseLayer??!1),rt(this,_a,e.healthCheck),rt(this,$s,Hv(()=>C(this,bi).getVisible())),rt(this,Gn,C(this,bi).on("change:visible",C(this,$s).trigger)),rt(this,Nn,ri(Ec(bc(C(this,bi))))),this.__setVisible(e.visible??!0)}get visible(){return C(this,$s).value}get olLayer(){return C(this,bi)}get isBaseLayer(){return C(this,pa)}get loadState(){return C(this,Nn).value}destroy(){this.__destroyed||(rt(this,Xs,rc(C(this,Xs))),C(this,Gn)&&Qt(C(this,Gn)),rt(this,Gn,void 0),this.olLayer.dispose(),super.destroy())}__attachToMap(e){super.__attachToMap(e);const{initial:n,resource:s}=X1(this,C(this,_a),r=>{C(this,Nn).value=r});rt(this,Xs,s),C(this,Nn).value=n}setVisible(e){if(this.isBaseLayer){To.warn(`Cannot change visibility of base layer '${this.id}': use activateBaseLayer() on the map's LayerCollection instead.`);return}this.__setVisible(e)}__setVisible(e){C(this,bi).getVisible()!==e&&C(this,bi).setVisible(e)}}bi=new WeakMap,pa=new WeakMap,_a=new WeakMap,$s=new WeakMap,Nn=new WeakMap,Gn=new WeakMap,Xs=new WeakMap;function X1(i,t,e){const n=i.olLayer;if(!(n instanceof mr))return{initial:"loaded",resource:{destroy(){}}};let s=bc(n);const r=Ec(s);let a=r,o="loading";r!=="error"&&H1(i,t).then(u=>{o=u,l()});const l=()=>{const u=Ec(s),d=o==="error"?"error":u;a!==d&&(a=d,e(a))};let h;h=s?.on("change",()=>{l()});const c=n.on("change:source",()=>{h&&Qt(h),h=void 0,s=bc(n),h=s?.on("change",()=>{l()}),l()});return{initial:a,resource:{destroy(){h&&Qt(h),Qt(c)}}}}async function H1(i,t){if(t==null)return"loaded";let e;if(typeof t=="function")e=t;else if(typeof t=="string")e=async()=>{const s=await i.map.__sharedDependencies.httpService.fetch(t);return s.ok?"loaded":(To.warn(`Health check failed for layer '${i.id}' (http status ${s.status})`),"error")};else return To.error(`Unexpected object for 'healthCheck' parameter of layer '${i.id}'`,t),"error";try{return await e(i)}catch(n){return To.warn(`Health check failed for layer '${i.id}'`,n),"error"}}function bc(i){if(i instanceof mr)return i?.getSource()??void 0}function Ec(i){switch(i?.getState()){case void 0:return"loaded";case"undefined":return"not-loaded";case"loading":return"loading";case"ready":return"loaded";case"error":return"error"}}class Y1 extends Wo{get type(){return"simple"}get legend(){}get layers(){}get sublayers(){}}const q1=Y1,ot={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},K1=5;class Z1 extends Da{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.staleKeys_=new Array,this.maxStaleKeys=K1}getStaleKeys(){return this.staleKeys_}prependStaleKey(t){this.staleKeys_.unshift(t),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(t){return ft()}getData(t){return null}prepareFrame(t){return ft()}renderFrame(t,e){return ft()}forEachFeatureAtCoordinate(t,e,n,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===ot.LOADED||e.getState()===ot.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=ot.LOADED&&e!=ot.ERROR&&t.addEventListener(it.CHANGE,this.boundHandleImageChange_),e==ot.IDLE&&(t.load(),e=t.getState()),e==ot.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class sm extends fi{constructor(t,e,n,s){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=s}}const xn=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",J1=xn.includes("firefox"),Q1=xn.includes("safari")&&!xn.includes("chrom");Q1&&(xn.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(xn));const tx=xn.includes("webkit")&&!xn.includes("edge"),rm=xn.includes("macintosh"),am=typeof devicePixelRatio<"u"?devicePixelRatio:1,Gu=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,om=typeof Image<"u"&&Image.prototype.decode,lm=function(){let i=!1;try{const t=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return i}();function Nt(i,t,e,n){let s;return e&&e.length?s=e.shift():Gu?s=new OffscreenCanvas(i||300,t||300):s=document.createElement("canvas"),i&&(s.width=i),t&&(s.height=t),s.getContext("2d",n)}let yh;function $o(){return yh||(yh=Nt(1,1)),yh}function Ul(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}function ex(i){let t=i.offsetWidth;const e=getComputedStyle(i);return t+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10),t}function ix(i){let t=i.offsetHeight;const e=getComputedStyle(i);return t+=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10),t}function Xo(i,t){const e=t.parentNode;e&&e.replaceChild(i,t)}function hm(i){for(;i.lastChild;)i.lastChild.remove()}function nx(i,t){const e=i.childNodes;for(let n=0;;++n){const s=e[n],r=t[n];if(!s&&!r)break;if(s!==r){if(!s){i.appendChild(r);continue}if(!r){i.removeChild(s),--n;continue}i.insertBefore(r,s)}}}class cm{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy($o(),{get:(t,e)=>{if(typeof $o()[e]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,n)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,n),!0)})}pushMethodArgs_=(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this);pushFunction(t){this.instructions_[this.zIndex+this.offset_].push(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let n=0,s=e.length;n.0031308?1.055*Math.pow(r,1/2.4)-.055:r=r*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[r*255,a*255,o*255]};ea.xyz=function(i,t){var e=i[0]/255,n=i[1]/255,s=i[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=e*.41239079926595+n*.35758433938387+s*.18048078840183,a=e*.21263900587151+n*.71516867876775+s*.072192315360733,o=e*.019330818715591+n*.11919477979462+s*.95053215224966;return t=t||Zt.whitepoint[2].E,[r*t[0],a*t[1],o*t[2]]};const zu={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(i,t,e){var n,s,r,a,o,l,h,c,u,d,g,f,m;if(r=i[0],a=i[1],o=i[2],r===0)return[0,0,0];var p=.0011070564598794539;return t=t||"D65",e=e||2,u=Zt.whitepoint[e][t][0],d=Zt.whitepoint[e][t][1],g=Zt.whitepoint[e][t][2],f=4*u/(u+15*d+3*g),m=9*d/(u+15*d+3*g),n=a/(13*r)+f||0,s=o/(13*r)+m||0,h=r>8?d*Math.pow((r+16)/116,3):d*r*p,l=h*9*n/(4*s)||0,c=h*(12-3*n-20*s)/(4*s)||0,[l,h,c]}};Zt.luv=function(i,t,e){var n,s,r,a,o,l,h,c,u,d,g,f,m,p=.008856451679035631,_=903.2962962962961;t=t||"D65",e=e||2,u=Zt.whitepoint[e][t][0],d=Zt.whitepoint[e][t][1],g=Zt.whitepoint[e][t][2],f=4*u/(u+15*d+3*g),m=9*d/(u+15*d+3*g),l=i[0],h=i[1],c=i[2],n=4*l/(l+15*h+3*c)||0,s=9*h/(l+15*h+3*c)||0;var v=h/d;return r=v<=p?_*v:116*Math.pow(v,1/3)-16,a=13*r*(n-f),o=13*r*(s-m),[r,a,o]};var um={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(i){var t=i[0],e=i[1],n=i[2],s,r,a;return a=n/360*2*Math.PI,s=e*Math.cos(a),r=e*Math.sin(a),[t,s,r]},xyz:function(i){return zu.xyz(um.luv(i))}};zu.lchuv=function(i){var t=i[0],e=i[1],n=i[2],s=Math.sqrt(e*e+n*n),r=Math.atan2(n,e),a=r*360/2/Math.PI;return a<0&&(a+=360),[t,s,a]};Zt.lchuv=function(i){return zu.lchuv(Zt.luv(i))};var sx={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const af=W_(sx);var of={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function rx(i){var t,e=[],n=1,s;if(typeof i=="number")return{space:"rgb",values:[i>>>16,(i&65280)>>>8,i&255],alpha:1};if(typeof i=="number")return{space:"rgb",values:[i>>>16,(i&65280)>>>8,i&255],alpha:1};if(i=String(i).toLowerCase(),af[i])e=af[i].slice(),s="rgb";else if(i==="transparent")n=0,s="rgb",e=[0,0,0];else if(i[0]==="#"){var r=i.slice(1),a=r.length,o=a<=4;n=1,o?(e=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],a===4&&(n=parseInt(r[3]+r[3],16)/255)):(e=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],a===8&&(n=parseInt(r[6]+r[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),s="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(i)){var l=t[1];s=l.replace(/a$/,"");var h=s==="cmyk"?4:s==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/),s==="color"&&(s=e.shift()),e=e.map(function(c,u){if(c[c.length-1]==="%")return c=parseFloat(c)/100,u===3?c:s==="rgb"?c*255:s[0]==="h"||s[0]==="l"&&!u?c*100:s==="lab"?c*125:s==="lch"?u<2?c*150:c*360:s[0]==="o"&&!u?c:s==="oklab"?c*.4:s==="oklch"?u<2?c*.4:c*360:c;if(s[u]==="h"||u===2&&s[s.length-1]==="h"){if(of[c]!==void 0)return of[c];if(c.endsWith("deg"))return parseFloat(c);if(c.endsWith("turn"))return parseFloat(c)*360;if(c.endsWith("grad"))return parseFloat(c)*360/400;if(c.endsWith("rad"))return parseFloat(c)*180/Math.PI}return c==="none"?0:parseFloat(c)}),n=e.length>h?e.pop():1}else/[0-9](?:\s|\/|,)/.test(i)&&(e=i.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),s=i.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:s,values:e,alpha:n}}const xh={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(i){var t=i[0]/360,e=i[1]/100,n=i[2]/100,s,r,a,o,l,h=0;if(e===0)return l=n*255,[l,l,l];for(r=n<.5?n*(1+e):n+e-n*e,s=2*n-r,o=[0,0,0];h<3;)a=t+1/3*-(h-1),a<0?a++:a>1&&a--,l=6*a<1?s+(r-s)*6*a:2*a<1?r:3*a<2?s+(r-s)*(2/3-a)*6:s,o[h++]=l*255;return o}};ea.hsl=function(i){var t=i[0]/255,e=i[1]/255,n=i[2]/255,s=Math.min(t,e,n),r=Math.max(t,e,n),a=r-s,o,l,h;return r===s?o=0:t===r?o=(e-n)/a:e===r?o=2+(n-t)/a:n===r&&(o=4+(t-e)/a),o=Math.min(o*60,360),o<0&&(o+=360),h=(s+r)/2,r===s?l=0:h<=.5?l=a/(r+s):l=a/(2-r-s),[o,l*100,h*100]};function ax(i){Array.isArray(i)&&i.raw&&(i=String.raw(...arguments)),i instanceof Number&&(i=+i);var t,e=rx(i);if(!e.space)return[];const n=e.space[0]==="h"?xh.min:ea.min,s=e.space[0]==="h"?xh.max:ea.max;return t=Array(3),t[0]=Math.min(Math.max(e.values[0],n[0]),s[0]),t[1]=Math.min(Math.max(e.values[1],n[1]),s[1]),t[2]=Math.min(Math.max(e.values[2],n[2]),s[2]),e.space[0]==="h"&&(t=xh.rgb(t)),t.push(Math.min(Math.max(e.alpha,0),1)),t}const Vu=[NaN,NaN,NaN,0];function ox(i){return typeof i=="string"?i:Bu(i)}const lx=1024,wr={};let Mh=0;function hx(i){if(i.length===4)return i;const t=i.slice();return t[3]=1,t}function lf(i){const t=Zt.lchuv(ea.xyz(i));return t[3]=i[3],t}function cx(i){const t=Zt.rgb(um.xyz(i));return t[3]=i[3],t}function ju(i){if(i==="none")return Vu;if(wr.hasOwnProperty(i))return wr[i];if(Mh>=lx){let e=0;for(const n in wr)e++&3||(delete wr[n],--Mh)}const t=ax(i);if(t.length!==4)throw new Error('failed to parse "'+i+'" as color');for(const e of t)if(isNaN(e))throw new Error('failed to parse "'+i+'" as color');return dm(t),wr[i]=t,++Mh,t}function ar(i){return Array.isArray(i)?i:ju(i)}function dm(i){return i[0]=It(i[0]+.5|0,0,255),i[1]=It(i[1]+.5|0,0,255),i[2]=It(i[2]+.5|0,0,255),i[3]=It(i[3],0,1),i}function Bu(i){let t=i[0];t!=(t|0)&&(t=t+.5|0);let e=i[1];e!=(e|0)&&(e=e+.5|0);let n=i[2];n!=(n|0)&&(n=n+.5|0);const s=i[3]===void 0?1:Math.round(i[3]*1e3)/1e3;return"rgba("+t+","+e+","+n+","+s+")"}const hf=[];let ps=null;function ux(){ps=Nt(1,1,void 0,{willReadFrequently:!0})}class fm extends Z1{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=oi(),this.pixelTransform=oi(),this.inversePixelTransform=oi(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(t,e,n){ps||ux(),ps.clearRect(0,0,1,1);let s;try{ps.drawImage(t,e,n,1,1,0,0,1,1),s=ps.getImageData(0,0,1,1).data}catch{return ps=null,null}return s}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const s=this.getLayer().getClassName();let r,a;if(t&&t.className===s&&(!n||t&&t.style.backgroundColor&&En(ar(t.style.backgroundColor),ar(n)))){const o=t.firstElementChild;o instanceof HTMLCanvasElement&&(a=o.getContext("2d"))}if(a&&a.canvas.style.transform===e?(this.container=t,this.context=a,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){r=document.createElement("div"),r.className=s;let o=r.style;o.position="absolute",o.width="100%",o.height="100%",a=Nt();const l=a.canvas;r.appendChild(l),o=l.style,o.position="absolute",o.left="0",o.transformOrigin="top left",this.container=r,this.context=a}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const s=Ti(n),r=Dl(n),a=Na(n),o=Ol(n);Ht(e.coordinateToPixelTransform,s),Ht(e.coordinateToPixelTransform,r),Ht(e.coordinateToPixelTransform,a),Ht(e.coordinateToPixelTransform,o);const l=this.inversePixelTransform;Ht(l,s),Ht(l,r),Ht(l,a),Ht(l,o),t.save(),t.beginPath(),t.moveTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}prepareContainer(t,e){const n=t.extent,s=t.viewState.resolution,r=t.viewState.rotation,a=t.pixelRatio,o=Math.round(ht(n)/s*a),l=Math.round(Ft(n)/s*a);Xi(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,r,-o/2,-l/2),X0(this.inversePixelTransform,this.pixelTransform);const h=p1(this.pixelTransform);if(this.useContainer(e,h,this.getBackground(t)),!this.containerReused){const c=this.context.canvas;c.width!=o||c.height!=l?(c.width=o,c.height=l):this.context.clearRect(0,0,o,l),h!==c.style.transform&&(c.style.transform=h)}}dispatchRenderEvent_(t,e,n){const s=this.getLayer();if(s.hasListener(t)){const r=new sm(t,this.inversePixelTransform,n,e);s.dispatchEvent(r)}}preRender(t,e){this.frameState=e,!e.declutter&&this.dispatchRenderEvent_(Ue.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(Ue.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new cm),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(Ue.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(Ue.POSTRENDER,this.context,t))}getRenderTransform(t,e,n,s,r,a,o){const l=r/2,h=a/2,c=s/e,u=-c,d=-t[0]+o,g=-t[1];return Xi(this.tempTransform,l,h,c,u,-n,d,g)}disposeInternal(){delete this.frameState,super.disposeInternal()}}function dx(i,t,e){const n=i;let s=!0,r=!1,a=!1;const o=[Jr(n,it.LOAD,function(){a=!0,r||t()})];return n.src&&om?(r=!0,n.decode().then(function(){s&&t()}).catch(function(l){s&&(a?t():e())})):o.push(Jr(n,it.ERROR,e)),function(){s=!1,o.forEach(Et)}}function fx(i,t){return new Promise((e,n)=>{function s(){a(),e(i)}function r(){a(),n(new Error("Image load error"))}function a(){i.removeEventListener("load",s),i.removeEventListener("error",r)}i.addEventListener("load",s),i.addEventListener("error",r)})}function gx(i,t){return t&&(i.src=t),i.src&&om?new Promise((e,n)=>i.decode().then(()=>e(i)).catch(s=>i.complete&&i.width?e(i):n(s))):fx(i)}const gm=.5,mx=10,cf=.25;class mm{constructor(t,e,n,s,r,a,o){this.sourceProj_=t,this.targetProj_=e;let l={};const h=o?_c(x=>Ht(o,Eu(x,this.targetProj_,this.sourceProj_))):Bo(this.targetProj_,this.sourceProj_);this.transformInv_=function(x){const y=x[0]+"/"+x[1];return l[y]||(l[y]=h(x)),l[y]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&ht(s)>=ht(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?ht(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?ht(this.targetProj_.getExtent()):null;const c=Ti(n),u=Dl(n),d=Na(n),g=Ol(n),f=this.transformInv_(c),m=this.transformInv_(u),p=this.transformInv_(d),_=this.transformInv_(g),v=mx+(a?Math.max(0,Math.ceil(Math.log2(nr(n)/(a*a*256*256)))):0);if(this.addQuad_(c,u,d,g,f,m,p,_,v),this.wrapsXInSource_){let x=1/0;this.triangles_.forEach(function(y,M,w){x=Math.min(x,y.source[0][0],y.source[1][0],y.source[2][0])}),this.triangles_.forEach(y=>{if(Math.max(y.source[0][0],y.source[1][0],y.source[2][0])-x>this.sourceWorldWidth_/2){const M=[[y.source[0][0],y.source[0][1]],[y.source[1][0],y.source[1][1]],[y.source[2][0],y.source[2][1]]];M[0][0]-x>this.sourceWorldWidth_/2&&(M[0][0]-=this.sourceWorldWidth_),M[1][0]-x>this.sourceWorldWidth_/2&&(M[1][0]-=this.sourceWorldWidth_),M[2][0]-x>this.sourceWorldWidth_/2&&(M[2][0]-=this.sourceWorldWidth_);const w=Math.min(M[0][0],M[1][0],M[2][0]);Math.max(M[0][0],M[1][0],M[2][0])-w.5&&u<1;let f=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const p=uc([t,e,n,s]);f=ht(p)/this.targetWorldWidth_>cf||f}!g&&this.sourceProj_.isGlobal()&&u&&(f=u>cf||f)}if(!f&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3])&&!he(c,this.maxSourceExtent_))return;let m=0;if(!f&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(l[0])||!isFinite(l[1]))){if(h>0)f=!0;else if(m=(!isFinite(r[0])||!isFinite(r[1])?8:0)+(!isFinite(a[0])||!isFinite(a[1])?4:0)+(!isFinite(o[0])||!isFinite(o[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),m!=1&&m!=2&&m!=4&&m!=8)return}if(h>0){if(!f){const p=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(p);let v;g?v=(Ls(r[0],d)+Ls(o[0],d))/2-Ls(_[0],d):v=(r[0]+o[0])/2-_[0];const x=(r[1]+o[1])/2-_[1];f=v*v+x*x>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){const p=[(e[0]+n[0])/2,(e[1]+n[1])/2],_=this.transformInv_(p),v=[(s[0]+t[0])/2,(s[1]+t[1])/2],x=this.transformInv_(v);this.addQuad_(t,e,p,v,r,a,_,x,h-1),this.addQuad_(v,p,n,s,x,_,o,l,h-1)}else{const p=[(t[0]+e[0])/2,(t[1]+e[1])/2],_=this.transformInv_(p),v=[(n[0]+s[0])/2,(n[1]+s[1])/2],x=this.transformInv_(v);this.addQuad_(t,p,v,s,r,_,x,l,h-1),this.addQuad_(p,e,n,v,_,a,o,x,h-1)}return}}if(g){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}m&11||this.addTriangle_(t,n,s,r,o,l),m&14||this.addTriangle_(t,n,e,r,o,a),m&&(m&13||this.addTriangle_(e,s,t,a,l,r),m&7||this.addTriangle_(e,s,n,a,l,o))}calculateSourceExtent(){const t=Ee();return this.triangles_.forEach(function(e,n,s){const r=e.source;$r(t,r[0]),$r(t,r[1]),$r(t,r[2])}),t}getTriangles(){return this.triangles_}}let bh;const Os=[];function uf(i,t,e,n,s){i.beginPath(),i.moveTo(0,0),i.lineTo(t,e),i.lineTo(n,s),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(t,n)+1,Math.max(e,s)),i.restore()}function Eh(i,t){return Math.abs(i[t*4]-210)>2||Math.abs(i[t*4+3]-.75*255)>2}function px(){if(bh===void 0){const i=Nt(6,6,Os);i.globalCompositeOperation="lighter",i.fillStyle="rgba(210, 0, 0, 0.75)",uf(i,4,5,4,0),uf(i,4,5,0,5);const t=i.getImageData(0,0,3,3).data;bh=Eh(t,0)||Eh(t,4)||Eh(t,8),Ul(i),Os.push(i.canvas)}return bh}function df(i,t,e,n){const s=Eu(e,t,i);let r=rr(t,n,e);const a=t.getMetersPerUnit();a!==void 0&&(r*=a);const o=i.getMetersPerUnit();o!==void 0&&(r/=o);const l=i.getExtent();if(!l||er(l,s)){const h=rr(i,r,s)/r;isFinite(h)&&h>0&&(r/=h)}return r}function pm(i,t,e,n){const s=ci(e);let r=df(i,t,s,n);return(!isFinite(r)||r<=0)&&pu(e,function(a){return r=df(i,t,a,n),isFinite(r)&&r>0}),r}function _x(i,t,e,n,s,r,a,o,l,h,c,u,d,g){const f=Nt(Math.round(e*i),Math.round(e*t),Os);if(u||(f.imageSmoothingEnabled=!1),l.length===0)return f.canvas;f.scale(e,e);function m(M){return Math.round(M*e)/e}f.globalCompositeOperation="lighter";const p=Ee();l.forEach(function(M,w,I){Al(p,M.extent)});let _;const v=e/n,x=(u?1:1+Math.pow(2,-24))/v;{if(_=Nt(Math.round(ht(p)*v),Math.round(Ft(p)*v),Os),u||(_.imageSmoothingEnabled=!1),s&&g){const M=(s[0]-p[0])*v,w=-(s[3]-p[3])*v,I=ht(s)*v,E=Ft(s)*v;_.rect(M,w,I,E),_.clip()}l.forEach(function(M,w,I){if(M.image.width>0&&M.image.height>0){if(M.clipExtent){_.save();const P=(M.clipExtent[0]-p[0])*v,N=-(M.clipExtent[3]-p[3])*v,G=ht(M.clipExtent)*v,k=Ft(M.clipExtent)*v;_.rect(u?P:Math.round(P),u?N:Math.round(N),u?G:Math.round(P+G)-Math.round(P),u?k:Math.round(N+k)-Math.round(N)),_.clip()}const E=(M.extent[0]-p[0])*v,S=-(M.extent[3]-p[3])*v,T=ht(M.extent)*v,O=Ft(M.extent)*v;_.drawImage(M.image,h,h,M.image.width-2*h,M.image.height-2*h,u?E:Math.round(E),u?S:Math.round(S),u?T:Math.round(E+T)-Math.round(E),u?O:Math.round(S+O)-Math.round(S)),M.clipExtent&&_.restore()}})}const y=Ti(a);return o.getTriangles().forEach(function(M,w,I){const E=M.source,S=M.target;let T=E[0][0],O=E[0][1],P=E[1][0],N=E[1][1],G=E[2][0],k=E[2][1];const D=m((S[0][0]-y[0])/r),z=m(-(S[0][1]-y[1])/r),U=m((S[1][0]-y[0])/r),q=m(-(S[1][1]-y[1])/r),V=m((S[2][0]-y[0])/r),$=m(-(S[2][1]-y[1])/r),H=T,X=O;T=0,O=0,P-=H,N-=X,G-=H,k-=X;const A=[[P,N,0,0,U-D],[G,k,0,0,V-D],[0,0,P,N,q-z],[0,0,G,k,$-z]],et=My(A);if(!et)return;if(f.save(),f.beginPath(),px()||!u){f.moveTo(U,q);const dt=4,St=D-U,Bt=z-q;for(let Ut=0;Uti):null}function Ho(i,t,e,n){return n!==void 0?(n[0]=i,n[1]=t,n[2]=e,n):[i,t,e]}function vx(i,t,e){return i+"/"+t+"/"+e}function yx(i){return xx(i[0],i[1],i[2])}function xx(i,t,e){return(t<e||e>t.getMaxZoom())return!1;const r=t.getFullTileRange(e);return r?r.containsXY(n,s):!0}const bx=/\{z\}/g,Ex=/\{x\}/g,wx=/\{y\}/g,Cx=/\{-y\}/g;function Sx(i,t,e,n,s){return i.replace(bx,t.toString()).replace(Ex,e.toString()).replace(wx,n.toString()).replace(Cx,function(){if(s===void 0)throw new Error("If the URL template has a {-y} placeholder, the grid extent must be known");return(s-n).toString()})}function Ix(i){const t=[];let e=/\{([a-z])-([a-z])\}/.exec(i);if(e){const n=e[1].charCodeAt(0),s=e[2].charCodeAt(0);let r;for(r=n;r<=s;++r)t.push(i.replace(e[0],String.fromCharCode(r)));return t}if(e=/\{(\d+)-(\d+)\}/.exec(i),e){const n=parseInt(e[2],10);for(let s=parseInt(e[1],10);s<=n;s++)t.push(i.replace(e[0],s.toString()));return t}return t.push(i),t}di("map:WMSLayer");const W={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},ao={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class Rx extends mr{constructor(t){t=t||{};const e=Object.assign({},t),n=t.cacheSize;delete t.cacheSize,delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.cacheSize_=n,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(ao.PRELOAD)}setPreload(t){this.set(ao.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(ao.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(ao.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}class Uu extends Tl{constructor(t,e,n){super(),n=n||{},this.tileCoord=t,this.state=e,this.key="",this.transition_=n.transition===void 0?250:n.transition,this.transitionStarts_={},this.interpolate=!!n.interpolate}changed(){this.dispatchEvent(it.CHANGE)}release(){this.state===W.ERROR&&this.setState(W.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==W.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){ft()}getAlpha(t,e){if(!this.transition_)return 1;let n=this.transitionStarts_[t];if(!n)n=e,this.transitionStarts_[t]=n;else if(n===-1)return 1;const s=e-n+1e3/60;return s>=this.transition_?1:$0(s/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}disposeInternal(){this.release(),super.disposeInternal()}}function Yo(i){return i instanceof Image||i instanceof HTMLCanvasElement||i instanceof HTMLVideoElement||i instanceof ImageBitmap?i:null}function Tx(i){return i instanceof Uint8Array||i instanceof Uint8ClampedArray||i instanceof Float32Array||i instanceof DataView?i:null}const Px=new Error("disposed");let as=null;function Lx(i){as||(as=Nt(i.width,i.height,void 0,{willReadFrequently:!0}));const t=as.canvas,e=i.width;t.width!==e&&(t.width=e);const n=i.height;return t.height!==n&&(t.height=n),as.clearRect(0,0,e,n),as.drawImage(i,0,0),as.getImageData(0,0,e,n).data}const Ax=[256,256];class wc extends Uu{constructor(t){const e=W.IDLE;super(t.tileCoord,e,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||null,this.controller_=t.controller||null}getSize(){if(this.size_)return this.size_;const t=Yo(this.data_);return t?[t.width,t.height]:Ax}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==W.IDLE&&this.state!==W.ERROR)return;this.state=W.LOADING,this.changed();const t=this;this.loader_().then(function(e){t.data_=e,t.state=W.LOADED,t.changed()}).catch(function(e){t.error_=e,t.state=W.ERROR,t.changed()})}disposeInternal(){this.controller_&&(this.controller_.abort(Px),this.controller_=null),super.disposeInternal()}}class vm extends Uu{constructor(t,e,n,s,r,a){super(t,e,a),this.crossOrigin_=s,this.src_=n,this.key=n,this.image_=new Image,s!==null&&(this.image_.crossOrigin=s),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=W.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=W.ERROR,this.unlistenImage_(),this.image_=Ox(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=W.LOADED:this.state=W.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==W.ERROR&&(this.state=W.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==W.IDLE&&(this.state=W.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=dx(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}disposeInternal(){this.unlistenImage_(),this.image_=null,super.disposeInternal()}}function Ox(){const i=Nt(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}class Dx{constructor(t){this.highWaterMark=t!==void 0?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}deleteOldest(){const t=this.pop();t instanceof Rl&&t.dispose()}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.deleteOldest()}clear(){for(;this.oldest_;)this.deleteOldest()}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const n=this.entries_[t];return gt(n!==void 0,"Tried to get a value for a key that does not exist in the cache"),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_}remove(t){const e=this.entries_[t];return gt(e!==void 0,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t}getValues(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){gt(!(t in this.entries_),"Tried to set a value for a key that is used already");const n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_}setSize(t){this.highWaterMark=t}}function Wl(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Cc(i,t,e,n,s,r,a){a=a??Wl();const o=1/(i-t),l=1/(e-n),h=1/(s-r);return a[0]=-2*o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=-2*l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2*h,a[11]=0,a[12]=(i+t)*o,a[13]=(n+e)*l,a[14]=(r+s)*h,a[15]=1,a}function gf(i,t,e,n,s){return s=s??Wl(),s[0]=i[0]*t,s[1]=i[1]*t,s[2]=i[2]*t,s[3]=i[3]*t,s[4]=i[4]*e,s[5]=i[5]*e,s[6]=i[6]*e,s[7]=i[7]*e,s[8]=i[8]*n,s[9]=i[9]*n,s[10]=i[10]*n,s[11]=i[11]*n,s[12]=i[12],s[13]=i[13],s[14]=i[14],s[15]=i[15],s}function kx(i,t,e,n,s){s=s??Wl();let r,a,o,l,h,c,u,d,g,f,m,p;return i===s?(s[12]=i[0]*t+i[4]*e+i[8]*n+i[12],s[13]=i[1]*t+i[5]*e+i[9]*n+i[13],s[14]=i[2]*t+i[6]*e+i[10]*n+i[14],s[15]=i[3]*t+i[7]*e+i[11]*n+i[15]):(r=i[0],a=i[1],o=i[2],l=i[3],h=i[4],c=i[5],u=i[6],d=i[7],g=i[8],f=i[9],m=i[10],p=i[11],s[0]=r,s[1]=a,s[2]=o,s[3]=l,s[4]=h,s[5]=c,s[6]=u,s[7]=d,s[8]=g,s[9]=f,s[10]=m,s[11]=p,s[12]=r*t+h*e+g*n+i[12],s[13]=a*t+c*e+f*n+i[13],s[14]=o*t+u*e+m*n+i[14],s[15]=l*t+d*e+p*n+i[15]),s}function Fx(i,t,e,n){return n=n??Wl(),n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=i,n[13]=t,n[14]=e,n[15]=1,n}const Nx=` + attribute vec4 a_position; + attribute vec4 a_texcoord; + + uniform mat4 u_matrix; + uniform mat4 u_textureMatrix; + + varying vec2 v_texcoord; + + void main() { + gl_Position = u_matrix * a_position; + vec2 texcoord = (u_textureMatrix * a_texcoord).xy; + v_texcoord = texcoord; + } +`,Gx=` + precision mediump float; + + varying vec2 v_texcoord; + + uniform sampler2D u_texture; + + void main() { + if ( + v_texcoord.x < 0.0 || + v_texcoord.y < 0.0 || + v_texcoord.x > 1.0 || + v_texcoord.y > 1.0 + ) { + discard; + } + gl_FragColor = texture2D(u_texture, v_texcoord); + } +`;class zx{constructor(t){this.gl_=t,this.program_=Sc(t,Gx,Nx),this.positionLocation=t.getAttribLocation(this.program_,"a_position"),this.texcoordLocation=t.getAttribLocation(this.program_,"a_texcoord"),this.matrixLocation=t.getUniformLocation(this.program_,"u_matrix"),this.textureMatrixLocation=t.getUniformLocation(this.program_,"u_textureMatrix"),this.textureLocation=t.getUniformLocation(this.program_,"u_texture"),this.positionBuffer=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.positionBuffer),this.positions=[0,0,0,1,1,0,1,0,0,1,1,1],t.bufferData(t.ARRAY_BUFFER,new Float32Array(this.positions),t.STATIC_DRAW),this.texcoordBuffer=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.texcoordBuffer),this.texcoords=[0,0,0,1,1,0,1,0,0,1,1,1],t.bufferData(t.ARRAY_BUFFER,new Float32Array(this.texcoords),t.STATIC_DRAW)}drawImage(t,e,n,s,r,a,o,l,h,c,u,d,g){const f=this.gl_;l===void 0&&(l=s),h===void 0&&(h=r),a===void 0&&(a=e),o===void 0&&(o=n),c===void 0&&(c=a),u===void 0&&(u=o),d===void 0&&(d=f.canvas.width),g===void 0&&(g=f.canvas.height),f.bindTexture(f.TEXTURE_2D,t),f.useProgram(this.program_),f.bindBuffer(f.ARRAY_BUFFER,this.positionBuffer),f.enableVertexAttribArray(this.positionLocation),f.vertexAttribPointer(this.positionLocation,2,f.FLOAT,!1,0,0),f.bindBuffer(f.ARRAY_BUFFER,this.texcoordBuffer),f.enableVertexAttribArray(this.texcoordLocation),f.vertexAttribPointer(this.texcoordLocation,2,f.FLOAT,!1,0,0);let m=Cc(0,d,0,g,-1,1);m=kx(m,l,h,0),m=gf(m,c,u,1),f.uniformMatrix4fv(this.matrixLocation,!1,m);let p=Fx(s/e,r/n,0);p=gf(p,a/e,o/n,1),f.uniformMatrix4fv(this.textureMatrixLocation,!1,p),f.uniform1i(this.textureLocation,0),f.drawArrays(f.TRIANGLES,0,this.positions.length/2)}}function mf(i,t,e){const n=i.createShader(t);if(n===null)throw new Error("Shader compilation failed");if(i.shaderSource(n,e),i.compileShader(n),!i.getShaderParameter(n,i.COMPILE_STATUS)){const s=i.getShaderInfoLog(n);throw s===null?new Error("Shader info log creation failed"):new Error(s)}return n}function Sc(i,t,e){const n=i.createProgram(),s=mf(i,i.VERTEX_SHADER,e),r=mf(i,i.FRAGMENT_SHADER,t);if(n===null)throw new Error("Program creation failed");if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw i.getProgramInfoLog(n)===null?new Error("Program info log creation failed"):new Error;return n}const Vx=` + attribute vec4 a_position; + + uniform mat4 u_matrix; + + void main() { + gl_Position = u_matrix * a_position; + } +`,jx=` + precision mediump float; + + uniform vec4 u_val; + void main() { + gl_FragColor = u_val; + } +`,Bx=` + attribute vec4 a_position; + attribute vec2 a_texcoord; + + varying vec2 v_texcoord; + + uniform mat4 u_matrix; + + void main() { + gl_Position = u_matrix * a_position; + v_texcoord = a_texcoord; + } +`,Ux=` + precision mediump float; + + varying vec2 v_texcoord; + + uniform sampler2D u_texture; + + void main() { + if (v_texcoord.x < 0.0 || v_texcoord.x > 1.0 || v_texcoord.y < 0.0 || v_texcoord.y > 1.0) { + discard; + } + gl_FragColor = texture2D(u_texture, v_texcoord); + } +`;function Wx(i,t,e,n){let s;return e&&e.length?s=e.shift():Gu?s=new OffscreenCanvas(i||300,t||300):s=document.createElement("canvas"),i&&(s.width=i),t&&(s.height=t),s.getContext("webgl",n)}function $x(i){const t=i.canvas;t.width=1,t.height=1,i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT|i.STENCIL_BUFFER_BIT)}const pf=[];function Xx(i,t,e,n,s,r,a,o,l,h,c,u,d,g){const f=Math.round(n*t),m=Math.round(n*e);i.canvas.width=f,i.canvas.height=m;let p,_;if(_=i.createTexture(),i.bindTexture(i.TEXTURE_2D,_),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),d?(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR)):(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST)),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,f,m,0,i.RGBA,c,null),p=i.createFramebuffer(),i.bindFramebuffer(i.FRAMEBUFFER,p),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,_,0),p===null)throw new Error("Could not create framebuffer");if(_===null)throw new Error("Could not create texture");if(l.length===0)return{width:f,height:m,framebuffer:p,texture:_};const v=Ee();l.forEach(function(T,O,P){Al(v,T.extent)});let x,y,M;const w=1/s;{if(x=i.createTexture(),_===null)throw new Error("Could not create texture");y=Math.round(ht(v)*w),M=Math.round(Ft(v)*w);const T=i.getParameter(i.MAX_TEXTURE_SIZE),O=Math.max(y,M),P=O>T?T/O:1,N=Math.round(y*P),G=Math.round(M*P);i.bindTexture(i.TEXTURE_2D,x),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),d?(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR)):(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST)),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,N,G,0,i.RGBA,c,null);const k=i.createFramebuffer();i.bindFramebuffer(i.FRAMEBUFFER,k),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,x,0);const D=new zx(i);l.forEach(function(z,U,q){const V=(z.extent[0]-v[0])*w*P,$=-(z.extent[3]-v[3])*w*P,H=ht(z.extent)*w*P,X=Ft(z.extent)*w*P;if(i.bindFramebuffer(i.FRAMEBUFFER,k),i.viewport(0,0,N,G),z.clipExtent){const A=(z.clipExtent[0]-v[0])*w*P,et=-(z.clipExtent[3]-v[3])*w*P,st=ht(z.clipExtent)*w*P,dt=Ft(z.clipExtent)*w*P;i.enable(i.SCISSOR_TEST),i.scissor(d?A:Math.round(A),d?et:Math.round(et),d?st:Math.round(A+st)-Math.round(A),d?dt:Math.round(et+dt)-Math.round(et))}D.drawImage(z.texture,z.width,z.height,h,h,z.width-2*h,z.height-2*h,d?V:Math.round(V),d?$:Math.round($),d?H:Math.round(V+H)-Math.round(V),d?X:Math.round($+X)-Math.round($),N,G),i.disable(i.SCISSOR_TEST)}),i.deleteFramebuffer(k)}const I=Ti(a),E=Ti(v),S=T=>{const O=(T[0][0]-I[0])/r*n,P=-(T[0][1]-I[1])/r*n,N=(T[1][0]-I[0])/r*n,G=-(T[1][1]-I[1])/r*n,k=(T[2][0]-I[0])/r*n,D=-(T[2][1]-I[1])/r*n;return{u1:N,v1:G,u0:O,v0:P,u2:k,v2:D}};i.bindFramebuffer(i.FRAMEBUFFER,p),i.viewport(0,0,f,m);{const T=[],O=[],P=Sc(i,Ux,Bx);i.useProgram(P);const N=i.getUniformLocation(P,"u_texture");i.bindTexture(i.TEXTURE_2D,x),i.uniform1i(N,0),o.getTriangles().forEach(function(V,$,H){const X=V.source,A=V.target,{u1:et,v1:st,u0:dt,v0:St,u2:Bt,v2:Ut}=S(A),re=(X[0][0]-E[0])/s/y,Re=-(X[0][1]-E[1])/s/M,_i=(X[1][0]-E[0])/s/y,vi=-(X[1][1]-E[1])/s/M,Te=(X[2][0]-E[0])/s/y,qe=-(X[2][1]-E[1])/s/M;T.push(et,st,dt,St,Bt,Ut),O.push(_i,vi,re,Re,Te,qe)});const G=Cc(0,f,m,0,-1,1),k=i.getUniformLocation(P,"u_matrix");i.uniformMatrix4fv(k,!1,G);const D=i.getAttribLocation(P,"a_position"),z=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,z),i.bufferData(i.ARRAY_BUFFER,new Float32Array(T),i.STATIC_DRAW),i.vertexAttribPointer(D,2,i.FLOAT,!1,0,0),i.enableVertexAttribArray(D);const U=i.getAttribLocation(P,"a_texcoord"),q=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,q),i.bufferData(i.ARRAY_BUFFER,new Float32Array(O),i.STATIC_DRAW),i.vertexAttribPointer(U,2,i.FLOAT,!1,0,0),i.enableVertexAttribArray(U),i.drawArrays(i.TRIANGLES,0,T.length/2)}if(u){const T=Sc(i,jx,Vx);i.useProgram(T);const O=Cc(0,f,m,0,-1,1),P=i.getUniformLocation(T,"u_matrix");i.uniformMatrix4fv(P,!1,O);const N=Array.isArray(u)?u:[0,0,0,255],G=i.getUniformLocation(T,"u_val");i.uniform4fv(G,N);const k=i.getAttribLocation(T,"a_position"),D=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,D),i.vertexAttribPointer(k,2,i.FLOAT,!1,0,0),i.enableVertexAttribArray(k);const z=o.getTriangles().reduce(function(U,q){const V=q.target,{u1:$,v1:H,u0:X,v0:A,u2:et,v2:st}=S(V);return U.concat([$,H,X,A,X,A,et,st,et,st,$,H])},[]);i.bufferData(i.ARRAY_BUFFER,new Float32Array(z),i.STATIC_DRAW),i.drawArrays(i.LINES,0,z.length/2)}return{width:f,height:m,framebuffer:p,texture:_}}class Hx extends wc{constructor(t){super({tileCoord:t.tileCoord,loader:()=>Promise.resolve(new Uint8ClampedArray(4)),interpolate:t.interpolate,transition:t.transition}),this.renderEdges_=t.renderEdges!==void 0?t.renderEdges:!1,this.pixelRatio_=t.pixelRatio,this.gutter_=t.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=t.sourceTileGrid,this.targetTileGrid_=t.targetTileGrid,this.wrappedTileCoord_=t.wrappedTileCoord||t.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const e=t.sourceProj,n=e.getExtent(),s=t.sourceTileGrid.getExtent();this.clipExtent_=e.canWrapX()?s?ni(n,s):n:s;const r=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),a=this.targetTileGrid_.getExtent();let o=this.sourceTileGrid_.getExtent();const l=a?ni(r,a):r;if(nr(l)===0){this.state=W.EMPTY;return}n&&(o?o=ni(o,n):o=n);const h=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),c=t.targetProj,u=pm(e,c,l,h);if(!isFinite(u)||u<=0){this.state=W.EMPTY;return}const d=t.errorThreshold!==void 0?t.errorThreshold:gm;if(this.triangulation_=new mm(e,c,l,o,u*d,h,t.transformMatrix),this.triangulation_.getTriangles().length===0){this.state=W.EMPTY;return}this.sourceZ_=this.sourceTileGrid_.getZForResolution(u);let g=this.triangulation_.calculateSourceExtent();if(o&&(e.canWrapX()?(g[1]=It(g[1],o[1],o[3]),g[3]=It(g[3],o[1],o[3])):g=ni(g,o)),!nr(g))this.state=W.EMPTY;else{let f=0,m=0;e.canWrapX()&&(f=ht(n),m=Math.floor((g[0]-n[0])/f)),_u(g.slice(),e,!0).forEach(_=>{const v=this.sourceTileGrid_.getTileRangeForExtentAndZ(_,this.sourceZ_),x=t.getTileFunction;for(let y=v.minX;y<=v.maxX;y++)for(let M=v.minY;M<=v.maxY;M++){const w=x(this.sourceZ_,y,M,this.pixelRatio_);if(w){const I=m*f;this.sourceTiles_.push({tile:w,offset:I})}}++m}),this.sourceTiles_.length===0&&(this.state=W.EMPTY)}}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const t=[];let e=!1;if(this.sourceTiles_.forEach(y=>{const M=y.tile;if(!M||M.getState()!==W.LOADED)return;const w=M.getSize(),I=this.gutter_;let E;const S=Tx(M.getData());S?E=S:(e=!0,E=Lx(Yo(M.getData())));const T=[w[0]+2*I,w[1]+2*I],O=E instanceof Float32Array,P=T[0]*T[1],N=O?Float32Array:Uint8ClampedArray,G=new N(E.buffer),k=N.BYTES_PER_ELEMENT,D=k*G.length/P,z=G.byteLength/T[1],U=Math.floor(z/k/T[0]),q=this.sourceTileGrid_.getTileCoordExtent(M.tileCoord);q[0]+=y.offset,q[2]+=y.offset;const V=this.clipExtent_?.slice();V&&(V[0]+=y.offset,V[2]+=y.offset),t.push({extent:q,clipExtent:V,data:G,dataType:N,bytesPerPixel:D,pixelSize:T,bandCount:U})}),this.sourceTiles_.length=0,t.length===0){this.state=W.ERROR,this.changed();return}const n=this.wrappedTileCoord_[0],s=this.targetTileGrid_.getTileSize(n),r=typeof s=="number"?s:s[0],a=typeof s=="number"?s:s[1],o=r*this.pixelRatio_,l=a*this.pixelRatio_,h=this.targetTileGrid_.getResolution(n),c=this.sourceTileGrid_.getResolution(this.sourceZ_),u=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),d=t[0].bandCount,g=new t[0].dataType(d*o*l),f=Wx(o,l,pf,{premultipliedAlpha:!1,antialias:!1});let m;const p=f.RGBA;let _;t[0].dataType==Float32Array?(_=f.FLOAT,f.getExtension("WEBGL_color_buffer_float"),f.getExtension("OES_texture_float"),f.getExtension("EXT_float_blend"),m=f.getExtension("OES_texture_float_linear")!==null&&this.interpolate):(_=f.UNSIGNED_BYTE,m=this.interpolate);const v=4,x=Math.ceil(d/v);for(let y=x-1;y>=0;--y){const M=[];for(let N=0,G=t.length;N{const n=e.getState();if(n!==W.IDLE&&n!==W.LOADING)return;t++;const s=ct(e,it.CHANGE,()=>{const r=e.getState();(r==W.LOADED||r==W.ERROR||r==W.EMPTY)&&(Et(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(s)}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:e}){e.getState()==W.IDLE&&e.load()})}unlistenSources_(){this.sourcesListenerKeys_.forEach(Et),this.sourcesListenerKeys_=null}}class Ic extends Uu{constructor(t,e,n,s,r,a,o,l,h,c,u,d){super(r,W.IDLE,d),this.renderEdges_=u!==void 0?u:!1,this.pixelRatio_=o,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=s,this.wrappedTileCoord_=a||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=t.canWrapX()?t.getExtent():void 0;const g=s.getTileCoordExtent(this.wrappedTileCoord_),f=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const p=f?ni(g,f):g;if(nr(p)===0){this.state=W.EMPTY;return}const _=t.getExtent();_&&(m?m=ni(m,_):m=_);const v=s.getResolution(this.wrappedTileCoord_[0]),x=pm(t,n,p,v);if(!isFinite(x)||x<=0){this.state=W.EMPTY;return}const y=c!==void 0?c:gm;if(this.triangulation_=new mm(t,n,p,m,x*y,v),this.triangulation_.getTriangles().length===0){this.state=W.EMPTY;return}this.sourceZ_=e.getZForResolution(x);let M=this.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(M[1]=It(M[1],m[1],m[3]),M[3]=It(M[3],m[1],m[3])):M=ni(M,m)),!nr(M))this.state=W.EMPTY;else{let w=0,I=0;t.canWrapX()&&(w=ht(_),I=Math.floor((M[0]-_[0])/w)),_u(M.slice(),t,!0).forEach(S=>{const T=e.getTileRangeForExtentAndZ(S,this.sourceZ_);for(let O=T.minX;O<=T.maxX;O++)for(let P=T.minY;P<=T.maxY;P++){const N=h(this.sourceZ_,O,P,o);if(N){const G=I*w;this.sourceTiles_.push({tile:N,offset:G})}}++I}),this.sourceTiles_.length===0&&(this.state=W.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{const n=e.tile;if(n&&n.getState()==W.LOADED){const s=this.sourceTileGrid_.getTileCoordExtent(n.tileCoord);s[0]+=e.offset,s[2]+=e.offset;const r=this.clipExtent_?.slice();r&&(r[0]+=e.offset,r[2]+=e.offset),t.push({extent:s,clipExtent:r,image:n.getImage()})}}),this.sourceTiles_.length=0,t.length===0)this.state=W.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),s=typeof n=="number"?n:n[0],r=typeof n=="number"?n:n[1],a=this.targetTileGrid_.getResolution(e),o=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=_x(s,r,this.pixelRatio_,o,this.sourceTileGrid_.getExtent(),a,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=W.LOADED}this.changed()}load(){if(this.state==W.IDLE){this.state=W.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:e})=>{const n=e.getState();if(n==W.IDLE||n==W.LOADING){t++;const s=ct(e,it.CHANGE,r=>{const a=e.getState();(a==W.LOADED||a==W.ERROR||a==W.EMPTY)&&(Et(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(s)}}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:e},n,s){e.getState()==W.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Et),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Ul(this.canvas_.getContext("2d")),Os.push(this.canvas_),this.canvas_=null),super.release()}}class Wu{constructor(t,e,n,s){this.minX=t,this.maxX=e,this.minY=n,this.maxY=s}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function os(i,t,e,n,s){return s!==void 0?(s.minX=i,s.maxX=t,s.minY=e,s.maxY=n,s):new Wu(i,t,e,n)}function _f(i){return i[0]>0&&i[1]>0}function Yx(i,t,e){return e===void 0&&(e=[0,0]),e[0]=i[0]*t+.5|0,e[1]=i[1]*t+.5|0,e}function xe(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}function wh(i,t,e,n){return`${i},${vx(t,e,n)}`}function Ch(i,t,e){if(!(e in i))return i[e]=new Set([t]),!0;const n=i[e],s=n.has(t);return s||n.add(t),!s}function qx(i,t,e){const n=i[e];return n?n.delete(t):!1}function vf(i,t){const e=i.layerStatesArray[i.layerIndex];e.extent&&(t=ni(t,gn(e.extent,i.viewState.projection)));const n=e.layer.getRenderSource();if(!n.getWrapX()){const s=n.getTileGridForProjection(i.viewState.projection).getExtent();s&&(t=ni(t,s))}return t}class Kx extends fm{constructor(t,e){super(t),e=e||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=Ee(),this.tempTileRange_=new Wu(0,0,0,0),this.tempTileCoord_=Ho(0,0,0);const n=e.cacheSize!==void 0?e.cacheSize:512;this.tileCache_=new Dx(n),this.maxStaleKeys=n*.5}getTileCache(){return this.tileCache_}getOrCreateTile(t,e,n,s){const r=this.tileCache_,o=this.getLayer().getSource(),l=wh(o.getKey(),t,e,n);let h;if(r.containsKey(l))h=r.get(l);else{if(h=o.getTile(t,e,n,s.pixelRatio,s.viewState.projection),!h)return null;r.set(l,h)}return h}getTile(t,e,n,s){const r=this.getOrCreateTile(t,e,n,s);return r||null}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),s=Ht(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!er(r,s))return null;const a=e.viewState,o=n.getRenderSource(),l=o.getTileGridForProjection(a.projection),h=o.getTilePixelRatio(e.pixelRatio);for(let c=l.getZForResolution(a.resolution);c>=l.getMinZoom();--c){const u=l.getTileCoordForCoordAndZ(s,c),d=this.getTile(c,u[1],u[2],e);if(!d||d.getState()!==W.LOADED)continue;const g=l.getOrigin(c),f=xe(l.getTileSize(c)),m=l.getResolution(c);let p;if(d instanceof vm||d instanceof Ic)p=d.getImage();else if(d instanceof wc){if(p=Yo(d.getData()),!p)continue}else continue;const _=Math.floor(h*((s[0]-g[0])/m-u[1]*f[0])),v=Math.floor(h*((g[1]-s[1])/m-u[2]*f[1])),x=Math.round(h*o.getGutterForProjection(a.projection));return this.getImageData(p,_+x,v+x)}return null}prepareFrame(t){this.renderedProjection?t.viewState.projection!==this.renderedProjection&&(this.tileCache_.clear(),this.renderedProjection=t.viewState.projection):this.renderedProjection=t.viewState.projection;const e=this.getLayer().getSource();if(!e)return!1;const n=e.getRevision();return this.renderedRevision_?this.renderedRevision_!==n&&(this.renderedRevision_=n,this.renderedSourceKey_===e.getKey()&&this.tileCache_.clear()):this.renderedRevision_=n,!0}enqueueTiles(t,e,n,s,r){const a=t.viewState,o=this.getLayer(),l=o.getRenderSource(),h=l.getTileGridForProjection(a.projection),c=pt(l);c in t.wantedTiles||(t.wantedTiles[c]={});const u=t.wantedTiles[c],d=o.getMapInternal(),g=Math.max(n-r,h.getMinZoom(),h.getZForResolution(Math.min(o.getMaxResolution(),d?d.getView().getResolutionForZoom(Math.max(o.getMinZoom(),0)):h.getResolution(0)),l.zDirection));for(let f=n;f>=g;--f){const m=h.getTileRangeForExtentAndZ(e,f,this.tempTileRange_),p=h.getResolution(f);for(let _=m.minX;_<=m.maxX;++_)for(let v=m.minY;v<=m.maxY;++v){const x=this.getTile(f,_,v,t);if(!x||!Ch(s,x,f))continue;const M=x.getKey();if(u[M]=!0,x.getState()===W.IDLE&&!t.tileQueue.isKeyQueued(M)){const w=Ho(f,_,v,this.tempTileCoord_);t.tileQueue.enqueue([x,c,h.getTileCoordCenter(w),p])}}}}findStaleTile_(t,e){const n=this.tileCache_,s=t[0],r=t[1],a=t[2],o=this.getStaleKeys();for(let l=0;l0&&setTimeout(()=>{this.enqueueTiles(t,O,f-1,S,T-1)},0),!(f in S))return this.container;const P=pt(this),N=t.time;for(const V of S[f]){const $=V.getState();if((V instanceof Ic||V instanceof Hx)&&$===W.EMPTY)continue;const H=V.tileCoord;if($===W.LOADED&&V.getAlpha(P,N)===1){V.endTransition(P);continue}if($!==W.IDLE&&(n=!1),$!==W.ERROR&&(this.renderComplete=!1),this.findStaleTile_(H,S)){qx(S,V,f),t.animate=!0;continue}if(this.findAltTiles_(g,H,f+1,S))continue;const et=g.getMinZoom();for(let st=f-1;st>=et&&!this.findAltTiles_(g,H,st,S);--st);}const G=m/o*h/v,k=this.getRenderContext(t);Xi(this.tempTransform,x/2,y/2,G,G,0,-x/2,-y/2),s.extent&&this.clipUnrotated(k,t,M),u.getInterpolate()||(k.imageSmoothingEnabled=!1),this.preRender(k,t);const D=Object.keys(S).map(Number);D.sort(ji);let z;const U=[],q=[];for(let V=D.length-1;V>=0;--V){const $=D[V],H=u.getTilePixelSize($,h,a),A=g.getResolution($)/m,et=H[0]*A*G,st=H[1]*A*G,dt=g.getTileCoordForCoordAndZ(Ti(E),$),St=g.getTileCoordExtent(dt),Bt=Ht(this.tempTransform,[v*(St[0]-E[0])/m,v*(E[3]-St[3])/m]),Ut=v*u.getGutterForProjection(a);for(const re of S[$]){if(re.getState()!==W.LOADED)continue;const Re=re.tileCoord,_i=dt[1]-Re[1],vi=Math.round(Bt[0]-(_i-1)*et),Te=dt[2]-Re[2],qe=Math.round(Bt[1]-(Te-1)*st),de=Math.round(Bt[0]-_i*et),te=Math.round(Bt[1]-Te*st),Pe=vi-de,kt=qe-te,In=D.length===1;let Ke=!1;z=[de,te,de+Pe,te,de+Pe,te+kt,de,te+kt];for(let ns=0,ss=U.length;ns{const X=pt(u),A=H.wantedTiles[X],et=A?Object.keys(A).length:0;this.updateCacheSize(et),this.tileCache_.expireCache()};t.postRenderFunctions.push(V)}return!this.renderComplete&&!n&&(t.animate=!0),this.container}updateCacheSize(t){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,t*2)}drawTile(t,e,n,s,r,a,o,l){let h;if(t instanceof wc){if(h=Yo(t.getData()),!h)throw new Error("Rendering array data is not yet supported")}else h=this.getTileImage(t);if(!h)return;const c=this.getRenderContext(e),u=pt(this),d=e.layerStatesArray[e.layerIndex],g=d.opacity*(l?t.getAlpha(u,e.time):1),f=g!==c.globalAlpha;f&&(c.save(),c.globalAlpha=g),c.drawImage(h,o,o,h.width-2*o,h.height-2*o,n,s,r,a),f&&c.restore(),g!==d.opacity?e.animate=!0:l&&t.endTransition(u)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}updateUsedTiles(t,e,n){const s=pt(e);s in t||(t[s]={}),t[s][n.getKey()]=!0}}class $u extends Rx{constructor(t){super(t)}createRenderer(){return new Kx(this,{cacheSize:this.getCacheSize()})}}const Sh={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},ls=[0,0,0],Ki=5;class ym{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,gt(_y(this.resolutions_,(s,r)=>r-s),"`resolutions` must be sorted in descending order");let e;if(!t.origins){for(let s=0,r=this.resolutions_.length-1;s{const a=new Wu(Math.min(0,s[0]),Math.max(s[0]-1,-1),Math.min(0,s[1]),Math.max(s[1]-1,-1));if(n){const o=this.getTileRangeForExtentAndZ(n,r);a.minX=Math.max(o.minX,a.minX),a.maxX=Math.min(o.maxX,a.maxX),a.minY=Math.max(o.minY,a.minY),a.maxY=Math.min(o.maxY,a.maxY)}return a}):n&&this.calculateTileRanges_(n)}forEachTileCoord(t,e,n){const s=this.getTileRangeForExtentAndZ(t,e);for(let r=s.minX,a=s.maxX;r<=a;++r)for(let o=s.minY,l=s.maxY;o<=l;++o)n([e,r,o])}forEachTileCoordParentTileRange(t,e,n,s){let r,a,o,l=null,h=t[0]-1;for(this.zoomFactor_===2?(a=t[1],o=t[2]):l=this.getTileCoordExtent(t,s);h>=this.minZoom;){if(a!==void 0&&o!==void 0?(a=Math.floor(a/2),o=Math.floor(o/2),r=os(a,a,o,o,n)):r=this.getTileRangeForExtentAndZ(l,h,n),e(h,r))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,n){if(t[0]this.maxZoom||e0?n:Math.max(r/e[0],s/e[1]);const a=t+1,o=new Array(a);for(let l=0;lthis.getTileInternal(g,f,m,p,a),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return d.key=l,d}getTileInternal(t,e,n,s,r){const a=this.getKey();return this.createTile_(t,e,n,s,r,a)}setRenderReprojectionEdges(t){this.renderReprojectionEdges_!=t&&(this.renderReprojectionEdges_=t,this.changed())}setTileGridForProjection(t,e){const n=Gt(t);if(n){const s=pt(n);s in this.tileGridForProjection||(this.tileGridForProjection[s]=e)}}}function oM(i,t){i.getImage().src=t}const ge={ADD:"add",REMOVE:"remove"},yf={LENGTH:"length"};class oo extends fi{constructor(t,e,n){super(t),this.element=e,this.index=n}}class We extends Ye{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let n=0,s=this.array_.length;n0;)this.pop()}extend(t){for(let e=0,n=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new oo(ge.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let n=0,s=e.length;n=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new oo(ge.REMOVE,e,t)),e}setAt(t,e){const n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const s=this.array_[t];this.array_[t]=e,this.dispatchEvent(new oo(ge.REMOVE,s,t)),this.dispatchEvent(new oo(ge.ADD,e,t))}updateLength_(){this.set(yf.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,s=this.array_.length;nthis.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const n=this.cache_[e];!(t++&3)&&!n.hasListener()&&(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,n){const s=Ih(t,e,n);return s in this.cache_?this.cache_[s]:null}getPattern(t,e,n){const s=Ih(t,e,n);return s in this.patternCache_?this.patternCache_[s]:null}set(t,e,n,s,r){const a=Ih(t,e,n),o=a in this.cache_;this.cache_[a]=s,r&&(s.getImageState()===ot.IDLE&&s.load(),s.getImageState()===ot.LOADING?s.ready().then(()=>{this.patternCache_[a]=$o().createPattern(s.getImage(1),"repeat")}):this.patternCache_[a]=$o().createPattern(s.getImage(1),"repeat")),o||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function Ih(i,t,e){const n=e?ar(e):"null";return t+":"+i+":"+n}const $e=new dM;let Cr=null;class bm extends Tl{constructor(t,e,n,s,r){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=n,this.canvas_={},this.color_=r,this.imageState_=s===void 0?ot.IDLE:s,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===ot.LOADED){Cr||(Cr=Nt(1,1,void 0,{willReadFrequently:!0})),Cr.drawImage(this.image_,0,0);try{Cr.getImageData(0,0,1,1),this.tainted_=!1}catch{Cr=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(it.CHANGE)}handleImageError_(){this.imageState_=ot.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=ot.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],n=Nt(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===ot.IDLE){this.image_||this.initializeImage_(),this.imageState_=ot.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&gx(this.image_,this.src_).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==ot.LOADED)return;const e=this.image_,n=Nt(Math.ceil(e.width*t),Math.ceil(e.height*t)),s=n.canvas;n.scale(t,t),n.drawImage(e,0,0),n.globalCompositeOperation="multiply",n.fillStyle=ox(this.color_),n.fillRect(0,0,s.width/t,s.height/t),n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),this.canvas_[t]=s}ready(){return this.ready_||(this.ready_=new Promise(t=>{if(this.imageState_===ot.LOADED||this.imageState_===ot.ERROR)t();else{const e=()=>{(this.imageState_===ot.LOADED||this.imageState_===ot.ERROR)&&(this.removeEventListener(it.CHANGE,e),t())};this.addEventListener(it.CHANGE,e)}})),this.ready_}}function Yu(i,t,e,n,s,r){let a=t===void 0?void 0:$e.get(t,e,s);return a||(a=new bm(i,i&&"src"in i?i.src||void 0:t,e,n,s),$e.set(t,e,s,a,r)),r&&a&&!$e.getPattern(t,e,s)&&$e.set(t,e,s,a,r),a}class Ce{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,t.color!==void 0&&this.setColor(t.color)}clone(){const t=this.getColor();return new Ce({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(t!==null&&typeof t=="object"&&"src"in t){const e=Yu(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then(()=>{this.patternImage_=null}),e.getImageState()===ot.IDLE&&e.load(),e.getImageState()===ot.LOADING&&(this.patternImage_=e)}this.color_=t}getKey(){const t=this.getColor();return t?t instanceof CanvasPattern||t instanceof CanvasGradient?pt(t):typeof t=="object"&&"src"in t?t.src+":"+t.offset:ar(t).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}function qo(i,t,e,n,s,r,a){let o,l;const h=(e-t)/n;if(h===1)o=t;else if(h===2)o=t,l=s;else if(h!==0){let c=i[t],u=i[t+1],d=0;const g=[0];for(let p=t+n;p1?a:2,r=r||new Array(a);for(let c=0;c>1;sMath.max(s,Jo(i,r)),0);return e[t]=n,n}function yM(i,t){const e=[],n=[],s=[];let r=0,a=0,o=0,l=0;for(let h=0,c=t.length;h<=c;h+=2){const u=t[h];if(u===` +`||h===c){r=Math.max(r,a),s.push(a),a=0,o+=l,l=0;continue}const d=t[h+1]||i.font,g=Jo(d,u);e.push(g),a+=g;const f=vM(d);n.push(f),l=Math.max(l,f)}return{width:r,height:o,widths:e,heights:n,lineWidths:s}}function xM(i,t,e,n,s,r,a,o,l,h,c){i.save(),e!==1&&(i.globalAlpha===void 0?i.globalAlpha=u=>u.globalAlpha*=e:i.globalAlpha*=e),t&&i.transform.apply(i,t),n.contextInstructions?(i.translate(l,h),i.scale(c[0],c[1]),MM(n,i)):c[0]<0||c[1]<0?(i.translate(l,h),i.scale(c[0],c[1]),i.drawImage(n,s,r,a,o,0,0,a,o)):i.drawImage(n,s,r,a,o,l,h,a*c[0],o*c[1]),i.restore()}function MM(i,t){const e=i.contextInstructions;for(let n=0,s=e.length;nthis.imageState_=ot.LOADED),this.render()}clone(){const t=this.getScale(),e=new Hl({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){const e=this.fill_?.getKey(),n=`${t},${this.angle_},${this.radius},${this.radius2_},${this.points_},${e}`+Object.values(this.renderOptions_).join(",");let s=$e.get(n,null,null)?.getImage(1);if(!s){const r=this.renderOptions_,a=Math.ceil(r.size*t),o=Nt(a,a);this.draw_(r,o,t),s=o.canvas,$e.set(n,null,null,new bm(s,void 0,null,ot.LOADED,null))}return s}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let s=this.radius,r=this.radius2_===void 0?s:this.radius2_;if(se;){if(n-e>600){const l=n-e+1,h=t-e+1,c=Math.log(l),u=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*u*(l-u)/l)*(h-l/2<0?-1:1),g=Math.max(e,Math.floor(t-h*u/l+d)),f=Math.min(n,Math.floor(t+(l-h)*u/l+d));Rm(i,t,g,f,s)}const r=i[t];let a=e,o=n;for(Sr(i,e,t),s(i[n],r)>0&&Sr(i,e,n);a0;)o--}s(i[e],r)===0?Sr(i,e,o):(o++,Sr(i,o,n)),o<=t&&(e=o+1),t<=o&&(n=o-1)}}function Sr(i,t,e){const n=i[t];i[t]=i[e],i[e]=n}function wM(i,t){return it?1:0}let Tm=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!co(t,e))return n;const s=this.toBBox,r=[];for(;e;){for(let a=0;a=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)}_split(t,e){const n=t[e],s=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,s);const a=this._chooseSplitIndex(n,r,s),o=vs(n.children.splice(a,n.children.length-a));o.height=n.height,o.leaf=n.leaf,hs(n,this.toBBox),hs(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(n,o)}_splitRoot(t,e){this.data=vs([t,e]),this.data.height=t.height+1,this.data.leaf=!1,hs(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let s,r=1/0,a=1/0;for(let o=e;o<=n-e;o++){const l=Lr(t,0,o,this.toBBox),h=Lr(t,o,n,this.toBBox),c=TM(l,h),u=Th(l)+Th(h);c=e;h--){const c=t.children[h];Ar(o,t.leaf?r(c):c),l+=ho(o)}return l}_adjustParentBBoxes(t,e,n){for(let s=n;s>=0;s--)Ar(e[s],t)}_condense(t){for(let e=t.length-1,n;e>=0;e--)t[e].children.length===0?e>0?(n=t[e-1].children,n.splice(n.indexOf(t[e]),1)):this.clear():hs(t[e],this.toBBox)}};function CM(i,t,e){if(!e)return t.indexOf(i);for(let n=0;n=i.minX&&t.maxY>=i.minY}function vs(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Ef(i,t,e,n,s){const r=[t,e];for(;r.length;){if(e=r.pop(),t=r.pop(),e-t<=n)continue;const a=t+Math.ceil((e-t)/n/2)*n;Rm(i,a,t,e,s),r.push(t,a,a,e)}}function wf(i,t,e,n){return e!==void 0&&n!==void 0?[e/i,n/t]:e!==void 0?e/i:n!==void 0?n/t:1}class hr extends $l{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,s=t.scale!==void 0?t.scale:1,r=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:s,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const a=t.img!==void 0?t.img:null;let o=t.src;gt(!(o!==void 0&&a),"`image` and `src` cannot be provided at the same time"),(o===void 0||o.length===0)&&a&&(o=a.src||pt(a)),gt(o!==void 0&&o.length>0,"A defined and non-empty `src` or `image` must be provided"),gt(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let l;if(t.src!==void 0?l=ot.IDLE:a!==void 0&&("complete"in a?a.complete?l=a.src?ot.LOADED:ot.IDLE:l=ot.LOADING:l=ot.LOADED),this.color_=t.color!==void 0?ar(t.color):null,this.iconImage_=Yu(a,o,this.crossOrigin_,l,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,this.initialOptions_,t.width!==void 0||t.height!==void 0){let h,c;if(t.size)[h,c]=t.size;else{const u=this.getImage(1);if(u.width&&u.height)h=u.width,c=u.height;else if(u instanceof HTMLImageElement){this.initialOptions_=t;const d=()=>{if(this.unlistenImageChange(d),!this.initialOptions_)return;const g=this.iconImage_.getSize();this.setScale(wf(g[0],g[1],t.width,t.height))};this.listenImageChange(d);return}}h!==void 0&&this.setScale(wf(h,c,t.width,t.height))}}clone(){let t,e,n;return this.initialOptions_?(e=this.initialOptions_.width,n=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new hr({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:n,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=s[0]),this.anchorYUnits_=="fraction"&&(t[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+s[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==ot.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==ot.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(it.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(it.CHANGE,t)}ready(){return this.iconImage_.ready()}}let es=0;const le=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string",Has:"has"},OM={[L.Get]:tt(at(1,1/0),Cf),[L.Var]:tt(at(1,1),DM),[L.Has]:tt(at(1,1/0),Cf),[L.Id]:tt(kM,cs),[L.Concat]:tt(at(2,1/0),mt(pe)),[L.GeometryType]:tt(FM,cs),[L.LineMetric]:tt(cs),[L.Resolution]:tt(cs),[L.Zoom]:tt(cs),[L.Time]:tt(cs),[L.Any]:tt(at(2,1/0),mt(le)),[L.All]:tt(at(2,1/0),mt(le)),[L.Not]:tt(at(1,1),mt(le)),[L.Equal]:tt(at(2,2),mt(uo)),[L.NotEqual]:tt(at(2,2),mt(uo)),[L.GreaterThan]:tt(at(2,2),mt(ut)),[L.GreaterThanOrEqualTo]:tt(at(2,2),mt(ut)),[L.LessThan]:tt(at(2,2),mt(ut)),[L.LessThanOrEqualTo]:tt(at(2,2),mt(ut)),[L.Multiply]:tt(at(2,1/0),Sf),[L.Coalesce]:tt(at(2,1/0),Sf),[L.Divide]:tt(at(2,2),mt(ut)),[L.Add]:tt(at(2,1/0),mt(ut)),[L.Subtract]:tt(at(2,2),mt(ut)),[L.Clamp]:tt(at(3,3),mt(ut)),[L.Mod]:tt(at(2,2),mt(ut)),[L.Pow]:tt(at(2,2),mt(ut)),[L.Abs]:tt(at(1,1),mt(ut)),[L.Floor]:tt(at(1,1),mt(ut)),[L.Ceil]:tt(at(1,1),mt(ut)),[L.Round]:tt(at(1,1),mt(ut)),[L.Sin]:tt(at(1,1),mt(ut)),[L.Cos]:tt(at(1,1),mt(ut)),[L.Atan]:tt(at(1,2),mt(ut)),[L.Sqrt]:tt(at(1,1),mt(ut)),[L.Match]:tt(at(4,1/0),If,GM),[L.Between]:tt(at(3,3),mt(ut)),[L.Interpolate]:tt(at(6,1/0),If,zM),[L.Case]:tt(at(3,1/0),NM,VM),[L.In]:tt(at(2,2),jM),[L.Number]:tt(at(1,1/0),mt(uo)),[L.String]:tt(at(1,1/0),mt(uo)),[L.Array]:tt(at(1,1/0),mt(ut)),[L.Color]:tt(at(1,4),mt(ut)),[L.Band]:tt(at(1,3),mt(ut)),[L.Palette]:tt(at(2,2),BM),[L.ToString]:tt(at(1,1),mt(le|ut|pe|ii))};function Cf(i,t,e){const n=i.length-1,s=new Array(n);for(let r=0;rt){const o=t===1/0?`${i} or more`:`${i} to ${t}`;throw new Error(`expected ${o} arguments for ${r}, got ${a}`)}}}function Sf(i,t,e){const n=i.length-1,s=new Array(n);for(let r=0;rn.featureId;case L.GeometryType:return n=>n.geometryType;case L.Concat:{const n=i.args.map(s=>ui(s));return s=>"".concat(...n.map(r=>r(s).toString()))}case L.Resolution:return n=>n.resolution;case L.Any:case L.All:case L.Between:case L.In:case L.Not:return HM(i);case L.Equal:case L.NotEqual:case L.LessThan:case L.LessThanOrEqualTo:case L.GreaterThan:case L.GreaterThanOrEqualTo:return XM(i);case L.Multiply:case L.Divide:case L.Add:case L.Subtract:case L.Clamp:case L.Mod:case L.Pow:case L.Abs:case L.Floor:case L.Ceil:case L.Round:case L.Sin:case L.Cos:case L.Atan:case L.Sqrt:return YM(i);case L.Case:return qM(i);case L.Match:return KM(i);case L.Interpolate:return ZM(i);case L.ToString:return JM(i);default:throw new Error(`Unsupported operator ${e}`)}}function WM(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{for(let a=0;a{for(let a=0;a{const r=i.args;let a=s.properties[n];for(let o=1,l=r.length;os.variables[n];case L.Has:return s=>{const r=i.args;if(!(n in s.properties))return!1;let a=s.properties[n];for(let o=1,l=r.length;on(r)===s(r);case L.NotEqual:return r=>n(r)!==s(r);case L.LessThan:return r=>n(r)n(r)<=s(r);case L.GreaterThan:return r=>n(r)>s(r);case L.GreaterThanOrEqualTo:return r=>n(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${e}`)}}function HM(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{for(let a=0;a{for(let a=0;a{const a=s[0](r),o=s[1](r),l=s[2](r);return a>=o&&a<=l};case L.In:return r=>{const a=s[0](r);for(let o=1;o!s[0](r);default:throw new Error(`Unsupported logical operator ${e}`)}}function YM(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{let a=1;for(let o=0;os[0](r)/s[1](r);case L.Add:return r=>{let a=0;for(let o=0;os[0](r)-s[1](r);case L.Clamp:return r=>{const a=s[0](r),o=s[1](r);if(al?l:a};case L.Mod:return r=>s[0](r)%s[1](r);case L.Pow:return r=>Math.pow(s[0](r),s[1](r));case L.Abs:return r=>Math.abs(s[0](r));case L.Floor:return r=>Math.floor(s[0](r));case L.Ceil:return r=>Math.ceil(s[0](r));case L.Round:return r=>Math.round(s[0](r));case L.Sin:return r=>Math.sin(s[0](r));case L.Cos:return r=>Math.cos(s[0](r));case L.Atan:return n===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case L.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${e}`)}}function qM(i,t){const e=i.args.length,n=new Array(e);for(let s=0;s{for(let r=0;r{const r=n[0](s);for(let a=1;a{const r=n[0](s),a=n[1](s);let o,l;for(let h=2;h=a)return h===2?u:d?QM(r,a,o,l,c,u):Fr(r,a,o,l,c,u);o=c,l=u}return l}}function JM(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{const a=s[0](r);return i.args[0].type===ii?Bu(a):a.toString()};default:throw new Error(`Unsupported convert operator ${e}`)}}function Fr(i,t,e,n,s,r){const a=s-e;if(a===0)return n;const o=t-e,l=i===1?o/a:(Math.pow(i,o)-1)/(Math.pow(i,a)-1);return n+l*(r-n)}function QM(i,t,e,n,s,r){if(s-e===0)return n;const o=lf(n),l=lf(r);let h=l[2]-o[2];h>180?h-=360:h<-180&&(h+=360);const c=[Fr(i,t,e,o[0],s,l[0]),Fr(i,t,e,o[1],s,l[1]),o[2]+Fr(i,t,e,0,s,h),Fr(i,t,e,n[3],s,r[3])];return dm(cx(c))}function tb(i){return!0}function eb(i){const t=Pm(),e=ib(i,t),n=Am();return function(s,r){if(n.properties=s.getPropertiesInternal(),n.resolution=r,t.featureId){const a=s.getId();a!==void 0?n.featureId=a:n.featureId=null}return t.geometryType&&(n.geometryType=Lm(s.getGeometry())),e(n)}}function Rf(i){const t=Pm(),e=i.length,n=new Array(e);for(let a=0;anull;n=Ju(i,t+"fill-color",e)}if(!n)return null;const s=new Ce;return function(r){const a=n(r);return a===Vu?null:(s.setColor(a),s)}}function oa(i,t,e){const n=ve(i,t+"stroke-width",e),s=Ju(i,t+"stroke-color",e);if(!n&&!s)return null;const r=Gi(i,t+"stroke-line-cap",e),a=Gi(i,t+"stroke-line-join",e),o=Om(i,t+"stroke-line-dash",e),l=ve(i,t+"stroke-line-dash-offset",e),h=ve(i,t+"stroke-miter-limit",e),c=new At;return function(u){if(s){const d=s(u);if(d===Vu)return null;c.setColor(d)}if(n&&c.setWidth(n(u)),r){const d=r(u);if(d!=="butt"&&d!=="round"&&d!=="square")throw new Error("Expected butt, round, or square line cap");c.setLineCap(d)}if(a){const d=a(u);if(d!=="bevel"&&d!=="round"&&d!=="miter")throw new Error("Expected bevel, round, or miter line join");c.setLineJoin(d)}return o&&c.setLineDash(o(u)),l&&c.setLineDashOffset(l(u)),h&&c.setMiterLimit(h(u)),c}}function nb(i,t){const e="text-",n=Gi(i,e+"value",t);if(!n)return null;const s=aa(i,e,t),r=aa(i,e+"background-",t),a=oa(i,e,t),o=oa(i,e+"background-",t),l=Gi(i,e+"font",t),h=ve(i,e+"max-angle",t),c=ve(i,e+"offset-x",t),u=ve(i,e+"offset-y",t),d=Ds(i,e+"overflow",t),g=Gi(i,e+"placement",t),f=ve(i,e+"repeat",t),m=Yl(i,e+"scale",t),p=Ds(i,e+"rotate-with-view",t),_=ve(i,e+"rotation",t),v=Gi(i,e+"align",t),x=Gi(i,e+"justify",t),y=Gi(i,e+"baseline",t),M=Ds(i,e+"keep-upright",t),w=Om(i,e+"padding",t),I=ql(i,e+"declutter-mode"),E=new Ku({declutterMode:I});return function(S){if(E.setText(n(S)),s&&E.setFill(s(S)),r&&E.setBackgroundFill(r(S)),a&&E.setStroke(a(S)),o&&E.setBackgroundStroke(o(S)),l&&E.setFont(l(S)),h&&E.setMaxAngle(h(S)),c&&E.setOffsetX(c(S)),u&&E.setOffsetY(u(S)),d&&E.setOverflow(d(S)),g){const T=g(S);if(T!=="point"&&T!=="line")throw new Error("Expected point or line for text-placement");E.setPlacement(T)}if(f&&E.setRepeat(f(S)),m&&E.setScale(m(S)),p&&E.setRotateWithView(p(S)),_&&E.setRotation(_(S)),v){const T=v(S);if(T!=="left"&&T!=="center"&&T!=="right"&&T!=="end"&&T!=="start")throw new Error("Expected left, right, center, start, or end for text-align");E.setTextAlign(T)}if(x){const T=x(S);if(T!=="left"&&T!=="right"&&T!=="center")throw new Error("Expected left, right, or center for text-justify");E.setJustify(T)}if(y){const T=y(S);if(T!=="bottom"&&T!=="top"&&T!=="middle"&&T!=="alphabetic"&&T!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");E.setTextBaseline(T)}return w&&E.setPadding(w(S)),M&&E.setKeepUpright(M(S)),E}}function sb(i,t){return"icon-src"in i?rb(i,t):"shape-points"in i?ab(i,t):"circle-radius"in i?ob(i,t):null}function rb(i,t){const e="icon-",n=e+"src",s=Dm(i[n],n),r=Qo(i,e+"anchor",t),a=Yl(i,e+"scale",t),o=ve(i,e+"opacity",t),l=Qo(i,e+"displacement",t),h=ve(i,e+"rotation",t),c=Ds(i,e+"rotate-with-view",t),u=Pf(i,e+"anchor-origin"),d=Lf(i,e+"anchor-x-units"),g=Lf(i,e+"anchor-y-units"),f=db(i,e+"color"),m=cb(i,e+"cross-origin"),p=ub(i,e+"offset"),_=Pf(i,e+"offset-origin"),v=tl(i,e+"width"),x=tl(i,e+"height"),y=hb(i,e+"size"),M=ql(i,e+"declutter-mode"),w=new hr({src:s,anchorOrigin:u,anchorXUnits:d,anchorYUnits:g,color:f,crossOrigin:m,offset:p,offsetOrigin:_,height:x,width:v,size:y,declutterMode:M});return function(I){return o&&w.setOpacity(o(I)),l&&w.setDisplacement(l(I)),h&&w.setRotation(h(I)),c&&w.setRotateWithView(c(I)),a&&w.setScale(a(I)),r&&w.setAnchor(r(I)),w}}function ab(i,t){const e="shape-",n=e+"points",s=e+"radius",r=Ac(i[n],n),a=Ac(i[s],s),o=aa(i,e,t),l=oa(i,e,t),h=Yl(i,e+"scale",t),c=Qo(i,e+"displacement",t),u=ve(i,e+"rotation",t),d=Ds(i,e+"rotate-with-view",t),g=tl(i,e+"radius2"),f=tl(i,e+"angle"),m=ql(i,e+"declutter-mode"),p=new Hl({points:r,radius:a,radius2:g,angle:f,declutterMode:m});return function(_){return o&&p.setFill(o(_)),l&&p.setStroke(l(_)),c&&p.setDisplacement(c(_)),u&&p.setRotation(u(_)),d&&p.setRotateWithView(d(_)),h&&p.setScale(h(_)),p}}function ob(i,t){const e="circle-",n=aa(i,e,t),s=oa(i,e,t),r=ve(i,e+"radius",t),a=Yl(i,e+"scale",t),o=Qo(i,e+"displacement",t),l=ve(i,e+"rotation",t),h=Ds(i,e+"rotate-with-view",t),c=ql(i,e+"declutter-mode"),u=new ts({radius:5,declutterMode:c});return function(d){return r&&u.setRadius(r(d)),n&&u.setFill(n(d)),s&&u.setStroke(s(d)),o&&u.setDisplacement(o(d)),l&&u.setRotation(l(d)),h&&u.setRotateWithView(h(d)),a&&u.setScale(a(d)),u}}function ve(i,t,e){if(!(t in i))return;const n=Yi(i[t],ut,e);return function(s){return Ac(n(s),t)}}function Gi(i,t,e){if(!(t in i))return null;const n=Yi(i[t],pe,e);return function(s){return Dm(n(s),t)}}function lb(i,t,e){const n=Gi(i,t+"pattern-src",e),s=Tf(i,t+"pattern-offset",e),r=Tf(i,t+"pattern-size",e),a=Ju(i,t+"color",e);return function(o){return{src:n(o),offset:s&&s(o),size:r&&r(o),color:a&&a(o)}}}function Ds(i,t,e){if(!(t in i))return null;const n=Yi(i[t],le,e);return function(s){const r=n(s);if(typeof r!="boolean")throw new Error(`Expected a boolean for ${t}`);return r}}function Ju(i,t,e){if(!(t in i))return null;const n=Yi(i[t],ii,e);return function(s){return km(n(s),t)}}function Om(i,t,e){if(!(t in i))return null;const n=Yi(i[t],Yn,e);return function(s){return Ga(n(s),t)}}function Qo(i,t,e){if(!(t in i))return null;const n=Yi(i[t],Yn,e);return function(s){const r=Ga(n(s),t);if(r.length!==2)throw new Error(`Expected two numbers for ${t}`);return r}}function Tf(i,t,e){if(!(t in i))return null;const n=Yi(i[t],Yn,e);return function(s){return Fm(n(s),t)}}function Yl(i,t,e){if(!(t in i))return null;const n=Yi(i[t],Yn|ut,e);return function(s){return fb(n(s),t)}}function tl(i,t){const e=i[t];if(e!==void 0){if(typeof e!="number")throw new Error(`Expected a number for ${t}`);return e}}function hb(i,t){const e=i[t];if(e!==void 0){if(typeof e=="number")return xe(e);if(!Array.isArray(e))throw new Error(`Expected a number or size array for ${t}`);if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw new Error(`Expected a number or size array for ${t}`);return e}}function cb(i,t){const e=i[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);return e}}function Pf(i,t){const e=i[t];if(e!==void 0){if(e!=="bottom-left"&&e!=="bottom-right"&&e!=="top-left"&&e!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${t}`);return e}}function Lf(i,t){const e=i[t];if(e!==void 0){if(e!=="pixels"&&e!=="fraction")throw new Error(`Expected pixels or fraction for ${t}`);return e}}function ub(i,t){const e=i[t];if(e!==void 0)return Ga(e,t)}function ql(i,t){const e=i[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);if(e!=="declutter"&&e!=="obstacle"&&e!=="none")throw new Error(`Expected declutter, obstacle, or none for ${t}`);return e}}function db(i,t){const e=i[t];if(e!==void 0)return km(e,t)}function Ga(i,t){if(!Array.isArray(i))throw new Error(`Expected an array for ${t}`);const e=i.length;for(let n=0;n4)throw new Error(`Expected a color with 3 or 4 values for ${t}`);return e}function Fm(i,t){const e=Ga(i,t);if(e.length!==2)throw new Error(`Expected an array of two numbers for ${t}`);return e}function fb(i,t){return typeof i=="number"?i:Fm(i,t)}const Af={RENDER_ORDER:"renderOrder"};class Nm extends mr{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Af.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const n=this.getDeclutter();n in t.declutter||(t.declutter[n]=new Tm(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(Af.RENDER_ORDER,t)}setStyle(t){this.style_=t===void 0?Im:t;const e=gb(t);this.styleFunction_=t===null?void 0:qu(e),this.changed()}setDeclutter(t){this.declutter_=t?String(t):void 0,this.changed()}}function gb(i){if(i===void 0)return Im;if(!i)return null;if(typeof i=="function"||i instanceof wt)return i;if(!Array.isArray(i))return Rf([i]);if(i.length===0)return[];const t=i.length,e=i[0];if(e instanceof wt){const s=new Array(t);for(let r=0;rl&&(this.instructions.push([Z.CUSTOM,l,c,t,n,mn,r]),this.hitDetectionInstructions.push([Z.CUSTOM,l,c,t,s||n,mn,r]));break;case"Point":h=t.getFlatCoordinates(),this.coordinates.push(h[0],h[1]),c=this.coordinates.length,this.instructions.push([Z.CUSTOM,l,c,t,n,void 0,r]),this.hitDetectionInstructions.push([Z.CUSTOM,l,c,t,s||n,void 0,r]);break}this.endGeometry(e)}beginGeometry(t,e,n){this.beginGeometryInstruction1_=[Z.BEGIN_GEOMETRY,e,0,t,n],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Z.BEGIN_GEOMETRY,e,0,t,n],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let s,r,a=-1;for(e=0;ethis.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(t){const e=t.fillStyle,n=[Z.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(t.fillPatternScale),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Z.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,s=t.lineCap,r=t.lineDash,a=t.lineDashOffset,o=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=s||r!=t.currentLineDash&&!En(t.currentLineDash,r)||t.currentLineDashOffset!=a||t.currentLineJoin!=o||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=s,t.currentLineDash=r,t.currentLineDashOffset=a,t.currentLineJoin=o,t.currentLineWidth=l,t.currentMiterLimit=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Z.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=R0(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;fu(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class mb extends za{constructor(t,e,n,s){super(t,e,n,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,n){if(!this.image_||this.maxExtent&&!er(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,n);const s=t.getFlatCoordinates(),r=t.getStride(),a=this.coordinates.length,o=this.appendFlatPointCoordinates(s,r);this.instructions.push([Z.DRAW_IMAGE,a,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Z.DRAW_IMAGE,a,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,n){if(!this.image_)return;this.beginGeometry(t,e,n);const s=t.getFlatCoordinates(),r=[];for(let l=0,h=s.length;l=i){const f=(i-o+g)/g,m=Ae(h,u,f),p=Ae(c,d,f);l.push(m,p),r.push(l),l=[m,p],o==i&&(a+=s),o=0}else if(o0&&r.push(l),r}function vb(i,t,e,n,s){let r=e,a=e,o=0,l=0,h=e,c,u,d,g,f,m,p,_,v,x;for(u=e;ui&&(l>o&&(o=l,r=h,a=u),l=0,h=u-s)),d=g,p=v,_=x),f=y,m=M}return l+=g,l>o?[h,u]:[r,a]}const el={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class yb extends za{constructor(t,e,n,s){super(t,e,n,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textKeepUpright_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[me]={fillStyle:me},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,n){const s=this.textFillState_,r=this.textStrokeState_,a=this.textState_;if(this.text_===""||!a||!s&&!r)return;const o=this.coordinates;let l=o.length;const h=t.getType();let c=null,u=t.getStride();if(a.placement==="line"&&(h=="LineString"||h=="MultiLineString"||h=="Polygon"||h=="MultiPolygon")){if(!he(this.maxExtent,t.getExtent()))return;let d;if(c=t.getFlatCoordinates(),h=="LineString")d=[c.length];else if(h=="MultiLineString")d=t.getEnds();else if(h=="Polygon")d=t.getEnds().slice(0,1);else if(h=="MultiPolygon"){const p=t.getEndss();d=[];for(let _=0,v=p.length;_{const M=o[(v+y)*2]===c[y*u]&&o[(v+y)*2+1]===c[y*u+1];return M||--v,M})}this.saveTextStates_(),(a.backgroundFill||a.backgroundStroke)&&(this.setFillStrokeStyle(a.backgroundFill,a.backgroundStroke),a.backgroundFill&&this.updateFillStyle(this.state,this.createFill),a.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,n);let f=a.padding;if(f!=kn&&(a.scale[0]<0||a.scale[1]<0)){let v=a.padding[0],x=a.padding[1],y=a.padding[2],M=a.padding[3];a.scale[0]<0&&(x=-x,M=-M),a.scale[1]<0&&(v=-v,y=-y),f=[v,x,y,M]}const m=this.pixelRatio;this.instructions.push([Z.DRAW_IMAGE,l,g,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,f==kn?kn:f.map(function(v){return v*m}),!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const p=1/m,_=this.state.fillStyle;a.backgroundFill&&(this.state.fillStyle=me,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Z.DRAW_IMAGE,l,g,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[p,p],NaN,this.declutterMode_,this.declutterImageWithText_,f,!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?me:this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),a.backgroundFill&&(this.state.fillStyle=_,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||sa,justify:e.justify,textBaseline:e.textBaseline||Zo,scale:e.scale});const a=this.fillKey_;n&&(a in this.fillStates||(this.fillStates[a]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,a=this.textKey_,o=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=el[s.textBaseline],c=this.textOffsetY_*l,u=this.text_,d=n?n.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([Z.DRAW_CHARS,t,e,h,s.overflow,o,s.maxAngle,l,c,r,d*l,u,a,1,this.declutterMode_,this.textKeepUpright_]),this.hitDetectionInstructions.push([Z.DRAW_CHARS,t,e,h,s.overflow,o&&me,s.maxAngle,l,c,r,d*l,u,a,1/l,this.declutterMode_,this.textKeepUpright_])}setTextStyle(t,e){let n,s,r;if(!t)this.text_="";else{const a=t.getFill();a?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=Ci(a.getColor()||me)):(s=null,this.textFillState_=s);const o=t.getStroke();if(!o)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const m=o.getLineDash(),p=o.getLineDashOffset(),_=o.getWidth(),v=o.getMiterLimit();r.lineCap=o.getLineCap()||or,r.lineDash=m?m.slice():Ui,r.lineDashOffset=p===void 0?Wi:p,r.lineJoin=o.getLineJoin()||lr,r.lineWidth=_===void 0?ra:_,r.miterLimit=v===void 0?ia:v,r.strokeStyle=Ci(o.getColor()||na)}n=this.textState_;const l=t.getFont()||Cm;_M(l);const h=t.getScaleArray();n.overflow=t.getOverflow(),n.font=l,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.repeat=t.getRepeat(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||Zo,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||kn,n.scale=h===void 0?[1,1]:h;const c=t.getOffsetX(),u=t.getOffsetY(),d=t.getRotateWithView(),g=t.getKeepUpright(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=c===void 0?0:c,this.textOffsetY_=u===void 0?0:u,this.textRotateWithView_=d===void 0?!1:d,this.textKeepUpright_=g===void 0?!0:g,this.textRotation_=f===void 0?0:f,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:pt(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.repeat||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=s&&s.fillStyle?typeof s.fillStyle=="string"?s.fillStyle:"|"+pt(s.fillStyle):""}this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const xb={Circle:Df,Default:za,Image:mb,LineString:pb,Polygon:Df,Text:yb};class Mb{constructor(t,e,n,s){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=s,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const s in n){const r=n[s].finish();t[e][s]=r}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let s=this.buildersByZIndex_[n];s===void 0&&(s={},this.buildersByZIndex_[n]=s);let r=s[e];if(r===void 0){const a=xb[e];r=new a(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=r}return r}}function bb(i,t,e,n,s,r,a,o,l,h,c,u,d=!0){let g=i[t],f=i[t+1],m=0,p=0,_=0,v=0;function x(){m=g,p=f,t+=n,g=i[t],f=i[t+1],v+=_,_=Math.sqrt((g-m)*(g-m)+(f-p)*(f-p))}do x();while(tz[2]}else P=M>T;const N=Math.PI,G=[],k=I+n===t;t=I,_=0,v=E,g=i[t],f=i[t+1];let D;if(k){x(),D=Math.atan2(f-p,g-m),P&&(D+=D>0?-N:N);const z=(T+M)/2,U=(O+w)/2;return G[0]=[z,U,(S-r)/2,D,s],G}s=s.replace(/\n/g," ");for(let z=0,U=s.length;z0?-N:N),D!==void 0){let et=q-D;if(et+=et>N?-2*N:et<-N?2*N:0,Math.abs(et)>a)return null}D=q;const V=z;let $=0;for(;z0&&i.push(` +`,""),i.push(t,""),i}class wb{constructor(t,e,n,s,r){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=oi(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new cm:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,n,s){const r=t+e+n+s;if(this.labels_[r])return this.labels_[r];const a=s?this.strokeStates[s]:null,o=n?this.fillStates[n]:null,l=this.textStates[e],h=this.pixelRatio,c=[l.scale[0]*h,l.scale[1]*h],u=l.justify?el[l.justify]:Lh(Array.isArray(t)?t[0]:t,l.textAlign||sa),d=s&&a.lineWidth?a.lineWidth:0,g=Array.isArray(t)?t:String(t).split(` +`).reduce(Eb,[]),{width:f,height:m,widths:p,heights:_,lineWidths:v}=yM(l,g),x=f+d,y=[],M=(x+2)*c[0],w=(m+d)*c[1],I={width:M<0?Math.floor(M):Math.ceil(M),height:w<0?Math.floor(w):Math.ceil(w),contextInstructions:y};(c[0]!=1||c[1]!=1)&&y.push("scale",c),s&&(y.push("strokeStyle",a.strokeStyle),y.push("lineWidth",d),y.push("lineCap",a.lineCap),y.push("lineJoin",a.lineJoin),y.push("miterLimit",a.miterLimit),y.push("setLineDash",[a.lineDash]),y.push("lineDashOffset",a.lineDashOffset)),n&&y.push("fillStyle",o.fillStyle),y.push("textBaseline","middle"),y.push("textAlign","center");const E=.5-u;let S=u*x+E*d;const T=[],O=[];let P=0,N=0,G=0,k=0,D;for(let z=0,U=g.length;zt?t-h:r,y=a+c>e?e-c:a,M=f[3]+x*d[0]+f[1],w=f[0]+y*d[1]+f[2],I=_-f[3],E=v-f[0];(m||u!==0)&&(Ji[0]=I,Qi[0]=I,Ji[1]=E,Di[1]=E,Di[0]=I+M,ki[0]=Di[0],ki[1]=E+w,Qi[1]=ki[1]);let S;return u!==0?(S=Xi(oi(),n,s,1,1,u,-n,-s),Ht(S,Ji),Ht(S,Di),Ht(S,ki),Ht(S,Qi),$i(Math.min(Ji[0],Di[0],ki[0],Qi[0]),Math.min(Ji[1],Di[1],ki[1],Qi[1]),Math.max(Ji[0],Di[0],ki[0],Qi[0]),Math.max(Ji[1],Di[1],ki[1],Qi[1]),us)):$i(Math.min(I,I+M),Math.min(E,E+w),Math.max(I,I+M),Math.max(E,E+w),us),g&&(_=Math.round(_),v=Math.round(v)),{drawImageX:_,drawImageY:v,drawImageW:x,drawImageH:y,originX:h,originY:c,declutterBox:{minX:us[0],minY:us[1],maxX:us[2],maxY:us[3],value:p},canvasTransform:S,scale:d}}replayImageOrLabel_(t,e,n,s,r,a,o){const l=!!(a||o),h=s.declutterBox,c=o?o[2]*s.scale[0]/2:0;return h.minX-c<=e[0]&&h.maxX+c>=0&&h.minY-c<=e[1]&&h.maxY+c>=0&&(l&&this.replayTextBackground_(t,Ji,Di,ki,Qi,a,o),xM(t,s.canvasTransform,r,n,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const n=Ht(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;t.save(),t.translate(n[0]%s,n[1]%s),e!==1&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,n,s){const r=this.textStates[e],a=this.createLabel(t,e,s,n),o=this.strokeStates[n],l=this.pixelRatio,h=Lh(Array.isArray(t)?t[0]:t,r.textAlign||sa),c=el[r.textBaseline||Zo],u=o&&o.lineWidth?o.lineWidth:0,d=a.width/l-2*r.scale[0],g=h*d+2*(.5-h)*u,f=c*a.height/l+2*(.5-c)*u;return{label:a,anchorX:g,anchorY:f}}execute_(t,e,n,s,r,a,o,l){const h=this.zIndexContext_;let c;this.pixelCoordinates_&&En(n,this.renderedTransform_)?c=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),c=vn(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),g1(this.renderedTransform_,n));let u=0;const d=s.length;let g=0,f,m,p,_,v,x,y,M,w,I,E,S,T,O=0,P=0,N=null,G=null;const k=this.coordinateCache_,D=this.viewRotation_,z=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,U={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},q=this.instructions!=s||this.overlaps?0:200;let V,$,H,X;for(;uq&&(this.fill_(t),O=0),P>q&&(t.stroke(),P=0),!O&&!P&&(t.beginPath(),v=NaN,x=NaN),++u;break;case Z.CIRCLE:g=A[1];const st=c[g],dt=c[g+1],St=c[g+2],Bt=c[g+3],Ut=St-st,re=Bt-dt,Re=Math.sqrt(Ut*Ut+re*re);t.moveTo(st+Re,dt),t.arc(st,dt,Re,0,2*Math.PI,!0),++u;break;case Z.CLOSE_PATH:t.closePath(),++u;break;case Z.CUSTOM:g=A[1],f=A[2];const _i=A[3],vi=A[4],Te=A[5];U.geometry=_i,U.feature=V,u in k||(k[u]=[]);const qe=k[u];Te?Te(c,g,f,2,qe):(qe[0]=c[g],qe[1]=c[g+1],qe.length=2),h&&(h.zIndex=A[6]),vi(qe,U),++u;break;case Z.DRAW_IMAGE:g=A[1],f=A[2],w=A[3],m=A[4],p=A[5];let de=A[6];const te=A[7],Pe=A[8],kt=A[9],In=A[10];let Ke=A[11];const ns=A[12];let ss=A[13];_=A[14]||"declutter";const Wt=A[15];if(!w&&A.length>=20){I=A[19],E=A[20],S=A[21],T=A[22];const ke=this.drawLabelWithPointPlacement_(I,E,S,T);w=ke.label,A[3]=w;const Rn=A[23];m=(ke.anchorX-Rn)*this.pixelRatio,A[4]=m;const Fe=A[24];p=(ke.anchorY-Fe)*this.pixelRatio,A[5]=p,de=w.height,A[6]=de,ss=w.width,A[13]=ss}let rh;A.length>25&&(rh=A[25]);let ah,qa,Ka;A.length>17?(ah=A[16],qa=A[17],Ka=A[18]):(ah=kn,qa=!1,Ka=!1),In&&z?Ke+=D:!In&&!z&&(Ke-=D);let x_=0;for(;g!zm.includes(i));class Sb{constructor(t,e,n,s,r,a,o){this.maxExtent_=t,this.overlaps_=s,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=a,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=oi(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,o)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t,e){for(const n in t){let s=this.executorsByZIndex_[n];s===void 0&&(s={},this.executorsByZIndex_[n]=s);const r=t[n];for(const a in r){const o=r[a];s[a]=new wb(this.resolution_,this.pixelRatio_,this.overlaps_,o,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let s=0,r=t.length;s0){if(!a||I==="none"||g!=="Image"&&g!=="Text"||a.includes(M)){const O=(d[S]-3)/4,P=s-O%o,N=s-(O/o|0),G=r(M,w,P*P+N*N);if(G)return G}c.clearRect(0,0,o,o);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(ji);let p,_,v,x,y;for(p=m.length-1;p>=0;--p){const M=m[p].toString();for(v=this.executorsByZIndex_[M],_=ws.length-1;_>=0;--_)if(g=ws[_],x=v[g],x!==void 0&&(y=x.executeHitDetection(c,l,n,f,u),y))return y}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],s=e[1],r=e[2],a=e[3],o=[n,s,n,a,r,a,r,s];return vn(o,0,8,2,t,o),o}isEmpty(){return Qs(this.executorsByZIndex_)}execute(t,e,n,s,r,a,o){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(o?my:ji),a=a||ws;const h=ws.length;for(let c=0,u=l.length;c_.execute(M,e,n,s,r,o)),y&&x.restore(),v){v.offset();const M=l[c]*h+f;this.deferredZIndexContexts_[M]||(this.deferredZIndexContexts_[M]=[]),this.deferredZIndexContexts_[M].push(v)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(ji);for(let n=0,s=e.length;n{r.draw(this.renderedContext_),r.clear()}),t[e[n]].length=0}}const Ah={};function Ib(i){if(Ah[i]!==void 0)return Ah[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let r=0;r<=i;++r)for(let a=0;a<=i;++a){const o=r*r+a*a;if(o>e)break;let l=n[o];l||(l=[],n[o]=l),l.push(((i+r)*t+(i+a))*4+3),r>0&&l.push(((i-r)*t+(i+a))*4+3),a>0&&(l.push(((i+r)*t+(i-a))*4+3),r>0&&l.push(((i-r)*t+(i-a))*4+3))}const s=[];for(let r=0,a=n.length;ru*this.pixelRatio_),lineDashOffset:(a||Wi)*this.pixelRatio_,lineJoin:o!==void 0?o:lr,lineWidth:(l!==void 0?l:ra)*this.pixelRatio_,miterLimit:h!==void 0?h:ia,strokeStyle:Ci(n||na)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),s=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*n,this.imageAnchorY_=s[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const a=t.getScaleArray();this.imageScale_=[a[0]*this.pixelRatio_/n,a[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const g=e.getColor();this.textFillState_={fillStyle:Ci(g||me)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const g=n.getColor(),f=n.getLineCap(),m=n.getLineDash(),p=n.getLineDashOffset(),_=n.getLineJoin(),v=n.getWidth(),x=n.getMiterLimit();this.textStrokeState_={lineCap:f!==void 0?f:or,lineDash:m||Ui,lineDashOffset:p||Wi,lineJoin:_!==void 0?_:lr,lineWidth:v!==void 0?v:ra,miterLimit:x!==void 0?x:ia,strokeStyle:Ci(g||na)}}const s=t.getFont(),r=t.getOffsetX(),a=t.getOffsetY(),o=t.getRotateWithView(),l=t.getRotation(),h=t.getScaleArray(),c=t.getText(),u=t.getTextAlign(),d=t.getTextBaseline();this.textState_={font:s!==void 0?s:Cm,textAlign:u!==void 0?u:sa,textBaseline:d!==void 0?d:Zo},this.text_=c!==void 0?Array.isArray(c)?c.reduce((g,f,m)=>g+=m%2?" ":f,""):c:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=a!==void 0?this.pixelRatio_*a:0,this.textRotateWithView_=o!==void 0?o:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}}}const wi=.5;function Tb(i,t,e,n,s,r,a,o,l){const h=s,c=i[0]*wi,u=i[1]*wi,d=Nt(c,u);d.imageSmoothingEnabled=!1;const g=d.canvas,f=new Rb(d,wi,s,null,a,o,null),m=e.length,p=Math.floor((256*256*256-1)/m),_={};for(let x=1;x<=m;++x){const y=e[x-1],M=y.getStyleFunction()||n;if(!M)continue;let w=M(y,r);if(!w)continue;Array.isArray(w)||(w=[w]);const E=(x*p).toString(16).padStart(7,"#00000");for(let S=0,T=w.length;S0;return u&&Promise.all(l).then(()=>s(null)),Db(i,t,e,n,r,a,o),u}function Db(i,t,e,n,s,r,a){const o=e.getGeometryFunction()(t);if(!o)return;const l=o.simplifyTransformed(n,s);if(e.getRenderer())Bm(i,l,e,t,a);else{const c=Vm[l.getType()];c(i,l,e,t,a,r)}}function Bm(i,t,e,n,s){if(t.getType()=="GeometryCollection"){const a=t.getGeometries();for(let o=0,l=a.length;o{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=this.frameState.size.slice(),s=this.renderedCenter_,r=this.renderedResolution_,a=this.renderedRotation_,o=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),c=[],u=n[0]*wi,d=n[1]*wi;c.push(this.getRenderTransform(s,r,a,wi,u,d,0).slice());const g=h.getSource(),f=o.getExtent();if(g.getWrapX()&&o.canWrapX()&&!fn(f,l)){let m=l[0];const p=ht(f);let _=0,v;for(;mf[2];)++_,v=p*_,c.push(this.getRenderTransform(s,r,a,wi,u,d,v).slice()),m-=p}this.hitDetectionImageData_=Tb(n,c,this.renderedFeatures_,h.getStyleFunction(),l,r,a,Nf(r,this.renderedPixelRatio_))}e(Pb(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,n,s,r){if(!this.replayGroup_)return;const a=e.viewState.resolution,o=e.viewState.rotation,l=this.getLayer(),h={},c=function(d,g,f){const m=pt(d),p=h[m];if(p){if(p!==!0&&fd.value):null)}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const s=t.viewHints[ne.ANIMATING],r=t.viewHints[ne.INTERACTING],a=e.getUpdateWhileAnimating(),o=e.getUpdateWhileInteracting();if(this.ready&&!a&&s||!o&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,h=t.viewState,c=h.projection,u=h.resolution,d=t.pixelRatio,g=e.getRevision(),f=e.getRenderBuffer();let m=e.getRenderOrder();m===void 0&&(m=Ab);const p=h.center.slice(),_=fu(l,f*u),v=_.slice(),x=[_.slice()],y=c.getExtent();if(n.getWrapX()&&c.canWrapX()&&!fn(y,t.extent)){const G=ht(y),k=Math.max(ht(_)/2,G);_[0]=y[0]-k,_[2]=y[2]+k,D0(p,c);const D=L0(x[0],c);D[0]y[0]&&D[2]>y[2]&&x.push([D[0]-G,D[1],D[2]-G,D[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==g&&this.renderedRenderOrder_==m&&this.renderedFrameDeclutter_===!!t.declutter&&fn(this.wrappedRenderedExtent_,_))return En(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const M=new Mb(jm(u,d),_,u,d);let w;for(let G=0,k=x.length;G{let D;const z=G.getStyleFunction()||e.getStyleFunction();if(z&&(D=z(G,u)),D){const U=this.renderFeature(G,I,D,M,w,this.getLayer().getDeclutter(),k);E=E&&!U}},T=W0(_),O=n.getFeaturesInExtent(T);m&&O.sort(m);for(let G=0,k=O.length;G=n[0]||t[1]<=n[1]&&t[3]>=n[1]?!0:pu(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],s=t.slice();s[e]=s[0]+n;for(let r=1;rt.clone())}class la extends wn{constructor(t,e,n){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&n)this.setFlatCoordinates(e,t),this.ends_=n;else{const s=t,r=[],a=[];for(let l=0,h=s.length;l{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const n=this.simplifiedGeometry_.getFlatCoordinates();let s;switch(this.type_){case"LineString":n.length=jl(n,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,n,0),s=[n.length];break;case"MultiLineString":s=[],n.length=q0(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,n,0,s);break;case"Polygon":s=[],n.length=Ou(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),n,0,s);break}return s&&(this.simplifiedGeometry_=new ti(this.type_,n,s,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}ti.prototype.getFlatCoordinates=ti.prototype.getOrientedFlatCoordinates;const Ge={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Ub(i,t){return[[-1/0,-1/0,1/0,1/0]]}let Wb=!1;function $b(i,t,e,n,s,r,a){const o=new XMLHttpRequest;o.open("GET",typeof i=="function"?i(e,n,s):i,!0),t.getType()=="arraybuffer"&&(o.responseType="arraybuffer"),o.withCredentials=Wb,o.onload=function(l){if(!o.status||o.status>=200&&o.status<300){const h=t.getType();try{let c;h=="text"||h=="json"?c=o.responseText:h=="xml"?c=o.responseXML||o.responseText:h=="arraybuffer"&&(c=o.response),c?r(t.readFeatures(c,{extent:e,featureProjection:s}),t.readProjection(c)):a()}catch{a()}}else a()},o.onerror=a,o.send()}function jf(i,t){return function(e,n,s,r,a){const o=this;$b(i,t,e,n,s,function(l,h){o.addFeatures(l),r!==void 0&&r(l)},a||Js)}}class tn extends fi{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Ql extends _m{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Js,this.format_=t.format||null,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(gt(this.format_,"`format` must be set when `url` is set"),this.loader_=jf(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Ub;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new zf:null,this.loadedExtentsRtree_=new zf,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,s;Array.isArray(t.features)?s=t.features:t.features&&(n=t.features,s=n.getArray()),!e&&n===void 0&&(n=new We(s)),s!==void 0&&this.addFeaturesInternal(s),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=pt(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const s=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new tn(Ge.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof ti||(this.featureChangeKeys_[t]=[ct(e,it.CHANGE,this.handleFeatureChange_,this),ct(e,Xn.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let n=!0;if(e.getId()!==void 0){const s=String(e.getId());if(!(s in this.idIndex_))this.idIndex_[s]=e;else if(e instanceof ti){const r=this.idIndex_[s];r instanceof ti?Array.isArray(r)?r.push(e):this.idIndex_[s]=[r,e]:n=!1}else n=!1}return n&&(gt(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],s=[];for(let r=0,a=t.length;r{e||(e=!0,this.addFeature(n.element),e=!1)}),t.addEventListener(ge.REMOVE,n=>{e||(e=!0,this.removeFeature(n.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(Et);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){this.featuresRtree_.forEach(n=>{this.removeFeatureInternal(n)});for(const n in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[n])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new tn(Ge.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(s){const r=s.getGeometry();if(r instanceof ti||r.intersectsCoordinate(t))return e(s)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(n){const s=n.getGeometry();if(s instanceof ti||s.intersectsExtent(t)){const r=e(n);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),Qs(this.nullGeometryFeatures_)||ai(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const s=_u(t,e);return[].concat(...s.map(r=>this.featuresRtree_.getInExtent(r)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],s=t[1];let r=null;const a=[NaN,NaN];let o=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||Zs,this.featuresRtree_.forEachInExtent(l,function(h){if(e(h)){const c=h.getGeometry(),u=o;if(o=c instanceof ti?0:c.closestPointXY(n,s,a,o),o{--this.loadingExtentsCount_,this.dispatchEvent(new tn(Ge.FEATURESLOADEND,void 0,c))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new tn(Ge.FEATURESLOADERROR))}),s.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_,n=e.forEachInExtent(t,function(s){if(ir(s.extent,t))return s});n&&e.remove(n)}removeFeatures(t){let e=!1;for(let n=0,s=t.length;n0&&this.points_[n+2]>t;)n-=3;const s=this.points_[e+2]-this.points_[n+2];if(s<1e3/60)return!1;const r=this.points_[e]-this.points_[n],a=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(a,r),this.initialVelocity_=Math.sqrt(r*r+a*a)/s,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}class Hb extends Rl{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){ft()}calculateMatrices2D(t){const e=t.viewState,n=t.coordinateToPixelTransform,s=t.pixelToCoordinateTransform;Xi(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),X0(s,n)}forEachFeatureAtCoordinate(t,e,n,s,r,a,o,l){let h;const c=e.viewState;function u(y,M,w,I){return r.call(a,M,y?w:null,I)}const d=c.projection,g=D0(t.slice(),d),f=[[0,0]];if(d.canWrapX()&&s){const y=d.getExtent(),M=ht(y);f.push([-M,0],[M,0])}const m=e.layerStatesArray,p=m.length,_=[],v=[];for(let y=0;y=0;--M){const w=m[M],I=w.layer;if(I.hasRenderer()&&Nu(w,c)&&o.call(l,I)){const E=I.getRenderer(),S=I.getSource();if(E&&S){const T=S.getWrapX()?g:t,O=u.bind(null,w.managed);v[0]=T[0]+f[y][0],v[1]=T[1]+f[y][1],h=E.forEachFeatureAtCoordinate(v,e,n,O,_)}if(h)return h}}if(_.length===0)return;const x=1/_.length;return _.forEach((y,M)=>y.distanceSq+=M*x),_.sort((y,M)=>y.distanceSq-M.distanceSq),_.some(y=>h=y.callback(y.feature,y.layer,y.geometry)),h}hasFeatureAtCoordinate(t,e,n,s,r,a){return this.forEachFeatureAtCoordinate(t,e,n,s,Zs,this,r,a)!==void 0}getMap(){return this.map_}renderFrame(t){ft()}scheduleExpireIconCache(t){$e.canExpireCache()&&t.postRenderFunctions.push(Yb)}}function Yb(i,t){$e.expire()}class qb extends Hb{constructor(t){super(t),this.fontChangeListenerKey_=ct(Fi,Xn.PROPERTYCHANGE,t.redrawText,t),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=pr+" ol-layers";const n=t.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const n=this.getMap();if(n.hasListener(t)){const s=new sm(t,void 0,e);n.dispatchEvent(s)}}disposeInternal(){Et(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(Ue.PRECOMPOSE,t);const e=t.layerStatesArray.sort((o,l)=>o.zIndex-l.zIndex);e.some(o=>o.layer instanceof Nm&&o.layer.getDeclutter())&&(t.declutter={});const s=t.viewState;this.children_.length=0;const r=[];let a=null;for(let o=0,l=e.length;o=0;--n){const s=e[n],r=s.layer;r.getDeclutter()&&r.renderDeclutter(t,s)}e.forEach(n=>n.layer.renderDeferred(t))}}}class sn extends fi{constructor(t,e){super(t),this.layer=e}}const Dh={LAYERS:"layers"};class _r extends I0{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let n=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Dh.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new We(n.slice(),{unique:!0}):gt(typeof n.getArray=="function","Expected `layers` to be an array or a `Collection`"):n=new We(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Et),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(ct(t,ge.ADD,this.handleLayersAdd_,this),ct(t,ge.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(Et);Oa(this.listenerKeys_);const e=t.getArray();for(let n=0,s=e.length;n{this.clickTimeoutId_=void 0;const n=new Ni(_t.SINGLECLICK,this.map_,t);this.dispatchEvent(n)},250)}updateActivePointers_(t){const e=t,n=e.pointerId;if(e.type==_t.POINTERUP||e.type==_t.POINTERCANCEL){delete this.trackedTouches_[n];for(const s in this.trackedTouches_)if(this.trackedTouches_[s].target!==e.target){delete this.trackedTouches_[s];break}}else(e.type==_t.POINTERDOWN||e.type==_t.POINTERMOVE)&&(this.trackedTouches_[n]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new Ni(_t.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Et),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new Ni(_t.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(ct(n,_t.POINTERMOVE,this.handlePointerMove_,this),ct(n,_t.POINTERUP,this.handlePointerUp_,this),ct(this.element_,_t.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(ct(this.element_.getRootNode(),_t.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new Ni(_t.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new Ni(_t.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Et(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(it.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Et(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Et),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const Mi={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Vt={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},nl=1/0;class Zb{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Oa(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const s=this.keyFunction_(n);return delete this.queuedElements_[s],n}enqueue(t){gt(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=nl?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,n=this.priorities_,s=e.length,r=e[t],a=n[t],o=t;for(;t>1;){const l=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),c=ht;){const o=this.getParentIndex_(e);if(s[o]>a)n[e]=n[o],s[e]=s[o],e=o;else break}n[e]=r,s[e]=a}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let s=0;const r=e.length;let a,o,l;for(o=0;o0;){const s=this.dequeue()[0],r=s.getKey();s.getState()===W.IDLE&&!(r in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++n,s.load())}}}function Qb(i,t,e,n,s){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return nl;const r=i.viewState.center,a=n[0]-r[0],o=n[1]-r[1];return 65536*Math.log(s)+Math.sqrt(a*a+o*o)/s}let Va=class extends Ye{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&this.element?.remove();for(let e=0,n=this.listenerKeys.length;es.getAttributions(t)));if(this.attributions_!==void 0&&(Array.isArray(this.attributions_)?this.attributions_.forEach(s=>n.add(s)):n.add(this.attributions_)),!this.overrideCollapsible_){const s=!e.some(r=>r.getSource()?.getAttributionsCollapsible()===!1);this.setCollapsible(s)}return Array.from(n)}async updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=await Promise.all(this.collectSourceAttributions_(t).map(s=>vy(()=>s))),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!En(e,this.renderedAttributions_)){hm(this.ulElement_);for(let s=0,r=e.length;s0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:gr}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const s="rotate("+n+"rad)";if(this.autoHide_){const r=this.element.classList.contains(lo);!r&&n===0?this.element.classList.add(lo):r&&n!==0&&this.element.classList.remove(lo)}this.label_.style.transform=s}this.rotation_=n}}let eE=class extends Va{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",n=t.delta!==void 0?t.delta:1,s=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",r=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",a=t.zoomInLabel!==void 0?t.zoomInLabel:"+",o=t.zoomOutLabel!==void 0?t.zoomOutLabel:"–",l=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",h=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",c=document.createElement("button");c.className=s,c.setAttribute("type","button"),c.title=l,c.appendChild(typeof a=="string"?document.createTextNode(a):a),c.addEventListener(it.CLICK,this.handleClick_.bind(this,n),!1);const u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=h,u.appendChild(typeof o=="string"?document.createTextNode(o):o),u.addEventListener(it.CLICK,this.handleClick_.bind(this,-n),!1);const d=e+" "+pr+" "+Xl,g=this.element;g.className=d,g.appendChild(c),g.appendChild(u),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const n=this.getMap().getView();if(!n)return;const s=n.getZoom();if(s!==void 0){const r=n.getConstrainedZoom(s+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.duration_,easing:gr})):n.setZoom(r)}}};function iE(i){i=i||{};const t=new We;return(i.zoom!==void 0?i.zoom:!0)&&t.push(new eE(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&t.push(new tE(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&t.push(new Wm(i.attributionOptions)),t}const Dc={ACTIVE:"active"};class ja extends Ye{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Dc.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(Dc.ACTIVE,t)}setMap(t){this.map_=t}}function nE(i,t,e){const n=i.getCenterInternal();if(n){const s=[n[0]+t[0],n[1]+t[1]];i.animateInternal({duration:e!==void 0?e:250,easing:f1,center:i.getConstrainedCenter(s)})}}function Qu(i,t,e,n){const s=i.getZoom();if(s===void 0)return;const r=i.getConstrainedZoom(s+t),a=i.getResolutionForZoom(r);i.getAnimating()&&i.cancelAnimations(),i.animate({resolution:a,anchor:e,duration:n!==void 0?n:250,easing:gr})}class sE extends ja{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==_t.DBLCLICK){const n=t.originalEvent,s=t.map,r=t.coordinate,a=n.shiftKey?-this.delta_:this.delta_,o=s.getView();Qu(o,a,r,this.duration_),n.preventDefault(),e=!0}return!e}}class vr extends ja{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==_t.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==_t.POINTERUP){const n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==_t.POINTERDOWN){const n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==_t.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function td(i){const t=i.length;let e=0,n=0;for(let s=0;s0&&this.condition_(t)){const n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class uE extends vr{constructor(t){t=t||{},super({stopDown:fr}),this.condition_=t.condition?t.condition:rE,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!kh(t))return;const e=t.map,n=e.getView();if(n.getConstraints().rotation===Su)return;const s=e.getSize(),r=t.pixel,a=Math.atan2(s[1]/2-r[1],r[0]-s[0]/2);if(this.lastAngle_!==void 0){const o=a-this.lastAngle_;n.adjustRotationInternal(-o)}this.lastAngle_=a}handleUpEvent(t){return kh(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return kh(t)&&Xm(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class dE extends Rl{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,n="px",s=this.element_.style;s.left=Math.min(t[0],e[0])+n,s.top=Math.min(t[1],e[1])+n,s.width=Math.abs(e[0]-t[0])+n,s.height=Math.abs(e[1]-t[1])+n}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,s=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);s[4]=s[0].slice(),this.geometry_?this.geometry_.setCoordinates([s]):this.geometry_=new we([s])}getGeometry(){return this.geometry_}}const ds={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Ir extends fi{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class fE extends vr{constructor(t){super(),this.on,this.once,this.un,t=t??{},this.box_=new dE(t.className||"ol-dragbox"),this.minArea_=t.minArea??64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition??Xm,this.boxEndCondition_=t.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const s=n[0]-e[0],r=n[1]-e[1];return s*s+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Ir(ds.BOXDRAG,t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Ir(e?ds.BOXEND:ds.BOXCANCEL,t.coordinate,t)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Ir(ds.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new Ir(ds.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}setMap(t){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new Ir(ds.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(t)}}class qm extends fE{constructor(t){t=t||{};const e=t.condition?t.condition:Hm;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const n=this.getMap().getView();let s=this.getGeometry();if(this.out_){const r=n.rotatedExtentForGeometry(s),a=n.getResolutionForExtentInternal(r),o=n.getResolution()/a;s=s.clone(),s.scale(o*o)}n.fitInternal(s,{duration:this.duration_,easing:gr})}}const Pn={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class gE extends ja{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return ed(e)&&Ym(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==it.KEYDOWN){const n=t.originalEvent,s=n.key;if(this.condition_(t)&&(s==Pn.DOWN||s==Pn.LEFT||s==Pn.RIGHT||s==Pn.UP)){const a=t.map.getView(),o=a.getResolution()*this.pixelDelta_;let l=0,h=0;s==Pn.DOWN?h=-o:s==Pn.LEFT?l=-o:s==Pn.RIGHT?l=o:h=o;const c=[l,h];vu(c,a.getRotation()),nE(a,c,this.duration_),n.preventDefault(),e=!0}}return!e}}class mE extends ja{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(e){return!lE(e)&&Ym(e)},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==it.KEYDOWN||t.type==it.KEYPRESS){const n=t.originalEvent,s=n.key;if(this.condition_(t)&&(s==="+"||s==="-")){const r=t.map,a=s==="+"?this.delta_:-this.delta_,o=r.getView();Qu(o,a,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}class pE extends ja{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:Fc;this.condition_=t.onFocusOnly?kc($m,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_?t.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(t){if(!this.condition_(t)||t.type!==it.WHEEL)return!0;const n=t.map,s=t.originalEvent;s.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.pixel);let r;if(t.type==it.WHEEL&&(r=s.deltaY,J1&&s.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=am),s.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),r===0)return!1;this.lastDelta_=r;const a=Date.now();this.startTime_===void 0&&(this.startTime_=a),(!this.mode_||a-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<4?"trackpad":"wheel");const o=n.getView();if(this.mode_==="trackpad"&&!(o.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-r/this.deltaPerZoom_,this.lastAnchor_?n.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=a,!1;this.totalDelta_+=r;const l=Math.max(this.timeout_-(a-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let n=-It(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),Qu(e,n,this.lastAnchor_?t.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}class _E extends vr{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=fr),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const n=this.targetPointers[0],s=this.targetPointers[1],r=Math.atan2(s.clientY-n.clientY,s.clientX-n.clientX);if(this.lastAngle_!==void 0){const l=r-this.lastAngle_;this.rotationDelta_+=l,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=l}this.lastAngle_=r;const a=t.map,o=a.getView();o.getConstraints().rotation!==Su&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(td(this.targetPointers))),this.rotating_&&(a.render(),o.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}class vE extends vr{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=fr),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const n=this.targetPointers[0],s=this.targetPointers[1],r=n.clientX-s.clientX,a=n.clientY-s.clientY,o=Math.sqrt(r*r+a*a);this.lastDistance_!==void 0&&(e=this.lastDistance_/o),this.lastDistance_=o;const l=t.map,h=l.getView();e!=1&&(this.lastScaleDelta_=e),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel(td(this.targetPointers))),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const n=t.map.getView(),s=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,s),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}function Km(i){i=i||{};const t=new We,e=new Xb(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new uE),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new sE({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&t.push(new cE({onFocusOnly:i.onFocusOnly,kinetic:e})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&t.push(new _E),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new vE({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new gE),t.push(new mE({delta:i.zoomDelta,duration:i.zoomDuration}))),(i.mouseWheelZoom!==void 0?i.mouseWheelZoom:!0)&&t.push(new pE({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(i.shiftDragZoom!==void 0?i.shiftDragZoom:!0)&&t.push(new qm({duration:i.zoomDuration})),t}function Zm(i){if(i instanceof mr){i.setMapInternal(null);return}i instanceof _r&&i.getLayers().forEach(Zm)}function Jm(i,t){if(i instanceof mr){i.setMapInternal(t);return}if(i instanceof _r){const e=i.getLayers().getArray();for(let n=0,s=e.length;nthis.updateSize()),this.controls=e.controls||iE(),this.interactions=e.interactions||Km({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Jb(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Vt.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(Vt.VIEW,this.handleViewChanged_),this.addChangeListener(Vt.SIZE,this.handleSizeChanged_),this.addChangeListener(Vt.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof _e)&&t.view.then(function(s){n.setView(new _e(s))}),this.controls.addEventListener(ge.ADD,s=>{s.element.setMap(this)}),this.controls.addEventListener(ge.REMOVE,s=>{s.element.setMap(null)}),this.interactions.addEventListener(ge.ADD,s=>{s.element.setMap(this)}),this.interactions.addEventListener(ge.REMOVE,s=>{s.element.setMap(null)}),this.overlays_.addEventListener(ge.ADD,s=>{this.addOverlayInternal_(s.element)}),this.overlays_.addEventListener(ge.REMOVE,s=>{const r=s.element.getId();r!==void 0&&delete this.overlayIdIndex_[r.toString()],s.element.setMap(null)}),this.controls.forEach(s=>{s.setMap(this)}),this.interactions.forEach(s=>{s.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){Jm(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,n){if(!this.frameState_||!this.renderer_)return;const s=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const r=n.hitTolerance!==void 0?n.hitTolerance:0,a=n.layerFilter!==void 0?n.layerFilter:Zs,o=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(s,this.frameState_,r,o,e,null,a,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(s){n.push(s)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(s){s instanceof _r?e(s.getLayers()):t.push(s)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const s=e.layerFilter!==void 0?e.layerFilter:Zs,r=e.hitTolerance!==void 0?e.hitTolerance:0,a=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,r,a,s,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const n=this.viewport_.getBoundingClientRect(),s=this.getSize(),r=n.width/s[0],a=n.height/s[1],o="changedTouches"in t?t.changedTouches[0]:t;return[(o.clientX-n.left)/r,(o.clientY-n.top)/a]}getTarget(){return this.get(Vt.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return vc(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Ht(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Vt.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof We){e.setLayers(t);return}const n=e.getLayers();n.clear(),n.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e=0;r--){const a=s[r];if(a.getMap()!==this||!a.getActive()||!this.getTargetElement())continue;if(!a.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let s=this.maxTilesLoading_,r=s;if(t){const a=t.viewHints;if(a[ne.ANIMATING]||a[ne.INTERACTING]){const o=Date.now()-t.time>8;s=o?0:8,r=o?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new sn("removelayer",e)),this.set(Vt.LAYERGROUP,t)}setSize(t){this.set(Vt.SIZE,t)}setTarget(t){this.set(Vt.TARGET,t)}setView(t){if(!t||t instanceof _e){this.set(Vt.VIEW,t);return}this.set(Vt.VIEW,new _e);const e=this;t.then(function(n){e.setView(new _e(n))})}updateSize(){const t=this.getTargetElement();let e;if(t){const s=getComputedStyle(t),r=t.offsetWidth-parseFloat(s.borderLeftWidth)-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight)-parseFloat(s.borderRightWidth),a=t.offsetHeight-parseFloat(s.borderTopWidth)-parseFloat(s.paddingTop)-parseFloat(s.paddingBottom)-parseFloat(s.borderBottomWidth);!isNaN(r)&&!isNaN(a)&&(e=[Math.max(0,r),Math.max(0,a)],!_f(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&U0("No map visible because the map container's width or height are 0."))}const n=this.getSize();e&&(!n||!En(e,n))&&(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}};function yE(i){let t=null;i.keyboardEventTarget!==void 0&&(t=typeof i.keyboardEventTarget=="string"?document.getElementById(i.keyboardEventTarget):i.keyboardEventTarget);const e={},n=i.layers&&typeof i.layers.getLayers=="function"?i.layers:new _r({layers:i.layers});e[Vt.LAYERGROUP]=n,e[Vt.TARGET]=i.target,e[Vt.VIEW]=i.view instanceof _e?i.view:new _e;let s;i.controls!==void 0&&(Array.isArray(i.controls)?s=new We(i.controls.slice()):(gt(typeof i.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),s=i.controls));let r;i.interactions!==void 0&&(Array.isArray(i.interactions)?r=new We(i.interactions.slice()):(gt(typeof i.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),r=i.interactions));let a;return i.overlays!==void 0?Array.isArray(i.overlays)?a=new We(i.overlays.slice()):(gt(typeof i.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),a=i.overlays):a=new We,{controls:s,interactions:r,keyboardEventTarget:t,overlays:a,values:e}}const ee={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class id extends Ye{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=t.insertFirst!==void 0?t.insertFirst:!0,this.stopEvent=t.stopEvent!==void 0?t.stopEvent:!0,this.element=document.createElement("div"),this.element.className=t.className!==void 0?t.className:"ol-overlay-container "+mM,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=t.autoPan===!0?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(ee.ELEMENT,this.handleElementChanged),this.addChangeListener(ee.MAP,this.handleMapChanged),this.addChangeListener(ee.OFFSET,this.handleOffsetChanged),this.addChangeListener(ee.POSITION,this.handlePositionChanged),this.addChangeListener(ee.POSITIONING,this.handlePositioningChanged),t.element!==void 0&&this.setElement(t.element),this.setOffset(t.offset!==void 0?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),t.position!==void 0&&this.setPosition(t.position)}getElement(){return this.get(ee.ELEMENT)}getId(){return this.id}getMap(){return this.get(ee.MAP)||null}getOffset(){return this.get(ee.OFFSET)}getPosition(){return this.get(ee.POSITION)}getPositioning(){return this.get(ee.POSITIONING)}handleElementChanged(){hm(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&(this.element?.remove(),Et(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=ct(t,Mi.POSTRENDER,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(ee.ELEMENT,t)}setMap(t){this.set(ee.MAP,t)}setOffset(t){this.set(ee.OFFSET,t)}setPosition(t){this.set(ee.POSITION,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(ee.POSITION))return;const n=this.getRect(e.getTargetElement(),e.getSize()),s=this.getElement(),r=this.getRect(s,[ex(s),ix(s)]);t=t||{};const a=t.margin===void 0?20:t.margin;if(!fn(n,r)){const o=r[0]-n[0],l=n[2]-r[2],h=r[1]-n[1],c=n[3]-r[3],u=[0,0];if(o<0?u[0]=o-a:l<0&&(u[0]=Math.abs(l)+a),h<0?u[1]=h-a:c<0&&(u[1]=Math.abs(c)+a),u[0]!==0||u[1]!==0){const d=e.getView().getCenterInternal(),g=e.getPixelFromCoordinateInternal(d);if(!g)return;const f=[g[0]+u[0],g[1]+u[1]],m=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(f),duration:m.duration,easing:m.easing})}}}getRect(t,e){const n=t.getBoundingClientRect(),s=n.left+window.pageXOffset,r=n.top+window.pageYOffset;return[s,r,s+e[0],r+e[1]]}setPositioning(t){this.set(ee.POSITIONING,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e){this.setVisible(!1);return}const n=t.getPixelFromCoordinate(e),s=t.getSize();this.updateRenderedPosition(n,s)}updateRenderedPosition(t,e){const n=this.element.style,s=this.getOffset(),r=this.getPositioning();this.setVisible(!0);const a=Math.round(t[0]+s[0])+"px",o=Math.round(t[1]+s[1])+"px";let l="0%",h="0%";r=="bottom-right"||r=="center-right"||r=="top-right"?l="-100%":(r=="bottom-center"||r=="center-center"||r=="top-center")&&(l="-50%"),r=="bottom-left"||r=="bottom-center"||r=="bottom-right"?h="-100%":(r=="center-left"||r=="center-center"||r=="center-right")&&(h="-50%");const c=`translate(${l}, ${h}) translate(${a}, ${o})`;this.rendered.transform_!=c&&(this.rendered.transform_=c,n.transform=c)}getOptions(){return this.options}}di("map:WMTSLayer");function xE(i){const t=Object.keys(i.defs),e=t.length;let n,s;for(n=0;n=this.text.length)return;i=this.text[this.place++]}switch(this.state){case ua:return this.neutral(i);case tp:return this.keyword(i);case sl:return this.quoted(i);case ip:return this.afterquote(i);case ep:return this.number(i);case nd:return}};qi.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=sl;return}if(th.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)};qi.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=ua;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=ua,this.currentObject=this.stack.pop(),this.currentObject||(this.state=nd);return}};qi.prototype.number=function(i){if(np.test(i)){this.word+=i;return}if(th.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)};qi.prototype.quoted=function(i){if(i==='"'){this.state=ip;return}this.word+=i};qi.prototype.keyword=function(i){if(PE.test(i)){this.word+=i;return}if(i==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=ua;return}if(th.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)};qi.prototype.neutral=function(i){if(TE.test(i)){this.word=i,this.state=tp;return}if(i==='"'){this.word="",this.state=sl;return}if(np.test(i)){this.word=i,this.state=ep;return}if(th.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)};qi.prototype.output=function(){for(;this.place0?90:-90),i.lat_ts=i.lat1):!i.lat_ts&&i.lat0&&i.projName==="Polar_Stereographic"&&(i.lat_ts=i.lat0,i.lat0=xi(i.lat0>0?90:-90))}function sp(i){var t=LE(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var s={};return Cs(t,s),DE(s),s}function oe(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?oe[i]=Gc(arguments[1]):oe[i]=sp(arguments[1]):oe[i]=e}else if(arguments.length===1){if(Array.isArray(i))return i.map(function(n){Array.isArray(n)?oe.apply(t,n):oe(n)});if(typeof i=="string"){if(i in oe)return oe[i]}else"EPSG"in i?oe["EPSG:"+i.EPSG]=i:"ESRI"in i?oe["ESRI:"+i.ESRI]=i:"IAU2000"in i?oe["IAU2000:"+i.IAU2000]=i:console.log(i);return}}ME(oe);function kE(i){return typeof i=="string"}function FE(i){return i in oe}var NE=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function GE(i){return NE.some(function(t){return i.indexOf(t)>-1})}var zE=["3857","900913","3785","102113"];function VE(i){var t=Mn(i,"authority");if(t){var e=Mn(t,"epsg");return e&&zE.indexOf(e)>-1}}function jE(i){var t=Mn(i,"extension");if(t)return Mn(t,"proj4")}function BE(i){return i[0]==="+"}function UE(i){if(kE(i)){if(FE(i))return oe[i];if(GE(i)){var t=sp(i);if(VE(t))return oe["EPSG:3857"];var e=jE(t);return e?Gc(e):t}if(BE(i))return Gc(i)}else return i}function Xf(i,t){i=i||{};var e,n;if(!t)return i;for(n in t)e=t[n],e!==void 0&&(i[n]=e);return i}function Pi(i,t,e){var n=i*t;return e/Math.sqrt(1-n*n)}function Ba(i){return i<0?-1:1}function B(i){return Math.abs(i)<=Dt?i:i-Ba(i)*ca}function li(i,t,e){var n=i*e,s=.5*i;return n=Math.pow((1-n)/(1+n),s),Math.tan(.5*(F-t))/n}function da(i,t){for(var e=.5*i,n,s,r=F-2*Math.atan(t),a=0;a<=15;a++)if(n=i*Math.sin(r),s=F-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-r,r+=s,Math.abs(s)<=1e-10)return r;return-9999}function WE(){var i=this.b/this.a;this.es=1-i*i,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Pi(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function $E(i){var t=i.x,e=i.y;if(e*Si>90&&e*Si<-90&&t*Si>180&&t*Si<-180)return null;var n,s;if(Math.abs(Math.abs(e)-F)<=j)return null;if(this.sphere)n=this.x0+this.a*this.k0*B(t-this.long0),s=this.y0+this.a*this.k0*Math.log(Math.tan(vt+.5*e));else{var r=Math.sin(e),a=li(this.e,e,r);n=this.x0+this.a*this.k0*B(t-this.long0),s=this.y0-this.a*this.k0*Math.log(a)}return i.x=n,i.y=s,i}function XE(i){var t=i.x-this.x0,e=i.y-this.y0,n,s;if(this.sphere)s=F-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var r=Math.exp(-e/(this.a*this.k0));if(s=da(this.e,r),s===-9999)return null}return n=B(this.long0+t/(this.a*this.k0)),i.x=n,i.y=s,i}var HE=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const YE={init:WE,forward:$E,inverse:XE,names:HE};function qE(){}function Hf(i){return i}var KE=["longlat","identity"];const ZE={init:qE,forward:Hf,inverse:Hf,names:KE};var JE=[YE,ZE],Po={},rl=[];function rp(i,t){var e=rl.length;return i.names?(rl[e]=i,i.names.forEach(function(n){Po[n.toLowerCase()]=e}),this):(console.log(t),!0)}function QE(i){if(!i)return!1;var t=i.toLowerCase();if(typeof Po[t]<"u"&&rl[Po[t]])return rl[Po[t]]}function tw(){JE.forEach(rp)}const ew={start:tw,add:rp,get:QE};var nt={};nt.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};nt.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};nt.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};nt.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};nt.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};nt.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};nt.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};nt.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};nt.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};nt.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};nt.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};nt.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};nt.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};nt.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};nt.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};nt.clrk80ign={a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"};nt.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};nt.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};nt.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};nt.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};nt.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};nt.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};nt.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};nt.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};nt.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};nt.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};nt.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};nt.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};nt.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};nt.hough={a:6378270,rf:297,ellipseName:"Hough"};nt.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};nt.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};nt.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};nt.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};nt.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};nt.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};nt.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};nt.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};nt.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};nt.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};nt.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};nt.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var iw=nt.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};nt.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function nw(i,t,e,n){var s=i*i,r=t*t,a=(s-r)/s,o=0;n?(i*=1-a*(wE+a*(CE+a*SE)),s=i*i,a=0):o=Math.sqrt(a);var l=(s-r)/r;return{es:a,e:o,ep2:l}}function sw(i,t,e,n,s){if(!i){var r=Mn(nt,n);r||(r=iw),i=r.a,t=r.b,e=r.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)3&&(o.datum_params[3]!==0||o.datum_params[4]!==0||o.datum_params[5]!==0||o.datum_params[6]!==0)&&(o.datum_type=Kn,o.datum_params[3]*=Xr,o.datum_params[4]*=Xr,o.datum_params[5]*=Xr,o.datum_params[6]=o.datum_params[6]/1e6+1)),a&&(o.datum_type=ks,o.grids=a),o.a=e,o.b=n,o.es=s,o.ep2=r,o}var ap={};function aw(i,t){var e=new DataView(t),n=hw(e),s=cw(e,n),r=uw(e,s,n),a={header:s,subgrids:r};return ap[i]=a,a}function ow(i){if(i===void 0)return null;var t=i.split(",");return t.map(lw)}function lw(i){if(i.length===0)return null;var t=i[0]==="@";return t&&(i=i.slice(1)),i==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:i,mandatory:!t,grid:ap[i]||null,isNull:!1}}function Ss(i){return i/3600*Math.PI/180}function hw(i){var t=i.getInt32(8,!1);return t===11?!1:(t=i.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function cw(i,t){return{nFields:i.getInt32(8,t),nSubgridFields:i.getInt32(24,t),nSubgrids:i.getInt32(40,t),shiftType:zc(i,56,64).trim(),fromSemiMajorAxis:i.getFloat64(120,t),fromSemiMinorAxis:i.getFloat64(136,t),toSemiMajorAxis:i.getFloat64(152,t),toSemiMinorAxis:i.getFloat64(168,t)}}function zc(i,t,e){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(t,e)))}function uw(i,t,e){for(var n=176,s=[],r=0;r5e-11?!1:i.datum_type===qn?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]:i.datum_type===Kn?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]&&i.datum_params[3]===t.datum_params[3]&&i.datum_params[4]===t.datum_params[4]&&i.datum_params[5]===t.datum_params[5]&&i.datum_params[6]===t.datum_params[6]:!0}function op(i,t,e){var n=i.x,s=i.y,r=i.z?i.z:0,a,o,l,h;if(s<-F&&s>-1.001*F)s=-F;else if(s>F&&s<1.001*F)s=F;else{if(s<-F)return{x:-1/0,y:-1/0,z:i.z};if(s>F)return{x:1/0,y:1/0,z:i.z}}return n>Math.PI&&(n-=2*Math.PI),o=Math.sin(s),h=Math.cos(s),l=o*o,a=e/Math.sqrt(1-t*l),{x:(a+r)*h*Math.cos(n),y:(a+r)*h*Math.sin(n),z:(a*(1-t)+r)*o}}function lp(i,t,e,n){var s=1e-12,r=s*s,a=30,o,l,h,c,u,d,g,f,m,p,_,v,x,y=i.x,M=i.y,w=i.z?i.z:0,I,E,S;if(o=Math.sqrt(y*y+M*M),l=Math.sqrt(y*y+M*M+w*w),o/er&&xn.y||g>n.x||po&&Math.abs(l.y)>o);if(a<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=B(r.x+e.ll[0]),n.y=r.y+e.ll[1]}else isNaN(r.x)||(n.x=i.x+r.x,n.y=i.y+r.y);return n}function qf(i,t){var e={x:i.x/t.del[0],y:i.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},s={x:e.x-1*n.x,y:e.y-1*n.y},r={x:Number.NaN,y:Number.NaN},a;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return r;a=n.y*t.lim[0]+n.x;var o={x:t.cvs[a][0],y:t.cvs[a][1]};a++;var l={x:t.cvs[a][0],y:t.cvs[a][1]};a+=t.lim[0];var h={x:t.cvs[a][0],y:t.cvs[a][1]};a--;var c={x:t.cvs[a][0],y:t.cvs[a][1]},u=s.x*s.y,d=s.x*(1-s.y),g=(1-s.x)*(1-s.y),f=(1-s.x)*s.y;return r.x=g*o.x+d*l.x+f*c.x+u*h.x,r.y=g*o.y+d*l.y+f*c.y+u*h.y,r}function Kf(i,t,e){var n=e.x,s=e.y,r=e.z||0,a,o,l,h={};for(l=0;l<3;l++)if(!(t&&l===2&&e.z===void 0))switch(l===0?(a=n,"ew".indexOf(i.axis[l])!==-1?o="x":o="y"):l===1?(a=s,"ns".indexOf(i.axis[l])!==-1?o="y":o="x"):(a=r,o="z"),i.axis[l]){case"e":h[o]=a;break;case"w":h[o]=-a;break;case"n":h[o]=a;break;case"s":h[o]=-a;break;case"u":e[o]!==void 0&&(h.z=a);break;case"d":e[o]!==void 0&&(h.z=-a);break;default:return null}return h}function hp(i){var t={x:i[0],y:i[1]};return i.length>2&&(t.z=i[2]),i.length>3&&(t.m=i[3]),t}function xw(i){Zf(i.x),Zf(i.y)}function Zf(i){if(typeof Number.isFinite=="function"){if(Number.isFinite(i))return;throw new TypeError("coordinates must be finite numbers")}if(typeof i!="number"||i!==i||!isFinite(i))throw new TypeError("coordinates must be finite numbers")}function Mw(i,t){return(i.datum.datum_type===qn||i.datum.datum_type===Kn||i.datum.datum_type===ks)&&t.datumCode!=="WGS84"||(t.datum.datum_type===qn||t.datum.datum_type===Kn||t.datum.datum_type===ks)&&i.datumCode!=="WGS84"}function al(i,t,e,n){var s;Array.isArray(e)?e=hp(e):e={x:e.x,y:e.y,z:e.z,m:e.m};var r=e.z!==void 0;if(xw(e),i.datum&&t.datum&&Mw(i,t)&&(s=new Ii("WGS84"),e=al(i,s,e,n),i=s),n&&i.axis!=="enu"&&(e=Kf(i,!1,e)),i.projName==="longlat")e={x:e.x*Kt,y:e.y*Kt,z:e.z||0};else if(i.to_meter&&(e={x:e.x*i.to_meter,y:e.y*i.to_meter,z:e.z||0}),e=i.inverse(e),!e)return;if(i.from_greenwich&&(e.x+=i.from_greenwich),e=vw(i.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*Si,y:e.y*Si,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?Kf(t,!0,e):(e&&!r&&delete e.z,e)}var Jf=Ii("WGS84");function Fh(i,t,e,n){var s,r,a;return Array.isArray(e)?(s=al(i,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof s.z=="number"?[s.x,s.y,s.z].concat(e.slice(3)):[s.x,s.y,e[2]].concat(e.slice(3)):[s.x,s.y].concat(e.slice(2)):[s.x,s.y]):(r=al(i,t,e,n),a=Object.keys(e),a.length===2||a.forEach(function(o){if(typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(o==="x"||o==="y"||o==="z")return}else if(o==="x"||o==="y")return;r[o]=e[o]}),r)}function Qf(i){return i instanceof Ii?i:i.oProj?i.oProj:Ii(i)}function Se(i,t,e){i=Qf(i);var n=!1,s;return typeof t>"u"?(t=i,i=Jf,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=Jf,n=!0),t=Qf(t),e?Fh(i,t,e):(s={forward:function(r,a){return Fh(i,t,r,a)},inverse:function(r,a){return Fh(t,i,r,a)}},n&&(s.oProj=t),s)}var tg=6,cp="AJSAJS",up="AFAFAF",Is=65,fe=73,Ve=79,Nr=86,Gr=90;const bw={forward:dp,inverse:Ew,toPoint:fp};function dp(i,t){return t=t||5,Sw(ww({lat:i[1],lon:i[0]}),t)}function Ew(i){var t=sd(mp(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function fp(i){var t=sd(mp(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Nh(i){return i*(Math.PI/180)}function eg(i){return 180*(i/Math.PI)}function ww(i){var t=i.lat,e=i.lon,n=6378137,s=.00669438,r=.9996,a,o,l,h,c,u,d,g=Nh(t),f=Nh(e),m,p;p=Math.floor((e+180)/6)+1,e===180&&(p=60),t>=56&&t<64&&e>=3&&e<12&&(p=32),t>=72&&t<84&&(e>=0&&e<9?p=31:e>=9&&e<21?p=33:e>=21&&e<33?p=35:e>=33&&e<42&&(p=37)),a=(p-1)*6-180+3,m=Nh(a),o=s/(1-s),l=n/Math.sqrt(1-s*Math.sin(g)*Math.sin(g)),h=Math.tan(g)*Math.tan(g),c=o*Math.cos(g)*Math.cos(g),u=Math.cos(g)*(f-m),d=n*((1-s/4-3*s*s/64-5*s*s*s/256)*g-(3*s/8+3*s*s/32+45*s*s*s/1024)*Math.sin(2*g)+(15*s*s/256+45*s*s*s/1024)*Math.sin(4*g)-35*s*s*s/3072*Math.sin(6*g));var _=r*l*(u+(1-h+c)*u*u*u/6+(5-18*h+h*h+72*c-58*o)*u*u*u*u*u/120)+5e5,v=r*(d+l*Math.tan(g)*(u*u/2+(5-h+9*c+4*c*c)*u*u*u*u/24+(61-58*h+h*h+600*c-330*o)*u*u*u*u*u*u/720));return t<0&&(v+=1e7),{northing:Math.round(v),easting:Math.round(_),zoneNumber:p,zoneLetter:Cw(t)}}function sd(i){var t=i.northing,e=i.easting,n=i.zoneLetter,s=i.zoneNumber;if(s<0||s>60)return null;var r=.9996,a=6378137,o=.00669438,l,h=(1-Math.sqrt(1-o))/(1+Math.sqrt(1-o)),c,u,d,g,f,m,p,_,v,x=e-5e5,y=t;n<"N"&&(y-=1e7),p=(s-1)*6-180+3,l=o/(1-o),m=y/r,_=m/(a*(1-o/4-3*o*o/64-5*o*o*o/256)),v=_+(3*h/2-27*h*h*h/32)*Math.sin(2*_)+(21*h*h/16-55*h*h*h*h/32)*Math.sin(4*_)+151*h*h*h/96*Math.sin(6*_),c=a/Math.sqrt(1-o*Math.sin(v)*Math.sin(v)),u=Math.tan(v)*Math.tan(v),d=l*Math.cos(v)*Math.cos(v),g=a*(1-o)/Math.pow(1-o*Math.sin(v)*Math.sin(v),1.5),f=x/(c*r);var M=v-c*Math.tan(v)/g*(f*f/2-(5+3*u+10*d-4*d*d-9*l)*f*f*f*f/24+(61+90*u+298*d+45*u*u-252*l-3*d*d)*f*f*f*f*f*f/720);M=eg(M);var w=(f-(1+2*u+d)*f*f*f/6+(5-2*d+28*u-3*d*d+8*l+24*u*u)*f*f*f*f*f/120)/Math.cos(v);w=p+eg(w);var I;if(i.accuracy){var E=sd({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});I={top:E.lat,right:E.lon,bottom:M,left:w}}else I={lat:M,lon:w};return I}function Cw(i){var t="Z";return 84>=i&&i>=72?t="X":72>i&&i>=64?t="W":64>i&&i>=56?t="V":56>i&&i>=48?t="U":48>i&&i>=40?t="T":40>i&&i>=32?t="S":32>i&&i>=24?t="R":24>i&&i>=16?t="Q":16>i&&i>=8?t="P":8>i&&i>=0?t="N":0>i&&i>=-8?t="M":-8>i&&i>=-16?t="L":-16>i&&i>=-24?t="K":-24>i&&i>=-32?t="J":-32>i&&i>=-40?t="H":-40>i&&i>=-48?t="G":-48>i&&i>=-56?t="F":-56>i&&i>=-64?t="E":-64>i&&i>=-72?t="D":-72>i&&i>=-80&&(t="C"),t}function Sw(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+Iw(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function Iw(i,t,e){var n=gp(e),s=Math.floor(i/1e5),r=Math.floor(t/1e5)%20;return Rw(s,r,n)}function gp(i){var t=i%tg;return t===0&&(t=tg),t}function Rw(i,t,e){var n=e-1,s=cp.charCodeAt(n),r=up.charCodeAt(n),a=s+i-1,o=r+t,l=!1;a>Gr&&(a=a-Gr+Is-1,l=!0),(a===fe||sfe||(a>fe||sVe||(a>Ve||sGr&&(a=a-Gr+Is-1),o>Nr?(o=o-Nr+Is-1,l=!0):l=!1,(o===fe||rfe||(o>fe||rVe||(o>Ve||rNr&&(o=o-Nr+Is-1);var h=String.fromCharCode(a)+String.fromCharCode(o);return h}function mp(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var t=i.length,e=null,n="",s,r=0;!/[A-Z]/.test(s=i.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+i;n+=s,r++}var a=parseInt(n,10);if(r===0||r+3>t)throw"MGRSPoint bad conversion from: "+i;var o=i.charAt(r++);if(o<="A"||o==="B"||o==="Y"||o>="Z"||o==="I"||o==="O")throw"MGRSPoint zone letter "+o+" not handled: "+i;e=i.substring(r,r+=2);for(var l=gp(a),h=Tw(e.charAt(0),l),c=Pw(e.charAt(1),l);c0&&(m=1e5/Math.pow(10,d),p=i.substring(r,r+d),g=parseFloat(p)*m,_=i.substring(r+d),f=parseFloat(_)*m),v=g+h,x=f+c,{easting:v,northing:x,zoneLetter:o,zoneNumber:a,accuracy:m}}function Tw(i,t){for(var e=cp.charCodeAt(t-1),n=1e5,s=!1;e!==i.charCodeAt(0);){if(e++,e===fe&&e++,e===Ve&&e++,e>Gr){if(s)throw"Bad character: "+i;e=Is,s=!0}n+=1e5}return n}function Pw(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=up.charCodeAt(t-1),n=0,s=!1;e!==i.charCodeAt(0);){if(e++,e===fe&&e++,e===Ve&&e++,e>Nr){if(s)throw"Bad character: "+i;e=Is,s=!0}n+=1e5}return n}function Lw(i){var t;switch(i){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+i}function cr(i,t,e){if(!(this instanceof cr))return new cr(i,t,e);if(Array.isArray(i))this.x=i[0],this.y=i[1],this.z=i[2]||0;else if(typeof i=="object")this.x=i.x,this.y=i.y,this.z=i.z||0;else if(typeof i=="string"&&typeof t>"u"){var n=i.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=i,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}cr.fromMGRS=function(i){return new cr(fp(i))};cr.prototype.toMGRS=function(i){return dp([this.x,this.y],i)};var Aw=1,Ow=.25,ig=.046875,ng=.01953125,sg=.01068115234375,Dw=.75,kw=.46875,Fw=.013020833333333334,Nw=.007120768229166667,Gw=.3645833333333333,zw=.005696614583333333,Vw=.3076171875;function rd(i){var t=[];t[0]=Aw-i*(Ow+i*(ig+i*(ng+i*sg))),t[1]=i*(Dw-i*(ig+i*(ng+i*sg)));var e=i*i;return t[2]=e*(kw-i*(Fw+i*Nw)),e*=i,t[3]=e*(Gw-i*zw),t[4]=e*i*Vw,t}function yr(i,t,e,n){return e*=t,t*=t,n[0]*i-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var jw=20;function ad(i,t,e){for(var n=1/(1-t),s=i,r=jw;r;--r){var a=Math.sin(s),o=1-t*a*a;if(o=(yr(s,a,Math.cos(s),e)-i)*(o*Math.sqrt(o))*n,s-=o,Math.abs(o)j?Math.tan(e):0,m=Math.pow(f,2),p=Math.pow(m,2);s=1-this.es*Math.pow(o,2),c=c/Math.sqrt(s);var _=yr(e,o,l,this.en);r=this.a*(this.k0*c*(1+u/6*(1-m+d+u/20*(5-18*m+p+14*d-58*m*d+u/42*(61+179*p-p*m-479*m)))))+this.x0,a=this.a*(this.k0*(_-this.ml0+o*n*c/2*(1+u/12*(5-m+9*d+4*g+u/30*(61+p-58*m+270*d-330*m*d+u/56*(1385+543*p-p*m-3111*m))))))+this.y0}else{var h=l*Math.sin(n);if(Math.abs(Math.abs(h)-1)=1){if(h-1>j)return 93;a=0}else a=Math.acos(a);e<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return i.x=r,i.y=a,i}function Ww(i){var t,e,n,s,r=(i.x-this.x0)*(1/this.a),a=(i.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,e=ad(t,this.es,this.en),Math.abs(e)j?Math.tan(e):0,f=this.ep2*Math.pow(d,2),m=Math.pow(f,2),p=Math.pow(g,2),_=Math.pow(p,2);t=1-this.es*Math.pow(u,2);var v=r*Math.sqrt(t)/this.k0,x=Math.pow(v,2);t=t*g,n=e-t*x/(1-this.es)*.5*(1-x/12*(5+3*p-9*f*p+f-4*m-x/30*(61+90*p-252*f*p+45*_+46*f-x/56*(1385+3633*p+4095*_+1574*_*p)))),s=B(this.long0+v*(1-x/6*(1+2*p+f-x/20*(5+28*p+24*_+8*f*p+6*f-x/42*(61+662*p+1320*_+720*_*p))))/d)}else n=F*Ba(a),s=0;else{var o=Math.exp(r/this.k0),l=.5*(o-1/o),h=this.lat0+a/this.k0,c=Math.cos(h);t=Math.sqrt((1-Math.pow(c,2))/(1+Math.pow(l,2))),n=Math.asin(t),a<0&&(n=-n),l===0&&c===0?s=0:s=B(Math.atan2(l,c)+this.long0)}return i.x=s,i.y=n,i}var $w=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const Lo={init:Bw,forward:Uw,inverse:Ww,names:$w};function pp(i){var t=Math.exp(i);return t=(t-1/t)/2,t}function ye(i,t){i=Math.abs(i),t=Math.abs(t);var e=Math.max(i,t),n=Math.min(i,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function Xw(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function Hw(i){var t=Math.abs(i);return t=Xw(t*(1+t/(ye(1,t)+1))),i<0?-t:t}function od(i,t){for(var e=2*Math.cos(2*t),n=i.length-1,s=i[n],r=0,a;--n>=0;)a=-r+e*s+i[n],r=s,s=a;return t+a*Math.sin(2*t)}function Yw(i,t){for(var e=2*Math.cos(t),n=i.length-1,s=i[n],r=0,a;--n>=0;)a=-r+e*s+i[n],r=s,s=a;return Math.sin(t)*a}function qw(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function _p(i,t,e){for(var n=Math.sin(t),s=Math.cos(t),r=pp(e),a=qw(e),o=2*s*a,l=-2*n*r,h=i.length-1,c=i[h],u=0,d=0,g=0,f,m;--h>=0;)f=d,m=u,d=c,u=g,c=-f+o*d-l*u+i[h],g=-m+l*d+o*u;return o=n*a,l=s*r,[o*c-l*g,o*g+l*c]}function Kw(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Lo.init.apply(this),this.forward=Lo.forward,this.inverse=Lo.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var i=this.es/(1+Math.sqrt(1-this.es)),t=i/(2-i),e=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),e=e*t,this.cgb[1]=e*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=e*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),e=e*t,this.cgb[2]=e*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=e*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),e=e*t,this.cgb[3]=e*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=e*(1237/630+t*(-12/5+t*(-24832/14175))),e=e*t,this.cgb[4]=e*(4174/315+t*(-144838/6237)),this.cbg[4]=e*(-734/315+t*(109598/31185)),e=e*t,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(1/4+e*(1/64+e/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=e*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=e*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),e=e*t,this.utg[2]=e*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=e*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),e=e*t,this.utg[3]=e*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=e*(49561/161280+t*(-179/168+t*(6601661/7257600))),e=e*t,this.utg[4]=e*(-4583/161280+t*(108847/3991680)),this.gtu[4]=e*(34729/80640+t*(-3418889/1995840)),e=e*t,this.utg[5]=e*(-20648693/638668800),this.gtu[5]=e*(212378941/319334400);var n=od(this.cbg,this.lat0);this.Zb=-this.Qn*(n+Yw(this.gtu,2*n))}function Zw(i){var t=B(i.x-this.long0),e=i.y;e=od(this.cbg,e);var n=Math.sin(e),s=Math.cos(e),r=Math.sin(t),a=Math.cos(t);e=Math.atan2(n,a*s),t=Math.atan2(r*s,ye(n,s*a)),t=Hw(Math.tan(t));var o=_p(this.gtu,2*e,2*t);e=e+o[0],t=t+o[1];var l,h;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,h=this.a*(this.Qn*e+this.Zb)+this.y0):(l=1/0,h=1/0),i.x=l,i.y=h,i}function Jw(i){var t=(i.x-this.x0)*(1/this.a),e=(i.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,s;if(Math.abs(t)<=2.623395162778){var r=_p(this.utg,2*e,2*t);e=e+r[0],t=t+r[1],t=Math.atan(pp(t));var a=Math.sin(e),o=Math.cos(e),l=Math.sin(t),h=Math.cos(t);e=Math.atan2(a*h,ye(l,h*o)),t=Math.atan2(l,h*o),n=B(t+this.long0),s=od(this.cgb,e)}else n=1/0,s=1/0;return i.x=n,i.y=s,i}var Qw=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const Ao={init:Kw,forward:Zw,inverse:Jw,names:Qw};function tC(i,t){if(i===void 0){if(i=Math.floor((B(t)+Math.PI)*30/Math.PI)+1,i<0)return 0;if(i>60)return 60}return i}var eC="etmerc";function iC(){var i=tC(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*Kt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Ao.init.apply(this),this.forward=Ao.forward,this.inverse=Ao.inverse}var nC=["Universal Transverse Mercator System","utm"];const sC={init:iC,names:nC,dependsOn:eC};function ld(i,t){return Math.pow((1-i)/(1+i),t)}var rC=20;function aC(){var i=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*i*i),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(i/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+vt)/(Math.pow(Math.tan(.5*this.lat0+vt),this.C)*ld(this.e*i,this.ratexp))}function oC(i){var t=i.x,e=i.y;return i.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+vt),this.C)*ld(this.e*Math.sin(e),this.ratexp))-F,i.x=this.C*t,i}function lC(i){for(var t=1e-14,e=i.x/this.C,n=i.y,s=Math.pow(Math.tan(.5*n+vt)/this.K,1/this.C),r=rC;r>0&&(n=2*Math.atan(s*ld(this.e*Math.sin(i.y),-.5*this.e))-F,!(Math.abs(n-i.y)0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=j&&Math.abs(Math.cos(this.lat_ts))>j&&(this.k0=.5*this.cons*Pi(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/li(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Pi(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-F,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function _C(i){var t=i.x,e=i.y,n=Math.sin(e),s=Math.cos(e),r,a,o,l,h,c,u=B(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=j&&Math.abs(e+this.lat0)<=j?(i.x=NaN,i.y=NaN,i):this.sphere?(r=2*this.k0/(1+this.sinlat0*n+this.coslat0*s*Math.cos(u)),i.x=this.a*r*s*Math.sin(u)+this.x0,i.y=this.a*r*(this.coslat0*n-this.sinlat0*s*Math.cos(u))+this.y0,i):(a=2*Math.atan(this.ssfn_(e,n,this.e))-F,l=Math.cos(a),o=Math.sin(a),Math.abs(this.coslat0)<=j?(h=li(this.e,e*this.con,this.con*n),c=2*this.a*this.k0*h/this.cons,i.x=this.x0+c*Math.sin(t-this.long0),i.y=this.y0-this.con*c*Math.cos(t-this.long0),i):(Math.abs(this.sinlat0)0?t=B(this.long0+Math.atan2(i.x,-1*i.y)):t=B(this.long0+Math.atan2(i.x,i.y)):t=B(this.long0+Math.atan2(i.x*Math.sin(o),a*this.coslat0*Math.cos(o)-i.y*this.sinlat0*Math.sin(o))),i.x=t,i.y=e,i)}else if(Math.abs(this.coslat0)<=j){if(a<=j)return e=this.lat0,t=this.long0,i.x=t,i.y=e,i;i.x*=this.con,i.y*=this.con,n=a*this.cons/(2*this.a*this.k0),e=this.con*da(this.e,n),t=this.con*B(this.con*this.long0+Math.atan2(i.x,-1*i.y))}else s=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=j?r=this.X0:(r=Math.asin(Math.cos(s)*this.sinX0+i.y*Math.sin(s)*this.cosX0/a),t=B(this.long0+Math.atan2(i.x*Math.sin(s),a*this.cosX0*Math.cos(s)-i.y*this.sinX0*Math.sin(s)))),e=-1*da(this.e,Math.tan(.5*(F+r)));return i.x=t,i.y=e,i}var yC=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"];const xC={init:pC,forward:_C,inverse:vC,names:yC,ssfn_:mC};function MC(){var i=this.lat0;this.lambda0=this.long0;var t=Math.sin(i),e=this.a,n=this.rf,s=1/n,r=2*s-Math.pow(s,2),a=this.e=Math.sqrt(r);this.R=this.k0*e*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(i),4)),this.b0=Math.asin(t/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+i/2)),h=Math.log((1+a*t)/(1-a*t));this.K=o-this.alpha*l+this.alpha*a/2*h}function bC(i){var t=Math.log(Math.tan(Math.PI/4-i.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(i.y))/(1-this.e*Math.sin(i.y))),n=-this.alpha*(t+e)+this.K,s=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(i.x-this.lambda0),a=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(s)+Math.cos(this.b0)*Math.cos(r))),o=Math.asin(Math.cos(this.b0)*Math.sin(s)-Math.sin(this.b0)*Math.cos(s)*Math.cos(r));return i.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,i.x=this.R*a+this.x0,i}function EC(i){for(var t=i.x-this.x0,e=i.y-this.y0,n=t/this.R,s=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(s))),o=this.lambda0+a/this.alpha,l=0,h=r,c=-1e3,u=0;Math.abs(h-c)>1e-7;){if(++u>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+r/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),c=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return i.x=o,i.y=h,i}var wC=["somerc"];const CC={init:MC,forward:bC,inverse:EC,names:wC};var xs=1e-7;function SC(i){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof i.PROJECTION=="object"?Object.keys(i.PROJECTION)[0]:i.PROJECTION;return"no_uoff"in i||"no_off"in i||t.indexOf(e)!==-1}function IC(){var i,t,e,n,s,r,a,o,l,h,c=0,u,d=0,g=0,f=0,m=0,p=0,_=0;this.no_off=SC(this),this.no_rot="no_rot"in this;var v=!1;"alpha"in this&&(v=!0);var x=!1;if("rectified_grid_angle"in this&&(x=!0),v&&(_=this.alpha),x&&(c=this.rectified_grid_angle*Kt),v||x)d=this.longc;else if(g=this.long1,m=this.lat1,f=this.long2,p=this.lat2,Math.abs(m-p)<=xs||(i=Math.abs(m))<=xs||Math.abs(i-F)<=xs||Math.abs(Math.abs(this.lat0)-F)<=xs||Math.abs(Math.abs(p)-F)<=xs)throw new Error;var y=1-this.es;t=Math.sqrt(y),Math.abs(this.lat0)>j?(o=Math.sin(this.lat0),e=Math.cos(this.lat0),i=1-this.es*o*o,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/y),this.A=this.B*this.k0*t/i,n=this.B*t/(e*Math.sqrt(i)),s=n*n-1,s<=0?s=0:(s=Math.sqrt(s),this.lat0<0&&(s=-s)),this.E=s+=n,this.E*=Math.pow(li(this.e,this.lat0,o),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=s=1),v||x?(v?(u=Math.asin(Math.sin(_)/n),x||(c=_)):(u=c,_=Math.asin(n*Math.sin(u))),this.lam0=d-Math.asin(.5*(s-1/s)*Math.tan(u))/this.B):(r=Math.pow(li(this.e,m,Math.sin(m)),this.B),a=Math.pow(li(this.e,p,Math.sin(p)),this.B),s=this.E/r,l=(a-r)/(a+r),h=this.E*this.E,h=(h-a*r)/(h+a*r),i=g-f,i<-Math.pi?f-=ca:i>Math.pi&&(f+=ca),this.lam0=B(.5*(g+f)-Math.atan(h*Math.tan(.5*this.B*(g-f))/l)/this.B),u=Math.atan(2*Math.sin(this.B*B(g-this.lam0))/(s-1/s)),c=_=Math.asin(n*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(_))),this.lat0<0&&(this.u_0=-this.u_0)),s=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(vt-s)),this.v_pole_s=this.ArB*Math.log(Math.tan(vt+s))}function RC(i){var t={},e,n,s,r,a,o,l,h;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-F)>j){if(a=this.E/Math.pow(li(this.e,i.y,Math.sin(i.y)),this.B),o=1/a,e=.5*(a-o),n=.5*(a+o),r=Math.sin(this.B*i.x),s=(e*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(s)-1)0?this.v_pole_n:this.v_pole_s,l=this.ArB*i.y;return this.no_rot?(t.x=l,t.y=h):(l-=this.u_0,t.x=h*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-h*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function TC(i){var t,e,n,s,r,a,o,l={};if(i.x=(i.x-this.x0)*(1/this.a),i.y=(i.y-this.y0)*(1/this.a),this.no_rot?(e=i.y,t=i.x):(e=i.x*this.cosrot-i.y*this.sinrot,t=i.y*this.cosrot+i.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),s=.5*(n-1/n),r=.5*(n+1/n),a=Math.sin(this.BrA*t),o=(a*this.cosgam+s*this.singam)/r,Math.abs(Math.abs(o)-1)j?this.ns=Math.log(n/o)/Math.log(s/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(s,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function OC(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=j&&(e=Ba(e)*(F-2*j));var n=Math.abs(Math.abs(e)-F),s,r;if(n>j)s=li(this.e,e,Math.sin(e)),r=this.a*this.f0*Math.pow(s,this.ns);else{if(n=e*this.ns,n<=0)return null;r=0}var a=this.ns*B(t-this.long0);return i.x=this.k0*(r*Math.sin(a))+this.x0,i.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,i}function DC(i){var t,e,n,s,r,a=(i.x-this.x0)/this.k0,o=this.rh-(i.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+o*o),e=1):(t=-Math.sqrt(a*a+o*o),e=-1);var l=0;if(t!==0&&(l=Math.atan2(e*a,e*o)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),s=da(this.e,n),s===-9999)return null}else s=-F;return r=B(l/this.ns+this.long0),i.x=r,i.y=s,i}var kC=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const FC={init:AC,forward:OC,inverse:DC,names:kC};function NC(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function GC(i){var t,e,n,s,r,a,o,l=i.x,h=i.y,c=B(l-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),r=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(s)),a=this.n*r,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n),i.y=o*Math.cos(a)/1,i.x=o*Math.sin(a)/1,this.czech||(i.y*=-1,i.x*=-1),i}function zC(i){var t,e,n,s,r,a,o,l,h=i.x;i.x=i.y,i.y=h,this.czech||(i.y*=-1,i.x*=-1),a=Math.sqrt(i.x*i.x+i.y*i.y),r=Math.atan2(i.y,i.x),s=r/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(s)),e=Math.asin(Math.cos(n)*Math.sin(s)/Math.cos(t)),i.x=this.long0-e/this.alfa,o=t,l=0;var c=0;do i.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-i.y)<1e-10&&(l=1),o=i.y,c+=1;while(l===0&&c<15);return c>=15?null:i}var VC=["Krovak","krovak"];const jC={init:NC,forward:GC,inverse:zC,names:VC};function ce(i,t,e,n,s){return i*s-t*Math.sin(2*s)+e*Math.sin(4*s)-n*Math.sin(6*s)}function Ua(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function Wa(i){return .375*i*(1+.25*i*(1+.46875*i))}function $a(i){return .05859375*i*i*(1+.75*i)}function Xa(i){return i*i*i*(35/3072)}function ur(i,t,e){var n=t*e;return i/Math.sqrt(1-n*n)}function Cn(i){return Math.abs(i)1e-7?(e=i*t,(1-i*i)*(t/(1-e*e)-.5/i*Math.log((1-e)/(1+e)))):2*t}var HC=1,YC=2,qC=3,KC=4;function ZC(){var i=Math.abs(this.lat0);if(Math.abs(i-F)0){var t;switch(this.qp=yn(this.e,1),this.mmf=.5/(1-this.es),this.apa=a2(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=yn(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function JC(i){var t,e,n,s,r,a,o,l,h,c,u=i.x,d=i.y;if(u=B(u-this.long0),this.sphere){if(r=Math.sin(d),c=Math.cos(d),n=Math.cos(u),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+c*n:1+this.sinph0*r+this.cosph0*c*n,e<=j)return null;e=Math.sqrt(2/e),t=e*c*Math.sin(u),e*=this.mode===this.EQUIT?r:this.cosph0*r-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.lat0)=0?(t=(h=Math.sqrt(a))*s,e=n*(this.mode===this.S_POLE?h:-h)):t=e=0;break}}return i.x=this.a*t+this.x0,i.y=this.a*e+this.y0,i}function QC(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,s,r,a,o,l,h;if(this.sphere){var c=0,u,d=0;if(u=Math.sqrt(t*t+e*e),s=u*.5,s>1)return null;switch(s=2*Math.asin(s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=Math.sin(s),c=Math.cos(s)),this.mode){case this.EQUIT:s=Math.abs(u)<=j?0:Math.asin(e*d/u),t*=d,e=c*u;break;case this.OBLIQ:s=Math.abs(u)<=j?this.lat0:Math.asin(c*this.sinph0+e*d*this.cosph0/u),t*=d*this.cosph0,e=(c-Math.sin(s)*this.sinph0)*u;break;case this.N_POLE:e=-e,s=F-s;break;case this.S_POLE:s-=F;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,l=Math.sqrt(t*t+e*e),l1&&(i=i>1?1:-1),Math.asin(i)}function c2(){Math.abs(this.lat1+this.lat2)j?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function u2(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=yn(this.e3,this.sin_phi),s=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*B(t-this.long0),a=s*Math.sin(r)+this.x0,o=this.rh-s*Math.cos(r)+this.y0;return i.x=a,i.y=o,i}function d2(i){var t,e,n,s,r,a;return i.x-=this.x0,i.y=this.rh-i.y+this.y0,this.ns0>=0?(t=Math.sqrt(i.x*i.x+i.y*i.y),n=1):(t=-Math.sqrt(i.x*i.x+i.y*i.y),n=-1),s=0,t!==0&&(s=Math.atan2(n*i.x,n*i.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,e)),r=B(s/this.ns0+this.long0),i.x=r,i.y=a,i}function f2(i,t){var e,n,s,r,a,o=bn(.5*t);if(i0||Math.abs(a)<=j?(o=this.x0+this.a*r*e*Math.sin(n)/a,l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*s)/a):(o=this.x0+this.infinity_dist*e*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*s)),i.x=o,i.y=l,i}function v2(i){var t,e,n,s,r,a;return i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,(t=Math.sqrt(i.x*i.x+i.y*i.y))?(s=Math.atan2(t,this.rc),e=Math.sin(s),n=Math.cos(s),a=bn(n*this.sin_p14+i.y*e*this.cos_p14/t),r=Math.atan2(i.x*e,t*this.cos_p14*n-i.y*this.sin_p14*e),r=B(this.long0+r)):(a=this.phic0,r=0),i.x=r,i.y=a,i}var y2=["gnom"];const x2={init:p2,forward:_2,inverse:v2,names:y2};function M2(i,t){var e=1-(1-i*i)/(2*i)*Math.log((1-i)/(1+i));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*F:F;for(var n=Math.asin(.5*t),s,r,a,o,l=0;l<30;l++)if(r=Math.sin(n),a=Math.cos(n),o=i*r,s=Math.pow(1-o*o,2)/(2*a)*(t/(1-i*i)-r/(1-o*o)+.5/i*Math.log((1-o)/(1+o))),n+=s,Math.abs(s)<=1e-10)return n;return NaN}function b2(){this.sphere||(this.k0=Pi(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function E2(i){var t=i.x,e=i.y,n,s,r=B(t-this.long0);if(this.sphere)n=this.x0+this.a*r*Math.cos(this.lat_ts),s=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var a=yn(this.e,Math.sin(e));n=this.x0+this.a*this.k0*r,s=this.y0+this.a*a*.5/this.k0}return i.x=n,i.y=s,i}function w2(i){i.x-=this.x0,i.y-=this.y0;var t,e;return this.sphere?(t=B(this.long0+i.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(i.y/this.a*Math.cos(this.lat_ts))):(e=M2(this.e,2*i.y*this.k0/this.a),t=B(this.long0+i.x/(this.a*this.k0))),i.x=t,i.y=e,i}var C2=["cea"];const S2={init:b2,forward:E2,inverse:w2,names:C2};function I2(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function R2(i){var t=i.x,e=i.y,n=B(t-this.long0),s=Cn(e-this.lat0);return i.x=this.x0+this.a*n*this.rc,i.y=this.y0+this.a*s,i}function T2(i){var t=i.x,e=i.y;return i.x=B(this.long0+(t-this.x0)/(this.a*this.rc)),i.y=Cn(this.lat0+(e-this.y0)/this.a),i}var P2=["Equirectangular","Equidistant_Cylindrical","eqc"];const L2={init:I2,forward:R2,inverse:T2,names:P2};var rg=20;function A2(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ua(this.es),this.e1=Wa(this.es),this.e2=$a(this.es),this.e3=Xa(this.es),this.ml0=this.a*ce(this.e0,this.e1,this.e2,this.e3,this.lat0)}function O2(i){var t=i.x,e=i.y,n,s,r,a=B(t-this.long0);if(r=a*Math.sin(e),this.sphere)Math.abs(e)<=j?(n=this.a*a,s=-1*this.a*this.lat0):(n=this.a*Math.sin(r)/Math.tan(e),s=this.a*(Cn(e-this.lat0)+(1-Math.cos(r))/Math.tan(e)));else if(Math.abs(e)<=j)n=this.a*a,s=-1*this.ml0;else{var o=ur(this.a,this.e,Math.sin(e))/Math.tan(e);n=o*Math.sin(r),s=this.a*ce(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+o*(1-Math.cos(r))}return i.x=n+this.x0,i.y=s+this.y0,i}function D2(i){var t,e,n,s,r,a,o,l,h;if(n=i.x-this.x0,s=i.y-this.y0,this.sphere)if(Math.abs(s+this.a*this.lat0)<=j)t=B(n/this.a+this.long0),e=0;else{a=this.lat0+s/this.a,o=n*n/this.a/this.a+a*a,l=a;var c;for(r=rg;r;--r)if(c=Math.tan(l),h=-1*(a*(l*c+1)-l-.5*(l*l+o)*c)/((l-a)/c-1),l+=h,Math.abs(h)<=j){e=l;break}t=B(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(s+this.ml0)<=j)e=0,t=B(this.long0+n/this.a);else{a=(this.ml0+s)/this.a,o=n*n/this.a/this.a+a*a,l=a;var u,d,g,f,m;for(r=rg;r;--r)if(m=this.e*Math.sin(l),u=Math.sqrt(1-m*m)*Math.tan(l),d=this.a*ce(this.e0,this.e1,this.e2,this.e3,l),g=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),f=d/this.a,h=(a*(u*f+1)-f-.5*u*(f*f+o))/(this.es*Math.sin(2*l)*(f*f+o-2*a*f)/(4*u)+(a-f)*(u*g-2/Math.sin(2*l))-g),l-=h,Math.abs(h)<=j){e=l;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=B(this.long0+Math.asin(n*u/this.a)/Math.sin(e))}return i.x=t,i.y=e,i}var k2=["Polyconic","poly"];const F2={init:A2,forward:O2,inverse:D2,names:k2};function N2(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function G2(i){var t,e=i.x,n=i.y,s=n-this.lat0,r=e-this.long0,a=s/Xr*1e-5,o=r,l=1,h=0;for(t=1;t<=10;t++)l=l*a,h=h+this.A[t]*l;var c=h,u=o,d=1,g=0,f,m,p=0,_=0;for(t=1;t<=6;t++)f=d*c-g*u,m=g*c+d*u,d=f,g=m,p=p+this.B_re[t]*d-this.B_im[t]*g,_=_+this.B_im[t]*d+this.B_re[t]*g;return i.x=_*this.a+this.x0,i.y=p*this.a+this.y0,i}function z2(i){var t,e=i.x,n=i.y,s=e-this.x0,r=n-this.y0,a=r/this.a,o=s/this.a,l=1,h=0,c,u,d=0,g=0;for(t=1;t<=6;t++)c=l*a-h*o,u=h*a+l*o,l=c,h=u,d=d+this.C_re[t]*l-this.C_im[t]*h,g=g+this.C_im[t]*l+this.C_re[t]*h;for(var f=0;f.999999999999&&(e=.999999999999),t=Math.asin(e);var n=B(this.long0+i.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var s=Math.asin(e);return i.x=n,i.y=s,i}var iS=["Mollweide","moll"];const nS={init:Q2,forward:tS,inverse:eS,names:iS};function sS(){Math.abs(this.lat1+this.lat2)=0?(e=Math.sqrt(i.x*i.x+i.y*i.y),t=1):(e=-Math.sqrt(i.x*i.x+i.y*i.y),t=-1);var r=0;if(e!==0&&(r=Math.atan2(t*i.x,t*i.y)),this.sphere)return s=B(this.long0+r/this.ns),n=Cn(this.g-e/this.a),i.x=s,i.y=n,i;var a=this.g-e/this.a;return n=ol(a,this.e0,this.e1,this.e2,this.e3),s=B(this.long0+r/this.ns),i.x=s,i.y=n,i}var oS=["Equidistant_Conic","eqdc"];const lS={init:sS,forward:rS,inverse:aS,names:oS};function hS(){this.R=this.a}function cS(i){var t=i.x,e=i.y,n=B(t-this.long0),s,r;Math.abs(e)<=j&&(s=this.x0+this.R*n,r=this.y0);var a=bn(2*Math.abs(e/Math.PI));(Math.abs(n)<=j||Math.abs(Math.abs(e)-F)<=j)&&(s=this.x0,e>=0?r=this.y0+Math.PI*this.R*Math.tan(.5*a):r=this.y0+Math.PI*this.R*-Math.tan(.5*a));var o=.5*Math.abs(Math.PI/n-n/Math.PI),l=o*o,h=Math.sin(a),c=Math.cos(a),u=c/(h+c-1),d=u*u,g=u*(2/h-1),f=g*g,m=Math.PI*this.R*(o*(u-f)+Math.sqrt(l*(u-f)*(u-f)-(f+l)*(d-f)))/(f+l);n<0&&(m=-m),s=this.x0+m;var p=l+u;return m=Math.PI*this.R*(g*p-o*Math.sqrt((f+l)*(l+1)-p*p))/(f+l),e>=0?r=this.y0+m:r=this.y0-m,i.x=s,i.y=r,i}function uS(i){var t,e,n,s,r,a,o,l,h,c,u,d,g;return i.x-=this.x0,i.y-=this.y0,u=Math.PI*this.R,n=i.x/u,s=i.y/u,r=n*n+s*s,a=-Math.abs(s)*(1+r),o=a-2*s*s+n*n,l=-2*a+1+2*s*s+r*r,g=s*s/l+(2*o*o*o/l/l/l-9*a*o/l/l)/27,h=(a-o*o/3/l)/l,c=2*Math.sqrt(-h/3),u=3*g/h/c,Math.abs(u)>1&&(u>=0?u=1:u=-1),d=Math.acos(u)/3,i.y>=0?e=(-c*Math.cos(d+Math.PI/3)-o/3/l)*Math.PI:e=-(-c*Math.cos(d+Math.PI/3)-o/3/l)*Math.PI,Math.abs(n)2*F*this.a?void 0:(e=t/this.a,n=Math.sin(e),s=Math.cos(e),r=this.long0,Math.abs(t)<=j?a=this.lat0:(a=bn(s*this.sin_p12+i.y*n*this.cos_p12/t),o=Math.abs(this.lat0)-F,Math.abs(o)<=j?this.lat0>=0?r=B(this.long0+Math.atan2(i.x,-i.y)):r=B(this.long0-Math.atan2(-i.x,i.y)):r=B(this.long0+Math.atan2(i.x*n,t*this.cos_p12*s-i.y*this.sin_p12*n))),i.x=r,i.y=a,i)):(l=Ua(this.es),h=Wa(this.es),c=$a(this.es),u=Xa(this.es),Math.abs(this.sin_p12-1)<=j?(d=this.a*ce(l,h,c,u,F),t=Math.sqrt(i.x*i.x+i.y*i.y),g=d-t,a=ol(g/this.a,l,h,c,u),r=B(this.long0+Math.atan2(i.x,-1*i.y)),i.x=r,i.y=a,i):Math.abs(this.sin_p12+1)<=j?(d=this.a*ce(l,h,c,u,F),t=Math.sqrt(i.x*i.x+i.y*i.y),g=t-d,a=ol(g/this.a,l,h,c,u),r=B(this.long0+Math.atan2(i.x,i.y)),i.x=r,i.y=a,i):(t=Math.sqrt(i.x*i.x+i.y*i.y),p=Math.atan2(i.x,i.y),f=ur(this.a,this.e,this.sin_p12),_=Math.cos(p),v=this.e*this.cos_p12*_,x=-v*v/(1-this.es),y=3*this.es*(1-x)*this.sin_p12*this.cos_p12*_/(1-this.es),M=t/f,w=M-x*(1+x)*Math.pow(M,3)/6-y*(1+3*x)*Math.pow(M,4)/24,I=1-x*w*w/2-M*w*w*w/6,m=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*_),r=B(this.long0+Math.asin(Math.sin(p)*Math.sin(w)/Math.cos(m))),E=Math.sin(m),a=Math.atan2((E-this.es*I*this.sin_p12)*Math.tan(m),E*(1-this.es)),i.x=r,i.y=a,i))}var _S=["Azimuthal_Equidistant","aeqd"];const vS={init:gS,forward:mS,inverse:pS,names:_S};function yS(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function xS(i){var t,e,n,s,r,a,o,l,h=i.x,c=i.y;return n=B(h-this.long0),t=Math.sin(c),e=Math.cos(c),s=Math.cos(n),a=this.sin_p14*t+this.cos_p14*e*s,r=1,(a>0||Math.abs(a)<=j)&&(o=this.a*r*e*Math.sin(n),l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*s)),i.x=o,i.y=l,i}function MS(i){var t,e,n,s,r,a,o;return i.x-=this.x0,i.y-=this.y0,t=Math.sqrt(i.x*i.x+i.y*i.y),e=bn(t/this.a),n=Math.sin(e),s=Math.cos(e),a=this.long0,Math.abs(t)<=j?(o=this.lat0,i.x=a,i.y=o,i):(o=bn(s*this.sin_p14+i.y*n*this.cos_p14/t),r=Math.abs(this.lat0)-F,Math.abs(r)<=j?(this.lat0>=0?a=B(this.long0+Math.atan2(i.x,-i.y)):a=B(this.long0-Math.atan2(-i.x,i.y)),i.x=a,i.y=o,i):(a=B(this.long0+Math.atan2(i.x*n,t*this.cos_p14*s-i.y*this.sin_p14*n)),i.x=a,i.y=o,i))}var bS=["ortho"];const ES={init:yS,forward:xS,inverse:MS,names:bS};var Tt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},yt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function wS(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=F-vt/2?this.face=Tt.TOP:this.lat0<=-(F-vt/2)?this.face=Tt.BOTTOM:Math.abs(this.long0)<=vt?this.face=Tt.FRONT:Math.abs(this.long0)<=F+vt?this.face=this.long0>0?Tt.RIGHT:Tt.LEFT:this.face=Tt.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function CS(i){var t={x:0,y:0},e,n,s,r,a,o,l={value:0};if(i.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(i.y)):e=i.y,n=i.x,this.face===Tt.TOP)r=F-e,n>=vt&&n<=F+vt?(l.value=yt.AREA_0,s=n-F):n>F+vt||n<=-(F+vt)?(l.value=yt.AREA_1,s=n>0?n-Dt:n+Dt):n>-(F+vt)&&n<=-vt?(l.value=yt.AREA_2,s=n+F):(l.value=yt.AREA_3,s=n);else if(this.face===Tt.BOTTOM)r=F+e,n>=vt&&n<=F+vt?(l.value=yt.AREA_0,s=-n+F):n=-vt?(l.value=yt.AREA_1,s=-n):n<-vt&&n>=-(F+vt)?(l.value=yt.AREA_2,s=-n-F):(l.value=yt.AREA_3,s=n>0?-n+Dt:-n-Dt);else{var h,c,u,d,g,f,m;this.face===Tt.RIGHT?n=Fs(n,+F):this.face===Tt.BACK?n=Fs(n,+Dt):this.face===Tt.LEFT&&(n=Fs(n,-F)),d=Math.sin(e),g=Math.cos(e),f=Math.sin(n),m=Math.cos(n),h=g*m,c=g*f,u=d,this.face===Tt.FRONT?(r=Math.acos(h),s=mo(r,u,c,l)):this.face===Tt.RIGHT?(r=Math.acos(c),s=mo(r,u,-h,l)):this.face===Tt.BACK?(r=Math.acos(-h),s=mo(r,u,-c,l)):this.face===Tt.LEFT?(r=Math.acos(-c),s=mo(r,u,h,l)):(r=s=0,l.value=yt.AREA_0)}return o=Math.atan(12/Dt*(s+Math.acos(Math.sin(s)*Math.cos(vt))-F)),a=Math.sqrt((1-Math.cos(r))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(s))))),l.value===yt.AREA_1?o+=F:l.value===yt.AREA_2?o+=Dt:l.value===yt.AREA_3&&(o+=1.5*Dt),t.x=a*Math.cos(o),t.y=a*Math.sin(o),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,i.x=t.x,i.y=t.y,i}function SS(i){var t={lam:0,phi:0},e,n,s,r,a,o,l,h,c,u={value:0};if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,n=Math.atan(Math.sqrt(i.x*i.x+i.y*i.y)),e=Math.atan2(i.y,i.x),i.x>=0&&i.x>=Math.abs(i.y)?u.value=yt.AREA_0:i.y>=0&&i.y>=Math.abs(i.x)?(u.value=yt.AREA_1,e-=F):i.x<0&&-i.x>=Math.abs(i.y)?(u.value=yt.AREA_2,e=e<0?e+Dt:e-Dt):(u.value=yt.AREA_3,e+=F),c=Dt/12*Math.tan(e),a=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),o=Math.atan(a),s=Math.cos(e),r=Math.tan(n),l=1-s*s*r*r*(1-Math.cos(Math.atan(1/Math.cos(o)))),l<-1?l=-1:l>1&&(l=1),this.face===Tt.TOP)h=Math.acos(l),t.phi=F-h,u.value===yt.AREA_0?t.lam=o+F:u.value===yt.AREA_1?t.lam=o<0?o+Dt:o-Dt:u.value===yt.AREA_2?t.lam=o-F:t.lam=o;else if(this.face===Tt.BOTTOM)h=Math.acos(l),t.phi=h-F,u.value===yt.AREA_0?t.lam=-o+F:u.value===yt.AREA_1?t.lam=-o:u.value===yt.AREA_2?t.lam=-o-F:t.lam=o<0?-o-Dt:-o+Dt;else{var d,g,f;d=l,c=d*d,c>=1?f=0:f=Math.sqrt(1-c)*Math.sin(o),c+=f*f,c>=1?g=0:g=Math.sqrt(1-c),u.value===yt.AREA_1?(c=g,g=-f,f=c):u.value===yt.AREA_2?(g=-g,f=-f):u.value===yt.AREA_3&&(c=g,g=f,f=-c),this.face===Tt.RIGHT?(c=d,d=-g,g=c):this.face===Tt.BACK?(d=-d,g=-g):this.face===Tt.LEFT&&(c=d,d=g,g=-c),t.phi=Math.acos(-f)-F,t.lam=Math.atan2(g,d),this.face===Tt.RIGHT?t.lam=Fs(t.lam,-F):this.face===Tt.BACK?t.lam=Fs(t.lam,-Dt):this.face===Tt.LEFT&&(t.lam=Fs(t.lam,+F))}if(this.es!==0){var m,p,_;m=t.phi<0?1:0,p=Math.tan(t.phi),_=this.b/Math.sqrt(p*p+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-_*_)/(this.one_minus_f*_)),m&&(t.phi=-t.phi)}return t.lam+=this.long0,i.x=t.lam,i.y=t.phi,i}function mo(i,t,e,n){var s;return ivt&&s<=F+vt?(n.value=yt.AREA_1,s-=F):s>F+vt||s<=-(F+vt)?(n.value=yt.AREA_2,s=s>=0?s-Dt:s+Dt):(n.value=yt.AREA_3,s+=F)),s}function Fs(i,t){var e=i+t;return e<-Dt?e+=ca:e>+Dt&&(e-=ca),e}var IS=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const RS={init:wS,forward:CS,inverse:SS,names:IS};var Vc=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],zr=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],vp=.8487,yp=1.3523,xp=Si/5,TS=1/xp,Rs=18,ll=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},PS=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function LS(i,t,e,n){for(var s=t;n;--n){var r=i(s);if(s-=r,Math.abs(r)=Rs&&(n=Rs-1),e=Si*(e-TS*n);var s={x:ll(Vc[n],e)*t,y:ll(zr[n],e)};return i.y<0&&(s.y=-s.y),s.x=s.x*this.a*vp+this.x0,s.y=s.y*this.a*yp+this.y0,s}function DS(i){var t={x:(i.x-this.x0)/(this.a*vp),y:Math.abs(i.y-this.y0)/(this.a*yp)};if(t.y>=1)t.x/=Vc[Rs][0],t.y=i.y<0?-F:F;else{var e=Math.floor(t.y*Rs);for(e<0?e=0:e>=Rs&&(e=Rs-1);;)if(zr[e][0]>t.y)--e;else if(zr[e+1][0]<=t.y)++e;else break;var n=zr[e],s=5*(t.y-n[0])/(zr[e+1][0]-n[0]);s=LS(function(r){return(ll(n,r)-t.y)/PS(n,r)},s,j,100),t.x/=ll(Vc[e],s),t.y=(5*e+s)*Kt,i.y<0&&(t.y=-t.y)}return t.x=B(t.x+this.long0),t}var kS=["Robinson","robin"];const FS={init:AS,forward:OS,inverse:DS,names:kS};function NS(){this.name="geocent"}function GS(i){var t=op(i,this.es,this.a);return t}function zS(i){var t=lp(i,this.es,this.a,this.b);return t}var VS=["Geocentric","geocentric","geocent","Geocent"];const jS={init:NS,forward:GS,inverse:zS,names:VS};var se={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Rr={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function BS(){if(Object.keys(Rr).forEach((function(e){if(typeof this[e]>"u")this[e]=Rr[e].def;else{if(Rr[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);Rr[e].num&&(this[e]=parseFloat(this[e]))}Rr[e].degrees&&(this[e]=this[e]*Kt)}).bind(this)),Math.abs(Math.abs(this.lat0)-F)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var i=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(i),this.sw=Math.sin(i)}function US(i){i.x-=this.long0;var t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),s,r;switch(this.mode){case se.OBLIQ:r=this.sinph0*t+this.cosph0*e*n;break;case se.EQUIT:r=e*n;break;case se.S_POLE:r=-t;break;case se.N_POLE:r=t;break}switch(r=this.pn1/(this.p-r),s=r*e*Math.sin(i.x),this.mode){case se.OBLIQ:r*=this.cosph0*t-this.sinph0*e*n;break;case se.EQUIT:r*=t;break;case se.N_POLE:r*=-(e*n);break;case se.S_POLE:r*=e*n;break}var a,o;return a=r*this.cg+s*this.sg,o=1/(a*this.sw*this.h1+this.cw),s=(s*this.cg-r*this.sg)*this.cw*o,r=a*o,i.x=s*this.a,i.y=r*this.a,i}function WS(i){i.x/=this.a,i.y/=this.a;var t={x:i.x,y:i.y},e,n,s;s=1/(this.pn1-i.y*this.sw),e=this.pn1*i.x*s,n=this.pn1*i.y*this.cw*s,i.x=e*this.cg+n*this.sg,i.y=n*this.cg-e*this.sg;var r=ye(i.x,i.y);if(Math.abs(r)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var i=1-this.es,t=1/i;this.radius_p=Math.sqrt(i),this.radius_p2=i,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function YS(i){var t=i.x,e=i.y,n,s,r,a;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var o=this.radius_p/ye(this.radius_p*Math.cos(e),Math.sin(e));if(s=o*Math.cos(t)*Math.cos(e),r=o*Math.sin(t)*Math.cos(e),a=o*Math.sin(e),(this.radius_g-s)*s-r*r-a*a*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;n=this.radius_g-s,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/ye(a,n)),i.y=this.radius_g_1*Math.atan(a/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(a/ye(r,n)))}else this.shape==="sphere"&&(n=Math.cos(e),s=Math.cos(t)*n,r=Math.sin(t)*n,a=Math.sin(e),n=this.radius_g-s,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/ye(a,n)),i.y=this.radius_g_1*Math.atan(a/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(a/ye(r,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function qS(i){var t=-1,e=0,n=0,s,r,a,o;if(i.x=i.x/this.a,i.y=i.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*ye(1,n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*ye(1,e));var l=n/this.radius_p;if(s=e*e+l*l+t*t,r=2*this.radius_g*t,a=r*r-4*s*this.C,a<0)return i.x=Number.NaN,i.y=Number.NaN,i;o=(-r-Math.sqrt(a))/(2*s),t=this.radius_g+o*t,e*=o,n*=o,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t),i.y=Math.atan(this.radius_p_inv2*Math.tan(i.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*Math.sqrt(1+e*e)),s=e*e+n*n+t*t,r=2*this.radius_g*t,a=r*r-4*s*this.C,a<0)return i.x=Number.NaN,i.y=Number.NaN,i;o=(-r-Math.sqrt(a))/(2*s),t=this.radius_g+o*t,e*=o,n*=o,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t)}return i.x=i.x+this.long0,i}var KS=["Geostationary Satellite View","Geostationary_Satellite","geos"];const ZS={init:HS,forward:YS,inverse:qS,names:KS};var Hr=1.340264,Yr=-.081106,qr=893e-6,Kr=.003796,hl=Math.sqrt(3)/2;function JS(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function QS(i){var t=B(i.x-this.long0),e=i.y,n=Math.asin(hl*Math.sin(e)),s=n*n,r=s*s*s;return i.x=t*Math.cos(n)/(hl*(Hr+3*Yr*s+r*(7*qr+9*Kr*s))),i.y=n*(Hr+Yr*s+r*(qr+Kr*s)),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function tI(i){i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a;var t=1e-9,e=12,n=i.y,s,r,a,o,l,h;for(h=0;h=F?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=oI,this.forward=aI)}function sI(i){var t=B(i.x-(this.long0||0)),e=i.y,n,s,r;return n=this.am1+this.m1-yr(e,s=Math.sin(e),r=Math.cos(e),this.en),s=r*t/(n*Math.sqrt(1-this.es*s*s)),i.x=n*Math.sin(s),i.y=this.am1-n*Math.cos(s),i.x=this.a*i.x+(this.x0||0),i.y=this.a*i.y+(this.y0||0),i}function rI(i){i.x=(i.x-(this.x0||0))/this.a,i.y=(i.y-(this.y0||0))/this.a;var t,e,n,s;if(e=ye(i.x,i.y=this.am1-i.y),s=ad(this.am1+this.m1-e,this.es,this.en),(t=Math.abs(s))fa?(i.x=s*Math.sin(n=t*Math.cos(e)/s),i.y=this.cphi1-s*Math.cos(n)):i.x=i.y=0,i.x=this.a*i.x+(this.x0||0),i.y=this.a*i.y+(this.y0||0),i}function oI(i){i.x=(i.x-(this.x0||0))/this.a,i.y=(i.y-(this.y0||0))/this.a;var t,e,n=ye(i.x,i.y=this.cphi1-i.y);if(e=this.cphi1+this.phi1-n,Math.abs(e)>F)throw new Error;return Math.abs(Math.abs(e)-F)<=fa?t=0:t=n*Math.atan2(i.x,i.y)/Math.cos(e),i.x=B(t+(this.long0||0)),i.y=Cn(e),i}var lI=["bonne","Bonne (Werner lat_1=90)"];const hI={init:nI,names:lI};function cI(i){i.Proj.projections.add(Lo),i.Proj.projections.add(Ao),i.Proj.projections.add(sC),i.Proj.projections.add(gC),i.Proj.projections.add(xC),i.Proj.projections.add(CC),i.Proj.projections.add(LC),i.Proj.projections.add(FC),i.Proj.projections.add(jC),i.Proj.projections.add(XC),i.Proj.projections.add(h2),i.Proj.projections.add(m2),i.Proj.projections.add(x2),i.Proj.projections.add(S2),i.Proj.projections.add(L2),i.Proj.projections.add(F2),i.Proj.projections.add(j2),i.Proj.projections.add(X2),i.Proj.projections.add(J2),i.Proj.projections.add(nS),i.Proj.projections.add(lS),i.Proj.projections.add(fS),i.Proj.projections.add(vS),i.Proj.projections.add(ES),i.Proj.projections.add(RS),i.Proj.projections.add(FS),i.Proj.projections.add(jS),i.Proj.projections.add(XS),i.Proj.projections.add(ZS),i.Proj.projections.add(iI),i.Proj.projections.add(hI)}Se.defaultDatum="WGS84";Se.Proj=Ii;Se.WGS84=new Se.Proj("WGS84");Se.Point=cr;Se.toPoint=hp;Se.defs=oe;Se.nadgrid=aw;Se.transform=al;Se.mgrs=bw;Se.version="__VERSION__";cI(Se);function uI(i){for(const[t,e]of Object.entries(i))Se.defs(t,e);xE(Se)}function eh(i){return{definition:`--${i}`,ref:`var(--${i})`}}const jc=eh("map-padding-left"),Bc=eh("map-padding-right"),Uc=eh("map-padding-top"),Wc=eh("map-padding-bottom");function dI(i,t,e){const n={position:"absolute",zIndex:1,transitionProperty:"left, right, top, bottom",transitionDuration:"200ms",transitionTimingFunction:"ease-out",overflow:"hidden"},r=t??0,o=e??0,l=pI(e),h=(u,d)=>`(${u} + ${d}px)`,c={};switch(i){case"top-left":c.left=h(jc.ref,r),c.top=h(Uc.ref,o);break;case"top-right":c.right=h(Bc.ref,r),c.top=h(Uc.ref,o);break;case"bottom-left":c.left=h(jc.ref,r),c.bottom=h(Wc.ref,o+l.gap);break;case"bottom-right":c.right=h(Bc.ref,r),c.bottom=h(Wc.ref,o+l.gap);break}for(const[u,d]of Object.entries(c))n[u]=`calc(${d})`;return n.maxH=`calc((100%) - ${po(c.top,"0px")} - ${po(c.bottom,l.gap+"px")} - ${o}px - ${l.space}px)`,n.maxW=`calc((100%) - ${po(c.left,"0px")} - ${po(c.right,"0px")} - ${r}px)`,n}function po(i,t){return i??t}const cd=b.createContext(void 0);cd.displayName="MapContainerContext";const fI=cd.Provider;function gI(){const i=b.useContext(cd);if(!i)throw new Error("Map container context is not available. The component must be a child of the component.");return i}const mI="top-right";function Gh(i){const{position:t=mI,children:e,horizontalGap:n,verticalGap:s}=i,{containerProps:r}=De("map-anchor",i),{mapAnchorsHost:a}=gI();return Zg.createPortal(R.jsx(Mt,{...r,...dI(t,n,s),children:e}),a)}function pI(i){return{gap:i===void 0?30:0,space:10}}const _I="@open-pioneer/map",vI=iu.bind(void 0,_I);function yI(){var i=b.useRef(!1),t=b.useCallback(function(){return i.current},[]);return b.useEffect(function(){return i.current=!0,function(){i.current=!1}},[]),t}function xI(i,t,e){t===void 0&&(t=[]),e===void 0&&(e={loading:!1});var n=b.useRef(0),s=yI(),r=b.useState(e),a=r[0],o=r[1],l=b.useCallback(function(){for(var h=[],c=0;ct.isBaseLayer)}getActiveBaseLayer(){return C(this,Qe).value}activateBaseLayer(t){let e;if(t!=null){if(e=C(this,je).get(t),!(e instanceof Wo))return en.warn(`Cannot activate base layer '${t}: layer has an invalid type.'`),!1;if(!e)return en.warn(`Cannot activate base layer '${t}': layer is unknown.`),!1;if(!e.isBaseLayer)return en.warn(`Cannot activate base layer '${t}': layer is not a base layer.`),!1}return lt(this,be,Oo).call(this,e),!0}getOperationalLayers(t){return this.getAllLayers(t).filter(e=>!e.isBaseLayer)}getAllLayers(t){const e=Array.from(C(this,an).values());return t?.sortByDisplayOrder&&SI(e),e}getLayerById(t){return C(this,je).get(t)}removeLayerById(t){const e=C(this,je).get(t);if(!e){en.isDebug()&&en.debug(`Cannot remove layer '${t}': layer is unknown.`);return}lt(this,be,Ep).call(this,e)}getLayerByRawInstance(t){return C(this,on)?.get(t)}}zn=new WeakMap,an=new WeakMap,je=new WeakMap,on=new WeakMap,Qe=new WeakMap,xl=new WeakMap,be=new WeakSet,bp=function(t){lt(this,be,wp).call(this,t);const e=t.olLayer;t.isBaseLayer?(e.setZIndex(EI),!C(this,Qe).value&&t.visible?lt(this,be,Oo).call(this,t):t.__setVisible(!1)):(e.setZIndex(Rd(this,xl)._++),t.__setVisible(t.visible)),C(this,an).add(t),C(this,zn).olMap.addLayer(e)},Ep=function(t){if(!C(this,an).has(t)){en.warn(`Cannot remove layer '${t.id}': only top level layers can be removed at this time.`);return}if(!(t instanceof Wo))throw new Error("Internal error: expected top level layer to be an instance of AbstractLayer.");if(C(this,zn).olMap.removeLayer(t.olLayer),C(this,an).delete(t),lt(this,be,Cp).call(this,t),C(this,Qe).value===t){const e=this.getBaseLayers()[0];e&&og(e),lt(this,be,Oo).call(this,e)}t.destroy()},Oo=function(t){if(C(this,Qe).value!==t){if(en.isDebug()){const e=n=>n?`'${n.id}'`:void 0;en.debug(`Switching active base layer from ${e(C(this,Qe).value)} to ${e(t)}`)}M0(()=>{C(this,Qe).value?.__setVisible(!1),C(this,Qe).value=t,t?.__setVisible(!0)})}},wp=function(t){const e=[],n=s=>{const r=s.id,a="olLayer"in s?s.olLayer:void 0;if(C(this,je).has(r))throw new Error(`Layer id '${r}' is not unique. Either assign a unique id yourself or skip configuring 'id' for an automatically generated id.`);if(a&&C(this,on).has(a))throw new Error(`OlLayer used by layer '${r}' has already been used in map.`);C(this,je).set(r,s),a&&C(this,on).set(a,s),e.push([r,a]);for(const o of s.layers?.__getRawLayers()??[])n(o);for(const o of s.sublayers?.__getRawSublayers()??[])n(o)};try{n(t)}catch(s){for(const[r,a]of e)C(this,je).delete(r),a&&C(this,on).delete(a);throw s}},Cp=function(t){const e=n=>{"olLayer"in n&&C(this,on).delete(n.olLayer),C(this,je).delete(n.id);for(const s of n.layers?.__getRawLayers()??[])e(s);for(const s of n.sublayers?.__getRawSublayers()??[])e(s)};e(t)};function SI(i){i.sort((t,e)=>{const n=t.olLayer.getZIndex()??1,s=e.olLayer.getZIndex()??1;return n-s})}function og(i){if(!(i instanceof Wo))throw new Error("Layer is not a valid layer instance. Use one of the classes provided by the map package instead.")}const II=17,RI=20,TI={top:50,right:20,bottom:10,left:20};var va,$c;class PI{constructor(t){Y(this,va);Ct(this,"olMap");Ct(this,"olLayer");Ct(this,"olSource");Ct(this,"activeHighlights");this.olMap=t,this.olSource=new Ql({features:void 0}),this.olLayer=new Kl({className:"highlight-layer",source:this.olSource,style:function(e,n){return OI(e,n)}}),this.activeHighlights=new Set,this.olLayer.setZIndex(ud),this.olMap.addLayer(this.olLayer)}getLayer(){return this.olLayer}destroy(){this.clearHighlight()}addHighlight(t,e){const n=lt(this,va,$c).call(this,t);if(n.length===0)return{get isActive(){return!1},destroy(){}};const s=n.map(l=>{const h=l.getType(),c=new ei({type:h,geometry:l});return c.setStyle(DI(h,e?.highlightStyle)),c}),r=this.olSource,a=this.activeHighlights,o={get isActive(){return a.has(o)},destroy(){if(this.isActive){for(const l of s)r.removeFeature(l);a.delete(o)}}};return r.addFeatures(s),this.activeHighlights.add(o),o}zoomToHighlight(t,e){const n=lt(this,va,$c).call(this,t);if(n.length===0)return;let s=Ee();for(const g of n)s=Al(s,g.getExtent());const r=ci(s),o=nr(s)===0?e?.pointZoom??II:e?.maxZoom??RI;LI(this.olMap,r);const{top:l=0,right:h=0,bottom:c=0,left:u=0}=e?.viewPadding??TI,d=[l,h,c,u];AI(this.olMap,s,o,d)}addHighlightAndZoom(t,e){const n=this.addHighlight(t,e);return this.zoomToHighlight(t,e),n}clearHighlight(){for(const t of this.activeHighlights)t.destroy()}}va=new WeakSet,$c=function(t){const e=[];return t.forEach(n=>{"getType"in n&&e.push(n),"geometry"in n&&n.geometry&&e.push(n.geometry)}),e};function LI(i,t){t&&t.length&&i.getView().setCenter(t)}function AI(i,t,e,n){t?i.getView().fit(t,{maxZoom:e,padding:n}):e&&i.getView().setZoom(e)}function OI(i,t){const e=i.get("type");return qu(Xc(e))(i,t)}function DI(i,t){if(t&&i in t){const n=t[i];return n||Xc(i)}else return Xc(i)}function Xc(i){return i in zh?zh[i]:zh.Polygon}const zh={Point:new wt({image:new hr({anchor:[.5,1],src:ag})}),MultiPoint:new wt({image:new hr({anchor:[.5,1],src:ag})}),LineString:[new wt({stroke:new At({color:"#fff",width:5})}),new wt({stroke:new At({color:"#00ffff",width:3})})],MultiLineString:[new wt({stroke:new At({color:"#fff",width:5})}),new wt({stroke:new At({color:"#00ffff",width:3})})],Polygon:[new wt({stroke:new At({color:"#fff",width:5})}),new wt({stroke:new At({color:"#00ffff",width:3}),fill:new Ce({color:"rgba(224,255,255,0.35)"})})],MultiPolygon:[new wt({stroke:new At({color:"#fff",width:5})}),new wt({stroke:new At({color:"#00ffff",width:3}),fill:new Ce({color:"rgba(224,255,255,0.35)"})})]},fs=di("map:MapModel"),lg=25.4/.28,hg=39.37;var ya,Be,Hs,xa,zi,Ma,Ys,ba,ln,hn,Ea,wa,cn,Vi,Ml,Ip;class Sp extends s0{constructor(e){super();Y(this,Ml);Y(this,ya);Y(this,Be);Y(this,Hs);Y(this,xa,new CI(this));Y(this,zi);Y(this,Ma);Y(this,Ys,!1);Y(this,ba);Y(this,ln,ri());Y(this,hn);Y(this,Ea);Y(this,wa,new AbortController);Y(this,cn);Y(this,Vi);rt(this,ya,e.id),rt(this,Be,e.olMap),rt(this,Hs,Ur(()=>C(this,Be).getView(),n=>{const s=C(this,Be).on("change:view",n);return()=>Qt(s)})),C(this,ln).value=e.initialExtent,rt(this,Ma,{httpService:e.httpService}),rt(this,zi,new PI(C(this,Be))),rt(this,cn,"waiting"),lt(this,Ml,Ip).call(this).then(()=>{rt(this,cn,"ready"),C(this,Vi)?.resolve(),rt(this,Vi,void 0)},n=>{Pd(n)||fs.error("Failed to initialize map",n),rt(this,cn,"error"),C(this,Vi)?.reject(new Error("Failed to initialize map.")),rt(this,Vi,void 0)}),rt(this,ba,Ur(()=>C(this,Be).getTargetElement()??void 0,n=>{const s=C(this,Be).on("change:target",n);return()=>Qt(s)})),rt(this,hn,Zr(()=>kI(C(this,Hs).value))),rt(this,Ea,Zr(()=>{const{projection:n,resolution:s,center:r}=this;if(n==null||s==null||r==null)return;const a=rr(n,s,r);return Math.round(a*hg*lg)}))}destroy(){if(!C(this,Ys)){rt(this,Ys,!0);try{this.emit("destroy")}catch(e){fs.warn("Unexpected error from event listener during map model destruction:",e)}C(this,wa).abort(),C(this,Vi)?.reject(new Error("Map model was destroyed.")),C(this,xa).destroy(),C(this,zi).destroy(),C(this,Be).dispose()}}get id(){return C(this,ya)}get olMap(){return C(this,Be)}get olView(){return C(this,Hs).value}get projection(){return C(this,hn).value.projection}get center(){return C(this,hn).value.center.value}get resolution(){return C(this,hn).value.resolution.value}get zoomLevel(){return C(this,hn).value.zoom.value}get scale(){return C(this,Ea).value}get layers(){return C(this,xa)}get container(){return C(this,ba).value}get initialExtent(){return C(this,ln).value}get __sharedDependencies(){return C(this,Ma)}setScale(e){const n=this.olView,s=this.projection,r=this.center;if(!r)return;const a=s.getMetersPerUnit()??1,o=hg*lg*a,l=e/rr(s,o,r);n.setResolution(l)}highlight(e,n){return C(this,zi).addHighlight(e,n)}zoom(e,n){C(this,zi).zoomToHighlight(e,n)}highlightAndZoom(e,n){return C(this,zi).addHighlightAndZoom(e,n??{})}removeHighlights(){C(this,zi).clearHighlight()}whenDisplayed(){return C(this,Ys)?Promise.reject(new Error("Map model was destroyed.")):C(this,cn)==="error"?Promise.reject(new Error("Failed to initialize map.")):C(this,cn)==="ready"?Promise.resolve():(C(this,Vi)??rt(this,Vi,$_())).promise}}ya=new WeakMap,Be=new WeakMap,Hs=new WeakMap,xa=new WeakMap,zi=new WeakMap,Ma=new WeakMap,Ys=new WeakMap,ba=new WeakMap,ln=new WeakMap,hn=new WeakMap,Ea=new WeakMap,wa=new WeakMap,cn=new WeakMap,Vi=new WeakMap,Ml=new WeakSet,Ip=async function(){try{await FI(this.olMap,C(this,wa).signal)}catch(e){throw Pd(e)?e:new Error("Failed to wait for the map to be displayed.",{cause:e})}try{const n=C(this,Be).getView();if(C(this,ln).value){const s=C(this,ln).value,r=[s.xMin,s.yMin,s.xMax,s.yMax],a=ci(r),o=n.getResolutionForExtent(r);fs.debug("Applying initial extent",s),fs.debug(" Computed center:",a),fs.debug(" Computed resolution:",o),n.setCenter(a),n.setResolution(o)}else{const s=n.calculateExtent(),[r=0,a=0,o=0,l=0]=s,h={xMin:r,yMin:a,xMax:o,yMax:l};fs.debug("Detected initial extent",h),C(this,ln).value=h}}catch(e){throw new Error("Failed to apply the initial extent.",{cause:e})}};function kI(i){return{resolution:Ur(()=>i.getResolution(),t=>{const e=i.on("change:resolution",t);return()=>Qt(e)}),center:Ur(()=>i.getCenter(),t=>{const e=i.on("change:center",t);return()=>Qt(e)}),zoom:Ur(()=>i.getZoom(),t=>{const e=i.on("change:resolution",t);return()=>Qt(e)}),projection:i.getProjection()}}function FI(i,t){return new Promise((n,s)=>{let r;function a(){const h=i.getSize()??[],[c=0,u=0]=h;h&&c>0&&u>0&&l()}function o(){l(Ld())}function l(h){r&&(Qt(r),r=void 0),t.removeEventListener("abort",o),h?s(h):n(NI(25))}if(t.aborted){l(Ld());return}t.addEventListener("abort",o),r=i.on("change:size",a)})}function NI(i){return new Promise(t=>setTimeout(t,i))}function gi(i){const t=GI(i),e=vI("map.MapRegistry"),n=MI(async()=>typeof t=="string"?await e.expectMapModel(t):Promise.resolve(t),[e,t]);return b.useMemo(()=>n.loading?{kind:"loading"}:n.error?{kind:"rejected",error:n.error}:{kind:"resolved",map:n.value},[n])}function GI(i){if(typeof i=="object"&&i.mapId!=null&&i.map!=null)throw new Error("Cannot specify both 'mapId' and 'map' in useMapModel at the same time.");if(i instanceof Sp)throw new Error("Map model instances cannot be passed directly to 'useMapModel' (see TypeScript signature).");const t=b.useMemo(()=>i==null?{}:typeof i=="string"?{mapId:i}:{mapId:i.mapId,map:i.map},[...typeof i=="string"||i==null?[i]:[i.mapId,i.map]]),e=bI(),n=cg(t)??cg(e);if(n==null)throw new Error("No map specified. You must either specify the map (or its id) via a DefaultMapProvider parent or configure it explicitly.");return n}function cg(i){return i?.map??i?.mapId}const An=di("map:MapContainer");function zI(i){const{viewPadding:t,viewPaddingChangeBehavior:e,children:n,role:s,"aria-label":r,"aria-labelledby":a}=i,{containerProps:o}=De("map-container",i),l=b.useRef(null),h=b.useRef(null),c=gi(i),u=c.map,[d,g]=b.useState(!1);b.useEffect(()=>{if(c.kind!=="loading"){if(c.kind==="rejected"){An.error("Cannot display the map. Caused by ",c.error);return}if(!u){An.error("No configuration available for the configured map.");return}if(l.current){const m=jI(u,l.current);return()=>m?.destroy()}}},[c,u]),b.useEffect(()=>{g(!0)},[]);const f=b.useMemo(()=>({height:"100%",position:"relative",[Uc.definition]:t?.top!=null?t.top+"px":"0px",[Wc.definition]:t?.bottom!=null?t.bottom+"px":"0px",[jc.definition]:t?.left!=null?t.left+"px":"0px",[Bc.definition]:t?.right!=null?t.right+"px":"0px"}),[t]);return R.jsxs(Oe.div,{...o,role:s,"aria-label":r,"aria-labelledby":a,ref:l,style:f,tabIndex:0,children:[d&&u&&R.jsx(VI,{olMap:u.olMap,mapAnchorsHost:h.current,viewPadding:t,viewPaddingChangeBehavior:e,children:n}),R.jsx(Oe.div,{ref:h,className:"map-anchors"})]})}function VI(i){const{olMap:t,mapAnchorsHost:e,viewPadding:n,viewPaddingChangeBehavior:s="preserve-center",children:r}=i,a=b.useMemo(()=>({left:n?.left??0,right:n?.right??0,top:n?.top??0,bottom:n?.bottom??0}),[n]);b.useEffect(()=>{const l=t?.getView();if(!t||!l)return;const h=l.getCenter(),c=UI(l.padding),u=BI(t,c);switch(l.padding=WI(a),s){case"preserve-center":l.animate({center:h,duration:300});break;case"preserve-extent":{u&&l.animate({center:h,resolution:l.getResolutionForExtent(u),duration:300});break}}},[a,t,s]);const o=b.useMemo(()=>({mapAnchorsHost:e}),[e]);return R.jsx(fI,{value:o,children:r})}function jI(i,t){const e=i.id,n=i.olMap;if(n.getTarget()){An.error("Failed to display the map: the map already has a target. There may be more than one .");return}if(An.isDebug()&&An.debug(`Setting target of map '${e}':`,t),!("keyboardEventTarget_"in n))throw new Error("Internal error: failed to override keyboard event target. The property is no longer present.");n.keyboardEventTarget_=t,n.setTarget(t);let s=!1;return{destroy(){s||(An.isDebug()&&An.debug(`Removing target of map '${e}':`,t),n.keyboardEventTarget_=void 0,n.setTarget(void 0),s=!0)}}}function BI(i,t){const e=i.getSize();if(!e||e.length<2)return;const[n,s]=e,r=i.getCoordinateFromPixel([t.left,t.bottom]),a=i.getCoordinateFromPixel([Math.max(0,n-t.right),Math.max(0,s-t.top)]);if(!r||!a)return;const[o,l]=r,[h,c]=a;return[o,l,h,c]}function UI(i){return{top:i?.[0]??0,right:i?.[1]??0,bottom:i?.[2]??0,left:i?.[3]??0}}function WI(i){const{top:t,right:e,bottom:n,left:s}=i;return[t,e,n,s]}const $I=1.2;function XI(i,t=$I){HI(i);const e=Ft(i),n=ht(i),s=e*t,r=n*t;return[i[0]-(s-e)/2,i[1]-(r-n)/2,i[2]+(s-e)/2,i[3]+(r-n)/2]}function HI(i){if(i.length!==4)throw new Error(`Invalid extent (expected length 4, but got length ${i.length}).`)}class YI extends aM{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:Qx({extent:Xu(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const qI='© OpenStreetMap contributors.';class dd extends YI{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[qI];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",s=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:s,wrapX:t.wrapX,zDirection:t.zDirection})}}const ze="main";class KI{mapId=ze;async getMapConfig(){return{initialView:{kind:"position",center:{x:847541,y:6793584},zoom:14},projection:"EPSG:3857",layers:[new q1({title:"OpenStreetMap",olLayer:new $u({source:new dd,properties:{title:"OSM"}}),isBaseLayer:!0})]}}}const _o={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class vo extends fi{constructor(t,e){super(t),this.feature=e}}function ZI(i,t){const e=[];for(let n=0;n=e?i[t-e]:i[t]}function xo(i,t,e){let n,s;ta){const l=Ps(i,n),h=Ps(i,s);return yo(l,h)}let o=0;if(nd.startIndex?md.startIndex&&(m-=g.length)),l=m,o=u)}const h=t.targets[o];let c=h.ring;if(t.targetIndex===o&&c){const u=Ps(h.coordinates,l),d=e.getPixelFromCoordinate(u);O0(d,t.startPx)>n&&(c=!1)}if(c){const u=h.coordinates,d=u.length,g=h.startIndex,f=l;if(g=e?n-=e:n<0&&(n+=e);let r=n+1;r>=e&&(r-=e);const a=i[n],o=a[0],l=a[1],h=i[r],c=h[0]-o,u=h[1]-l;return[o+c*s,l+u*s]}class QI extends vr{constructor(t){const e=t;e.stopDown||(e.stopDown=fr),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=eR(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:Zs,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let n=t.geometryFunction;if(!n){const s=this.mode_;if(s==="Circle")n=(r,a,o)=>{const l=a||new Zl([NaN,NaN]),h=Ze(r[0]),c=A0(h,Ze(r[r.length-1]));return l.setCenterAndRadius(h,Math.sqrt(c),this.geometryLayout_),l};else{let r;s==="Point"?r=Wn:s==="LineString"?r=He:s==="Polygon"&&(r=we),n=(a,o,l)=>(o?s==="Polygon"?a[0].length?o.setCoordinates([a[0].concat([a[0][0]])],this.geometryLayout_):o.setCoordinates([],this.geometryLayout_):o.setCoordinates(a,this.geometryLayout_):o=new r(a,this.geometryLayout_),o)}}this.geometryFunction_=n,this.dragVertexDelay_=t.dragVertexDelay!==void 0?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new Kl({source:new Ql({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:tR(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:ed,this.freehandCondition_,t.freehand?this.freehandCondition_=Fc:this.freehandCondition_=t.freehandCondition?t.freehandCondition:Hm,this.traceCondition_,this.setTrace(t.trace||!1),this.traceState_={active:!1},this.traceSource_=t.traceSource||t.source||null,this.addChangeListener(Dc.ACTIVE,this.updateState_)}setTrace(t){let e;t?t===!0?e=Fc:e=t:e=oE,this.traceCondition_=e}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===it.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(t);let e=t.type===_t.POINTERMOVE,n=!0;return!this.freehand_&&this.lastDragTime_&&t.type===_t.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===_t.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),n=!1):this.freehand_&&t.type===_t.POINTERDOWN?n=!1:e&&this.getPointerCount()<2?(n=t.type===_t.POINTERMOVE,n&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===_t.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===_t.DBLCLICK&&(n=!1),super.handleEvent(t)&&n}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(()=>{this.handlePointerMove_(new Ni(_t.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))},this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(t){if(!this.traceSource_||!this.traceCondition_(t))return;if(this.traceState_.active){this.deactivateTrace_();return}const e=this.getMap(),n=e.getCoordinateFromPixel([t.pixel[0]-this.snapTolerance_,t.pixel[1]+this.snapTolerance_]),s=e.getCoordinateFromPixel([t.pixel[0]+this.snapTolerance_,t.pixel[1]-this.snapTolerance_]),r=uc([n,s]),a=this.traceSource_.getFeaturesInExtent(r);if(a.length===0)return;const o=ZI(t.coordinate,a);o.length&&(this.traceState_={active:!0,startPx:t.pixel.slice(),targets:o,targetIndex:-1})}addOrRemoveTracedCoordinates_(t,e){const n=t.startIndex<=t.endIndex,s=t.startIndex<=e;n===s?n&&e>t.endIndex||!n&&et.endIndex)&&this.removeTracedCoordinates_(e,t.endIndex):(this.removeTracedCoordinates_(t.startIndex,t.endIndex),this.addTracedCoordinates_(t,t.startIndex,e))}removeTracedCoordinates_(t,e){if(t===e)return;let n=0;if(t0&&this.removeLastPoints_(n)}addTracedCoordinates_(t,e,n){if(e===n)return;const s=[];if(e=a;--o)s.push(Ts(t.coordinates,o))}s.length&&this.appendCoordinates(s)}updateTrace_(t){const e=this.traceState_;if(!e.active||e.targetIndex===-1&&O0(e.startPx,t.pixel)this.squaredClickTolerance_:a<=this.squaredClickTolerance_,!this.shouldHandle_)return}if(!this.finishCoordinate_){this.createOrUpdateSketchPoint_(t.coordinate.slice());return}this.updateTrace_(t),this.modifyDrawing_(t.coordinate)}atFinish_(t,e){let n=!1;if(this.sketchFeature_){let s=!1,r=[this.finishCoordinate_];const a=this.mode_;if(a==="Point")n=!0;else if(a==="Circle")n=this.sketchCoords_.length===2;else if(a==="LineString")s=!e&&this.sketchCoords_.length>this.minPoints_;else if(a==="Polygon"){const o=this.sketchCoords_;s=o[0].length>this.minPoints_,r=[o[0][0],o[0][o[0].length-2]],e?r=[o[0][0]]:r=[o[0][0],o[0][o[0].length-2]]}if(s){const o=this.getMap();for(let l=0,h=r.length;l=this.maxPoints_&&(this.freehand_?r.pop():s=!0),r.push(t.slice()),this.geometryFunction_(r,e,n)):a==="Polygon"&&(r=this.sketchCoords_[0],r.length>=this.maxPoints_&&(this.freehand_?r.pop():s=!0),r.push(t.slice()),s&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,e,n)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),s?this.finishDrawing():this.sketchFeature_}removeLastPoints_(t){if(!this.sketchFeature_)return;const e=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection(),s=this.mode_;for(let r=0;r=2){this.finishCoordinate_=a[a.length-2].slice();const o=this.finishCoordinate_.slice();a[a.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(a,e,n),e.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if(s==="Polygon"){a=this.sketchCoords_[0],a.splice(-2,1);const o=this.sketchLine_.getGeometry();if(a.length>=2){const l=a[a.length-2].slice();a[a.length-1]=l,this.createOrUpdateSketchPoint_(l)}o.setCoordinates(a),this.geometryFunction_(this.sketchCoords_,e,n)}if(a.length===1){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const t=this.abortDrawing_();if(!t)return null;let e=this.sketchCoords_;const n=t.getGeometry(),s=this.getMap().getView().getProjection();return this.mode_==="LineString"?(e.pop(),this.geometryFunction_(e,n,s)):this.mode_==="Polygon"&&(e[0].pop(),this.geometryFunction_(e,n,s),e=n.getCoordinates()),this.type_==="MultiPoint"?t.setGeometry(new Jl([e])):this.type_==="MultiLineString"?t.setGeometry(new la([e])):this.type_==="MultiPolygon"&&t.setGeometry(new ha([e])),this.dispatchEvent(new vo(_o.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t),t}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new vo(_o.DRAWABORT,t))}appendCoordinates(t){const e=this.mode_,n=!this.sketchFeature_;n&&this.startDrawing_(t[0]);let s;if(e==="LineString"||e==="Circle")s=this.sketchCoords_;else if(e==="Polygon")s=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;n&&s.shift(),s.pop();for(let a=0;a{const g=d.originalEvent;return(g.metaKey||g.ctrlKey)&&g.shiftKey};r.interactions=Km({dragPan:!0,altShiftDragRotate:!1,pinchRotate:!1,mouseWheelZoom:!0}).extend([new qm({out:!0,condition:u})])}const a=await n??{};this.initializeViewOptions(a),r.view=a instanceof _e?a:new _e(a),!r.layers&&!e.layers&&(r.layers=[new $u({source:new dd})]);const o=e.initialView,l=o?.kind==="extent"?o.extent:void 0;Bh.debug("Constructing OpenLayers map with options",r);const h=new Qm(r),c=new Sp({id:t,olMap:h,initialExtent:l,httpService:this.httpService});try{if(e.layers)for(const u of e.layers)c.layers.addLayer(u);return c}catch(u){throw c.destroy(),u}}initializeViewOptions(t){const e=this.mapId,n=this.mapConfig;if(t instanceof _e){const a=o=>{Bh.warn(`The advanced configuration for map id '${e}' has provided a fully constructed view instance: ${o} cannot be applied. +Use ViewOptions instead of a View instance.`)};n.projection!=null&&a("projection"),n.initialView!=null&&a("initialView");return}const s=t.projection=this.initializeProjection(n.projection),r=n.initialView;if(r)switch(r.kind){case"position":t.zoom=r.zoom,t.center=[r.center.x,r.center.y];break;case"extent":{const a=r.extent;t.zoom=0,t.center=[a.xMin+(a.xMax-a.xMin)/2,a.yMin+(a.yMax-a.yMin)/2];break}}else this.setViewDefaults(t,s)}setViewDefaults(t,e){if(t.center==null){const n=e.getExtent();n?t.center=ci(n):Bh.warn(`Cannot set default center coordinate because the current projection has no associated extent. +Try to configure 'initialView' explicity.`)}(t.zoom==null||t.resolution==null)&&(t.zoom=0)}initializeProjection(t){if(t==null)return Gt("EPSG:3857");const e=Gt(t);if(!e)throw new Error(`Failed to retrieve projection for code '${t}'.`);return e}}const Uh=di("map:MapRegistry");var Ca,Sa,un,dn,Ia,Vn,bl,Pp;class sR{constructor({references:t}){Y(this,bl);Y(this,Ca);Y(this,Sa,new Map);Y(this,un,new Map);Y(this,dn,new Map);Y(this,Ia,new WeakMap);Y(this,Vn,!1);rt(this,Ca,t.httpService);const e=t.providers;for(const n of e)C(this,Sa).set(n.mapId,n)}destroy(){C(this,Vn)||(Uh.info("Destroy map registry and all maps"),rt(this,Vn,!0),C(this,un).forEach(t=>{t.kind==="model"&&t.model.destroy()}),C(this,un).clear(),C(this,dn).clear())}async getMapModel(t){if(C(this,Vn))throw new Error("MapRegistry has already been destroyed.");const e=C(this,dn).get(t);if(e)return Wh(await e);const n=C(this,un).get(t);if(n)return Wh(n);const s=C(this,Sa).get(t);if(!s){Uh.debug(`Failed to find a config provider for map id '${t}'.`);return}const r=lt(this,bl,Pp).call(this,t,s).catch(a=>{const l={kind:"error",error:new Error(`Failed to construct map '${t}'`,{cause:a})};return C(this,dn).delete(t),C(this,un).set(t,l),l});return C(this,dn).set(t,r),Wh(await r)}async expectMapModel(t){const e=await this.getMapModel(t);if(!e)throw new Error(`No configuration available for map with id '${t}'.`);return e}getMapModelByRawInstance(t){return C(this,Ia).get(t)}}Ca=new WeakMap,Sa=new WeakMap,un=new WeakMap,dn=new WeakMap,Ia=new WeakMap,Vn=new WeakMap,bl=new WeakSet,Pp=async function(t,e){Uh.info(`Creating map with id '${t}'`);const n=await e.getMapConfig(),s=await iR(t,n,C(this,Ca));if(C(this,Vn))throw s.destroy(),new Error("MapRegistry has been destroyed.");const r={kind:"model",model:s};return C(this,un).set(t,r),C(this,dn).delete(t),C(this,Ia).set(s.olMap,s),r};function Wh(i){if(i.kind==="error")throw i.error;return i.model}const $h=di("notifier:NotificationService");var Ei,qs,Ra,si,Vr,Hc,aR;class rR{constructor(){Y(this,si);Y(this,Ei);Y(this,qs);Y(this,Ra)}destroy(){clearTimeout(C(this,Ra)),rt(this,Ra,void 0)}notify(t){lt(this,si,Hc).call(this,"showNotification",{title:t.title??void 0,message:t.message??void 0,level:t.level??"info",displayDuration:t.displayDuration})}success(t){lt(this,si,Vr).call(this,"success",t)}info(t){lt(this,si,Vr).call(this,"info",t)}warning(t){lt(this,si,Vr).call(this,"warning",t)}error(t){lt(this,si,Vr).call(this,"error",t)}closeAll(){lt(this,si,Hc).call(this,"closeAll")}registerHandler(t){if(C(this,Ei))return $h.warn(`A notification handler has already been registered; this new handler will be ignored. +The component has likely been used twice in your application.`),{destroy(){}};rt(this,Ei,t);const e=C(this,qs);if(rt(this,qs,void 0),e)for(const[s,...r]of e)t[s](...r);let n=!1;return{destroy:()=>{n||(n=!0,C(this,Ei)===t&&rt(this,Ei,void 0))}}}}Ei=new WeakMap,qs=new WeakMap,Ra=new WeakMap,si=new WeakSet,Vr=function(t,e){typeof e=="string"&&(e={message:e}),this.notify({...e,level:t})},Hc=function(t,...e){if(C(this,Ei))C(this,Ei)[t](...e);else{const n=C(this,qs)??rt(this,qs,[]);if(n.length>=1024){$h.error(`Internal notification buffer overflow: this event will be dropped to prevent a memory leak. +Make sure that the UI is configured to display notifications (use ).`,{method:t,args:e});return}n.push([t,...e])}},aR=function(){C(this,Ei)||$h.warn(`No notification handler has been registered: notifications will not be visible. +Make sure that your app contains the component.`)};var Ta,El,Lp;class oR{constructor(t){Y(this,El);Y(this,Ta);rt(this,Ta,t.references.interceptors.map((e,n)=>[t.referencesMeta.interceptors[n].serviceId,e]))}async fetch(t,e){const n=e?.signal??void 0,s=Object.assign({},e?.context),r=hR(e);Xh(n);let a=lR(t);{const l={target:a,signal:n??new AbortController().signal,context:s,options:r};Xh(n),await lt(this,El,Lp).call(this,l),a=l.target}const o=new Request(a,{...r,signal:n});return await window.fetch(o)}}Ta=new WeakMap,El=new WeakSet,Lp=async function(t){const{signal:e}=t;for(const[n,s]of C(this,Ta))if(Xh(e),s.beforeRequest)try{await s.beforeRequest(t)}catch(r){throw X_(r),new Error(`Interceptor '${n}' failed with an error`,{cause:r})}};function lR(i){return typeof i=="string"?new URL(i,window.location.href):i}function hR(i){const t=i?.method??"GET",e=new Headers(i?.headers??{}),n={...i,method:t,headers:e};for(const s in n)cR[s]&&delete n[s];return n}const cR={context:1,signal:1};function Xh(i){i?.aborted&&H_()}const uR={"ol-app":{name:"ol-app",services:{MainMapProvider:{name:"MainMapProvider",clazz:KI,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:sR,provides:[{name:"map.MapRegistry",qualifier:"map.MapRegistry"}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:rR,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/overview-map":{name:"@open-pioneer/overview-map",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-bar":{name:"@open-pioneer/scale-bar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-viewer":{name:"@open-pioneer/scale-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/geolocation":{name:"@open-pioneer/geolocation",services:{},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:oR,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}}},dR='.sidebar{height:100%;position:absolute;top:0;background-color:#ffffffb3;transition:width .3s ease-out 0s}.right-bottom{position:absolute;right:0;bottom:0;background:#fff}.zoom-controls{position:absolute;z-index:1000;bottom:2rem;right:1rem}.ol-control.ol-zoom{left:unset;right:.5em}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.ol-overviewmap .ol-viewport:hover{cursor:pointer}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.overview-map .ol-overviewmap{position:relative;height:100%;width:100%}.overview-map .ol-overviewmap:not(.ol-collapsed){border:1px solid black}.overview-map .ol-overviewmap .ol-overviewmap-map{border:none;width:100%;height:100%}.overview-map .ol-overviewmap .ol-overviewmap-box{border:2px solid red}.scale-bar .ol-scale-bar{margin-bottom:8px;margin-right:8px}.scale-bar .ol-scale-bar,.scale-bar .ol-scale-line{position:relative;bottom:0;left:0;background:none}.scale-bar .ol-scale-bar .ol-scale-bar-inner,.scale-bar .ol-scale-bar .ol-scale-line-inner,.scale-bar .ol-scale-line .ol-scale-bar-inner,.scale-bar .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)}.measurement-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.measurement-active-tooltip{background:#000000e6;border-radius:4px;border-color:#000000e6;opacity:.9;color:#fff}.measurement-finished-tooltip{background-color:#4cb3ffe6;color:#000;border:1px solid white}.measurement-active-tooltip:before,.measurement-finished-tooltip:before{border-top:6px solid rgba(0,0,0,.9);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measurement-finished-tooltip:before{border-top-color:#4cb3ff}',fR=["en","de"];function gR(i){switch(i){case"en":return Ad(()=>import("./CGbLuQbJLnhG.js"),[],import.meta.url).then(t=>t.default);case"de":return Ad(()=>import("./BMJspEKb-95r.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${i}'`)}const mR=Y_(dR),pR=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:gR,locales:fR,packages:uR,styles:mR},Symbol.toStringTag,{value:"Module"})),Hh=.75,bo=.1;let _R=class extends Va{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=t.collapsed!==void 0?t.collapsed:!0,this.collapsible_=t.collapsible!==void 0?t.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=t.rotateWithView!==void 0?t.rotateWithView:!1,this.viewExtent_=void 0;const e=t.className!==void 0?t.className:"ol-overviewmap",n=t.tipLabel!==void 0?t.tipLabel:"Overview map",s=t.collapseLabel!==void 0?t.collapseLabel:"‹";typeof s=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s):this.collapseLabel_=s;const r=t.label!==void 0?t.label:"›";typeof r=="string"?(this.label_=document.createElement("span"),this.label_.textContent=r):this.label_=r;const a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,o=document.createElement("button");o.setAttribute("type","button"),o.title=n,o.appendChild(a),o.addEventListener(it.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=t.view;const l=new Qm({view:t.view,controls:new We,interactions:new We});this.ovmap_=l,t.layers&&t.layers.forEach(function(v){l.addLayer(v)});const h=document.createElement("div");h.className="ol-overviewmap-box",h.style.boxSizing="border-box",this.boxOverlay_=new id({position:[0,0],positioning:"center-center",element:h}),this.ovmap_.addOverlay(this.boxOverlay_);const c=e+" "+pr+" "+Xl+(this.collapsed_&&this.collapsible_?" "+Ko:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=c,u.appendChild(this.ovmapDiv_),u.appendChild(o);const d=this,g=this.boxOverlay_,f=this.boxOverlay_.getElement(),m=function(v){return{clientX:v.clientX,clientY:v.clientY}},p=function(v){const x=m(v),y=l.getEventCoordinate(x);g.setPosition(y)},_=function(v){const x=l.getEventCoordinateInternal(v);d.getMap().getView().setCenterInternal(x),window.removeEventListener("pointermove",p),window.removeEventListener("pointerup",_)};this.ovmapDiv_.addEventListener("pointerdown",function(){event.target===f&&window.addEventListener("pointermove",p),window.addEventListener("pointerup",_)})}setMap(t){const e=this.getMap();if(t!==e){if(e){const n=e.getView();n&&this.unbindView_(n),this.ovmap_.setTarget(null)}if(super.setMap(t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(ct(t,Xn.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const n=t.getView();n&&this.bindView_(n),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(t){if(t.key===Vt.VIEW){const e=t.oldValue;e&&this.unbindView_(e);const n=this.getMap().getView();this.bindView_(n)}else!this.ovmap_.isRendered()&&(t.key===Vt.TARGET||t.key===Vt.SIZE)&&this.ovmap_.updateSize()}bindView_(t){if(!this.view_){const e=new _e({projection:t.getProjection()});this.ovmap_.setView(e)}t.addChangeListener(Le.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_(),t.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())}unbindView_(t){t.removeChangeListener(Le.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const n=t.getSize(),r=t.getView().calculateExtentInternal(n);if(this.viewExtent_&&ir(r,this.viewExtent_))return;this.viewExtent_=r;const a=e.getSize(),l=e.getView().calculateExtentInternal(a),h=e.getPixelFromCoordinateInternal(Ti(r)),c=e.getPixelFromCoordinateInternal(Na(r)),u=Math.abs(h[0]-c[0]),d=Math.abs(h[1]-c[1]),g=a[0],f=a[1];ug*Hh||d>f*Hh?this.resetExtent_():fn(l,r)||this.recenter_()}resetExtent_(){const t=this.getMap(),e=this.ovmap_,n=t.getSize(),r=t.getView().calculateExtentInternal(n),a=e.getView(),o=Math.log(Hh/bo)/Math.LN2,l=1/(Math.pow(2,o/2)*bo);Dy(r,l),a.fitInternal(Mc(r))}recenter_(){const t=this.getMap(),e=this.ovmap_,n=t.getView();e.getView().setCenterInternal(n.getCenterInternal())}updateBox_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const n=t.getSize(),s=t.getView(),r=e.getView(),a=this.rotateWithView_?0:-s.getRotation(),o=this.boxOverlay_,l=this.boxOverlay_.getElement(),h=s.getCenter(),c=s.getResolution(),u=r.getResolution(),d=n[0]*c/u,g=n[1]*c/u;if(o.setPosition(h),l){l.style.width=d+"px",l.style.height=g+"px";const f="rotate("+a+"rad)";l.style.transform=f}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=Jr(this.ovmap_,Mi.POSTRENDER,t=>{delete this.ovmapPostrenderKey_,this.updateBox_()}))}handleClick_(t){t.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(Ko),this.collapsed_?Xo(this.collapseLabel_,this.label_):Xo(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const t=this.ovmap_;if(!this.collapsed_){if(t.isRendered()){this.viewExtent_=void 0,t.render();return}t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())}setCollapsed(t){!this.collapsible_||this.collapsed_===t||this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,this.getMap().getView().getRotation()!==0&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(t){this.validateExtent_(),this.updateBox_()}};const Yh="units",vR=[1,2,5],Tr=25.4/.28;class yR extends Va{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const n=t.className!==void 0?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=n+"-inner",this.element.className=n+" "+pr,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=t.minWidth!==void 0?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(Yh,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(Yh)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(Yh,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=t.center,n=t.projection,s=this.getUnits(),r=s=="degrees"?"degrees":"m";let a=rr(n,t.resolution,e,r);const o=this.minWidth_*(this.dpi_||Tr)/Tr,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||Tr)/Tr:void 0;let h=o*a,c="";if(s=="degrees"){const x=tr.degrees;h*=x,h=l){d=m,g=p,f=_;break}else if(g>=o)break;m=d,p=g,_=f,++u}const v=this.scaleBar_?this.createScaleBar(g,d,c):d.toFixed(f<0?-f:0)+" "+c;this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=g&&(this.innerElement_.style.width=g+"px",this.renderedWidth_=g),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,n){const s=this.getScaleForResolution(),r=s<1?Math.round(1/s).toLocaleString()+" : 1":"1 : "+Math.round(s).toLocaleString(),a=this.scaleBarSteps_,o=t/a,l=[this.createMarker("absolute")];for(let c=0;c
`+this.createMarker("relative")+(c%2===0||a===2?this.createStepText(c,t,!1,e,n):"")+"")}return l.push(this.createStepText(a,t,!0,e,n)),(this.scaleBarText_?`
`+r+"
":"")+l.join("")}createMarker(t){return`
`}createStepText(t,e,n,s,r){const o=(t===0?0:Math.round(s/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+r),l=t===0?-3:e/this.scaleBarSteps_*-1,h=t===0?0:e/this.scaleBarSteps_*2;return`
`+o+"
"}getScaleForResolution(){const t=rr(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||Tr,n=1e3/25.4;return t*n*e}render(t){const e=t.frameState;e?this.viewState_=e.viewState:this.viewState_=null,this.updateElement_()}}const xR=i=>{const{displayMode:t="line"}=i,{containerProps:e}=De("scale-bar",i),{map:n}=gi(i),s=b.useRef(null);return b.useEffect(()=>{if(s.current&&n){const r=n.olMap,a=new yR({units:"metric",target:s.current,bar:t==="bar"});return r.addControl(a),()=>{r.removeControl(a)}}},[t,n]),R.jsx(Mt,{...e,ref:s})},Ha=b.forwardRef(function(t,e){const{label:n,icon:s,onClick:r,isLoading:a,isDisabled:o,isActive:l,tooltipProps:h,buttonProps:c}=t,{containerProps:{className:u,...d}}=De("tool-button",t),g=nu(u,{"tool-button--active":l,"tool-button--loading":a,"tool-button--disabled":o}),f=typeof l=="boolean"?l?"true":"false":void 0,[m,p]=b.useState(!1),_=v=>{p(!1),r?.(v)};return R.jsx(Jg,{label:n,placement:"auto",openDelay:500,...h,isOpen:m,onOpen:()=>p(!0),onClose:()=>p(!1),children:R.jsx(MR,{className:g,ref:e,"aria-label":n,leftIcon:s,iconSpacing:0,padding:0,isDisabled:o,isLoading:a,isActive:l,"aria-pressed":f,...d,...c,onClick:_})})}),MR=b.forwardRef(function(t,e){const{"aria-labelledby":n,"aria-describedby":s,...r}=t;return R.jsx(i0,{ref:e,...r})}),bR="@open-pioneer/map-navigation",fd=Jn.bind(void 0,bR);var Ap={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ug=Un.createContext&&Un.createContext(Ap),ER=["attr","size","title"];function wR(i,t){if(i==null)return{};var e=CR(i,t),n,s;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(e[n]=i[n])}return e}function CR(i,t){if(i==null)return{};var e={};for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){if(t.indexOf(n)>=0)continue;e[n]=i[n]}return e}function cl(){return cl=Object.assign?Object.assign.bind():function(i){for(var t=1;tUn.createElement(t.tag,ul({key:e},t.attr),Op(t.child)))}function Sn(i){return t=>Un.createElement(TR,cl({attr:ul({},i.attr)},t),Op(i.child))}function TR(i){var t=e=>{var{attr:n,size:s,title:r}=i,a=wR(i,ER),o=s||e.size||"1em",l;return e.className&&(l=e.className),i.className&&(l=(l?l+" ":"")+i.className),Un.createElement("svg",cl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,n,a,{className:l,style:ul(ul({color:i.color||e.color},e.style),i.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),r&&Un.createElement("title",null,r),i.children)};return ug!==void 0?Un.createElement(ug.Consumer,null,e=>t(e)):t(Ap)}function PR(i){return Sn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"},child:[]},{tag:"line",attr:{x1:"12",y1:"9",x2:"12",y2:"13"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(i)}function LR(i){return Sn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 14 4 9 9 4"},child:[]},{tag:"path",attr:{d:"M20 20v-7a4 4 0 0 0-4-4H4"},child:[]}]})(i)}function AR(i){return Sn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 14 20 9 15 4"},child:[]},{tag:"path",attr:{d:"M4 20v-7a4 4 0 0 1 4-4h12"},child:[]}]})(i)}function OR(i){return Sn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},child:[]},{tag:"polyline",attr:{points:"9 22 9 12 15 12 15 22"},child:[]}]})(i)}function DR(i){return Sn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(i)}function kR(i){return Sn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(i)}const FR=b.forwardRef(function(t,e){const{containerProps:n}=De("initial-extent",t),{map:s}=gi(t),r=fd();function a(){const o=s?.initialExtent;if(o){const l=[o.xMin,o.yMin,o.xMax,o.yMax];s.olView.fit(l,{duration:200})}}return R.jsx(Ha,{ref:e,label:r.formatMessage({id:"initial-extent.title"}),icon:R.jsx(OR,{}),onClick:a,...n})}),NR=b.forwardRef(function(t,e){return R.jsx(Dp,{zoomDirection:"in",ref:e,...t})}),GR=b.forwardRef(function(t,e){return R.jsx(Dp,{zoomDirection:"out",ref:e,...t})}),Dp=b.forwardRef(function(t,e){const{zoomDirection:n}=t,{map:s}=gi(t),r=fd(),[a,o]=b.useState(!1),{defaultClassName:l,buttonLabel:h,buttonIcon:c}=zR(r,n),{containerProps:u}=De(nu("zoom",l),t);function d(){if(a)return;o(!0);const g=s?.olView;let f=s?.zoomLevel;const m=g?.getMaxZoom()||Number.MAX_SAFE_INTEGER,p=g?.getMinZoom()||0;g&&f!==void 0&&(n==="in"&&fp&&--f,g.animate({zoom:f,duration:200},()=>o(!1)))}return R.jsx(Ha,{ref:e,label:h,icon:c,onClick:d,...u})});function zR(i,t){switch(t){case"in":return{defaultClassName:"zoom-in",buttonLabel:i.formatMessage({id:"zoom-in.title"}),buttonIcon:R.jsx(kR,{})};case"out":return{defaultClassName:"zoom-out",buttonLabel:i.formatMessage({id:"zoom-out.title"}),buttonIcon:R.jsx(DR,{})}}}function VR(i,t){const e=b.useRef(i);e.current=i;const n=BR(t);return b.useMemo(()=>Zr(()=>e.current()),[n])}function jR(i){const t=b.useCallback(()=>i.peek(),[i]),e=b.useCallback(s=>{const r=ay(()=>[i.value],s);return()=>r.destroy()},[i]),n=b.useSyncExternalStore(e,t);return b.useDebugValue(n),n}function is(i,t){const e=VR(i,t),n=jR(e);return b.useDebugValue(n),n}function BR(i){const t=b.useRef();return(t.current==null||!UR(t.current,i))&&(t.current=i??[]),t.current}function UR(i,t){return i===t?!0:i.length===(t?.length??0)&&i.every((e,n)=>e===t[n])}const WR=200;var hi,Yc,Do,kp;class $R{constructor(t){Y(this,hi);Ct(this,"olMap");Ct(this,"handle");Ct(this,"_mapViews",cu());Ct(this,"_activeViewId",ri(0));Ct(this,"backward",()=>{if(this.canBackward)lt(this,hi,Do).call(this,this.activeViewId-1),lt(this,hi,Yc).call(this,this.activeViewId);else throw new Error("Backward is not possible at the moment")});Ct(this,"forward",()=>{if(this.canForward)lt(this,hi,Do).call(this,this.activeViewId+1),lt(this,hi,Yc).call(this,this.activeViewId);else throw new Error("Forward is not possible at the moment")});this.olMap=t.olMap,this.handle=lt(this,hi,kp).call(this)}destroy(){this.handle&&Qt(this.handle),this.handle=void 0}get activeViewId(){return this._activeViewId.value}get mapViews(){return this._mapViews}get canBackward(){return this.mapViews.get(this.activeViewId-1)!=null}get canForward(){return this.mapViews.get(this.activeViewId+1)!=null}}hi=new WeakSet,Yc=function(t){const e=this.olMap.getView();this.olMap.setView(new _e({center:this.mapViews.get(t).center,resolution:this.mapViews.get(t).resolution,projection:e.getProjection()}))},Do=function(t){this._activeViewId.value=t},kp=function(){const t=this.olMap.on("moveend",()=>{e()}),e=()=>{const n=this.olMap,s=this.mapViews,r=n.getView(),a=r.getResolution(),o=r.getCenter();if(a!=null&&o!=null&&(o!==s.get(this.activeViewId)?.center||a!==s.get(this.activeViewId)?.resolution)){const l={resolution:a,center:o},h=this.activeViewId+1;for(const c of s.keys())c>h&&s.delete(c);for(const c of s.keys()){if(s.size{if(!i)return;let n=qh.get(i);return n==null?(n={vm:new $R(i),useCount:1},qh.set(i,n)):n.useCount++,e(n.vm),()=>{e(void 0),n.useCount--,n.useCount===0&&(n.vm.destroy(),qh.delete(i))}},[i]),t}b.forwardRef(function(t,e){return R.jsx(Fp,{viewDirection:"forward",ref:e,...t})});b.forwardRef(function(t,e){return R.jsx(Fp,{viewDirection:"backward",ref:e,...t})});const Fp=b.forwardRef(function(t,e){const n=fd(),{viewDirection:s}=t,{map:r}=gi(t),a=XR(r),{defaultClassName:o,buttonLabel:l,buttonIcon:h}=HR(n,s),{containerProps:c}=De(nu("view",o),t),u=is(()=>a?s==="forward"?a.canForward:a.canBackward:!1,[a,s]),d=()=>{a&&(s==="forward"?a.forward():a.backward())};return a&&R.jsx(Ha,{ref:e,...c,label:l,icon:h,onClick:d,isDisabled:!u})});function HR(i,t){switch(t){case"forward":return{defaultClassName:"view-forward",buttonLabel:i.formatMessage({id:"view-forward.title"}),buttonIcon:R.jsx(AR,{})};case"backward":return{defaultClassName:"view-backward",buttonLabel:i.formatMessage({id:"view-backward.title"}),buttonIcon:R.jsx(LR,{})}}}const YR="ol-app",qR=Jn.bind(void 0,YR),KR="@open-pioneer/coordinate-viewer",ZR=Jn.bind(void 0,KR),JR=4,QR="decimal",tT=i=>{const{precision:t,displayProjectionCode:e,format:n}=i,{containerProps:s}=De("coordinate-viewer",i),{map:r}=gi(i),a=r?.olMap,o=is(()=>r?.projection.getCode()??"",[r]);let{coordinates:l}=iT(a);l=l&&e?sT(l,o,e):l;const h=eT(l,t,n),c=e||o,u=h?h+" "+c:"";return R.jsx(Mt,{...s,children:R.jsx(Sl,{className:"coordinate-viewer-text",children:u})})};function eT(i,t,e){const n=ZR();return i?nT(i,t,n,e):""}function iT(i){const[t,e]=b.useState();return b.useEffect(()=>{if(!i)return;const n=i.on("pointermove",s=>{e(s.coordinate)});return()=>Qt(n)},[i]),{coordinates:t}}function nT(i,t,e,n){if(i[0]==null||i[1]==null)return"";const s=t??JR,r=n??QR,[a,o]=i;let l;if(r==="degree"&&isFinite(a)&&isFinite(o)){const[h,c,u]=fg(a,e,s),[d,g,f]=fg(o,e,s),m=`${Math.abs(h)}°${c}'${u}"${0<=h?"(E)":"(W)"}`,p=`${Math.abs(d)}°${g}'${f}"${0<=d?"(N)":"(S)"}`;l=m+" "+p}else{const h=e.formatNumber(a,{maximumFractionDigits:s,minimumFractionDigits:s}),c=e.formatNumber(o,{maximumFractionDigits:s,minimumFractionDigits:s});l=h+" "+c}return l}function fg(i,t,e){const n=Math.floor(i),s=i-n,r=Math.floor(60*s),o=60*(60*s-r),l=t.formatNumber(o,{maximumFractionDigits:e,minimumFractionDigits:e});return[n,r,l]}function sT(i,t,e){return Eu(i,t,e)}const rT="@open-pioneer/scale-viewer",aT=Jn.bind(void 0,rT),oT=i=>{const{containerProps:t}=De("scale-viewer",i),{map:e}=gi(i),n=aT(),s=is(()=>e?.scale??1,[e]),r=s?n.formatNumber(s):void 0;return R.jsx(Mt,{...t,children:r&&R.jsxs(Sl,{children:["1:",r]})})},Np="@open-pioneer/geolocation",lT=iu.bind(void 0,Np),Gp=Jn.bind(void 0,Np);function hT(i){return Sn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"},child:[]}]})(i)}const gg=di("geolocation:GeolocationController"),mg=17;var jn,Bn;class cT{constructor(t,e,n){Ct(this,"supported",!!navigator.geolocation);Ct(this,"map");Ct(this,"positionHighlightLayer");Ct(this,"geolocation");Ct(this,"onError");Ct(this,"maxZoom",mg);Ct(this,"accuracyFeature");Ct(this,"positionFeature");Ct(this,"changeHandlers",[]);Ct(this,"setMapToPosition",!0);Ct(this,"trackingOptions",{});Ct(this,"isInitialZoom",!0);Y(this,jn,ri(!1));Y(this,Bn,ri(!1));this.map=t,this.onError=e,this.isInitialZoom=!0,this.accuracyFeature=new ei,this.accuracyFeature.setStyle(_g()),this.positionFeature=new ei,this.positionFeature.setStyle(pg()),this.positionHighlightLayer=new Kl({source:new Ql({features:[this.accuracyFeature,this.positionFeature]})}),this.positionHighlightLayer.setZIndex(ud);const s=n||uT();this.geolocation=new uM({tracking:!1,trackingOptions:s,projection:t.olView?.getProjection()}),this.trackingOptions=s,this.geolocation.on("error",r=>this.handleGeolocationError(r))}destroy(){this.stopGeolocation(),this.geolocation?.setTracking(!1),this.geolocation.dispose(),this.accuracyFeature=void 0,this.positionFeature=void 0,this.positionHighlightLayer.dispose()}startGeolocation(){if(C(this,Bn).value)return;new Promise(e=>{C(this,Bn).value=!0,C(this,jn).value=!0,this.geolocation?.setProjection(this.map.olView?.getProjection()),this.geolocation?.setTracking(!0);const n=this.geolocation.on("change:accuracyGeometry",()=>{const o=this.geolocation.getAccuracyGeometry()||void 0;if(this.accuracyFeature?.setGeometry(o),this.accuracyFeature?.getGeometry()!==void 0&&e(),this.isInitialZoom){const l=this?.accuracyFeature?.getGeometry()?.getExtent();if(l){const h=XI(l);if(!h)return;this.map.olView.fit(h,{maxZoom:this.maxZoom}),this.isInitialZoom=!1}}}),s=this.geolocation.on("change:position",()=>{const o=this.geolocation.getPosition();o&&(o[0]||o[1])!==void 0&&(this.positionFeature?.setGeometry(new Wn(o)),this.setMapToPosition&&this.map.olView.setCenter(o),this.positionFeature?.getGeometry()!==void 0&&e())}),r=this.map.olView.on("change:resolution",()=>{this.setMapToPosition=this.isInitialZoom}),a=this.map.olMap.on("pointermove",o=>{o.dragging&&(this.setMapToPosition=!1)});this.changeHandlers.push(n,s,r,a),this.map.olMap.addLayer(this.positionHighlightLayer)}).then(()=>{C(this,jn).value=!1}).catch(e=>{gg.error("Failed to determine location",e)})}stopGeolocation(){this.geolocation?.setTracking(!1),C(this,Bn).value=!1,C(this,jn).value=!1,this.trackingOptions={},this.setMapToPosition=!0,this.isInitialZoom=!0,this.changeHandlers.forEach(t=>{Qt(t)}),this.changeHandlers=[],this.accuracyFeature?.setGeometry(void 0),this.positionFeature?.setGeometry(void 0),this.map.olMap.removeLayer(this.positionHighlightLayer)}get active(){return C(this,Bn).value}get loading(){return C(this,jn).value}setPositionFeatureStyle(t){this.positionFeature?.setStyle(t??pg())}setAccuracyFeatureStyle(t){this.accuracyFeature?.setStyle(t??_g())}setMaxZoom(t){this.maxZoom=t??mg}getMaxZoom(){return this.maxZoom}getPositionFeature(){return this.positionFeature}getAccuracyFeature(){return this.accuracyFeature}getTrackingOptions(){return this.trackingOptions}getGeolocation(){return this.geolocation}handleGeolocationError(t){gg.error("Error from geolocation API:",t.message),this.stopGeolocation();const e=(()=>{switch(t.code){case 1:return"permission-denied";case 2:return"position-unavailable";case 3:return"timeout";default:return"unknown"}})();this.onError(e)}}jn=new WeakMap,Bn=new WeakMap;const pg=()=>new wt({image:new ts({radius:6,fill:new Ce({color:"#3399CC"}),stroke:new At({color:"#fff",width:2})})}),_g=()=>new wt({stroke:new At({color:"#3399CC",width:3}),fill:new Ce({color:"rgba(0, 0, 255, 0.05)"})}),uT=()=>({enableHighAccuracy:!0,timeout:6e4,maximumAge:6e5}),dT=b.forwardRef(function(t,e){const{maxZoom:n,positionFeatureStyle:s,accuracyFeatureStyle:r,trackingOptions:a}=t,{map:o}=gi(t),l=gT(o,n,a,s,r);return l&&R.jsx(fT,{...t,controller:l,ref:e})}),fT=b.forwardRef(function(t,e){const{controller:n}=t,{containerProps:s}=De("geolocation",t),{isLoading:r,isActive:a}=is(()=>({isLoading:n.loading,isActive:n.active}),[n]),o=Gp(),l=n.supported?a?o.formatMessage({id:"locateMeEnd"}):o.formatMessage({id:"locateMeStart"}):o.formatMessage({id:"locateNotSupported"}),h=()=>{n.active?n.stopGeolocation():n.startGeolocation()};return R.jsx(Ha,{ref:e,label:l,icon:R.jsx(hT,{}),onClick:()=>h(),isActive:a,isLoading:r,isDisabled:!n.supported,...s})});function gT(i,t,e,n,s){const r=Gp(),a=lT("notifier.NotificationService"),[o,l]=b.useState();return b.useEffect(()=>{if(!i)return;const h=u=>{const d=r.formatMessage({id:"error"}),g=(()=>{switch(u){case"permission-denied":return r.formatMessage({id:"permissionDenied"});case"position-unavailable":return r.formatMessage({id:"positionUnavailable"});case"timeout":return r.formatMessage({id:"timeout"});case"unknown":return r.formatMessage({id:"unknownError"})}})();a.notify({level:"error",title:d,message:g})},c=new cT(i,h,e);return l(c),()=>{c.destroy(),l(void 0)}},[i,e,r,a]),b.useEffect(()=>{o?.setPositionFeatureStyle(n)},[o,n]),b.useEffect(()=>{o?.setAccuracyFeatureStyle(s)},[o,s]),b.useEffect(()=>{o?.setMaxZoom(t)},[o,t]),o}const mT="@open-pioneer/notifier",pT=iu.bind(void 0,mT),_T=bv({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"}),vT=!1;function yT(i){const{position:t="top-right"}=i,e=Gv(),n=pT("notifier.NotificationService"),[s,r]=b.useState(!vT),a=oc(l=>{const h=l.level==="error"?R.jsx(_T,{h:"100%",w:"100%"}):void 0;e({position:t,title:l.title,description:l.message||null,status:l.level,isClosable:!0,duration:l.displayDuration??null,icon:h})}),o=oc(()=>{e.closeAll()});return b.useEffect(()=>{const l=n.registerHandler({showNotification:a,closeAll:o});return()=>l.destroy()},[s,n,a,o]),R.jsx(R.Fragment,{})}const xT="200px",MT="300px",bT=i=>{const{olLayer:t,height:e=xT,width:n=MT}=i,{containerProps:s}=De("overview-map",i),r=b.useRef(null),{map:a}=gi(i);return b.useEffect(()=>{if(r.current&&a&&t){const o=a.olMap,l=new _R({className:"ol-overviewmap",layers:[t],collapsible:!1,collapsed:!1,target:r.current});return o.addControl(l),()=>{o.removeControl(l)}}},[a,t]),R.jsx(Mt,{height:e,width:n,ref:r,...s})},ET="@open-pioneer/measurement",wT=Jn.bind(void 0,ET);class CT{olMap;messages;activeFeatureStyle;layer;source;draw=void 0;activeMeasurement;predefinedMeasurements=new Map;finishedMeasurements=new Set;helpTooltip;resources=[];measurementChangedHandler;constructor(t,e){this.olMap=t,this.messages=e;const n=this.source=new Ql;this.layer=new Kl({source:n,zIndex:ud,properties:{name:"measurement-layer"}}),t.addLayer(this.layer);const s=t.on("pointermove",this.handlePointerMove.bind(this));this.resources.push({destroy(){Qt(s)}});const r=()=>{this.helpTooltip.element.classList.add("hidden")};t.getViewport().addEventListener("mouseout",r),this.resources.push({destroy(){t.getViewport().removeEventListener("mouseout",r)}}),this.helpTooltip=IT(this.olMap)}destroy(){this.stopMeasurement();for(const t of this.resources)t.destroy();this.resources=[],this.activeMeasurement=rc(this.activeMeasurement);for(const t of this.finishedMeasurements)t.destroy();this.finishedMeasurements.clear(),this.helpTooltip.destroy(),this.olMap.removeLayer(this.layer),this.layer.dispose(),this.source.dispose(),this.measurementChangedHandler=void 0,this.predefinedMeasurements.clear()}getVectorLayer(){return this.layer}setFinishedFeatureStyle(t){this.layer.setStyle(t)}setMeasurementSourceChangedHandler(t){this.measurementChangedHandler=t}setPredefinedMeasurements(t){this.updatePredefinedMeasurements(t)}setActiveFeatureStyle(t){const e=qu(t);this.activeFeatureStyle=(n,...s)=>{const r=n?.getGeometry()?.getType();if(r==="Polygon"||r==="LineString"||r==="Point")return e(n,...s)},this.draw?.getOverlay().setStyle(this.activeFeatureStyle)}clearMeasurements(){const t=this.source.getFeatures();this.source.clear(),t.forEach(e=>{this.raiseMeasurementsChangeEvent("remove-measurement",e)}),this.predefinedMeasurements.clear();for(const e of this.finishedMeasurements)e.destroy();this.finishedMeasurements.clear()}startMeasurement(t){if(this.draw)throw new Error("Internal error: another measurement interaction is still active.");const e=t==="area"?"Polygon":"LineString",n=this.draw=new QI({source:this.source,type:e,style:this.activeFeatureStyle});this.olMap.addInteraction(n);let s,r;n.on("drawstart",a=>{const o=a.feature;o&&(s=this.activeMeasurement=new vg("active",o,this),r=o.getGeometry()?.on("change",()=>{s?.updateTooltipContent(),s?.updateTooltipPosition()}))}),n.on("drawend",()=>{if(s&&s===this.activeMeasurement){const a=s;a.updateState("finished"),this.finishedMeasurements.add(a),this.raiseMeasurementsChangeEvent("add-measurement",a.feature),this.activeMeasurement=s=void 0}s=void 0,r&&Qt(r)}),n.on("drawabort",()=>{s&&(s.destroy(),s===this.activeMeasurement&&(this.activeMeasurement=void 0),s=void 0),r&&Qt(r)})}stopMeasurement(){this.draw&&(this.olMap.removeInteraction(this.draw),this.draw.abortDrawing(),this.draw.dispose(),this.draw=void 0),this.activeMeasurement=rc(this.activeMeasurement)}handlePointerMove(t){if(t.dragging)return;const e=this.helpTooltip,n=TT(this.messages,this.activeMeasurement);e.setText(n),e.overlay.setPosition(t.coordinate),e.element.classList.remove("hidden")}updatePredefinedMeasurements(t){const e=t.filter(s=>!this.predefinedMeasurements.has(s)),n=[];for(const s of this.predefinedMeasurements.keys())t.includes(s)||n.push(s);e.forEach(s=>{const r=new ei(s);this.source.addFeature(r);const a=new vg("finished",r,this);this.finishedMeasurements.add(a),this.predefinedMeasurements.set(s,a),this.raiseMeasurementsChangeEvent("add-measurement",r)}),n.forEach(s=>{const r=this.predefinedMeasurements.get(s);r&&(this.source.removeFeature(r.feature),this.finishedMeasurements.delete(r),r.destroy(),this.raiseMeasurementsChangeEvent("remove-measurement",r.feature)),this.predefinedMeasurements.delete(s)})}raiseMeasurementsChangeEvent(t,e){const n=e.getGeometry();this.measurementChangedHandler&&n&&this.measurementChangedHandler({kind:t,geometry:(n instanceof we,n)})}}class vg{controller;feature;_state;tooltip;constructor(t,e,n){this.controller=n,this._state=t,this.feature=e,this.tooltip=RT(this.olMap),this.updateTooltipContent(),this.updateTooltipPosition(),this.tooltip.setActive(t==="active")}destroy(){this.tooltip.destroy()}get state(){return this._state}updateState(t){this._state!==t&&(this._state=t,this.tooltip.setActive(t==="active"))}updateTooltipContent(){const t=this.feature.getGeometry();if(!t)return;const e=this.olMap.getView().getProjection();let n;t instanceof we?n=PT(t,e,this.messages):t instanceof He&&(n=LT(t,e,this.messages)),n&&this.tooltip.setHtml(n)}updateTooltipPosition(){const t=this.feature.getGeometry();if(!t)return;let e;if(t instanceof we)e=t.getInteriorPoint().getCoordinates()||null;else if(t instanceof He)e=t.getLastCoordinate()||null;else return;this.tooltip.overlay.setPosition(e)}get olMap(){return this.controller.olMap}get messages(){return this.controller.messages}}const yg=[0,-15],ST=[0,-7];function IT(i){const t=document.createElement("div");t.className="measurement-tooltip printing-hide hidden",t.role="tooltip";const e=document.createElement("span");t.appendChild(e);const n=new id({element:t,offset:[15,0],positioning:"center-left"});return i.addOverlay(n),{overlay:n,element:t,destroy(){i.removeOverlay(n)},setText(s){e.textContent=s},setHtml(s){e.innerHTML=s}}}function RT(i){const t=document.createElement("div");t.role="tooltip",t.className="measurement-tooltip measurement-active-tooltip printing-hide";const e=document.createElement("span");t.appendChild(e);const n=new id({element:t,offset:yg,positioning:"bottom-center",stopEvent:!1,insertFirst:!1});return i.addOverlay(n),{overlay:n,element:t,destroy(){i.removeOverlay(n)},setActive(s){s?(t.className="measurement-tooltip measurement-active-tooltip printing-hide",n.setOffset(yg)):(t.className="measurement-tooltip measurement-finished-tooltip",n.setOffset(ST))},setText(s){e.textContent=s},setHtml(s){e.innerHTML=s}}}function TT(i,t){if(t){const e=t.feature.getGeometry();if(e instanceof we||e instanceof He)return i.getContinueMessage()}return i.getHelpMessage()}function PT(i,t,e){const n=N0(i,{projection:t});let s;return n>=1e6?s=`${e.formatNumber(n/1e6)} km2`:s=`${e.formatNumber(n)} m2`,s}function LT(i,t,e){const n=F0(i,{projection:t});let s;return n>=1e3?s=`${e.formatNumber(n/1e3)} km`:s=`${e.formatNumber(n)} m`,s}const AT=i=>{const t=wT(),{containerProps:e}=De("measurement",i),[n,s]=b.useState("distance"),r=c=>t.formatMessage({id:c}),a=gi(i),o=OT(a.map,i,t);b.useEffect(()=>{if(o)return o.startMeasurement(n),()=>{o.stopMeasurement()}},[o,n]);function l(c){if(c==="distance"||c==="area")s(c);else throw new Error(`Unexpected measurement type: '${c}'.`)}function h(){o?.clearMeasurements()}return R.jsxs(Mt,{...e,children:[R.jsx(Sl,{mb:3,children:t.formatMessage({id:"measurementInfoText"})}),R.jsx(n0,{mb:4,alignItems:"center",children:R.jsxs(iv,{mb:2,children:[R.jsx(ru,{mb:1,children:r("measurementLabel")}),R.jsxs(f0,{value:n,onChange:c=>l(c.target.value),className:"measurement-select",children:[R.jsx("option",{value:"distance",children:r("distance")}),R.jsx("option",{value:"area",children:r("area")})]})]})}),R.jsx(i0,{padding:2,className:"measurement-delete-button",onClick:h,width:"100%",children:r("deleteMeasurementLabel")})]})};function OT(i,t,e){const{activeFeatureStyle:n,finishedFeatureStyle:s,onMeasurementsChange:r,predefinedMeasurements:a}=t,[o,l]=b.useState(void 0);return b.useEffect(()=>{if(!i)return;const h=new CT(i.olMap,{getContinueMessage(){return e.formatMessage({id:"tooltips.continue"})},getHelpMessage(){return e.formatMessage({id:"tooltips.help"})},formatNumber(c){return e.formatNumber(c,{maximumFractionDigits:2})}});return l(h),()=>{h.destroy(),l(void 0)}},[i,e]),b.useEffect(()=>{o?.setActiveFeatureStyle(n??DT())},[o,n]),b.useEffect(()=>{o?.setFinishedFeatureStyle(s??kT())},[o,s]),b.useEffect(()=>{o?.setMeasurementSourceChangedHandler(r)},[o,r]),b.useEffect(()=>{o?.setPredefinedMeasurements(a??[])},[o,a]),o}function DT(){return[new wt({stroke:new At({color:"#fff",lineDash:[10,10],width:5})}),new wt({fill:new Ce({color:"rgba(0,0,0,0.15)"}),stroke:new At({color:"rgba(0, 0, 0, 0.7)",lineDash:[10,10],width:3}),image:new ts({radius:5,stroke:new At({color:"rgba(0, 0, 0, 0.7)",width:2}),fill:new Ce({color:"rgba(255, 255, 255, 0.2)"})})})]}function kT(){return[new wt({stroke:new At({color:"#fff",width:5})}),new wt({stroke:new At({color:"#0b96fc",width:3}),fill:new Ce({color:"rgba(11,150,252,0.15)"})})]}function FT(i){return Sn({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M233.91,74.79,181.22,22.1a14,14,0,0,0-19.8,0L22.09,161.41a14,14,0,0,0,0,19.8L74.78,233.9a14,14,0,0,0,19.8,0L233.91,94.59A14,14,0,0,0,233.91,74.79ZM225.42,86.1,86.1,225.41h0a2,2,0,0,1-2.83,0L30.58,172.73a2,2,0,0,1,0-2.83L64,136.48l27.76,27.76a6,6,0,1,0,8.48-8.48L72.48,128,96,104.48l27.76,27.76a6,6,0,0,0,8.48-8.48L104.48,96,128,72.49l27.76,27.75a6,6,0,0,0,8.48-8.48L136.49,64,169.9,30.59a2,2,0,0,1,2.83,0l52.69,52.68A2,2,0,0,1,225.42,86.1Z"},child:[]}]})(i)}function xg(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),e.push.apply(e,n)}return e}function K(i){for(var t=1;ti.length)&&(t=i.length);for(var e=0,n=Array(t);e({x:i,y:i});function QT(i){const{x:t,y:e,width:n,height:s}=i;return{width:n,height:s,top:e,left:t,right:t+n,bottom:e+s,x:t,y:e}}function jp(i){return Up(i)?(i.nodeName||"").toLowerCase():"#document"}function Hi(i){var t;return(i==null||(t=i.ownerDocument)==null?void 0:t.defaultView)||window}function Bp(i){var t;return(t=(Up(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function Up(i){return i instanceof Node||i instanceof Hi(i).Node}function tP(i){return i instanceof Element||i instanceof Hi(i).Element}function gd(i){return i instanceof HTMLElement||i instanceof Hi(i).HTMLElement}function bg(i){return typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof Hi(i).ShadowRoot}function Wp(i){const{overflow:t,overflowX:e,overflowY:n,display:s}=md(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&!["inline","contents"].includes(s)}function eP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function iP(i){return["html","body","#document"].includes(jp(i))}function md(i){return Hi(i).getComputedStyle(i)}function nP(i){if(jp(i)==="html")return i;const t=i.assignedSlot||i.parentNode||bg(i)&&i.host||Bp(i);return bg(t)?t.host:t}function $p(i){const t=nP(i);return iP(t)?i.ownerDocument?i.ownerDocument.body:i.body:gd(t)&&Wp(t)?t:$p(t)}function ml(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);const s=$p(i),r=s===((n=i.ownerDocument)==null?void 0:n.body),a=Hi(s);if(r){const o=Kc(a);return t.concat(a,a.visualViewport||[],Wp(s)?s:[],o&&e?ml(o):[])}return t.concat(s,ml(s,[],e))}function Kc(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function sP(i){const t=md(i);let e=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=gd(i),r=s?i.offsetWidth:e,a=s?i.offsetHeight:n,o=fl(e)!==r||fl(n)!==a;return o&&(e=r,n=a),{width:e,height:n,$:o}}function pd(i){return tP(i)?i:i.contextElement}function Eg(i){const t=pd(i);if(!gd(t))return gl(1);const e=t.getBoundingClientRect(),{width:n,height:s,$:r}=sP(t);let a=(r?fl(e.width):e.width)/n,o=(r?fl(e.height):e.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const rP=gl(0);function aP(i){const t=Hi(i);return!eP()||!t.visualViewport?rP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oP(i,t,e){return!1}function wg(i,t,e,n){t===void 0&&(t=!1);const s=i.getBoundingClientRect(),r=pd(i);let a=gl(1);t&&(a=Eg(i));const o=oP()?aP(r):gl(0);let l=(s.left+o.x)/a.x,h=(s.top+o.y)/a.y,c=s.width/a.x,u=s.height/a.y;if(r){const d=Hi(r),g=n;let f=d,m=Kc(f);for(;m&&n&&g!==f;){const p=Eg(m),_=m.getBoundingClientRect(),v=md(m),x=_.left+(m.clientLeft+parseFloat(v.paddingLeft))*p.x,y=_.top+(m.clientTop+parseFloat(v.paddingTop))*p.y;l*=p.x,h*=p.y,c*=p.x,u*=p.y,l+=x,h+=y,f=Hi(m),m=Kc(f)}}return QT({width:c,height:u,x:l,y:h})}function lP(i,t){let e=null,n;const s=Bp(i);function r(){var o;clearTimeout(n),(o=e)==null||o.disconnect(),e=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),r();const{left:h,top:c,width:u,height:d}=i.getBoundingClientRect();if(o||t(),!u||!d)return;const g=Eo(c),f=Eo(s.clientWidth-(h+u)),m=Eo(s.clientHeight-(c+d)),p=Eo(h),v={rootMargin:-g+"px "+-f+"px "+-m+"px "+-p+"px",threshold:JT(0,ZT(1,l))||1};let x=!0;function y(M){const w=M[0].intersectionRatio;if(w!==l){if(!x)return a();w?a(!1,w):n=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{e=new IntersectionObserver(y,{...v,root:s.ownerDocument})}catch{e=new IntersectionObserver(y,v)}e.observe(i)}return a(!0),r}function hP(i,t,e,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,h=pd(i),c=s||r?[...h?ml(h):[],...ml(t)]:[];c.forEach(_=>{s&&_.addEventListener("scroll",e,{passive:!0}),r&&_.addEventListener("resize",e)});const u=h&&o?lP(h,e):null;let d=-1,g=null;a&&(g=new ResizeObserver(_=>{let[v]=_;v&&v.target===h&&g&&(g.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),e()}),h&&!l&&g.observe(h),g.observe(t));let f,m=l?wg(i):null;l&&p();function p(){const _=wg(i);m&&(_.x!==m.x||_.y!==m.y||_.width!==m.width||_.height!==m.height)&&e(),m=_,f=requestAnimationFrame(p)}return e(),()=>{var _;c.forEach(v=>{s&&v.removeEventListener("scroll",e),r&&v.removeEventListener("resize",e)}),u?.(),(_=g)==null||_.disconnect(),g=null,l&&cancelAnimationFrame(f)}}var Zc=b.useLayoutEffect,cP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],pl=function(){};function uP(i,t){return t?t[0]==="-"?i+t:i+"__"+t:i}function dP(i,t){for(var e=arguments.length,n=new Array(e>2?e-2:0),s=2;s-1}function gP(i){return nh(i)?window.innerHeight:i.clientHeight}function Hp(i){return nh(i)?window.pageYOffset:i.scrollTop}function vl(i,t){if(nh(i)){window.scrollTo(0,t);return}i.scrollTop=t}function mP(i){var t=getComputedStyle(i),e=t.position==="absolute",n=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var s=i;s=s.parentElement;)if(t=getComputedStyle(s),!(e&&t.position==="static")&&n.test(t.overflow+t.overflowY+t.overflowX))return s;return document.documentElement}function pP(i,t,e,n){return e*((i=i/n-1)*i*i+1)+t}function wo(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:pl,s=Hp(i),r=t-s,a=10,o=0;function l(){o+=a;var h=pP(o,s,r,e);vl(i,h),oe.bottom?vl(i,Math.min(t.offsetTop+t.clientHeight-i.offsetHeight+s,i.scrollHeight)):n.top-s1?e-1:0),s=1;s=f)return{placement:"bottom",maxHeight:t};if(S>=f&&!a)return r&&wo(l,T,P),{placement:"bottom",maxHeight:t};if(!a&&S>=n||a&&I>=n){r&&wo(l,T,P);var N=a?I-y:S-y;return{placement:"bottom",maxHeight:N}}if(s==="auto"||a){var G=t,k=a?w:E;return k>=n&&(G=Math.min(k-y-o,t)),{placement:"top",maxHeight:G}}if(s==="bottom")return r&&vl(l,T),{placement:"bottom",maxHeight:t};break;case"top":if(w>=f)return{placement:"top",maxHeight:t};if(E>=f&&!a)return r&&wo(l,O,P),{placement:"top",maxHeight:t};if(!a&&E>=n||a&&w>=n){var D=t;return(!a&&E>=n||a&&w>=n)&&(D=a?w-M:E-M),r&&wo(l,O,P),{placement:"top",maxHeight:D}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(s,'".'))}return h}function IP(i){var t={bottom:"top",top:"bottom"};return i?t[i]:"bottom"}var qp=function(t){return t==="auto"?"bottom":t},RP=function(t,e){var n,s=t.placement,r=t.theme,a=r.borderRadius,o=r.spacing,l=r.colors;return K((n={label:"menu"},bs(n,IP(s),"100%"),bs(n,"position","absolute"),bs(n,"width","100%"),bs(n,"zIndex",1),n),e?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:o.menuGutter,marginTop:o.menuGutter})},Kp=b.createContext(null),TP=function(t){var e=t.children,n=t.minMenuHeight,s=t.maxMenuHeight,r=t.menuPlacement,a=t.menuPosition,o=t.menuShouldScrollIntoView,l=t.theme,h=b.useContext(Kp)||{},c=h.setPortalPlacement,u=b.useRef(null),d=b.useState(s),g=Xt(d,2),f=g[0],m=g[1],p=b.useState(null),_=Xt(p,2),v=_[0],x=_[1],y=l.spacing.controlHeight;return Zc(function(){var M=u.current;if(M){var w=a==="fixed",I=o&&!w,E=SP({maxHeight:s,menuEl:M,minHeight:n,placement:r,shouldScroll:I,isFixedPosition:w,controlHeight:y});m(E.maxHeight),x(E.placement),c?.(E.placement)}},[s,r,a,o,n,c,y]),e({ref:u,placerProps:K(K({},t),{},{placement:v||qp(r),maxHeight:f})})},PP=function(t){var e=t.children,n=t.innerRef,s=t.innerProps;return J("div",Q({},Ot(t,"menu",{menu:!0}),{ref:n},s),e)},LP=PP,AP=function(t,e){var n=t.maxHeight,s=t.theme.spacing.baseUnit;return K({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},e?{}:{paddingBottom:s,paddingTop:s})},OP=function(t){var e=t.children,n=t.innerProps,s=t.innerRef,r=t.isMulti;return J("div",Q({},Ot(t,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:s},n),e)},Zp=function(t,e){var n=t.theme,s=n.spacing.baseUnit,r=n.colors;return K({textAlign:"center"},e?{}:{color:r.neutral40,padding:"".concat(s*2,"px ").concat(s*3,"px")})},DP=Zp,kP=Zp,FP=function(t){var e=t.children,n=e===void 0?"No options":e,s=t.innerProps,r=mi(t,wP);return J("div",Q({},Ot(K(K({},r),{},{children:n,innerProps:s}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),s),n)},NP=function(t){var e=t.children,n=e===void 0?"Loading...":e,s=t.innerProps,r=mi(t,CP);return J("div",Q({},Ot(K(K({},r),{},{children:n,innerProps:s}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),s),n)},GP=function(t){var e=t.rect,n=t.offset,s=t.position;return{left:e.left,position:s,top:n,width:e.width,zIndex:1}},zP=function(t){var e=t.appendTo,n=t.children,s=t.controlElement,r=t.innerProps,a=t.menuPlacement,o=t.menuPosition,l=b.useRef(null),h=b.useRef(null),c=b.useState(qp(a)),u=Xt(c,2),d=u[0],g=u[1],f=b.useMemo(function(){return{setPortalPlacement:g}},[]),m=b.useState(null),p=Xt(m,2),_=p[0],v=p[1],x=b.useCallback(function(){if(s){var I=_P(s),E=o==="fixed"?0:window.pageYOffset,S=I[d]+E;(S!==_?.offset||I.left!==_?.rect.left||I.width!==_?.rect.width)&&v({offset:S,rect:I})}},[s,o,d,_?.offset,_?.rect.left,_?.rect.width]);Zc(function(){x()},[x]);var y=b.useCallback(function(){typeof h.current=="function"&&(h.current(),h.current=null),s&&l.current&&(h.current=hP(s,l.current,x,{elementResize:"ResizeObserver"in window}))},[s,x]);Zc(function(){y()},[y]);var M=b.useCallback(function(I){l.current=I,y()},[y]);if(!e&&o!=="fixed"||!_)return null;var w=J("div",Q({ref:M},Ot(K(K({},t),{},{offset:_.offset,position:o,rect:_.rect}),"menuPortal",{"menu-portal":!0}),r),n);return J(Kp.Provider,{value:f},e?Zg.createPortal(w,e):w)},VP=function(t){var e=t.isDisabled,n=t.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:e?"none":void 0,position:"relative"}},jP=function(t){var e=t.children,n=t.innerProps,s=t.isDisabled,r=t.isRtl;return J("div",Q({},Ot(t,"container",{"--is-disabled":s,"--is-rtl":r}),n),e)},BP=function(t,e){var n=t.theme.spacing,s=t.isMulti,r=t.hasValue,a=t.selectProps.controlShouldRenderValue;return K({alignItems:"center",display:s&&r&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},e?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px")})},UP=function(t){var e=t.children,n=t.innerProps,s=t.isMulti,r=t.hasValue;return J("div",Q({},Ot(t,"valueContainer",{"value-container":!0,"value-container--is-multi":s,"value-container--has-value":r}),n),e)},WP=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},$P=function(t){var e=t.children,n=t.innerProps;return J("div",Q({},Ot(t,"indicatorsContainer",{indicators:!0}),n),e)},Ig,XP=["size"],HP=["innerProps","isRtl","size"],YP={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Jp=function(t){var e=t.size,n=mi(t,XP);return J("svg",Q({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:YP},n))},_d=function(t){return J(Jp,Q({size:20},t),J("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Qp=function(t){return J(Jp,Q({size:20},t),J("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},t_=function(t,e){var n=t.isFocused,s=t.theme,r=s.spacing.baseUnit,a=s.colors;return K({label:"indicatorContainer",display:"flex",transition:"color 150ms"},e?{}:{color:n?a.neutral60:a.neutral20,padding:r*2,":hover":{color:n?a.neutral80:a.neutral40}})},qP=t_,KP=function(t){var e=t.children,n=t.innerProps;return J("div",Q({},Ot(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),e||J(Qp,null))},ZP=t_,JP=function(t){var e=t.children,n=t.innerProps;return J("div",Q({},Ot(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),e||J(_d,null))},QP=function(t,e){var n=t.isDisabled,s=t.theme,r=s.spacing.baseUnit,a=s.colors;return K({label:"indicatorSeparator",alignSelf:"stretch",width:1},e?{}:{backgroundColor:n?a.neutral10:a.neutral20,marginBottom:r*2,marginTop:r*2})},tL=function(t){var e=t.innerProps;return J("span",Q({},e,Ot(t,"indicatorSeparator",{"indicator-separator":!0})))},eL=q_(Ig||(Ig=KT([` + 0%, 80%, 100% { opacity: 0; } + 40% { opacity: 1; } +`]))),iL=function(t,e){var n=t.isFocused,s=t.size,r=t.theme,a=r.colors,o=r.spacing.baseUnit;return K({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:s,lineHeight:1,marginRight:s,textAlign:"center",verticalAlign:"middle"},e?{}:{color:n?a.neutral60:a.neutral20,padding:o*2})},Kh=function(t){var e=t.delay,n=t.offset;return J("span",{css:Qg({animation:"".concat(eL," 1s ease-in-out ").concat(e,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},nL=function(t){var e=t.innerProps,n=t.isRtl,s=t.size,r=s===void 0?4:s,a=mi(t,HP);return J("div",Q({},Ot(K(K({},a),{},{innerProps:e,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),e),J(Kh,{delay:0,offset:n}),J(Kh,{delay:160,offset:!0}),J(Kh,{delay:320,offset:!n}))},sL=function(t,e){var n=t.isDisabled,s=t.isFocused,r=t.theme,a=r.colors,o=r.borderRadius,l=r.spacing;return K({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},e?{}:{backgroundColor:n?a.neutral5:a.neutral0,borderColor:n?a.neutral10:s?a.primary:a.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:s?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:s?a.primary:a.neutral30}})},rL=function(t){var e=t.children,n=t.isDisabled,s=t.isFocused,r=t.innerRef,a=t.innerProps,o=t.menuIsOpen;return J("div",Q({ref:r},Ot(t,"control",{control:!0,"control--is-disabled":n,"control--is-focused":s,"control--menu-is-open":o}),a,{"aria-disabled":n||void 0}),e)},aL=rL,oL=["data"],lL=function(t,e){var n=t.theme.spacing;return e?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},hL=function(t){var e=t.children,n=t.cx,s=t.getStyles,r=t.getClassNames,a=t.Heading,o=t.headingProps,l=t.innerProps,h=t.label,c=t.theme,u=t.selectProps;return J("div",Q({},Ot(t,"group",{group:!0}),l),J(a,Q({},o,{selectProps:u,theme:c,getStyles:s,getClassNames:r,cx:n}),h),J("div",null,e))},cL=function(t,e){var n=t.theme,s=n.colors,r=n.spacing;return K({label:"group",cursor:"default",display:"block"},e?{}:{color:s.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:r.baseUnit*3,paddingRight:r.baseUnit*3,textTransform:"uppercase"})},uL=function(t){var e=Xp(t);e.data;var n=mi(e,oL);return J("div",Q({},Ot(t,"groupHeading",{"group-heading":!0}),n))},dL=hL,fL=["innerRef","isDisabled","isHidden","inputClassName"],gL=function(t,e){var n=t.isDisabled,s=t.value,r=t.theme,a=r.spacing,o=r.colors;return K(K({visibility:n?"hidden":"visible",transform:s?"translateZ(0)":""},mL),e?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:o.neutral80})},e_={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},mL={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":K({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},e_)},pL=function(t){return K({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},e_)},_L=function(t){var e=t.cx,n=t.value,s=Xp(t),r=s.innerRef,a=s.isDisabled,o=s.isHidden,l=s.inputClassName,h=mi(s,fL);return J("div",Q({},Ot(t,"input",{"input-container":!0}),{"data-value":n||""}),J("input",Q({className:e({input:!0},l),ref:r,style:pL(o),disabled:a},h)))},vL=_L,yL=function(t,e){var n=t.theme,s=n.spacing,r=n.borderRadius,a=n.colors;return K({label:"multiValue",display:"flex",minWidth:0},e?{}:{backgroundColor:a.neutral10,borderRadius:r/2,margin:s.baseUnit/2})},xL=function(t,e){var n=t.theme,s=n.borderRadius,r=n.colors,a=t.cropWithEllipsis;return K({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},e?{}:{borderRadius:s/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},ML=function(t,e){var n=t.theme,s=n.spacing,r=n.borderRadius,a=n.colors,o=t.isFocused;return K({alignItems:"center",display:"flex"},e?{}:{borderRadius:r/2,backgroundColor:o?a.dangerLight:void 0,paddingLeft:s.baseUnit,paddingRight:s.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},i_=function(t){var e=t.children,n=t.innerProps;return J("div",n,e)},bL=i_,EL=i_;function wL(i){var t=i.children,e=i.innerProps;return J("div",Q({role:"button"},e),t||J(_d,{size:14}))}var CL=function(t){var e=t.children,n=t.components,s=t.data,r=t.innerProps,a=t.isDisabled,o=t.removeProps,l=t.selectProps,h=n.Container,c=n.Label,u=n.Remove;return J(h,{data:s,innerProps:K(K({},Ot(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),r),selectProps:l},J(c,{data:s,innerProps:K({},Ot(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},e),J(u,{data:s,innerProps:K(K({},Ot(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(e||"option")},o),selectProps:l}))},SL=CL,IL=function(t,e){var n=t.isDisabled,s=t.isFocused,r=t.isSelected,a=t.theme,o=a.spacing,l=a.colors;return K({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},e?{}:{backgroundColor:r?l.primary:s?l.primary25:"transparent",color:n?l.neutral20:r?l.neutral0:"inherit",padding:"".concat(o.baseUnit*2,"px ").concat(o.baseUnit*3,"px"),":active":{backgroundColor:n?void 0:r?l.primary:l.primary50}})},RL=function(t){var e=t.children,n=t.isDisabled,s=t.isFocused,r=t.isSelected,a=t.innerRef,o=t.innerProps;return J("div",Q({},Ot(t,"option",{option:!0,"option--is-disabled":n,"option--is-focused":s,"option--is-selected":r}),{ref:a,"aria-disabled":n},o),e)},TL=RL,PL=function(t,e){var n=t.theme,s=n.spacing,r=n.colors;return K({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},e?{}:{color:r.neutral50,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},LL=function(t){var e=t.children,n=t.innerProps;return J("div",Q({},Ot(t,"placeholder",{placeholder:!0}),n),e)},AL=LL,OL=function(t,e){var n=t.isDisabled,s=t.theme,r=s.spacing,a=s.colors;return K({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e?{}:{color:n?a.neutral40:a.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},DL=function(t){var e=t.children,n=t.isDisabled,s=t.innerProps;return J("div",Q({},Ot(t,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),s),e)},kL=DL,FL={ClearIndicator:JP,Control:aL,DropdownIndicator:KP,DownChevron:Qp,CrossIcon:_d,Group:dL,GroupHeading:uL,IndicatorsContainer:$P,IndicatorSeparator:tL,Input:vL,LoadingIndicator:nL,Menu:LP,MenuList:OP,MenuPortal:zP,LoadingMessage:NP,NoOptionsMessage:FP,MultiValue:SL,MultiValueContainer:bL,MultiValueLabel:EL,MultiValueRemove:wL,Option:TL,Placeholder:AL,SelectContainer:jP,SingleValue:kL,ValueContainer:UP},NL=function(t){return K(K({},FL),t.components)},Rg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function GL(i,t){return!!(i===t||Rg(i)&&Rg(t))}function zL(i,t){if(i.length!==t.length)return!1;for(var e=0;e1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return a?"option ".concat(s," is disabled. Select another option."):"option ".concat(s,", selected.");default:return""}},onFocus:function(t){var e=t.context,n=t.focused,s=t.options,r=t.label,a=r===void 0?"":r,o=t.selectValue,l=t.isDisabled,h=t.isSelected,c=t.isAppleDevice,u=function(m,p){return m&&m.length?"".concat(m.indexOf(p)+1," of ").concat(m.length):""};if(e==="value"&&o)return"value ".concat(a," focused, ").concat(u(o,n),".");if(e==="menu"&&c){var d=l?" disabled":"",g="".concat(h?" selected":"").concat(d);return"".concat(a).concat(g,", ").concat(u(s,n),".")}return""},onFilter:function(t){var e=t.inputValue,n=t.resultsMessage;return"".concat(n).concat(e?" for search term "+e:"",".")}},WL=function(t){var e=t.ariaSelection,n=t.focusedOption,s=t.focusedValue,r=t.focusableOptions,a=t.isFocused,o=t.selectValue,l=t.selectProps,h=t.id,c=t.isAppleDevice,u=l.ariaLiveMessages,d=l.getOptionLabel,g=l.inputValue,f=l.isMulti,m=l.isOptionDisabled,p=l.isSearchable,_=l.menuIsOpen,v=l.options,x=l.screenReaderStatus,y=l.tabSelectsValue,M=l.isLoading,w=l["aria-label"],I=l["aria-live"],E=b.useMemo(function(){return K(K({},UL),u||{})},[u]),S=b.useMemo(function(){var k="";if(e&&E.onChange){var D=e.option,z=e.options,U=e.removedValue,q=e.removedValues,V=e.value,$=function(St){return Array.isArray(St)?null:St},H=U||D||$(V),X=H?d(H):"",A=z||q||void 0,et=A?A.map(d):[],st=K({isDisabled:H&&m(H,o),label:X,labels:et},e);k=E.onChange(st)}return k},[e,E,m,o,d]),T=b.useMemo(function(){var k="",D=n||s,z=!!(n&&o&&o.includes(n));if(D&&E.onFocus){var U={focused:D,label:d(D),isDisabled:m(D,o),isSelected:z,options:r,context:D===n?"menu":"value",selectValue:o,isAppleDevice:c};k=E.onFocus(U)}return k},[n,s,d,m,E,r,o,c]),O=b.useMemo(function(){var k="";if(_&&v.length&&!M&&E.onFilter){var D=x({count:r.length});k=E.onFilter({inputValue:g,resultsMessage:D})}return k},[r,g,_,E,v,x,M]),P=e?.action==="initial-input-focus",N=b.useMemo(function(){var k="";if(E.guidance){var D=s?"value":_?"menu":"input";k=E.guidance({"aria-label":w,context:D,isDisabled:n&&m(n,o),isMulti:f,isSearchable:p,tabSelectsValue:y,isInitialFocus:P})}return k},[w,n,s,f,m,p,_,E,o,y,P]),G=J(b.Fragment,null,J("span",{id:"aria-selection"},S),J("span",{id:"aria-focused"},T),J("span",{id:"aria-results"},O),J("span",{id:"aria-guidance"},N));return J(b.Fragment,null,J(Tg,{id:h},P&&G),J(Tg,{"aria-live":I,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!P&&G))},$L=WL,Jc=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],XL=new RegExp("["+Jc.map(function(i){return i.letters}).join("")+"]","g"),n_={};for(var Zh=0;Zh-1}},KL=["innerRef"];function ZL(i){var t=i.innerRef,e=mi(i,KL),n=EP(e,"onExited","in","enter","exit","appear");return J("input",Q({ref:t},n,{css:Qg({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var JL=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function QL(i){var t=i.isEnabled,e=i.onBottomArrive,n=i.onBottomLeave,s=i.onTopArrive,r=i.onTopLeave,a=b.useRef(!1),o=b.useRef(!1),l=b.useRef(0),h=b.useRef(null),c=b.useCallback(function(p,_){if(h.current!==null){var v=h.current,x=v.scrollTop,y=v.scrollHeight,M=v.clientHeight,w=h.current,I=_>0,E=y-M-x,S=!1;E>_&&a.current&&(n&&n(p),a.current=!1),I&&o.current&&(r&&r(p),o.current=!1),I&&_>E?(e&&!a.current&&e(p),w.scrollTop=y,S=!0,a.current=!0):!I&&-_>x&&(s&&!o.current&&s(p),w.scrollTop=0,S=!0,o.current=!0),S&&JL(p)}},[e,n,s,r]),u=b.useCallback(function(p){c(p,p.deltaY)},[c]),d=b.useCallback(function(p){l.current=p.changedTouches[0].clientY},[]),g=b.useCallback(function(p){var _=l.current-p.changedTouches[0].clientY;c(p,_)},[c]),f=b.useCallback(function(p){if(p){var _=xP?{passive:!1}:!1;p.addEventListener("wheel",u,_),p.addEventListener("touchstart",d,_),p.addEventListener("touchmove",g,_)}},[g,d,u]),m=b.useCallback(function(p){p&&(p.removeEventListener("wheel",u,!1),p.removeEventListener("touchstart",d,!1),p.removeEventListener("touchmove",g,!1))},[g,d,u]);return b.useEffect(function(){if(t){var p=h.current;return f(p),function(){m(p)}}},[t,f,m]),function(p){h.current=p}}var Lg=["boxSizing","height","overflow","paddingRight","position"],Ag={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Og(i){i.preventDefault()}function Dg(i){i.stopPropagation()}function kg(){var i=this.scrollTop,t=this.scrollHeight,e=i+this.offsetHeight;i===0?this.scrollTop=1:e===t&&(this.scrollTop=i-1)}function Fg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Ng=!!(typeof window<"u"&&window.document&&window.document.createElement),Pr=0,gs={capture:!1,passive:!1};function tA(i){var t=i.isEnabled,e=i.accountForScrollbars,n=e===void 0?!0:e,s=b.useRef({}),r=b.useRef(null),a=b.useCallback(function(l){if(Ng){var h=document.body,c=h&&h.style;if(n&&Lg.forEach(function(f){var m=c&&c[f];s.current[f]=m}),n&&Pr<1){var u=parseInt(s.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,g=window.innerWidth-d+u||0;Object.keys(Ag).forEach(function(f){var m=Ag[f];c&&(c[f]=m)}),c&&(c.paddingRight="".concat(g,"px"))}h&&Fg()&&(h.addEventListener("touchmove",Og,gs),l&&(l.addEventListener("touchstart",kg,gs),l.addEventListener("touchmove",Dg,gs))),Pr+=1}},[n]),o=b.useCallback(function(l){if(Ng){var h=document.body,c=h&&h.style;Pr=Math.max(Pr-1,0),n&&Pr<1&&Lg.forEach(function(u){var d=s.current[u];c&&(c[u]=d)}),h&&Fg()&&(h.removeEventListener("touchmove",Og,gs),l&&(l.removeEventListener("touchstart",kg,gs),l.removeEventListener("touchmove",Dg,gs)))}},[n]);return b.useEffect(function(){if(t){var l=r.current;return a(l),function(){o(l)}}},[t,a,o]),function(l){r.current=l}}var eA=function(t){var e=t.target;return e.ownerDocument.activeElement&&e.ownerDocument.activeElement.blur()},iA={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function nA(i){var t=i.children,e=i.lockEnabled,n=i.captureEnabled,s=n===void 0?!0:n,r=i.onBottomArrive,a=i.onBottomLeave,o=i.onTopArrive,l=i.onTopLeave,h=QL({isEnabled:s,onBottomArrive:r,onBottomLeave:a,onTopArrive:o,onTopLeave:l}),c=tA({isEnabled:e}),u=function(g){h(g),c(g)};return J(b.Fragment,null,e&&J("div",{onClick:eA,css:iA}),t(u))}var sA={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},rA=function(t){var e=t.name,n=t.onFocus;return J("input",{required:!0,name:e,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:sA,value:"",onChange:function(){}})},aA=rA;function vd(i){var t;return typeof window<"u"&&window.navigator!=null?i.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function oA(){return vd(/^iPhone/i)}function r_(){return vd(/^Mac/i)}function lA(){return vd(/^iPad/i)||r_()&&navigator.maxTouchPoints>1}function hA(){return oA()||lA()}function cA(){return r_()||hA()}var uA=function(t){return t.label},a_=function(t){return t.label},o_=function(t){return t.value},dA=function(t){return!!t.isDisabled},fA={clearIndicator:ZP,container:VP,control:sL,dropdownIndicator:qP,group:lL,groupHeading:cL,indicatorsContainer:WP,indicatorSeparator:QP,input:gL,loadingIndicator:iL,loadingMessage:kP,menu:RP,menuList:AP,menuPortal:GP,multiValue:yL,multiValueLabel:xL,multiValueRemove:ML,noOptionsMessage:DP,option:IL,placeholder:PL,singleValue:OL,valueContainer:BP},gA={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},mA=4,l_=4,pA=38,_A=l_*2,vA={baseUnit:l_,controlHeight:pA,menuGutter:_A},tc={borderRadius:mA,colors:gA,spacing:vA},yA={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Sg(),captureMenuScroll:!Sg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:qL(),formatGroupLabel:uA,getOptionLabel:a_,getOptionValue:o_,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:dA,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!vP(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var e=t.count;return"".concat(e," result").concat(e!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Gg(i,t,e,n){var s=u_(i,t,e),r=d_(i,t,e),a=c_(i,t),o=yl(i,t);return{type:"option",data:t,isDisabled:s,isSelected:r,label:a,value:o,index:n}}function ko(i,t){return i.options.map(function(e,n){if("options"in e){var s=e.options.map(function(a,o){return Gg(i,a,t,o)}).filter(function(a){return Vg(i,a)});return s.length>0?{type:"group",data:e,options:s,index:n}:void 0}var r=Gg(i,e,t,n);return Vg(i,r)?r:void 0}).filter(MP)}function h_(i){return i.reduce(function(t,e){return e.type==="group"?t.push.apply(t,Ns(e.options.map(function(n){return n.data}))):t.push(e.data),t},[])}function zg(i,t){return i.reduce(function(e,n){return n.type==="group"?e.push.apply(e,Ns(n.options.map(function(s){return{data:s.data,id:"".concat(t,"-").concat(n.index,"-").concat(s.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function xA(i,t){return h_(ko(i,t))}function Vg(i,t){var e=i.inputValue,n=e===void 0?"":e,s=t.data,r=t.isSelected,a=t.label,o=t.value;return(!g_(i)||!r)&&f_(i,{label:a,value:o,data:s},n)}function MA(i,t){var e=i.focusedValue,n=i.selectValue,s=n.indexOf(e);if(s>-1){var r=t.indexOf(e);if(r>-1)return e;if(s-1?e:t[0]}var ec=function(t,e){var n,s=(n=t.find(function(r){return r.data===e}))===null||n===void 0?void 0:n.id;return s||null},c_=function(t,e){return t.getOptionLabel(e)},yl=function(t,e){return t.getOptionValue(e)};function u_(i,t,e){return typeof i.isOptionDisabled=="function"?i.isOptionDisabled(t,e):!1}function d_(i,t,e){if(e.indexOf(t)>-1)return!0;if(typeof i.isOptionSelected=="function")return i.isOptionSelected(t,e);var n=yl(i,t);return e.some(function(s){return yl(i,s)===n})}function f_(i,t,e){return i.filterOption?i.filterOption(t,e):!0}var g_=function(t){var e=t.hideSelectedOptions,n=t.isMulti;return e===void 0?n:e},EA=1,Ya=function(i){UT(e,i);var t=XT(e);function e(n){var s;if(jT(this,e),s=t.call(this,n),s.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},s.blockOptionHover=!1,s.isComposing=!1,s.commonProps=void 0,s.initialTouchX=0,s.initialTouchY=0,s.openAfterFocus=!1,s.scrollToFocusedOptionOnUpdate=!1,s.userIsDragging=void 0,s.isAppleDevice=cA(),s.controlRef=null,s.getControlRef=function(l){s.controlRef=l},s.focusedOptionRef=null,s.getFocusedOptionRef=function(l){s.focusedOptionRef=l},s.menuListRef=null,s.getMenuListRef=function(l){s.menuListRef=l},s.inputRef=null,s.getInputRef=function(l){s.inputRef=l},s.focus=s.focusInput,s.blur=s.blurInput,s.onChange=function(l,h){var c=s.props,u=c.onChange,d=c.name;h.name=d,s.ariaOnChange(l,h),u(l,h)},s.setValue=function(l,h,c){var u=s.props,d=u.closeMenuOnSelect,g=u.isMulti,f=u.inputValue;s.onInputChange("",{action:"set-value",prevInputValue:f}),d&&(s.setState({inputIsHiddenAfterUpdate:!g}),s.onMenuClose()),s.setState({clearFocusValueOnUpdate:!0}),s.onChange(l,{action:h,option:c})},s.selectOption=function(l){var h=s.props,c=h.blurInputOnSelect,u=h.isMulti,d=h.name,g=s.state.selectValue,f=u&&s.isOptionSelected(l,g),m=s.isOptionDisabled(l,g);if(f){var p=s.getOptionValue(l);s.setValue(g.filter(function(_){return s.getOptionValue(_)!==p}),"deselect-option",l)}else if(!m)u?s.setValue([].concat(Ns(g),[l]),"select-option",l):s.setValue(l,"select-option");else{s.ariaOnChange(l,{action:"select-option",option:l,name:d});return}c&&s.blurInput()},s.removeValue=function(l){var h=s.props.isMulti,c=s.state.selectValue,u=s.getOptionValue(l),d=c.filter(function(f){return s.getOptionValue(f)!==u}),g=jr(h,d,d[0]||null);s.onChange(g,{action:"remove-value",removedValue:l}),s.focusInput()},s.clearValue=function(){var l=s.state.selectValue;s.onChange(jr(s.props.isMulti,[],null),{action:"clear",removedValues:l})},s.popValue=function(){var l=s.props.isMulti,h=s.state.selectValue,c=h[h.length-1],u=h.slice(0,h.length-1),d=jr(l,u,u[0]||null);s.onChange(d,{action:"pop-value",removedValue:c})},s.getFocusedOptionId=function(l){return ec(s.state.focusableOptionsWithIds,l)},s.getFocusableOptionsWithIds=function(){return zg(ko(s.props,s.state.selectValue),s.getElementId("option"))},s.getValue=function(){return s.state.selectValue},s.cx=function(){for(var l=arguments.length,h=new Array(l),c=0;cg||d>g}},s.onTouchEnd=function(l){s.userIsDragging||(s.controlRef&&!l.composedPath().includes(s.controlRef)&&s.menuListRef&&!l.composedPath().includes(s.menuListRef)&&s.blurInput(),s.initialTouchX=0,s.initialTouchY=0)},s.onControlTouchEnd=function(l){s.userIsDragging||s.onControlMouseDown(l)},s.onClearIndicatorTouchEnd=function(l){s.userIsDragging||s.onClearIndicatorMouseDown(l)},s.onDropdownIndicatorTouchEnd=function(l){s.userIsDragging||s.onDropdownIndicatorMouseDown(l)},s.handleInputChange=function(l){var h=s.props.inputValue,c=l.currentTarget.value;s.setState({inputIsHiddenAfterUpdate:!1}),s.onInputChange(c,{action:"input-change",prevInputValue:h}),s.props.menuIsOpen||s.onMenuOpen()},s.onInputFocus=function(l){s.props.onFocus&&s.props.onFocus(l),s.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(s.openAfterFocus||s.props.openMenuOnFocus)&&s.openMenu("first"),s.openAfterFocus=!1},s.onInputBlur=function(l){var h=s.props.inputValue;if(s.menuListRef&&s.menuListRef.contains(document.activeElement)){s.inputRef.focus();return}s.props.onBlur&&s.props.onBlur(l),s.onInputChange("",{action:"input-blur",prevInputValue:h}),s.onMenuClose(),s.setState({focusedValue:null,isFocused:!1})},s.onOptionHover=function(l){if(!(s.blockOptionHover||s.state.focusedOption===l)){var h=s.getFocusableOptions(),c=h.indexOf(l);s.setState({focusedOption:l,focusedOptionId:c>-1?s.getFocusedOptionId(l):null})}},s.shouldHideSelectedOptions=function(){return g_(s.props)},s.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),s.focus()},s.onKeyDown=function(l){var h=s.props,c=h.isMulti,u=h.backspaceRemovesValue,d=h.escapeClearsValue,g=h.inputValue,f=h.isClearable,m=h.isDisabled,p=h.menuIsOpen,_=h.onKeyDown,v=h.tabSelectsValue,x=h.openMenuOnFocus,y=s.state,M=y.focusedOption,w=y.focusedValue,I=y.selectValue;if(!m&&!(typeof _=="function"&&(_(l),l.defaultPrevented))){switch(s.blockOptionHover=!0,l.key){case"ArrowLeft":if(!c||g)return;s.focusValue("previous");break;case"ArrowRight":if(!c||g)return;s.focusValue("next");break;case"Delete":case"Backspace":if(g)return;if(w)s.removeValue(w);else{if(!u)return;c?s.popValue():f&&s.clearValue()}break;case"Tab":if(s.isComposing||l.shiftKey||!p||!v||!M||x&&s.isOptionSelected(M,I))return;s.selectOption(M);break;case"Enter":if(l.keyCode===229)break;if(p){if(!M||s.isComposing)return;s.selectOption(M);break}return;case"Escape":p?(s.setState({inputIsHiddenAfterUpdate:!1}),s.onInputChange("",{action:"menu-close",prevInputValue:g}),s.onMenuClose()):f&&d&&s.clearValue();break;case" ":if(g)return;if(!p){s.openMenu("first");break}if(!M)return;s.selectOption(M);break;case"ArrowUp":p?s.focusOption("up"):s.openMenu("last");break;case"ArrowDown":p?s.focusOption("down"):s.openMenu("first");break;case"PageUp":if(!p)return;s.focusOption("pageup");break;case"PageDown":if(!p)return;s.focusOption("pagedown");break;case"Home":if(!p)return;s.focusOption("first");break;case"End":if(!p)return;s.focusOption("last");break;default:return}l.preventDefault()}},s.state.instancePrefix="react-select-"+(s.props.instanceId||++EA),s.state.selectValue=_l(n.value),n.menuIsOpen&&s.state.selectValue.length){var r=s.getFocusableOptionsWithIds(),a=s.buildFocusableOptions(),o=a.indexOf(s.state.selectValue[0]);s.state.focusableOptionsWithIds=r,s.state.focusedOption=a[o],s.state.focusedOptionId=ec(r,a[o])}return s}return BT(e,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Cg(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(s){var r=this.props,a=r.isDisabled,o=r.menuIsOpen,l=this.state.isFocused;(l&&!a&&s.isDisabled||l&&o&&!s.menuIsOpen)&&this.focusInput(),l&&a&&!s.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&s.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Cg(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(s,r){this.props.onInputChange(s,r)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(s){var r=this,a=this.state,o=a.selectValue,l=a.isFocused,h=this.buildFocusableOptions(),c=s==="first"?0:h.length-1;if(!this.props.isMulti){var u=h.indexOf(o[0]);u>-1&&(c=u)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:h[c],focusedOptionId:this.getFocusedOptionId(h[c])},function(){return r.onMenuOpen()})}},{key:"focusValue",value:function(s){var r=this.state,a=r.selectValue,o=r.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(o);o||(l=-1);var h=a.length-1,c=-1;if(a.length){switch(s){case"previous":l===0?c=0:l===-1?c=h:c=l-1;break;case"next":l>-1&&l0&&arguments[0]!==void 0?arguments[0]:"first",r=this.props.pageSize,a=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var l=0,h=o.indexOf(a);a||(h=-1),s==="up"?l=h>0?h-1:o.length-1:s==="down"?l=(h+1)%o.length:s==="pageup"?(l=h-r,l<0&&(l=0)):s==="pagedown"?(l=h+r,l>o.length-1&&(l=o.length-1)):s==="last"&&(l=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(tc):K(K({},tc),this.props.theme):tc}},{key:"getCommonProps",value:function(){var s=this.clearValue,r=this.cx,a=this.getStyles,o=this.getClassNames,l=this.getValue,h=this.selectOption,c=this.setValue,u=this.props,d=u.isMulti,g=u.isRtl,f=u.options,m=this.hasValue();return{clearValue:s,cx:r,getStyles:a,getClassNames:o,getValue:l,hasValue:m,isMulti:d,isRtl:g,options:f,selectOption:h,selectProps:u,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var s=this.state.selectValue;return s.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var s=this.props,r=s.isClearable,a=s.isMulti;return r===void 0?a:r}},{key:"isOptionDisabled",value:function(s,r){return u_(this.props,s,r)}},{key:"isOptionSelected",value:function(s,r){return d_(this.props,s,r)}},{key:"filterOption",value:function(s,r){return f_(this.props,s,r)}},{key:"formatOptionLabel",value:function(s,r){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(s,{context:r,inputValue:a,selectValue:o})}else return this.getOptionLabel(s)}},{key:"formatGroupLabel",value:function(s){return this.props.formatGroupLabel(s)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var s=this.props,r=s.isDisabled,a=s.isSearchable,o=s.inputId,l=s.inputValue,h=s.tabIndex,c=s.form,u=s.menuIsOpen,d=s.required,g=this.getComponents(),f=g.Input,m=this.state,p=m.inputIsHidden,_=m.ariaSelection,v=this.commonProps,x=o||this.getElementId("input"),y=K(K(K({"aria-autocomplete":"list","aria-expanded":u,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||void 0},u&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?_?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?b.createElement(f,Q({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:r,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:h,form:c,type:"text",value:l},y)):b.createElement(ZL,Q({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:pl,onFocus:this.onInputFocus,disabled:r,tabIndex:h,inputMode:"none",form:c,value:""},y))}},{key:"renderPlaceholderOrValue",value:function(){var s=this,r=this.getComponents(),a=r.MultiValue,o=r.MultiValueContainer,l=r.MultiValueLabel,h=r.MultiValueRemove,c=r.SingleValue,u=r.Placeholder,d=this.commonProps,g=this.props,f=g.controlShouldRenderValue,m=g.isDisabled,p=g.isMulti,_=g.inputValue,v=g.placeholder,x=this.state,y=x.selectValue,M=x.focusedValue,w=x.isFocused;if(!this.hasValue()||!f)return _?null:b.createElement(u,Q({},d,{key:"placeholder",isDisabled:m,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),v);if(p)return y.map(function(E,S){var T=E===M,O="".concat(s.getOptionLabel(E),"-").concat(s.getOptionValue(E));return b.createElement(a,Q({},d,{components:{Container:o,Label:l,Remove:h},isFocused:T,isDisabled:m,key:O,index:S,removeProps:{onClick:function(){return s.removeValue(E)},onTouchEnd:function(){return s.removeValue(E)},onMouseDown:function(N){N.preventDefault()}},data:E}),s.formatOptionLabel(E,"value"))});if(_)return null;var I=y[0];return b.createElement(c,Q({},d,{data:I,isDisabled:m}),this.formatOptionLabel(I,"value"))}},{key:"renderClearIndicator",value:function(){var s=this.getComponents(),r=s.ClearIndicator,a=this.commonProps,o=this.props,l=o.isDisabled,h=o.isLoading,c=this.state.isFocused;if(!this.isClearable()||!r||l||!this.hasValue()||h)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return b.createElement(r,Q({},a,{innerProps:u,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var s=this.getComponents(),r=s.LoadingIndicator,a=this.commonProps,o=this.props,l=o.isDisabled,h=o.isLoading,c=this.state.isFocused;if(!r||!h)return null;var u={"aria-hidden":"true"};return b.createElement(r,Q({},a,{innerProps:u,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var s=this.getComponents(),r=s.DropdownIndicator,a=s.IndicatorSeparator;if(!r||!a)return null;var o=this.commonProps,l=this.props.isDisabled,h=this.state.isFocused;return b.createElement(a,Q({},o,{isDisabled:l,isFocused:h}))}},{key:"renderDropdownIndicator",value:function(){var s=this.getComponents(),r=s.DropdownIndicator;if(!r)return null;var a=this.commonProps,o=this.props.isDisabled,l=this.state.isFocused,h={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return b.createElement(r,Q({},a,{innerProps:h,isDisabled:o,isFocused:l}))}},{key:"renderMenu",value:function(){var s=this,r=this.getComponents(),a=r.Group,o=r.GroupHeading,l=r.Menu,h=r.MenuList,c=r.MenuPortal,u=r.LoadingMessage,d=r.NoOptionsMessage,g=r.Option,f=this.commonProps,m=this.state.focusedOption,p=this.props,_=p.captureMenuScroll,v=p.inputValue,x=p.isLoading,y=p.loadingMessage,M=p.minMenuHeight,w=p.maxMenuHeight,I=p.menuIsOpen,E=p.menuPlacement,S=p.menuPosition,T=p.menuPortalTarget,O=p.menuShouldBlockScroll,P=p.menuShouldScrollIntoView,N=p.noOptionsMessage,G=p.onMenuScrollToTop,k=p.onMenuScrollToBottom;if(!I)return null;var D=function(X,A){var et=X.type,st=X.data,dt=X.isDisabled,St=X.isSelected,Bt=X.label,Ut=X.value,re=m===st,Re=dt?void 0:function(){return s.onOptionHover(st)},_i=dt?void 0:function(){return s.selectOption(st)},vi="".concat(s.getElementId("option"),"-").concat(A),Te={id:vi,onClick:_i,onMouseMove:Re,onMouseOver:Re,tabIndex:-1,role:"option","aria-selected":s.isAppleDevice?void 0:St};return b.createElement(g,Q({},f,{innerProps:Te,data:st,isDisabled:dt,isSelected:St,key:vi,label:Bt,type:et,value:Ut,isFocused:re,innerRef:re?s.getFocusedOptionRef:void 0}),s.formatOptionLabel(X.data,"menu"))},z;if(this.hasOptions())z=this.getCategorizedOptions().map(function(H){if(H.type==="group"){var X=H.data,A=H.options,et=H.index,st="".concat(s.getElementId("group"),"-").concat(et),dt="".concat(st,"-heading");return b.createElement(a,Q({},f,{key:st,data:X,options:A,Heading:o,headingProps:{id:dt,data:H.data},label:s.formatGroupLabel(H.data)}),H.options.map(function(St){return D(St,"".concat(et,"-").concat(St.index))}))}else if(H.type==="option")return D(H,"".concat(H.index))});else if(x){var U=y({inputValue:v});if(U===null)return null;z=b.createElement(u,f,U)}else{var q=N({inputValue:v});if(q===null)return null;z=b.createElement(d,f,q)}var V={minMenuHeight:M,maxMenuHeight:w,menuPlacement:E,menuPosition:S,menuShouldScrollIntoView:P},$=b.createElement(TP,Q({},f,V),function(H){var X=H.ref,A=H.placerProps,et=A.placement,st=A.maxHeight;return b.createElement(l,Q({},f,V,{innerRef:X,innerProps:{onMouseDown:s.onMenuMouseDown,onMouseMove:s.onMenuMouseMove},isLoading:x,placement:et}),b.createElement(nA,{captureEnabled:_,onTopArrive:G,onBottomArrive:k,lockEnabled:O},function(dt){return b.createElement(h,Q({},f,{innerRef:function(Bt){s.getMenuListRef(Bt),dt(Bt)},innerProps:{role:"listbox","aria-multiselectable":f.isMulti,id:s.getElementId("listbox")},isLoading:x,maxHeight:st,focusedOption:m}),z)}))});return T||S==="fixed"?b.createElement(c,Q({},f,{appendTo:T,controlElement:this.controlRef,menuPlacement:E,menuPosition:S}),$):$}},{key:"renderFormField",value:function(){var s=this,r=this.props,a=r.delimiter,o=r.isDisabled,l=r.isMulti,h=r.name,c=r.required,u=this.state.selectValue;if(c&&!this.hasValue()&&!o)return b.createElement(aA,{name:h,onFocus:this.onValueInputFocus});if(!(!h||o))if(l)if(a){var d=u.map(function(m){return s.getOptionValue(m)}).join(a);return b.createElement("input",{name:h,type:"hidden",value:d})}else{var g=u.length>0?u.map(function(m,p){return b.createElement("input",{key:"i-".concat(p),name:h,type:"hidden",value:s.getOptionValue(m)})}):b.createElement("input",{name:h,type:"hidden",value:""});return b.createElement("div",null,g)}else{var f=u[0]?this.getOptionValue(u[0]):"";return b.createElement("input",{name:h,type:"hidden",value:f})}}},{key:"renderLiveRegion",value:function(){var s=this.commonProps,r=this.state,a=r.ariaSelection,o=r.focusedOption,l=r.focusedValue,h=r.isFocused,c=r.selectValue,u=this.getFocusableOptions();return b.createElement($L,Q({},s,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:o,focusedValue:l,isFocused:h,selectValue:c,focusableOptions:u,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var s=this.getComponents(),r=s.Control,a=s.IndicatorsContainer,o=s.SelectContainer,l=s.ValueContainer,h=this.props,c=h.className,u=h.id,d=h.isDisabled,g=h.menuIsOpen,f=this.state.isFocused,m=this.commonProps=this.getCommonProps();return b.createElement(o,Q({},m,{className:c,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:f}),this.renderLiveRegion(),b.createElement(r,Q({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:f,menuIsOpen:g}),b.createElement(l,Q({},m,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),b.createElement(a,Q({},m,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(s,r){var a=r.prevProps,o=r.clearFocusValueOnUpdate,l=r.inputIsHiddenAfterUpdate,h=r.ariaSelection,c=r.isFocused,u=r.prevWasFocused,d=r.instancePrefix,g=s.options,f=s.value,m=s.menuIsOpen,p=s.inputValue,_=s.isMulti,v=_l(f),x={};if(a&&(f!==a.value||g!==a.options||m!==a.menuIsOpen||p!==a.inputValue)){var y=m?xA(s,v):[],M=m?zg(ko(s,v),"".concat(d,"-option")):[],w=o?MA(r,v):null,I=bA(r,y),E=ec(M,I);x={selectValue:v,focusedOption:I,focusedOptionId:E,focusableOptionsWithIds:M,focusedValue:w,clearFocusValueOnUpdate:!1}}var S=l!=null&&s!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},T=h,O=c&&u;return c&&!O&&(T={value:jr(_,v,v[0]||null),options:v,action:"initial-input-focus"},O=!u),h?.action==="initial-input-focus"&&(T=null),K(K(K({},x),S),{},{prevProps:s,ariaSelection:T,prevWasFocused:O})}}]),e}(b.Component);Ya.defaultProps=yA;var wA=b.forwardRef(function(i,t){var e=ih(i);return b.createElement(Ya,Q({ref:t},e))}),CA=wA,SA=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],jg=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,s=String(t).toLowerCase(),r=String(n.getOptionValue(e)).toLowerCase(),a=String(n.getOptionLabel(e)).toLowerCase();return r===s||a===s},ic={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,e,n,s){return!(!t||e.some(function(r){return jg(t,r,s)})||n.some(function(r){return jg(t,r,s)}))},getNewOptionData:function(t,e){return{label:e,value:t,__isNew__:!0}}};function m_(i){var t=i.allowCreateWhileLoading,e=t===void 0?!1:t,n=i.createOptionPosition,s=n===void 0?"last":n,r=i.formatCreateLabel,a=r===void 0?ic.formatCreateLabel:r,o=i.isValidNewOption,l=o===void 0?ic.isValidNewOption:o,h=i.getNewOptionData,c=h===void 0?ic.getNewOptionData:h,u=i.onCreateOption,d=i.options,g=d===void 0?[]:d,f=i.onChange,m=mi(i,SA),p=m.getOptionValue,_=p===void 0?o_:p,v=m.getOptionLabel,x=v===void 0?a_:v,y=m.inputValue,M=m.isLoading,w=m.isMulti,I=m.value,E=m.name,S=b.useMemo(function(){return l(y,_l(I),g,{getOptionValue:_,getOptionLabel:x})?c(y,a(y)):void 0},[a,c,x,_,y,l,g,I]),T=b.useMemo(function(){return(e||!M)&&S?s==="first"?[S].concat(Ns(g)):[].concat(Ns(g),[S]):g},[e,s,M,S,g]),O=b.useCallback(function(P,N){if(N.action!=="select-option")return f(P,N);var G=Array.isArray(P)?P:[P];if(G[G.length-1]===S){if(u)u(y);else{var k=c(y,y),D={action:"create-option",name:E,option:k};f(jr(w,[].concat(Ns(_l(I)),[k]),k),D)}return}f(P,N)},[c,y,w,E,S,u,f,I]);return K(K({},m),{},{options:T,onChange:O})}var IA=b.forwardRef(function(i,t){var e=ih(i),n=m_(e);return b.createElement(Ya,Q({ref:t},n))}),RA=IA,TA=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function p_(i){var t=i.defaultOptions,e=t===void 0?!1:t,n=i.cacheOptions,s=n===void 0?!1:n,r=i.loadOptions;i.options;var a=i.isLoading,o=a===void 0?!1:a,l=i.onInputChange,h=i.filterOption,c=h===void 0?null:h,u=mi(i,TA),d=u.inputValue,g=b.useRef(void 0),f=b.useRef(!1),m=b.useState(Array.isArray(e)?e:void 0),p=Xt(m,2),_=p[0],v=p[1],x=b.useState(typeof d<"u"?d:""),y=Xt(x,2),M=y[0],w=y[1],I=b.useState(e===!0),E=Xt(I,2),S=E[0],T=E[1],O=b.useState(void 0),P=Xt(O,2),N=P[0],G=P[1],k=b.useState([]),D=Xt(k,2),z=D[0],U=D[1],q=b.useState(!1),V=Xt(q,2),$=V[0],H=V[1],X=b.useState({}),A=Xt(X,2),et=A[0],st=A[1],dt=b.useState(void 0),St=Xt(dt,2),Bt=St[0],Ut=St[1],re=b.useState(void 0),Re=Xt(re,2),_i=Re[0],vi=Re[1];s!==_i&&(st({}),vi(s)),e!==Bt&&(v(Array.isArray(e)?e:void 0),Ut(e)),b.useEffect(function(){return f.current=!0,function(){f.current=!1}},[]);var Te=b.useCallback(function(te,Pe){if(!r)return Pe();var kt=r(te,Pe);kt&&typeof kt.then=="function"&&kt.then(Pe,function(){return Pe()})},[r]);b.useEffect(function(){e===!0&&Te(M,function(te){f.current&&(v(te||[]),T(!!g.current))})},[]);var qe=b.useCallback(function(te,Pe){var kt=fP(te,Pe,l);if(!kt){g.current=void 0,w(""),G(""),U([]),T(!1),H(!1);return}if(s&&et[kt])w(kt),G(kt),U(et[kt]),T(!1),H(!1);else{var In=g.current={};w(kt),T(!0),H(!N),Te(kt,function(Ke){f&&In===g.current&&(g.current=void 0,T(!1),G(kt),U(Ke||[]),H(!1),st(Ke?K(K({},et),{},bs({},kt,Ke)):et))})}},[s,Te,N,et,l]),de=$?[]:M&&N?z:_||[];return K(K({},u),{},{options:de,isLoading:S||o,onInputChange:qe,filterOption:c})}var PA=b.forwardRef(function(i,t){var e=p_(i),n=ih(e);return b.createElement(Ya,Q({ref:t},n))}),LA=PA,AA=b.forwardRef(function(i,t){var e=p_(i),n=ih(e),s=m_(n);return b.createElement(Ya,Q({ref:t},s))}),OA=AA,__=i=>{const{className:t,clearValue:e,cx:n,getStyles:s,getClassNames:r,getValue:a,hasValue:o,isMulti:l,isRtl:h,options:c,selectOption:u,selectProps:d,setValue:g,theme:f,...m}=i;return{...m}},DA=i=>typeof i=="string"&&["sm","md","lg"].includes(i),kA=i=>DA(i)?i:i==="xs"?"sm":i==="xl"?"lg":"md",pi=i=>{const t=Pa(),e=kA(t.components.Input.defaultProps.size),n=i??e;return Sv(typeof n=="string"?[n]:n,{fallback:"md"})||e},FA=i=>{const{children:t,className:e,cx:n,innerProps:s,isDisabled:r,isRtl:a,hasValue:o,selectProps:{chakraStyles:l}}=i,h={position:"relative",direction:a?"rtl":void 0,...r?{cursor:"not-allowed"}:{}},c=l?.container?l.container(h,i):h;return R.jsx(Mt,{...s,className:n({"--is-disabled":r,"--is-rtl":a,"--has-value":o},e),sx:c,children:t})},NA=i=>{const{children:t,className:e,cx:n,isMulti:s,hasValue:r,innerProps:a,selectProps:{chakraStyles:o,size:l,variant:h,focusBorderColor:c,errorBorderColor:u,controlShouldRenderValue:d}}=i,g=pi(l),f=Ri("Input",{size:g,variant:h,focusBorderColor:c,errorBorderColor:u}),m={display:s&&r&&d?"flex":"grid",alignItems:"center",flex:1,paddingY:"2px",paddingX:f.field.px,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},p=o?.valueContainer?o.valueContainer(m,i):m;return R.jsx(Mt,{...a,className:n({"value-container":!0,"value-container--is-multi":s,"value-container--has-value":r},e),sx:p,children:t})},GA=i=>{const{children:t,className:e,cx:n,innerProps:s,selectProps:{chakraStyles:r}}=i,a={display:"flex",alignItems:"center",alignSelf:"stretch",flexShrink:0},o=r?.indicatorsContainer?r.indicatorsContainer(a,i):a;return R.jsx(Mt,{...s,className:n({indicators:!0},e),sx:o,children:t})},zA=i=>{const{className:t,cx:e,children:n,innerRef:s,innerProps:r,isDisabled:a,isFocused:o,menuIsOpen:l,selectProps:{chakraStyles:h,size:c,variant:u,focusBorderColor:d,errorBorderColor:g,isInvalid:f,isReadOnly:m}}=i,p=pi(c),{field:{height:_,h:v,...x}}=Ri("Input",{size:p,variant:u,focusBorderColor:d,errorBorderColor:g}),M={...x,position:"relative",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",padding:0,overflow:"hidden",height:"auto",minH:_||v,...a?{pointerEvents:"none"}:{}},w=h?.control?h.control(M,i):M;return R.jsx(Mt,{ref:s,className:e({control:!0,"control--is-disabled":a,"control--is-focused":o,"control--menu-is-open":l},t),sx:w,...r,"data-focus":o?!0:void 0,"data-focus-visible":o?!0:void 0,"data-invalid":f?!0:void 0,"data-disabled":a?!0:void 0,"data-readonly":m?!0:void 0,children:n})},VA=i=>{const{className:t,cx:e,selectProps:{chakraStyles:n}}=i,s={opacity:1,display:"none"},r=n?.indicatorSeparator?n.indicatorSeparator(s,i):s;return R.jsx(su,{className:e({"indicator-separator":!0},t),sx:r,orientation:"vertical"})},jA=i=>R.jsx(Cl,{role:"presentation",focusable:"false","aria-hidden":"true",...i,children:R.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),BA=i=>{const{children:t,className:e,cx:n,innerProps:s,selectProps:{chakraStyles:r,size:a,focusBorderColor:o,errorBorderColor:l,variant:h}}=i,c=pi(a),d={...Ri("Select",{size:c,variant:h,focusBorderColor:o,errorBorderColor:l}).icon,display:"inline-flex",alignItems:"center",justifyContent:"center",position:"static",marginRight:2,marginLeft:1,pointerEvents:"none"},g=r?.dropdownIndicator?r.dropdownIndicator(d,i):d,f={height:"1em",width:"1em"},m=r?.downChevron?r.downChevron(f,i):f;return R.jsx(Mt,{...s,className:n({indicator:!0,"dropdown-indicator":!0},e),sx:g,children:t||R.jsx(jA,{sx:m})})},UA=i=>R.jsx(Cl,{focusable:"false","aria-hidden":!0,...i,children:R.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})}),WA=i=>{const{children:t,className:e,cx:n,innerProps:s,selectProps:{chakraStyles:r,size:a}}=i,o=pi(a),h={...eu("CloseButton",{size:o}),marginX:1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:"pointer"},c=r?.clearIndicator?r.clearIndicator(h,i):h,u={width:"1em",height:"1em"},d=r?.crossIcon?r.crossIcon(u,i):u;return R.jsx(Mt,{role:"button",className:n({indicator:!0,"clear-indicator":!0},e),sx:c,"aria-label":"Clear selected options",...s,children:t||R.jsx(UA,{sx:d})})},$A=i=>{const{className:t,cx:e,innerProps:n,selectProps:{chakraStyles:s,size:r},color:a,emptyColor:o,speed:l,thickness:h,spinnerSize:c}=i,u=pi(r),g={sm:"xs",md:"sm",lg:"md"}[u],f={marginRight:3},m=s?.loadingIndicator?s.loadingIndicator(f,i):f;return R.jsx(K_,{className:e({indicator:!0,"loading-indicator":!0},t),sx:m,...n,size:c||g,color:a,emptyColor:o,speed:l,thickness:h})},XA=i=>{const{className:t,cx:e,value:n,selectProps:{chakraStyles:s,isReadOnly:r}}=i,{innerRef:a,isDisabled:o,isHidden:l,inputClassName:h,...c}=__(i),u={gridArea:"1 / 2",minW:"2px",border:0,margin:0,outline:0,padding:0},d={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content",color:"inherit",marginX:"0.125rem",paddingY:"0.125rem",visibility:o?"hidden":"visible",transform:n?"translateZ(0)":"",_after:{content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre",padding:0,...u}},g=s?.inputContainer?s.inputContainer(d,i):d,f={background:0,opacity:l?0:1,width:"100%",...u},m=s?.input?s.input(f,i):f;return R.jsx(Mt,{className:e({"input-container":!0},t),"data-value":n||"",sx:g,children:R.jsx(Oe.input,{className:e({input:!0},h),ref:a,sx:m,disabled:o,readOnly:r?!0:void 0,...c})})},HA=i=>i?{bottom:"top",top:"bottom"}[i]:"top",YA=i=>{const{className:t,cx:e,children:n,innerProps:s,innerRef:r,placement:a,selectProps:{chakraStyles:o}}=i,l={position:"absolute",[HA(a)]:"100%",marginY:"8px",width:"100%",zIndex:1},h=o?.menu?o.menu(l,i):l;return R.jsx(c0,{children:R.jsx(Mt,{...s,ref:r,className:e({menu:!0},t),sx:h,children:n})})},qA=i=>{var t;const{className:e,cx:n,innerRef:s,children:r,maxHeight:a,isMulti:o,innerProps:l,selectProps:{chakraStyles:h,size:c,variant:u,focusBorderColor:d,errorBorderColor:g}}=i,f=Ri("Menu"),m=pi(c),_=Ri("Input",{size:m,variant:u,focusBorderColor:d,errorBorderColor:g}).field,v={...f.list,minW:"100%",maxHeight:`${a}px`,overflowY:"auto","--input-border-radius":_?.["--input-border-radius"],borderRadius:_?.borderRadius||((t=f.list)==null?void 0:t.borderRadius),position:"relative",WebkitOverflowScrolling:"touch"},x=h?.menuList?h.menuList(v,i):v;return R.jsx(Mt,{...l,className:n({"menu-list":!0,"menu-list--is-multi":o},e),sx:x,ref:s,children:r})},KA=i=>{const{children:t,className:e,cx:n,innerProps:s,selectProps:{chakraStyles:r,size:a}}=i,o=pi(a),h={color:"chakra-subtle-text",textAlign:"center",paddingY:{sm:"6px",md:"8px",lg:"10px"}[o],fontSize:o},c=r?.loadingMessage?r.loadingMessage(h,i):h;return R.jsx(Mt,{...s,className:n({"menu-notice":!0,"menu-notice--loading":!0},e),sx:c,children:t})},ZA=i=>{const{children:t,className:e,cx:n,innerProps:s,selectProps:{chakraStyles:r,size:a}}=i,o=pi(a),h={color:"chakra-subtle-text",textAlign:"center",paddingY:{sm:"6px",md:"8px",lg:"10px"}[o],fontSize:o},c=r?.noOptionsMessage?r.noOptionsMessage(h,i):h;return R.jsx(Mt,{...s,className:n({"menu-notice":!0,"menu-notice--no-options":!0},e),sx:c,children:t})},JA=i=>{const{children:t,className:e,cx:n,theme:s,getStyles:r,Heading:a,headingProps:o,label:l,selectProps:h,innerProps:c,getClassNames:u}=i,{chakraStyles:d}=h,g={},f=d?.group?d.group(g,i):g;return R.jsxs(Mt,{...c,className:n({group:!0},e),sx:f,children:[R.jsx(a,{...o,selectProps:h,cx:n,theme:s,getStyles:r,getClassNames:u,children:l}),R.jsx(Mt,{children:t})]})},QA=i=>{const{cx:t,className:e,selectProps:{chakraStyles:n,size:s}}=i,{data:r,...a}=__(i),o=Ri("Menu"),l=pi(s),h={sm:"xs",md:"sm",lg:"md"},c={sm:"0.4rem 0.8rem",md:"0.5rem 1rem",lg:"0.6rem 1.2rem"},u={...o.groupTitle,fontSize:h[l],padding:c[l],margin:0},d=n?.groupHeading?n.groupHeading(u,i):u;return R.jsx(Mt,{...a,className:t({"group-heading":!0},e),sx:d})},tO=i=>R.jsx("svg",{viewBox:"0 0 14 14",width:"1em",height:"1em",...i,children:R.jsx("polygon",{fill:"currentColor",points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})}),eO=i=>{const{className:t,cx:e,innerRef:n,innerProps:s,children:r,isFocused:a,isDisabled:o,isSelected:l,selectProps:{chakraStyles:h,size:c,isMulti:u,hideSelectedOptions:d,selectedOptionStyle:g,selectedOptionColorScheme:f}}=i,m=Ri("Menu").item,p=pi(c),_={sm:"0.6rem",md:"0.8rem",lg:"1rem"},v={sm:"0.3rem",md:"0.4rem",lg:"0.5rem"},x=Od(`${f}.500`,`${f}.300`),y=Od("white","black"),M=g==="check"&&(!u||d===!1),w=g==="color"&&l,I={...m,cursor:"pointer",display:"flex",alignItems:"center",width:"100%",textAlign:"start",fontSize:p,paddingX:_[p],paddingY:v[p],...w?{bg:x,color:y,_active:{bg:x}}:{}},E=h?.option?h.option(I,i):I;return R.jsxs(Mt,{...s,className:e({option:!0,"option--is-disabled":o,"option--is-focused":a,"option--is-selected":l},t),sx:E,ref:n,"data-focus":a?!0:void 0,"aria-disabled":o?!0:void 0,"aria-selected":l,children:[M&&R.jsx(u0,{fontSize:"0.8em",marginEnd:"0.75rem",opacity:l?1:0,children:R.jsx(tO,{})}),r]})},iO=i=>typeof i=="object"&&i!==null&&"colorScheme"in i&&typeof i.colorScheme=="string",nO=i=>typeof i=="object"&&i!==null&&"variant"in i&&typeof i.variant=="string",sO=i=>{const{children:t,className:e,components:n,cx:s,data:r,innerProps:a,isDisabled:o,isFocused:l,removeProps:h,selectProps:c,cropWithEllipsis:u}=i,{Container:d,Label:g,Remove:f}=n,{chakraStyles:m,tagColorScheme:p,tagVariant:_,size:v}=c,x=pi(v);let y="",M="";iO(r)&&(y=r.colorScheme),nO(r)&&(M=r.variant);const w=Ri("Tag",{size:x,colorScheme:y||p,variant:M||_}),I={...w.container,display:"flex",alignItems:"center",minWidth:0,margin:"0.125rem"},E=m?.multiValue?m.multiValue(I,i):I,S={...w.label,overflow:"hidden",textOverflow:u||u===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},T=m?.multiValueLabel?m.multiValueLabel(S,i):S,O={...w.closeButton,display:"flex",alignItems:"center",justifyContent:"center"},P=m?.multiValueRemove?m.multiValueRemove(O,i):O;return R.jsxs(d,{data:r,innerProps:{className:s({"multi-value":!0,"multi-value--is-disabled":o},e),...a},sx:E,selectProps:c,children:[R.jsx(g,{data:r,innerProps:{className:s({"multi-value__label":!0},e)},sx:T,selectProps:c,children:t}),R.jsx(f,{data:r,innerProps:{className:s({"multi-value__remove":!0},e),"aria-label":`Remove ${t||"option"}`,...h},sx:P,selectProps:c,isFocused:l})]})},rO=i=>{const{children:t,innerProps:e,sx:n}=i;return R.jsx(Oe.span,{...e,sx:n,children:t})},aO=i=>{const{children:t,innerProps:e,sx:n}=i;return R.jsx(Oe.span,{...e,sx:n,children:t})},oO=i=>R.jsx(Cl,{verticalAlign:"inherit",viewBox:"0 0 512 512",...i,children:R.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})}),lO=i=>{const{children:t,innerProps:e,isFocused:n,sx:s}=i;return R.jsx(Mt,{...e,role:"button",sx:s,"data-focus":n?!0:void 0,"data-focus-visible":n?!0:void 0,children:t||R.jsx(oO,{})})},hO=i=>{const{children:t,className:e,cx:n,innerProps:s,selectProps:{chakraStyles:r}}=i,a={gridArea:"1 / 1 / 2 / 3",color:"chakra-placeholder-color",mx:"0.125rem",userSelect:"none"},o=r?.placeholder?r.placeholder(a,i):a;return R.jsx(Mt,{...s,className:n({placeholder:!0},e),sx:o,children:t})},cO=i=>{const{children:t,className:e,cx:n,isDisabled:s,innerProps:r,selectProps:{chakraStyles:a}}=i,o={gridArea:"1 / 1 / 2 / 3",mx:"0.125rem",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},l=a?.singleValue?a.singleValue(o,i):o;return R.jsx(Mt,{className:n({"single-value":!0,"single-value--is-disabled":s},e),sx:l,...r,children:t})},uO={ClearIndicator:WA,Control:zA,DropdownIndicator:BA,Group:JA,GroupHeading:QA,IndicatorSeparator:VA,IndicatorsContainer:GA,Input:XA,LoadingIndicator:$A,LoadingMessage:KA,Menu:YA,MenuList:qA,MultiValue:sO,MultiValueContainer:rO,MultiValueLabel:aO,MultiValueRemove:lO,NoOptionsMessage:ZA,Option:eO,Placeholder:hO,SelectContainer:FA,SingleValue:cO,ValueContainer:NA},yd=uO,dO=({components:i={},theme:t,size:e,isDisabled:n,isInvalid:s,isReadOnly:r,required:a,isRequired:o,inputId:l,selectedOptionStyle:h="color",selectedOptionColorScheme:c="blue",variant:u,tagColorScheme:d,tagVariant:g,focusBorderColor:f,errorBorderColor:m,chakraStyles:p={},onFocus:_,onBlur:v,menuIsOpen:x,...y})=>{var M,w,I,E,S,T,O;const P=Pa(),{variant:N="outline"}=(I=(w=(M=P?.components)==null?void 0:M.Input)==null?void 0:w.defaultProps)!=null?I:{},{colorScheme:G="gray",variant:k="subtle"}=(T=(S=(E=P?.components)==null?void 0:E.Tag)==null?void 0:S.defaultProps)!=null?T:{},D=e0({id:l,isDisabled:n,isInvalid:s,isRequired:o,isReadOnly:r,onFocus:_,onBlur:v}),z=x??(D.readOnly?!1:void 0);let U=h;["color","check"].includes(h)||(U="color");let V=c;return typeof V!="string"&&(V="blue"),{components:{...yd,...i},size:e,selectedOptionStyle:U,selectedOptionColorScheme:V,variant:u??N,tagColorScheme:d??G,tagVariant:g??k,chakraStyles:p,focusBorderColor:f,errorBorderColor:m,onFocus:D.onFocus,onBlur:D.onBlur,isDisabled:D.disabled,isInvalid:!!D["aria-invalid"],inputId:D.id,isReadOnly:D.readOnly,required:a??D.required,menuIsOpen:z,...y,"aria-invalid":(O=y["aria-invalid"])!=null?O:D["aria-invalid"]}},sh=dO,fO=b.forwardRef((i,t)=>{const e=sh(i);return R.jsx(CA,{ref:t,...e})}),gO=fO;b.forwardRef((i,t)=>{const e=sh(i);return R.jsx(RA,{ref:t,...e})});b.forwardRef((i,t)=>{const e=sh(i);return R.jsx(LA,{ref:t,...e})});b.forwardRef((i,t)=>{const e=sh(i);return R.jsx(OA,{ref:t,...e})});const mO="@open-pioneer/basemap-switcher",v_=Jn.bind(void 0,mO),Bg="___NO_BASEMAP___",pO=i=>{const t=v_(),{allowSelectingEmptyBasemap:e=!1,"aria-label":n,"aria-labelledby":s}=i,{containerProps:r}=De("basemap-switcher",i),a=t.formatMessage({id:"emptyBasemapLabel"}),{map:o}=gi(i),l=_O(o),h=is(()=>o?.layers.getActiveBaseLayer(),[o]),c=v=>{o?.layers.activateBaseLayer(v===Bg?void 0:v)},{options:u,selectedLayer:d}=b.useMemo(()=>{const v=l.map(y=>({value:y.id,layer:y}));if(e||h==null){const y={value:Bg,layer:void 0};v.push(y)}const x=v.find(y=>y.layer===h);return{options:v,selectedLayer:x}},[e,l,h]),g=xO(),[f,m]=b.useState(!1),p=b.useMemo(()=>({Option:vO,SingleValue:yO}),[]),_=oc(v=>{!f&&v.key==="Enter"&&m(!0)});return R.jsx(Mt,{...r,children:o?R.jsx(gO,{"aria-label":n,"aria-labelledby":s,className:"basemap-switcher-select",classNamePrefix:"react-select",options:u,value:d,onChange:v=>v&&c(v.value),isClearable:!1,isSearchable:!1,menuPosition:"fixed",getOptionLabel:v=>v.layer!==void 0?v.layer.title+(v.layer.loadState==="error"?" "+t.formatMessage({id:"layerNotAvailable"}):""):a,isOptionDisabled:v=>v?.layer?.loadState==="error",components:p,ariaLiveMessages:{guidance:()=>"",onChange:v=>v.action=="select-option"||v.action=="initial-input-focus"?v.label+" "+t.formatMessage({id:"selected"}):"",onFilter:()=>"",onFocus:()=>""},chakraStyles:g,onKeyDown:_,menuIsOpen:f,onMenuOpen:()=>m(!0),onMenuClose:()=>m(!1)}):null})};function _O(i){return is(()=>i?.layers.getBaseLayers()??[],[i])}function vO(i){const{layer:t}=i.data,{isAvailable:e,content:n}=y_(t);return R.jsx(yd.Option,{...i,isDisabled:!e,className:"basemap-switcher-option",children:n})}function yO(i){const{layer:t}=i.data,{isAvailable:e,content:n}=y_(t);return R.jsx(yd.SingleValue,{...i,isDisabled:!e,className:"basemap-switcher-value",children:n})}function y_(i){const t=v_(),e=t.formatMessage({id:"layerNotAvailable"}),{label:n,isAvailable:s}=is(()=>i?{label:i.title,isAvailable:i.loadState!=="error"}:{label:t.formatMessage({id:"emptyBasemapLabel"}),isAvailable:!0},[i,t]);return{isAvailable:s,content:R.jsxs(Ms,{direction:"row",alignItems:"center",children:[n,!s&&R.jsx(Mt,{ml:2,children:R.jsx(Jg,{label:e,placement:"right",openDelay:500,children:R.jsx("span",{children:R.jsx(PR,{color:"red","aria-label":e})})})})]})}}function xO(){const[i,t]=Z_("colors",["background_body","border"],["#ffffff","#ffffff"]);return b.useMemo(()=>({control:n=>({...n,cursor:"pointer"}),indicatorSeparator:n=>({...n,borderColor:t}),dropdownIndicator:n=>({...n,backgroundColor:i})}),[i,t])}function MO(){const i=qR(),t=b.useId(),[e,n]=b.useState(!1);function s(){n(!e)}const r=b.useMemo(()=>new $u({source:new dd}),[]);return R.jsxs(Ms,{height:"100%",direction:"column",overflow:"hidden",children:[R.jsx(yT,{position:"bottom"}),R.jsxs(Dd,{title:R.jsx(Mt,{role:"region","aria-label":i.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:R.jsx(kd,{size:"md",children:"Open Pioneer Trails - Map Sample"})}),children:[R.jsx(Ms,{flex:"1",direction:"column",position:"relative",children:R.jsxs(zI,{mapId:ze,role:"main","aria-label":i.formatMessage({id:"ariaLabel.map"}),children:[R.jsx(Gh,{position:"top-left",horizontalGap:5,verticalGap:5,children:e&&R.jsx(Mt,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",role:"top-left","aria-label":i.formatMessage({id:"ariaLabel.topLeft"}),children:R.jsx(Mt,{role:"dialog","aria-labelledby":t,children:R.jsx(Dd,{title:R.jsx(kd,{id:t,size:"md",mb:2,children:i.formatMessage({id:"measurementTitle"})}),children:R.jsx(AT,{mapId:ze})})})})}),R.jsx(Gh,{position:"top-right",horizontalGap:5,verticalGap:5,children:R.jsxs(Mt,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",role:"top-right","aria-label":i.formatMessage({id:"ariaLabel.topRight"}),children:[R.jsx(bT,{mapId:ze,olLayer:r}),R.jsx(su,{mt:4}),R.jsxs(n0,{children:[R.jsx(ru,{mt:2,children:R.jsx(Sl,{as:"b",children:i.formatMessage({id:"basemapLabel"})})}),R.jsx(pO,{mapId:ze,allowSelectingEmptyBasemap:!0})]})]})}),R.jsx(Gh,{position:"bottom-right",horizontalGap:10,verticalGap:30,children:R.jsxs(Ms,{role:"bottom-right","aria-label":i.formatMessage({id:"ariaLabel.bottomRight"}),direction:"column",gap:1,padding:1,children:[R.jsx(Ha,{label:i.formatMessage({id:"measurementTitle"}),icon:R.jsx(FT,{}),isActive:e,onClick:s}),R.jsx(dT,{mapId:ze}),R.jsx(FR,{mapId:ze}),R.jsx(NR,{mapId:ze}),R.jsx(GR,{mapId:ze})]})})]})}),R.jsxs(Ms,{role:"region","aria-label":i.formatMessage({id:"ariaLabel.footer"}),gap:3,alignItems:"center",justifyContent:"center",children:[R.jsx(tT,{mapId:ze,precision:2}),R.jsx(xR,{mapId:ze}),R.jsx(oT,{mapId:ze})]})]})]})}const bO=J_({component:MO,theme:zv,appMetadata:pR});customElements.define("ol-map-app",bO); diff --git a/starter/assets/7klUr-ROEMCm.js b/starter/assets/7klUr-ROEMCm.js new file mode 100644 index 000000000..9c8b8fcfe --- /dev/null +++ b/starter/assets/7klUr-ROEMCm.js @@ -0,0 +1 @@ +import{m as O,r as l,s as v,j as o,b as g,aa as $,a3 as G,o as I,p as z,q as M,ab as L,C as W,n as D,a7 as E,a9 as U}from"./BUVr5rEhM7JP.js";const f=a=>a?"":void 0,H=a=>a?!0:void 0;function re(a,e){const r={},t={};for(const[n,s]of Object.entries(a))e.includes(n)?r[n]=s:t[n]=s;return[r,t]}const[oe,V]=O({strict:!1,name:"ButtonGroupContext"});function F(a){const{children:e,className:r,...t}=a,n=l.isValidElement(e)?l.cloneElement(e,{"aria-hidden":!0,focusable:!1}):e,s=v("chakra-button__icon",r);return o.jsx(g.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...t,className:s,children:n})}F.displayName="ButtonIcon";function q(a){const{label:e,placement:r,spacing:t="0.5rem",children:n=o.jsx(G,{color:"currentColor",width:"1em",height:"1em"}),className:s,__css:d,...p}=a,c=v("chakra-button__spinner",s),m=r==="start"?"marginEnd":"marginStart",u=l.useMemo(()=>$({display:"flex",alignItems:"center",position:e?"relative":"absolute",[m]:e?t:0,fontSize:"1em",lineHeight:"normal",...d}),[d,e,m,t]);return o.jsx(g.div,{className:c,...p,__css:u,children:n})}q.displayName="ButtonSpinner";function J(a){const[e,r]=l.useState(!a);return{ref:l.useCallback(s=>{s&&r(s.tagName==="BUTTON")},[]),type:e?"button":void 0}}const K=I((a,e)=>{const r=V(),t=z("Button",{...r,...a}),{isDisabled:n=r?.isDisabled,isLoading:s,isActive:d,children:p,leftIcon:c,rightIcon:m,loadingText:u,iconSpacing:h="0.5rem",type:C,spinner:b,spinnerPlacement:S="start",className:k,as:y,shouldWrapChildren:_,...N}=M(a),B=l.useMemo(()=>{const i={...t?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...t,...!!r&&{_focus:i}}},[t,r]),{ref:P,type:T}=J(y),j={rightIcon:m,leftIcon:c,iconSpacing:h,children:p,shouldWrapChildren:_};return o.jsxs(g.button,{disabled:n||s,ref:L(e,P),as:y,type:C??T,"data-active":f(d),"data-loading":f(s),__css:B,className:v("chakra-button",k),...N,children:[s&&S==="start"&&o.jsx(q,{className:"chakra-button__spinner--start",label:u,placement:"start",spacing:h,children:b}),s?u||o.jsx(g.span,{opacity:0,children:o.jsx(w,{...j})}):o.jsx(w,{...j}),s&&S==="end"&&o.jsx(q,{className:"chakra-button__spinner--end",label:u,placement:"end",spacing:h,children:b})]})});K.displayName="Button";function w(a){const{leftIcon:e,rightIcon:r,children:t,iconSpacing:n,shouldWrapChildren:s}=a;return s?o.jsxs("span",{style:{display:"contents"},children:[e&&o.jsx(F,{marginEnd:n,children:e}),t,r&&o.jsx(F,{marginStart:n,children:r})]}):o.jsxs(o.Fragment,{children:[e&&o.jsx(F,{marginEnd:n,children:e}),t,r&&o.jsx(F,{marginStart:n,children:r})]})}const[Q,X]=O({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Y,A]=O({strict:!1,name:"FormControlContext"});function Z(a){const{id:e,isRequired:r,isInvalid:t,isDisabled:n,isReadOnly:s,...d}=a,p=l.useId(),c=e||`field-${p}`,m=`${c}-label`,u=`${c}-feedback`,h=`${c}-helptext`,[C,b]=l.useState(!1),[S,k]=l.useState(!1),[y,_]=l.useState(!1),N=l.useCallback((i={},x=null)=>({id:h,...i,ref:D(x,R=>{R&&k(!0)})}),[h]),B=l.useCallback((i={},x=null)=>({...i,ref:x,"data-focus":f(y),"data-disabled":f(n),"data-invalid":f(t),"data-readonly":f(s),id:i.id!==void 0?i.id:m,htmlFor:i.htmlFor!==void 0?i.htmlFor:c}),[c,n,y,t,s,m]),P=l.useCallback((i={},x=null)=>({id:u,...i,ref:D(x,R=>{R&&b(!0)}),"aria-live":"polite"}),[u]),T=l.useCallback((i={},x=null)=>({...i,...d,ref:x,role:"group","data-focus":f(y),"data-disabled":f(n),"data-invalid":f(t),"data-readonly":f(s)}),[d,n,y,t,s]),j=l.useCallback((i={},x=null)=>({...i,ref:x,role:"presentation","aria-hidden":!0,children:i.children||"*"}),[]);return{isRequired:!!r,isInvalid:!!t,isReadOnly:!!s,isDisabled:!!n,isFocused:!!y,onFocus:()=>_(!0),onBlur:()=>_(!1),hasFeedbackText:C,setHasFeedbackText:b,hasHelpText:S,setHasHelpText:k,id:c,labelId:m,feedbackId:u,helpTextId:h,htmlProps:d,getHelpTextProps:N,getErrorMessageProps:P,getRootProps:T,getLabelProps:B,getRequiredIndicatorProps:j}}const ee=I(function(e,r){const t=W("Form",e),n=M(e),{getRootProps:s,htmlProps:d,...p}=Z(n),c=v("chakra-form-control",e.className);return o.jsx(Y,{value:p,children:o.jsx(Q,{value:t,children:o.jsx(g.div,{...s({},r),className:c,__css:t.container})})})});ee.displayName="FormControl";const te=I(function(e,r){const t=A(),n=X(),s=v("chakra-form__helper-text",e.className);return o.jsx(g.div,{...t?.getHelpTextProps(e,r),__css:n.helperText,className:s})});te.displayName="FormHelperText";function ie(a){const{isDisabled:e,isInvalid:r,isReadOnly:t,isRequired:n,...s}=se(a);return{...s,disabled:e,readOnly:t,required:n,"aria-invalid":H(r),"aria-required":H(n),"aria-readonly":H(t)}}function se(a){const e=A(),{id:r,disabled:t,readOnly:n,required:s,isRequired:d,isInvalid:p,isReadOnly:c,isDisabled:m,onFocus:u,onBlur:h,...C}=a,b=a["aria-describedby"]?[a["aria-describedby"]]:[];return e?.hasFeedbackText&&e?.isInvalid&&b.push(e.feedbackId),e?.hasHelpText&&b.push(e.helpTextId),{...C,"aria-describedby":b.join(" ")||void 0,id:r??e?.id,isDisabled:t??m??e?.isDisabled,isReadOnly:n??c??e?.isReadOnly,isRequired:s??d??e?.isRequired,isInvalid:p??e?.isInvalid,onFocus:E(e?.onFocus,u),onBlur:E(e?.onBlur,h)}}const ne=I((a,e)=>o.jsx(U,{align:"center",...a,direction:"row",ref:e}));ne.displayName="HStack";export{K as B,ee as F,ne as H,X as a,ie as b,H as c,f as d,se as e,re as s,A as u}; diff --git a/starter/assets/BT1ywf6Ef23V.js b/starter/assets/BT1ywf6Ef23V.js deleted file mode 100644 index 05ceb9e56..000000000 --- a/starter/assets/BT1ywf6Ef23V.js +++ /dev/null @@ -1 +0,0 @@ -import{w as re,r as o,f as J,C as je,o as _e,l as Se,j as n,b as G,I as Ze,t as ft,a3 as bt,x as ht,m as Ce,a4 as k,a5 as ce,i as Ee,s as We,E as _,a6 as vt,F as gt,_ as qe,c as xt,u as yt,a as Ct,H as se,T as z,B as le,d as St}from"./CZJiGrdGqn8U.js";import{d as kt,e as Nt,u as wt,S as Me,H as It,B as Pt}from"./DOkIEgc2QT0S.js";import{C as jt}from"./Bscpkux00yZG.js";var _t=()=>typeof document<"u",He=!1,ve=null,ae=!1,Ie=!1,Pe=new Set;function Re(e,t){Pe.forEach(r=>r(e,t))}var Et=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Mt(e){return!(e.metaKey||!Et&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function $e(e){ae=!0,Mt(e)&&(ve="keyboard",Re("keyboard",e))}function ue(e){if(ve="pointer",e.type==="mousedown"||e.type==="pointerdown"){ae=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let r=!1;try{r=t.matches(":focus-visible")}catch{}if(r)return;Re("pointer",e)}}function Rt(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function Ft(e){Rt(e)&&(ae=!0,ve="virtual")}function Dt(e){e.target===window||e.target===document||(!ae&&!Ie&&(ve="virtual",Re("virtual",e)),ae=!1,Ie=!1)}function At(){ae=!1,Ie=!0}function Xe(){return ve!=="pointer"}function Tt(){if(!_t()||He)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...r){ae=!0,e.apply(this,r)},document.addEventListener("keydown",$e,!0),document.addEventListener("keyup",$e,!0),document.addEventListener("click",Ft,!0),window.addEventListener("focus",Dt,!0),window.addEventListener("blur",At,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",ue,!0),document.addEventListener("pointermove",ue,!0),document.addEventListener("pointerup",ue,!0)):(document.addEventListener("mousedown",ue,!0),document.addEventListener("mousemove",ue,!0),document.addEventListener("mouseup",ue,!0)),He=!0}function Vt(e){Tt(),e(Xe());const t=()=>e(Xe());return Pe.add(t),()=>{Pe.delete(t)}}function Ot(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function et(e,t){let r=Ot(e);const a=10**(t??10);return r=Math.round(r*a)/a,t?r.toFixed(t):r.toString()}function Ye(e){if(!Number.isFinite(e))return 0;let t=1,r=0;for(;Math.round(e*t)/t!==e;)t*=10,r+=1;return r}function Lt(e,t,r){return e==null?e:(r{var g;return a==null?"":(g=we(a,i,r))!=null?g:""}),w=typeof l<"u",C=w?l:I,R=tt(X(C),i),E=r??R,x=o.useCallback(g=>{g!==C&&(w||N(g.toString()),y?.(g.toString(),X(g)))},[y,w,C]),j=o.useCallback(g=>{let m=g;return f&&(m=Lt(m,u,c)),et(m,E)},[E,f,c,u]),T=o.useCallback((g=i)=>{let m;C===""?m=X(g):m=X(C)+g,m=j(m),x(m)},[j,i,x,C]),K=o.useCallback((g=i)=>{let m;C===""?m=X(-g):m=X(C)-g,m=j(m),x(m)},[j,i,x,C]),F=o.useCallback(()=>{var g;let m;a==null?m="":m=(g=we(a,i,r))!=null?g:u,x(m)},[a,r,i,x,u]),v=o.useCallback(g=>{var m;const $=(m=we(g,i,E))!=null?m:u;x($)},[E,i,x,u]),h=X(C);return{isOutOfRange:h>c||hn.jsx(G.div,{className:"chakra-stack__divider",...e,__css:{...e.__css,borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"}});nt.displayName="StackDivider";var Bt=e=>n.jsx(Ze,{viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),Gt=e=>n.jsx(Ze,{viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function Je(e,t,r,a){o.useEffect(()=>{var l;if(!e.current||!a)return;const i=(l=e.current.ownerDocument.defaultView)!=null?l:window,u=Array.isArray(t)?t:[t],c=new i.MutationObserver(f=>{for(const y of f)y.type==="attributes"&&y.attributeName&&u.includes(y.attributeName)&&r(y)});return c.observe(e.current,{attributes:!0,attributeFilter:u}),()=>c.disconnect()})}function Kt(e,t){const r=re(e);o.useEffect(()=>{let a=null;const l=()=>r();return t!==null&&(a=window.setInterval(l,t)),()=>{a&&window.clearInterval(a)}},[t,r])}var Ut=50,Qe=300;function Wt(e,t){const[r,a]=o.useState(!1),[l,i]=o.useState(null),[u,c]=o.useState(!0),f=o.useRef(null),y=()=>clearTimeout(f.current);Kt(()=>{l==="increment"&&e(),l==="decrement"&&t()},r?Ut:null);const I=o.useCallback(()=>{u&&e(),f.current=setTimeout(()=>{c(!1),a(!0),i("increment")},Qe)},[e,u]),N=o.useCallback(()=>{u&&t(),f.current=setTimeout(()=>{c(!1),a(!0),i("decrement")},Qe)},[t,u]),w=o.useCallback(()=>{c(!0),a(!1),y()},[]);return o.useEffect(()=>()=>y(),[]),{up:I,down:N,stop:w,isSpinning:r}}var qt=/^[Ee0-9+\-.]$/;function Ht(e){return qt.test(e)}function $t(e,t){if(e.key==null)return!0;const r=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||r?!0:t(e.key)}function Xt(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:r=!0,keepWithinRange:a=!0,min:l=Number.MIN_SAFE_INTEGER,max:i=Number.MAX_SAFE_INTEGER,step:u=1,isReadOnly:c,isDisabled:f,isRequired:y,isInvalid:I,pattern:N="[0-9]*(.[0-9]+)?",inputMode:w="decimal",allowMouseWheel:C,id:R,onChange:E,precision:x,name:j,"aria-describedby":T,"aria-label":K,"aria-labelledby":F,onFocus:v,onBlur:h,onInvalid:D,getAriaValueText:P,isValidCharacter:H,format:g,parse:m,...$}=e,U=re(v),Q=re(h),W=re(D),O=re(H??Ht),me=re(P),d=zt(e),{update:q,increment:B,decrement:pe}=d,[ge,ie]=o.useState(!1),Z=!(c||f),L=o.useRef(null),ee=o.useRef(null),xe=o.useRef(null),Ne=o.useRef(null),fe=o.useCallback(s=>s.split("").filter(O).join(""),[O]),be=o.useCallback(s=>{var b;return(b=m?.(s))!=null?b:s},[m]),p=o.useCallback(s=>{var b;return((b=g?.(s))!=null?b:s).toString()},[g]);ft(()=>{(d.valueAsNumber>i||d.valueAsNumber{if(!L.current)return;if(L.current.value!=d.value){const b=be(L.current.value);d.setValue(fe(b))}},[be,fe]);const V=o.useCallback((s=u)=>{Z&&B(s)},[B,Z,u]),te=o.useCallback((s=u)=>{Z&&pe(s)},[pe,Z,u]),M=Wt(V,te);Je(xe,"disabled",M.stop,M.isSpinning),Je(Ne,"disabled",M.stop,M.isSpinning);const Ae=o.useCallback(s=>{if(s.nativeEvent.isComposing)return;const S=be(s.currentTarget.value);q(fe(S)),ee.current={start:s.currentTarget.selectionStart,end:s.currentTarget.selectionEnd}},[q,fe,be]),Te=o.useCallback(s=>{var b,S,A;U?.(s),ee.current&&(s.target.selectionStart=(S=ee.current.start)!=null?S:(b=s.currentTarget.value)==null?void 0:b.length,s.currentTarget.selectionEnd=(A=ee.current.end)!=null?A:s.currentTarget.selectionStart)},[U]),Ve=o.useCallback(s=>{if(s.nativeEvent.isComposing)return;$t(s,O)||s.preventDefault();const b=Oe(s)*u,S=s.key,ne={ArrowUp:()=>V(b),ArrowDown:()=>te(b),Home:()=>q(l),End:()=>q(i)}[S];ne&&(s.preventDefault(),ne(s))},[O,u,V,te,q,l,i]),Oe=s=>{let b=1;return(s.metaKey||s.ctrlKey)&&(b=.1),s.shiftKey&&(b=10),b},Le=o.useMemo(()=>{const s=me?.(d.value);if(s!=null)return s;const b=d.value.toString();return b||void 0},[d.value,me]),ze=o.useCallback(()=>{let s=d.value;if(d.value==="")return;/^[eE]/.test(d.value.toString())?d.setValue(""):(d.valueAsNumberi&&(s=i),d.cast(s))},[d,i,l]),Be=o.useCallback(()=>{ie(!1),r&&ze()},[r,ie,ze]),ye=o.useCallback(()=>{t&&requestAnimationFrame(()=>{var s;(s=L.current)==null||s.focus()})},[t]),Ge=o.useCallback(s=>{s.preventDefault(),M.up(),ye()},[ye,M]),Ke=o.useCallback(s=>{s.preventDefault(),M.down(),ye()},[ye,M]);ht(()=>L.current,"wheel",s=>{var b,S;const ne=((S=(b=L.current)==null?void 0:b.ownerDocument)!=null?S:document).activeElement===L.current;if(!C||!ne)return;s.preventDefault();const he=Oe(s)*u,Ue=Math.sign(s.deltaY);Ue===-1?V(he):Ue===1&&te(he)},{passive:!1});const dt=o.useCallback((s={},b=null)=>{const S=f||a&&d.isAtMax;return{...s,ref:Ce(b,xe),role:"button",tabIndex:-1,onPointerDown:k(s.onPointerDown,A=>{A.button!==0||S||Ge(A)}),onPointerLeave:k(s.onPointerLeave,M.stop),onPointerUp:k(s.onPointerUp,M.stop),disabled:S,"aria-disabled":ce(S)}},[d.isAtMax,a,Ge,M.stop,f]),mt=o.useCallback((s={},b=null)=>{const S=f||a&&d.isAtMin;return{...s,ref:Ce(b,Ne),role:"button",tabIndex:-1,onPointerDown:k(s.onPointerDown,A=>{A.button!==0||S||Ke(A)}),onPointerLeave:k(s.onPointerLeave,M.stop),onPointerUp:k(s.onPointerUp,M.stop),disabled:S,"aria-disabled":ce(S)}},[d.isAtMin,a,Ke,M.stop,f]),pt=o.useCallback((s={},b=null)=>{var S,A,ne,he;return{name:j,inputMode:w,type:"text",pattern:N,"aria-labelledby":F,"aria-label":K,"aria-describedby":T,id:R,disabled:f,...s,readOnly:(S=s.readOnly)!=null?S:c,"aria-readonly":(A=s.readOnly)!=null?A:c,"aria-required":(ne=s.required)!=null?ne:y,required:(he=s.required)!=null?he:y,ref:Ce(L,b),value:p(d.value),role:"spinbutton","aria-valuemin":l,"aria-valuemax":i,"aria-valuenow":Number.isNaN(d.valueAsNumber)?void 0:d.valueAsNumber,"aria-invalid":ce(I??d.isOutOfRange),"aria-valuetext":Le,autoComplete:"off",autoCorrect:"off",onChange:k(s.onChange,Ae),onKeyDown:k(s.onKeyDown,Ve),onFocus:k(s.onFocus,Te,()=>ie(!0)),onBlur:k(s.onBlur,Q,Be)}},[j,w,N,F,K,p,T,R,f,y,c,I,d.value,d.valueAsNumber,d.isOutOfRange,l,i,Le,Ae,Ve,Te,Q,Be]);return{value:p(d.value),valueAsNumber:d.valueAsNumber,isFocused:ge,isDisabled:f,isReadOnly:c,getIncrementButtonProps:dt,getDecrementButtonProps:mt,getInputProps:pt,htmlProps:$}}var[Yt,ke]=Ee({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Jt,Fe]=Ee({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),rt=J(function(t,r){const a=je("NumberInput",t),l=_e(t),i=Nt(l),{htmlProps:u,...c}=Xt(i),f=o.useMemo(()=>c,[c]);return n.jsx(Jt,{value:f,children:n.jsx(Yt,{value:a,children:n.jsx(G.div,{...u,ref:r,className:Se("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...a.root}})})})});rt.displayName="NumberInput";var at=J(function(t,r){const a=ke();return n.jsx(G.div,{"aria-hidden":!0,ref:r,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...a.stepperGroup}})});at.displayName="NumberInputStepper";var st=J(function(t,r){const{getInputProps:a}=Fe(),l=a(t,r),i=ke();return n.jsx(G.input,{...l,className:Se("chakra-numberinput__field",t.className),__css:{width:"100%",...i.field}})});st.displayName="NumberInputField";var ot=G("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),it=J(function(t,r){var a;const l=ke(),{getDecrementButtonProps:i}=Fe(),u=i(t,r);return n.jsx(ot,{...u,__css:l.stepper,children:(a=t.children)!=null?a:n.jsx(Bt,{})})});it.displayName="NumberDecrementStepper";var lt=J(function(t,r){var a;const{getIncrementButtonProps:l}=Fe(),i=l(t,r),u=ke();return n.jsx(ot,{...i,__css:u.stepper,children:(a=t.children)!=null?a:n.jsx(Gt,{})})});lt.displayName="NumberIncrementStepper";function Qt(e){return e&&We(e)&&We(e.target)}function Zt(e={}){const{onChange:t,value:r,defaultValue:a,name:l,isDisabled:i,isFocusable:u,isNative:c,...f}=e,[y,I]=o.useState(a||""),N=typeof r<"u",w=N?r:y,C=o.useRef(null),R=o.useCallback(()=>{const v=C.current;if(!v)return;let h="input:not(:disabled):checked";const D=v.querySelector(h);if(D){D.focus();return}h="input:not(:disabled)";const P=v.querySelector(h);P?.focus()},[]),x=`radio-${o.useId()}`,j=l||x,T=o.useCallback(v=>{const h=Qt(v)?v.target.value:v;N||I(h),t?.(String(h))},[t,N]),K=o.useCallback((v={},h=null)=>({...v,ref:Ce(h,C),role:"radiogroup"}),[]),F=o.useCallback((v={},h=null)=>({...v,ref:h,name:j,[c?"checked":"isChecked"]:w!=null?v.value===w:void 0,onChange(P){T(P)},"data-radiogroup":!0}),[c,j,T,w]);return{getRootProps:K,getRadioProps:F,name:j,ref:C,focus:R,setValue:I,value:w,onChange:T,isDisabled:i,isFocusable:u,htmlProps:f}}var[en,ut]=Ee({name:"RadioGroupContext",strict:!1}),De=J((e,t)=>{const{colorScheme:r,size:a,variant:l,children:i,className:u,isDisabled:c,isFocusable:f,...y}=e,{value:I,onChange:N,getRootProps:w,name:C,htmlProps:R}=Zt(y),E=o.useMemo(()=>({name:C,size:a,onChange:N,colorScheme:r,value:I,variant:l,isDisabled:c,isFocusable:f}),[C,a,N,r,I,l,c,f]);return n.jsx(en,{value:E,children:n.jsx(G.div,{...w(R,t),className:Se("chakra-radio-group",u),children:i})})});De.displayName="RadioGroup";var tn={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function nn(e={}){const{defaultChecked:t,isChecked:r,isFocusable:a,isDisabled:l,isReadOnly:i,isRequired:u,onChange:c,isInvalid:f,name:y,value:I,id:N,"data-radiogroup":w,"aria-describedby":C,...R}=e,E=`radio-${o.useId()}`,x=wt(),T=!!ut()||!!w;let F=!!x&&!T?x.id:E;F=N??F;const v=l??x?.isDisabled,h=i??x?.isReadOnly,D=u??x?.isRequired,P=f??x?.isInvalid,[H,g]=o.useState(!1),[m,$]=o.useState(!1),[U,Q]=o.useState(!1),[W,O]=o.useState(!1),[me,d]=o.useState(!!t),q=typeof r<"u",B=q?r:me;o.useEffect(()=>Vt(g),[]);const pe=o.useCallback(p=>{if(h||v){p.preventDefault();return}q||d(p.target.checked),c?.(p)},[q,v,h,c]),ge=o.useCallback(p=>{p.key===" "&&O(!0)},[O]),ie=o.useCallback(p=>{p.key===" "&&O(!1)},[O]),Z=o.useCallback((p={},V=null)=>({...p,ref:V,"data-active":_(W),"data-hover":_(U),"data-disabled":_(v),"data-invalid":_(P),"data-checked":_(B),"data-focus":_(m),"data-focus-visible":_(m&&H),"data-readonly":_(h),"aria-hidden":!0,onMouseDown:k(p.onMouseDown,()=>O(!0)),onMouseUp:k(p.onMouseUp,()=>O(!1)),onMouseEnter:k(p.onMouseEnter,()=>Q(!0)),onMouseLeave:k(p.onMouseLeave,()=>Q(!1))}),[W,U,v,P,B,m,h,H]),{onFocus:L,onBlur:ee}=x??{},xe=o.useCallback((p={},V=null)=>{const te=v&&!a;return{...p,id:F,ref:V,type:"radio",name:y,value:I,onChange:k(p.onChange,pe),onBlur:k(ee,p.onBlur,()=>$(!1)),onFocus:k(L,p.onFocus,()=>$(!0)),onKeyDown:k(p.onKeyDown,ge),onKeyUp:k(p.onKeyUp,ie),checked:B,disabled:te,readOnly:h,required:D,"aria-invalid":ce(P),"aria-disabled":ce(te),"aria-required":ce(D),"data-readonly":_(h),"aria-describedby":C,style:tn}},[v,a,F,y,I,pe,ee,L,ge,ie,B,h,D,P,C]);return{state:{isInvalid:P,isFocused:m,isChecked:B,isActive:W,isHovered:U,isDisabled:v,isReadOnly:h,isRequired:D},getCheckboxProps:Z,getRadioProps:Z,getInputProps:xe,getLabelProps:(p={},V=null)=>({...p,ref:V,onMouseDown:k(p.onMouseDown,rn),"data-disabled":_(v),"data-checked":_(B),"data-invalid":_(P)}),getRootProps:(p,V=null)=>({...p,ref:V,"data-disabled":_(v),"data-checked":_(B),"data-invalid":_(P)}),htmlProps:R}}function rn(e){e.preventDefault(),e.stopPropagation()}function an(e,t){const r={},a={};for(const[l,i]of Object.entries(e))t.includes(l)?r[l]=i:a[l]=i;return[r,a]}var Y=J((e,t)=>{var r;const a=ut(),{onChange:l,value:i}=e,u=je("Radio",{...a,...e}),c=_e(e),{spacing:f="0.5rem",children:y,isDisabled:I=a?.isDisabled,isFocusable:N=a?.isFocusable,inputProps:w,...C}=c;let R=e.isChecked;a?.value!=null&&i!=null&&(R=a.value===i);let E=l;a?.onChange&&i!=null&&(E=vt(a.onChange,l));const x=(r=e?.name)!=null?r:a?.name,{getInputProps:j,getCheckboxProps:T,getLabelProps:K,getRootProps:F,htmlProps:v}=nn({...C,isChecked:R,isFocusable:N,isDisabled:I,onChange:E,name:x}),[h,D]=an(v,gt),P=T(D),H=j(w,t),g=K(),m=Object.assign({},h,F()),$={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...u.container},U={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...u.control},Q={userSelect:"none",marginStart:f,...u.label};return n.jsxs(G.label,{className:"chakra-radio",...m,__css:$,children:[n.jsx("input",{className:"chakra-radio__input",...H}),n.jsx(G.span,{className:"chakra-radio__control",...P,__css:U}),y&&n.jsx(G.span,{className:"chakra-radio__label",...g,__css:Q,children:y})]})});Y.displayName="Radio";class sn{_intl;constructor(t){this._intl=t.intl}greet(t){return this._intl.formatMessage({id:"greetingService.greeting"},{name:t})}}const on={"i18n-howto-app":{name:"i18n-howto-app",services:{GreetingService:{name:"GreetingService",clazz:sn,provides:[{name:"i18n-howto-app.GreetingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"i18n-howto-app.GreetingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}}},ln="",un=["de","en"];function cn(e){switch(e){case"de":return qe(()=>import("./C5d3TNoZsHGp.js"),[],import.meta.url).then(t=>t.default);case"en":return qe(()=>import("./C0n1onxljylL.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${e}'`)}const dn=xt(ln),mn=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:cn,locales:un,packages:on,styles:dn},Symbol.toStringTag,{value:"Module"})),ct="i18n-howto-app",pn=yt.bind(void 0,ct),oe=Ct.bind(void 0,ct);function fn(){const e=oe();return n.jsxs(jt,{children:[n.jsx(se,{as:"h1",size:"lg",children:e.formatMessage({id:"heading"})}),n.jsx(z,{children:e.formatMessage({id:"text"})}),n.jsx(bn,{})]})}function bn(){return n.jsxs(Me,{mb:5,mt:5,divider:n.jsx(nt,{borderColor:"gray.200"}),spacing:"24px",align:"stretch",children:[n.jsx(le,{bg:"white",w:"100%",p:4,color:"black",borderWidth:"1px",borderColor:"black",children:n.jsx(hn,{})}),n.jsx(le,{bg:"white",w:"100%",p:4,color:"black",borderWidth:"1px",borderColor:"black",children:n.jsx(vn,{})}),n.jsx(le,{bg:"white",w:"100%",p:4,color:"black",borderWidth:"1px",borderColor:"black",children:n.jsx(gn,{})}),n.jsx(le,{bg:"white",w:"100%",p:4,color:"black",borderWidth:"1px",borderColor:"black",children:n.jsx(xn,{})}),n.jsx(le,{bg:"white",w:"100%",p:4,color:"black",borderWidth:"1px",borderColor:"black",children:n.jsx(yn,{})}),n.jsx(le,{bg:"white",w:"100%",p:4,color:"black",borderWidth:"1px",borderColor:"black",children:n.jsx(Cn,{})})]})}function hn(){const e=oe(),[t,r]=o.useState("");return n.jsxs(n.Fragment,{children:[n.jsx(se,{as:"h4",size:"md",children:e.formatMessage({id:"interpolation.heading"})}),n.jsx(de,{value:t,onChange:a=>r(a.target.value),placeholder:e.formatMessage({id:"interpolation.placeholder"}),size:"sm"}),n.jsx(z,{mb:"8px",children:e.formatMessage({id:"interpolation.value"},{name:t})})]})}function vn(){const e=oe(),[t,r]=o.useState("1");return n.jsxs(n.Fragment,{children:[n.jsx(se,{as:"h4",size:"md",children:e.formatMessage({id:"plurals.heading"})}),n.jsx(De,{onChange:r,value:t,children:n.jsxs(Me,{spacing:4,direction:"row",children:[n.jsx(Y,{size:"md",value:"0",children:"0"}),n.jsx(Y,{size:"md",value:"1",children:"1"}),n.jsx(Y,{size:"md",value:"42",children:"42"}),n.jsx(Y,{size:"md",value:"99",children:"99"})]})}),n.jsx(z,{mb:"8px",children:e.formatMessage({id:"plurals.value"},{n:t})})]})}function gn(){const e=oe(),[t,r]=o.useState(""),[a,l]=o.useState("male");return n.jsxs(n.Fragment,{children:[n.jsx(se,{as:"h4",size:"md",children:e.formatMessage({id:"selection.heading"})}),n.jsx(de,{value:t,onChange:i=>r(i.target.value),placeholder:e.formatMessage({id:"interpolation.placeholder"}),size:"sm"}),n.jsx(De,{onChange:l,value:a,children:n.jsxs(Me,{spacing:4,direction:"row",children:[n.jsx(Y,{size:"md",value:"female",children:e.formatMessage({id:"selection.gender.female"})}),n.jsx(Y,{size:"md",value:"male",children:e.formatMessage({id:"selection.gender.male"})}),n.jsx(Y,{size:"md",value:"other",children:e.formatMessage({id:"selection.gender.other"})})]})}),n.jsx(z,{mb:"8px",children:e.formatMessage({id:"selection.value"},{name:t,gender:a})})]})}function xn(){const e=oe(),[t,r]=o.useState("424224.24");return n.jsxs(n.Fragment,{children:[n.jsx(se,{as:"h4",size:"md",children:e.formatMessage({id:"numberformat.heading"})}),n.jsxs(rt,{onChange:a=>r(a),value:t,precision:2,step:.25,children:[n.jsx(st,{}),n.jsxs(at,{children:[n.jsx(lt,{}),n.jsx(it,{})]})]}),n.jsxs(z,{mb:"8px",children:[e.formatMessage({id:"numberformat.example.currency1"}),e.formatNumber(+t,{style:"currency",currency:"EUR"})]}),n.jsxs(z,{mb:"8px",children:[e.formatMessage({id:"numberformat.example.currency2"}),e.formatNumber(+t,{style:"currency",currency:"EUR",currencyDisplay:"name"})]}),n.jsxs(z,{mb:"8px",children:[e.formatMessage({id:"numberformat.example.unit1"}),e.formatNumber(+t,{style:"unit",unit:"terabyte-per-second"})]}),n.jsxs(z,{mb:"8px",children:[e.formatMessage({id:"numberformat.example.unit2"}),e.formatNumber(+t,{style:"unit",unit:"terabyte-per-second",unitDisplay:"long"})]})]})}function yn(){const e=oe(),[t,r]=o.useState("2023-02-19T19:02");return n.jsxs(n.Fragment,{children:[n.jsx(se,{as:"h4",size:"md",children:e.formatMessage({id:"datetimeformat.heading"})}),n.jsx(de,{value:t,onChange:a=>r(a.target.value),size:"md",type:"datetime-local"}),n.jsxs(z,{mb:"8px",children:[e.formatMessage({id:"datetimeformat.timelabel"}),e.formatDate(t,{dateStyle:"full",timeStyle:"short"})]}),n.jsxs(z,{mb:"8px",children:[e.formatMessage({id:"datetimeformat.relativetimelabel"}),e.formatRelativeTime(Sn(t),"minute",{numeric:"auto",style:"long"})]})]})}function Cn(){const e=oe(),t=pn("i18n-howto-app.GreetingService"),[r,a]=o.useState(""),[l,i]=o.useState("");return n.jsxs(n.Fragment,{children:[n.jsx(se,{as:"h4",size:"md",children:e.formatMessage({id:"serviceI18n.heading"})}),n.jsxs(It,{as:"form",onSubmit:u=>{u.preventDefault();const c=r.trim();i(c?t.greet(c):"")},children:[n.jsx(de,{placeholder:e.formatMessage({id:"serviceI18n.placeholder"}),value:r,onChange:u=>a(u.target.value),size:"md"}),n.jsx(Pt,{type:"submit",flexShrink:0,children:e.formatMessage({id:"serviceI18n.showGreeting"})})]}),l&&n.jsxs(z,{children:[e.formatMessage({id:"serviceI18n.serviceResponse"})," ",l]})]})}function Sn(e){const t=new Date(e).getTime()-new Date().getTime();return Math.round(t/6e4)}const kn=new URLSearchParams(window.location.search),Nn=kn.get("lang")||void 0,wn=St({component:fn,appMetadata:mn,config:{locale:Nn}});customElements.define("i18n-howto",wn); diff --git a/starter/assets/BUVr5rEhM7JP.js b/starter/assets/BUVr5rEhM7JP.js new file mode 100644 index 000000000..dc59c8457 --- /dev/null +++ b/starter/assets/BUVr5rEhM7JP.js @@ -0,0 +1,382 @@ +var Og=e=>{throw TypeError(e)};var pd=(e,t,r)=>t.has(e)||Og("Cannot "+r);var Le=(e,t,r)=>(pd(e,t,"read from private field"),r?r.call(e):t.get(e)),Gt=(e,t,r)=>t.has(e)?Og("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Lt=(e,t,r,n)=>(pd(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),il=(e,t,r)=>(pd(e,t,"access private method"),r);function iC(e,t){for(var r=0;rn[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var sl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ip(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kb={exports:{}},X={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ia=Symbol.for("react.element"),sC=Symbol.for("react.portal"),aC=Symbol.for("react.fragment"),lC=Symbol.for("react.strict_mode"),uC=Symbol.for("react.profiler"),cC=Symbol.for("react.provider"),dC=Symbol.for("react.context"),fC=Symbol.for("react.forward_ref"),hC=Symbol.for("react.suspense"),pC=Symbol.for("react.memo"),mC=Symbol.for("react.lazy"),Ng=Symbol.iterator;function gC(e){return e===null||typeof e!="object"?null:(e=Ng&&e[Ng]||e["@@iterator"],typeof e=="function"?e:null)}var Eb={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Cb=Object.assign,Tb={};function Di(e,t,r){this.props=e,this.context=t,this.refs=Tb,this.updater=r||Eb}Di.prototype.isReactComponent={};Di.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Di.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pb(){}Pb.prototype=Di.prototype;function sp(e,t,r){this.props=e,this.context=t,this.refs=Tb,this.updater=r||Eb}var ap=sp.prototype=new Pb;ap.constructor=sp;Cb(ap,Di.prototype);ap.isPureReactComponent=!0;var Dg=Array.isArray,_b=Object.prototype.hasOwnProperty,lp={current:null},Ab={key:!0,ref:!0,__self:!0,__source:!0};function Rb(e,t,r){var n,o={},i=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)_b.call(t,n)&&!Ab.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(a===1)o.children=r;else if(1=this.enabledLogLevelNumber}}function _C(e){switch(e){case"DEBUG":return"debug";case"INFO":return"info";case"WARN":return"warn";case"ERROR":return"error"}}function Fg(e){return TC[e]}function AC(e){switch(e){case"DEBUG":case"INFO":case"WARN":case"ERROR":return e;default:throw new Error(`invalid log level '${e}'; allowed levels are: DEBUG, INFO, WARN, ERROR`)}}function RC(e){return e instanceof Error?!0:!!(e&&typeof e=="object"&&typeof e.name=="string"&&typeof e.message=="string")}function IC(){let e,t;return{promise:new Promise((n,o)=>{e=n,t=o}),resolve:e,reject:t}}class jg{decimalRegexPattern;groupingRegexPattern;constructor(t){const r={useGrouping:!0},n=new Intl.NumberFormat(t,r).formatToParts(12345.6),o=n.find(s=>s.type==="decimal")?.value;if(!o)throw new Error("Could not determine decimal separator.");const i=n.find(s=>s.type==="group")?.value;if(!i)throw new Error("Could not determine grouping separator.");this.decimalRegexPattern=new RegExp(`${this.escapeRegExp(o)}`,"g"),i.trim()===""?this.groupingRegexPattern=/\s/g:this.groupingRegexPattern=new RegExp(`${this.escapeRegExp(i)}`,"g")}parse(t){t=t.trim();const r=t.replace(this.groupingRegexPattern,"").replace(this.decimalRegexPattern,".");return r?+r:NaN}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}var F=(e=>(e.INVALID_METADATA="runtime:invalid-metadata",e.INVALID_PROPERTY_NAME="runtime:invalid-property-name",e.REQUIRED_PROPERTY="runtime:required-property",e.NOT_MOUNTED="runtime:element-not-mounted",e.UNSUPPORTED_LOCALE="runtime:unsupported-locale",e.CONFIG_RESOLUTION_FAILED="runtime:config-resolution-failed",e.INVALID_STATE="runtime:invalid-state",e.INTERFACE_NOT_FOUND="runtime:interface-not-found",e.AMBIGUOUS_DEPENDENCY="runtime:ambiguous-dependency",e.UNDECLARED_DEPENDENCY="runtime:undeclared-dependency",e.MISSING_PACKAGE="runtime:missing-package",e.SERVICE_CONSTRUCTION_FAILED="runtime:service-construction-failed",e.SERVICE_DESTRUCTION_FAILED="runtime:service-destruction-failed",e.DUPLICATE_INTERFACE="runtime:duplicate-interface",e.DEPENDENCY_CYCLE="runtime:dependency-cycle",e.DUPLICATE_API_METHODS="runtime:duplicate-api-methods",e.INTERNAL="runtime:internal-error",e))(F||{});function ac({interfaceName:e,qualifier:t}){return`'${e}'`+(t?` (qualifier: '${t}')`:"")}function Mb(e){if(!e)throw new z(F.INVALID_METADATA,"Missing reference metadata.");if(e.all&&e.qualifier)throw new z(F.INVALID_METADATA,"References can't use 'qualifier' and 'all' properties at the same time.");return e.all?{all:!0,interfaceName:e.name}:{interfaceName:e.name,qualifier:e.qualifier}}function cp(e){return!e.all}function $C(e){return e.all===!0}class so{static create(t,r,n,o){const i=r.clazz,s=r.name,a=Object.entries(r.references??{}).map(([c,d])=>({referenceName:c,...Mb(d)})),l=r.provides?.map(c=>({interfaceName:c.name,qualifier:c.qualifier})),u={type:"class",clazz:i};return new so({name:s,packageName:t,factory:u,intl:n,dependencies:a,interfaces:l,properties:o})}id;name;packageName;intl;properties;dependencies;interfaces;_useCount=0;factory;_state="not-constructed";_instance=void 0;constructor(t){const{name:r,packageName:n,factory:o,intl:i,dependencies:s=[],interfaces:a=[],properties:l={}}=t;if(!MC(r))throw new z(F.INTERNAL,`Invalid service name: '${r}'.`);this.id=`${n}::${r}`,this.name=r,this.packageName=n,this.factory=o,this.intl=i,this.dependencies=s,this.interfaces=a,this.properties=l}get instance(){return this._instance}get state(){return this._state}get useCount(){return this._useCount}getInstanceOrThrow(){const t=this._instance;if(!t)throw new z(F.INTERNAL,"Expected service instance to be present.");return t}beforeCreate(){if(this._state==="not-constructed")this._state="constructing";else throw new z(F.INTERNAL,"Inconsistent state: service is already under construction.")}create(t){if(this._state!=="constructing"||this.instance!==void 0)throw new z(F.INTERNAL,"Inconsistent state: service is not being constructed.");try{return this._instance=OC(this.factory,{...t,properties:this.properties,intl:this.intl}),this._state="constructed",this._useCount=1,this._instance}catch(r){throw new z(F.SERVICE_CONSTRUCTION_FAILED,`Failed to create service instance '${this.id}'.`,{cause:r})}}destroy(){if(this._instance)try{this._instance.destroy?.()}catch(t){throw new z(F.SERVICE_DESTRUCTION_FAILED,`Failed to destroy service instance '${this.id}'.`,{cause:t})}this._instance=void 0,this._state="destroyed"}addRef(){return this._useCount+=1}removeRef(){return this._useCount-=1}}function Vg(e){return{type:"class",clazz:e}}function Hg(e){return{type:"function",create:e}}const LC=/^[a-z0-9_-]+$/i;function MC(e){return LC.test(e)}function OC(e,t){switch(e.type){case"class":return new e.clazz(t);case"function":return e.create(t)}}class lc{static create(t,r,n){const o=t.name,i=t.properties??{},s=DC(o,i,n),a=Object.entries(t.services??{}).map(([u,c])=>{if(u!==c.name)throw new z(F.INVALID_METADATA,"Invalid metadata: service name mismatch.");return so.create(t.name,c,r,s)}),l=t.ui?.references?.map(u=>Mb(u))??[];return new lc({name:o,services:a,uiReferences:l,properties:s,intl:r})}name;services;uiReferences;properties;intl;constructor(t){const r=t.name;if(!jC(r))throw new z(F.INTERNAL,`Invalid package name: '${r}'.`);this.name=r,this.services=t.services??[],this.uiReferences=t.uiReferences??[],this.properties=t.properties??{},this.intl=t.intl}}function NC(e,t,r){return Object.entries(e).map(([n,o])=>{if(n!==o.name)throw new z(F.INVALID_METADATA,"Invalid metadata: package name mismatch.");const i=t.createPackageI18n(n);return lc.create(o,i,r?.[n])})}function DC(e,t,r={}){const n={},o=[];for(const[i,s]of Object.entries(t))n[i]=s.value,s.required&&o.push(i);for(const[i,s]of Object.entries(r)){if(!zC(n,i))throw new z(F.INVALID_PROPERTY_NAME,`Unexpected property name '${i}' for package '${e}': the property does not exist.`);n[i]=s}for(const i of o)if(n[i]==null)throw new z(F.REQUIRED_PROPERTY,`Package '${e}' requires the property '${i}' to be initialized to a non-null value.`);return n}const BC=Object.prototype.hasOwnProperty;function zC(e,t){return BC.call(e,t)}const FC=/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;function jC(e){return FC.test(e)}class VC{services=new Map;_count=0;get serviceCount(){return this._count}register(t,{interfaceName:r,qualifier:n}){if(!r)throw new z(F.INVALID_METADATA,`Service '${t.id}' provides invalid interface '${r}'.`);if(n!=null&&!n)throw new z(F.INVALID_METADATA,`Service '${t.id}' uses an invalid qualifier for interface '${r}': '${n}'.`);const o=this.ensureInterfaceEntry(r);if(!n){o.unqualified.push(t),++this._count;return}const i=o.byQualifier.get(n);if(i)throw new z(F.DUPLICATE_INTERFACE,`Cannot register '${t.id}' as interface '${r}' with qualifier '${n}'. The interface is already provided by service '${i.id}'. You can choose a different qualifier or remove the service to resolve the collision.`);o.byQualifier.set(n,t),++this._count}lookup(t){return cp(t)?this.lookupOne(t):this.lookupAll(t.interfaceName)}lookupOne({interfaceName:t,qualifier:r}){if(!t)throw new z(F.INVALID_METADATA,`Invalid interface name during service lookup: '${t}'.`);if(r!=null&&!r)throw new z(F.INVALID_METADATA,`Invalid qualifier during service lookup of interface '${t}': '${r}'.`);const n=this.services.get(t);if(!n)return{type:"unimplemented"};if(!r){if(n.unqualified.length+n.byQualifier.size>1){const a=[];return a.push(...Array.from(n.byQualifier.entries()).map(([l,u])=>[u.id,l])),a.push(...n.unqualified.map(l=>[l.id,void 0])),{type:"ambiguous",choices:a}}const s=n.unqualified[0]??HC(n.byQualifier);return s?{type:"found",value:s}:{type:"unimplemented"}}const o=n.byQualifier.get(r);return o?{type:"found",value:o}:{type:"unimplemented"}}lookupAll(t){if(!t)throw new z(F.INVALID_METADATA,`Invalid interface name during service lookup: '${t}'.`);const r=this.services.get(t);if(!r)return{type:"found",value:[]};const n=new Set([...r.unqualified,...r.byQualifier.values()]);return{type:"found",value:Array.from(n)}}ensureInterfaceEntry(t){const r=this.services;let n=r.get(t);return n||(n={unqualified:[],byQualifier:new Map},r.set(t,n)),n}}function Ob(e,t=3){let r="",n=0;for(const[i,s]of e)if(n&&(r+=", "),r+=`'${i}'`,s&&(r+=` (with qualifier '${s}')`),++n>=t)break;const o=e.length-n;return o>0&&(r+=` and ${o} more`),r}function HC(e){return e.values().next().value}function UC(e){const t=new WC(e);return t.verify(),{serviceLookup:t.getServiceLookup(),serviceDependencies:t.getComputedDependencies()}}class WC{requiredReferences;items;serviceLookup=new VC;serviceToGraphItem=new Map;stack=[];constructor(t){this.requiredReferences=t.requiredReferences??[];const r=t.services??[],n=this.items=r.map(o=>({service:o,state:"not-visited",dependencies:{}}));for(const o of n)for(const i of o.service.interfaces)this.registerService(o,i)}verify(){for(const t of this.requiredReferences){let r;switch(t.type){case"framework":r={type:"framework-reference",value:t};break;case"ui":r={type:"ui-reference",packageName:t.packageName,value:t};break}this.visitReference(r)}for(const t of this.items)this.visitItem(t,"root")}getServiceLookup(){return this.serviceLookup}getComputedDependencies(){return new Map(this.items.map(t=>[t.service.id,t.dependencies]))}visitItem(t,r){const n=this.stack,o=t.state;if(o!=="done"){o==="pending"&&this.throwCycleError(t,r),n.push([t,r]),t.state="pending";for(const i of t.service.dependencies)t.dependencies[i.referenceName]=this.visitReference({type:"service-reference",service:t.service,referenceName:i.referenceName,value:i});t.state="done",n.pop()}}visitReference(t){const r=this.findServices(t);if(Array.isArray(r)){for(const n of r)this.visitItem(n,t);return r.map(n=>n.service)}else return this.visitItem(r,t),r.service}registerService(t,r){this.serviceLookup.register(t.service,r),this.serviceToGraphItem.set(t.service,t)}findServices(t){const r=t.value,n=this.serviceLookup.lookup(r);switch(n.type){case"unimplemented":{const i=GC(t);throw new z(F.INTERFACE_NOT_FOUND,i)}case"ambiguous":{const i=XC(t,n.choices);throw new z(F.AMBIGUOUS_DEPENDENCY,i)}}const o=n.value;return Array.isArray(o)?o.map(i=>this.getGraphItem(i)):this.getGraphItem(o)}getGraphItem(t){const r=this.serviceToGraphItem.get(t);if(!r||r.service!==t)throw new z(F.INTERNAL,`Failed to find matching graph item for service '${t.id}'.`);return r}throwCycleError(t,r){const n=this.stack,o=n.findIndex(s=>s[0]===t);if(o===-1)throw new z(F.INTERNAL,"Failed to find cycle participant on the stack.");const i=n.slice(o).concat([[t,r]]).map((s,a)=>{const l=s[0],u=a===0?"root":s[1];let c=`'${l.service.id}'`;return typeof u=="object"&&(c+=` (${qC(u)})`),c});throw new z(F.DEPENDENCY_CYCLE,`Detected dependency cycle: ${i.join(" => ")}.`)}}function GC(e){const t=ac(e.value);switch(e.type){case"service-reference":return`Service '${e.service.id}' requires an unimplemented interface ${t} as dependency '${e.referenceName}'.`;case"ui-reference":return`The UI of package '${e.packageName}' requires an unimplemented interface ${t}.`;case"framework-reference":return`The framework requires an unimplemented interface ${t}.`}}function XC(e,t){const r=ac(e.value),n=Ob(t);let o="";switch(e.type){case"service-reference":o=`Service '${e.service.id}' requires the ambiguous interface ${r} as dependency '${e.referenceName}'.`;break;case"ui-reference":o=`The UI of package '${e.packageName}' requires the ambiguous interface ${r}.`;break;case"framework-reference":o=`The framework requires the ambiguous interface ${r}.`;break}return o+=` Possible choices are ${n}.`,o}function qC(e){switch(e.type){case"service-reference":return`'${e.referenceName}' providing '${e.value.interfaceName}'`;case"ui-reference":return`UI of package '${e.packageName}' requiring '${e.value.interfaceName}'`;case"framework-reference":return`framework requiring '${e.value.interfaceName}'`}}var Pf=function(e,t){return Pf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Pf(e,t)};function br(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Pf(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var B=function(){return B=Object.assign||function(t){for(var r,n=1,o=arguments.length;n"u"&&(i=e.call(this,n),t.set(o,i)),i}function Db(e,t,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,n),t.set(o,i)),i}function dp(e,t,r,n,o){return r.bind(t,e,n,o)}function QC(e,t){var r=e.length===1?Nb:Db;return dp(e,this,r,t.cache.create(),t.serializer)}function ZC(e,t){return dp(e,this,Db,t.cache.create(),t.serializer)}function JC(e,t){return dp(e,this,Nb,t.cache.create(),t.serializer)}var eT=function(){return JSON.stringify(arguments)};function fp(){this.cache=Object.create(null)}fp.prototype.get=function(e){return this.cache[e]};fp.prototype.set=function(e,t){this.cache[e]=t};var tT={create:function(){return new fp}},pt={variadic:ZC,monadic:JC},Y;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Y||(Y={}));var we;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(we||(we={}));var vi;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(vi||(vi={}));function Ug(e){return e.type===we.literal}function rT(e){return e.type===we.argument}function Bb(e){return e.type===we.number}function zb(e){return e.type===we.date}function Fb(e){return e.type===we.time}function jb(e){return e.type===we.select}function Vb(e){return e.type===we.plural}function nT(e){return e.type===we.pound}function Hb(e){return e.type===we.tag}function Ub(e){return!!(e&&typeof e=="object"&&e.type===vi.number)}function _f(e){return!!(e&&typeof e=="object"&&e.type===vi.dateTime)}var Wb=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,oT=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function iT(e){var t={};return e.replace(oT,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var sT=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function aT(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(sT).filter(function(f){return f.length>0}),r=[],n=0,o=t;n1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(uT,function(l,u,c,d,f,m){if(u)t.minimumIntegerDigits=c.length;else{if(d&&f)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Xb.test(o.stem)){t.minimumIntegerDigits=o.stem.length;continue}if(Wg.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(Wg,function(l,u,c,d,f,m){return c==="*"?t.minimumFractionDigits=u.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:f&&m?(t.minimumFractionDigits=f.length,t.maximumFractionDigits=f.length+m.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var i=o.options[0];i==="w"?t=B(B({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=B(B({},t),Gg(i)));continue}if(Gb.test(o.stem)){t=B(B({},t),Gg(o.stem));continue}var s=qb(o.stem);s&&(t=B(B({},t),s));var a=cT(o.stem);a&&(t=B(B({},t),a))}return t}var ll={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function fT(e,t){for(var r="",n=0;n>1),l="a",u=hT(t);for((u=="H"||u=="k")&&(a=0);a-- >0;)r+=l;for(;s-- >0;)r=u+r}else o==="J"?r+="H":r+=o}return r}function hT(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var o=ll[n||""]||ll[r||""]||ll["".concat(r,"-001")]||ll["001"];return o[0]}var yd,pT=new RegExp("^".concat(Wb.source,"*")),mT=new RegExp("".concat(Wb.source,"*$"));function Z(e,t){return{start:e,end:t}}var gT=!!String.prototype.startsWith&&"_a".startsWith("a",1),yT=!!String.fromCodePoint,vT=!!Object.fromEntries,bT=!!String.prototype.codePointAt,ST=!!String.prototype.trimStart,xT=!!String.prototype.trimEnd,wT=!!Number.isSafeInteger,kT=wT?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Af=!0;try{var ET=Kb("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Af=((yd=ET.exec("a"))===null||yd===void 0?void 0:yd[0])==="a"}catch{Af=!1}var qg=gT?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Rf=yT?String.fromCodePoint:function(){for(var t=[],r=0;ri;){if(s=t[i++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},Yg=vT?Object.fromEntries:function(t){for(var r={},n=0,o=t;n=n)){var o=t.charCodeAt(r),i;return o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?o:(o-55296<<10)+(i-56320)+65536}},CT=ST?function(t){return t.trimStart()}:function(t){return t.replace(pT,"")},TT=xT?function(t){return t.trimEnd()}:function(t){return t.replace(mT,"")};function Kb(e,t){return new RegExp(e,t)}var If;if(Af){var Kg=Kb("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");If=function(t,r){var n;Kg.lastIndex=r;var o=Kg.exec(t);return(n=o[1])!==null&&n!==void 0?n:""}}else If=function(t,r){for(var n=[];;){var o=Yb(t,r);if(o===void 0||Qb(o)||RT(o))break;n.push(o),r+=o>=65536?2:1}return Rf.apply(void 0,n)};var PT=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var o=[];!this.isEOF();){var i=this.char();if(i===123){var s=this.parseArgument(t,n);if(s.err)return s;o.push(s.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),o.push({type:we.pound,location:Z(a,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(Y.UNMATCHED_CLOSING_TAG,Z(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&$f(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;o.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;o.push(s.val)}}}return{val:o,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:we.literal,value:"<".concat(o,"/>"),location:Z(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var s=i.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:we.tag,value:o,children:s,location:Z(n,this.clonePosition())},err:null}:this.error(Y.INVALID_TAG,Z(a,this.clonePosition())))}else return this.error(Y.UNCLOSED_TAG,Z(n,this.clonePosition()))}else return this.error(Y.INVALID_TAG,Z(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&AT(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),o="";;){var i=this.tryParseQuote(r);if(i){o+=i;continue}var s=this.tryParseUnquoted(t,r);if(s){o+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){o+=a;continue}break}var l=Z(n,this.clonePosition());return{val:{type:we.literal,value:o,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!_T(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Rf.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Rf(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Y.EXPECT_ARGUMENT_CLOSING_BRACE,Z(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Y.EMPTY_ARGUMENT,Z(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(Y.MALFORMED_ARGUMENT,Z(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Y.EXPECT_ARGUMENT_CLOSING_BRACE,Z(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:we.argument,value:o,location:Z(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Y.EXPECT_ARGUMENT_CLOSING_BRACE,Z(n,this.clonePosition())):this.parseArgumentOptions(t,r,o,n);default:return this.error(Y.MALFORMED_ARGUMENT,Z(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=If(this.message,r),o=r+n.length;this.bumpTo(o);var i=this.clonePosition(),s=Z(t,i);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,o){var i,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(a){case"":return this.error(Y.EXPECT_ARGUMENT_TYPE,Z(s,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var f=TT(d.val);if(f.length===0)return this.error(Y.EXPECT_ARGUMENT_STYLE,Z(this.clonePosition(),this.clonePosition()));var m=Z(c,this.clonePosition());u={style:f,styleLocation:m}}var y=this.tryParseArgumentClose(o);if(y.err)return y;var v=Z(o,this.clonePosition());if(u&&qg(u?.style,"::",0)){var x=CT(u.style.slice(2));if(a==="number"){var d=this.parseNumberSkeletonFromString(x,u.styleLocation);return d.err?d:{val:{type:we.number,value:n,location:v,style:d.val},err:null}}else{if(x.length===0)return this.error(Y.EXPECT_DATE_TIME_SKELETON,v);var p=x;this.locale&&(p=fT(x,this.locale));var f={type:vi.dateTime,pattern:p,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?iT(p):{}},h=a==="date"?we.date:we.time;return{val:{type:h,value:n,location:v,style:f},err:null}}}return{val:{type:a==="number"?we.number:a==="date"?we.date:we.time,value:n,location:v,style:(i=u?.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var g=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Y.EXPECT_SELECT_ARGUMENT_OPTIONS,Z(g,B({},g)));this.bumpSpace();var S=this.parseIdentifierIfPossible(),C=0;if(a!=="select"&&S.value==="offset"){if(!this.bumpIf(":"))return this.error(Y.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Z(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(Y.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Y.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),S=this.parseIdentifierIfPossible(),C=d.val}var P=this.tryParsePluralOrSelectOptions(t,a,r,S);if(P.err)return P;var y=this.tryParseArgumentClose(o);if(y.err)return y;var T=Z(o,this.clonePosition());return a==="select"?{val:{type:we.select,value:n,options:Yg(P.val),location:T},err:null}:{val:{type:we.plural,value:n,options:Yg(P.val),offset:C,pluralType:a==="plural"?"cardinal":"ordinal",location:T},err:null}}default:return this.error(Y.INVALID_ARGUMENT_TYPE,Z(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Y.EXPECT_ARGUMENT_CLOSING_BRACE,Z(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Y.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Z(o,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=aT(t)}catch{return this.error(Y.INVALID_NUMBER_SKELETON,r)}return{val:{type:vi.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?dT(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,o){for(var i,s=!1,a=[],l=new Set,u=o.value,c=o.location;;){if(u.length===0){var d=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(Y.EXPECT_PLURAL_ARGUMENT_SELECTOR,Y.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;c=Z(d,this.clonePosition()),u=this.message.slice(d.offset,this.offset())}else break}if(l.has(u))return this.error(r==="select"?Y.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Y.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);u==="other"&&(s=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?Y.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Y.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Z(this.clonePosition(),this.clonePosition()));var y=this.parseMessage(t+1,r,n);if(y.err)return y;var v=this.tryParseArgumentClose(m);if(v.err)return v;a.push([u,{value:y.val,location:Z(m,this.clonePosition())}]),l.add(u),this.bumpSpace(),i=this.parseIdentifierIfPossible(),u=i.value,c=i.location}return a.length===0?this.error(r==="select"?Y.EXPECT_SELECT_ARGUMENT_SELECTOR:Y.EXPECT_PLURAL_ARGUMENT_SELECTOR,Z(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Y.MISSING_OTHER_CLAUSE,Z(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)i=!0,s=s*10+(a-48),this.bump();else break}var l=Z(o,this.clonePosition());return i?(s*=n,kT(s)?{val:s,err:null}:this.error(r,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Yb(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(qg(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Qb(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function $f(e){return e>=97&&e<=122||e>=65&&e<=90}function _T(e){return $f(e)||e===47}function AT(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Qb(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function RT(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Lf(e){e.forEach(function(t){if(delete t.location,jb(t)||Vb(t))for(var r in t.options)delete t.options[r].location,Lf(t.options[r].value);else Bb(t)&&Ub(t.style)||(zb(t)||Fb(t))&&_f(t.style)?delete t.style.location:Hb(t)&&Lf(t.children)})}function IT(e,t){t===void 0&&(t={}),t=B({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new PT(e,t).parse();if(r.err){var n=SyntaxError(Y[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||Lf(r.val),r.val}var Nr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Nr||(Nr={}));var zn=function(e){br(t,e);function t(r,n,o){var i=e.call(this,r)||this;return i.code=n,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Qg=function(e){br(t,e);function t(r,n,o,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(o).join('", "'),'"'),Nr.INVALID_VALUE,i)||this}return t}(zn),$T=function(e){br(t,e);function t(r,n,o){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Nr.INVALID_VALUE,o)||this}return t}(zn),LT=function(e){br(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Nr.MISSING_VALUE,n)||this}return t}(zn),dt;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(dt||(dt={}));function MT(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==dt.literal||r.type!==dt.literal?t.push(r):n.value+=r.value,t},[])}function OT(e){return typeof e=="function"}function Hl(e,t,r,n,o,i,s){if(e.length===1&&Ug(e[0]))return[{type:dt.literal,value:e[0].value}];for(var a=[],l=0,u=e;l"u")){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=IT,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),So;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(So||(So={}));var La=function(e){br(t,e);function t(r,n,o){var i=this,s=o?o instanceof Error?o:new Error(String(o)):void 0;return i=e.call(this,"[@formatjs/intl Error ".concat(r,"] ").concat(n,` +`).concat(s?` +`.concat(s.message,` +`).concat(s.stack):""))||this,i.code=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,t),i}return t}(Error),zT=function(e){br(t,e);function t(r,n){return e.call(this,So.UNSUPPORTED_FORMATTER,r,n)||this}return t}(La),FT=function(e){br(t,e);function t(r,n){return e.call(this,So.INVALID_CONFIG,r,n)||this}return t}(La),Zg=function(e){br(t,e);function t(r,n){return e.call(this,So.MISSING_DATA,r,n)||this}return t}(La),ar=function(e){br(t,e);function t(r,n,o){var i=e.call(this,So.FORMAT_ERROR,"".concat(r,` +Locale: `).concat(n,` +`),o)||this;return i.locale=n,i}return t}(La),bd=function(e){br(t,e);function t(r,n,o,i){var s=e.call(this,"".concat(r,` +MessageID: `).concat(o?.id,` +Default Message: `).concat(o?.defaultMessage,` +Description: `).concat(o?.description,` +`),n,i)||this;return s.descriptor=o,s.locale=n,s}return t}(ar),jT=function(e){br(t,e);function t(r,n){var o=e.call(this,So.MISSING_TRANSLATION,'Missing message: "'.concat(r.id,'" for locale "').concat(n,'", using ').concat(r.defaultMessage?"default message (".concat(typeof r.defaultMessage=="string"?r.defaultMessage:r.defaultMessage.map(function(i){var s;return(s=i.value)!==null&&s!==void 0?s:JSON.stringify(i)}).join(),")"):"id"," as fallback."))||this;return o.descriptor=r,o}return t}(La);function _o(e,t,r){return r===void 0&&(r={}),t.reduce(function(n,o){return o in e?n[o]=e[o]:o in r&&(n[o]=r[o]),n},{})}var VT=function(e){},HT=function(e){},UT={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:VT,onWarn:HT};function Jb(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Zn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function WT(e){e===void 0&&(e=Jb());var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,o=ht(function(){for(var a,l=[],u=0;u[n[i].serviceId,o])}async getApi(){const t=this.providers.map(async([i,s])=>{const a=await s.getApiMethods();return{serviceId:i,methods:a}}),r=await Promise.all(t),n=new Map;for(const{serviceId:i,methods:s}of r)for(const[a,l]of Object.entries(s)){const u=n.get(a);if(u)throw new z(F.DUPLICATE_API_METHODS,`Cannot define API method '${a}' from '${i}' (method is also defined by '${u.serviceId}').`);n.set(a,{serviceId:i,method:l})}const o={};for(const[i,s]of n.entries())o[i]=s.method;return o}}var Ea,Ca,Ta,Pa,_a,Aa;class yP{constructor(t,r){Gt(this,Ea);Gt(this,Ca);Gt(this,Ta);Gt(this,Pa);Gt(this,_a);Gt(this,Aa);Lt(this,Ea,r.host),Lt(this,Ca,r.shadowRoot),Lt(this,Ta,r.container),Lt(this,Pa,r.locale),Lt(this,_a,Object.freeze(Array.from(r.supportedLocales))),Lt(this,Aa,r.changeLocale)}getHostElement(){return Le(this,Ea)}getShadowRoot(){return Le(this,Ca)}getApplicationContainer(){return Le(this,Ta)}getLocale(){return Le(this,Pa)}setLocale(t){Le(this,Aa).call(this,t)}getSupportedLocales(){return Le(this,_a)}}Ea=new WeakMap,Ca=new WeakMap,Ta=new WeakMap,Pa=new WeakMap,_a=new WeakMap,Aa=new WeakMap;const vP=$a("runtime:ApplicationLifecycleEventService");var Ra;class bP{constructor(t){Gt(this,Ra);const r=t.references.listeners,n=t.referencesMeta.listeners;Lt(this,Ra,r.map((o,i)=>[n[i].serviceId,o]))}emitLifecycleEvent(t){const r=(()=>{switch(t){case"after-start":return"afterApplicationStart";case"before-stop":return"beforeApplicationStop";default:throw new z(F.INTERNAL,`Invalid event '${t}'`)}})();for(const[n,o]of Le(this,Ra))try{o[r]?.()}catch(i){vP.error(`Unexpected error from application lifecycle listener ${n}`,i)}}}Ra=new WeakMap;const SP=$a("runtime:NumberParserService");class xP{numberParser;constructor(t,r){try{this.numberParser=new jg(r)}catch(n){SP.warn("Failed to create NumberParserImpl with locale. Retrying with default 'en-US' locale.",n),this.numberParser=new jg("en-US")}}parseNumber(t){return this.numberParser.parse(t)}}const Ki="@open-pioneer/runtime",wP="integration.ApiExtension",mp="runtime.ApiService",kP="runtime.ApplicationContext",gp="runtime.ApplicationLifecycleEventService",EP="runtime.NumberParserService",CP="runtime.AutoStart";function TP(e){const t=mP(),r=new so({name:"ApiServiceImpl",packageName:Ki,factory:Vg(gP),intl:t,interfaces:[{interfaceName:mp,qualifier:"builtin"}],dependencies:[{referenceName:"providers",interfaceName:wP,all:!0}]}),n=new so({name:"ApplicationContextImpl",packageName:Ki,factory:Hg(s=>new yP(s,e)),intl:t,interfaces:[{interfaceName:kP,qualifier:"builtin"}]}),o=new so({name:"ApplicationLifecycleEventServiceImpl",packageName:Ki,factory:Vg(bP),intl:t,interfaces:[{interfaceName:gp,qualifier:"builtin"}],dependencies:[{referenceName:"listeners",interfaceName:"runtime.ApplicationLifecycleListener",all:!0}]}),i=new so({name:"NumberParserServiceImpl",packageName:Ki,factory:Hg(s=>new xP(s,e.locale)),intl:t,interfaces:[{interfaceName:EP,qualifier:"builtin"}]});return new lc({name:Ki,services:[r,n,o,i],intl:t})}const n0=$a("runtime:ServiceLayer"),cl={type:"undeclared"},PP={type:"unknown-package"};class _P{allServices;requiredServices;serviceLookup;serviceDependencies;declaredDependencies;state="not-started";constructor(t,r=[]){const n=t.map(l=>l.services).flat(),o=t.map(l=>l.uiReferences.map(u=>({type:"ui",packageName:l.name,...u}))).flat(),i=[...r.map(l=>({type:"framework",...l})),...o],{serviceLookup:s,serviceDependencies:a}=UC({services:n,requiredReferences:i});this.allServices=n,this.requiredServices=AP(i,s),this.serviceLookup=s,this.serviceDependencies=a,this.declaredDependencies=RP(t)}destroy(){for(const t of this.requiredServices)this.destroyService(t);this.state="destroyed"}start(){if(this.state!=="not-started")throw new z(F.INTERNAL,"Service layer was already started.");for(const t of this.requiredServices)this.createService(t);this.state="started"}getService(t,r,n){if(this.state!=="started")throw new z(F.INTERNAL,"Service layer is not started.");if(!n?.ignoreDeclarationCheck){const o=this.checkDependency(t,r);if(o)return o}return this.serviceLookup.lookupOne(r)}getServices(t,r){if(this.state!=="started")throw new z(F.INTERNAL,"Service layer is not started.");const n=this.checkDependency(t,{interfaceName:r,all:!0});return n||this.serviceLookup.lookupAll(r)}createService(t){if(t.state==="constructed"){const o=t.getInstanceOrThrow();return t.addRef(),o}if(t.state==="constructing")throw new z(F.INTERNAL,"Cycle during service construction.");if(t.state!=="not-constructed")throw new z(F.INTERNAL,"Invalid service state.");const r={},n={};t.beforeCreate();for(const[o,i]of Object.entries(this.getServiceDeps(t))){const[s,a]=this.getReference(i);r[o]=s,n[o]=a}return n0.debug(`Creating service '${t.id}'.`),t.create({references:r,referencesMeta:n})}destroyService(t){if(t.state!=="destroyed"){t.removeRef()<=0&&(n0.debug(`Destroying service '${t.id}'`),t.destroy());for(const r of Object.values(this.getServiceDeps(t)))if(Array.isArray(r))for(const n of r)this.destroyService(n);else this.destroyService(r)}}checkDependency(t,r){const n=this.declaredDependencies.get(t);if(!n)return PP;const o=n.get(r.interfaceName);return o?cp(r)?r.qualifier==null?o.unqualified?void 0:cl:o.qualifiers.has(r.qualifier)?void 0:cl:o.all?void 0:cl:cl}getReference(t){if(Array.isArray(t)){const o=[],i=[];for(const s of t){const[a,l]=this.getReference(s);o.push(a),i.push(l)}return[o,i]}const r=this.createService(t),n={serviceId:t.id};return[r,n]}getServiceDeps(t){const r=this.serviceDependencies.get(t.id);if(!r)throw new z(F.INTERNAL,`Failed to find precomputed service dependencies for '${t.id}'.`);return r}}function AP(e,t){const r=new Set;for(const n of e){const o=t.lookup(n);if(o.type!=="found")throw new z(F.INTERNAL,`Failed to find required reference to ${ac(n)}.`);if(Array.isArray(o.value))for(const i of o.value)r.add(i);else r.add(o.value)}return r}function RP(e){const t=new Map;for(const r of e){const n=r.name,o=new Map;for(const i of r.uiReferences){let s=o.get(i.interfaceName);if(s||(s={all:!1,unqualified:!1,qualifiers:new Set},o.set(i.interfaceName,s)),$C(i))s.all=!0;else if(cp(i))i.qualifier==null?s.unqualified=!0:s.qualifiers.add(i.qualifier);else throw new z(F.INTERNAL,"Unexpected implementation spec.")}t.set(n,o)}return t}var i1={exports:{}},cc={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var IP=w,$P=Symbol.for("react.element"),LP=Symbol.for("react.fragment"),MP=Object.prototype.hasOwnProperty,OP=IP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,NP={key:!0,ref:!0,__self:!0,__source:!0};function s1(e,t,r){var n,o={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)MP.call(t,n)&&!NP.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:$P,type:e,key:i,ref:s,props:o,_owner:OP.current}}cc.Fragment=LP;cc.jsx=s1;cc.jsxs=s1;i1.exports=cc;var R=i1.exports;function DP(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function BP(){return!!globalThis?.document}function zP(e){return e.parentElement&&zP(e.parentElement)?!0:e.hidden}function vV(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function bV(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function FP(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const r={...e};for(const n of t)if(n!=null)for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&(o in r&&delete r[o],r[o]=n[o]);return r}function Ul(e){return Array.isArray(e)}function gt(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Ul(e)}function jP(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function VP(e){const t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}}function Mf(e){if(e==null)return e;const{unitless:t}=VP(e);return t||typeof e=="number"?`${e}px`:e}const a1=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,yp=e=>Object.fromEntries(Object.entries(e).sort(a1));function o0(e){const t=yp(e);return Object.assign(Object.values(t),t)}function HP(e){const t=Object.keys(yp(e));return new Set(t)}function i0(e){if(!e)return e;e=Mf(e)??e;const t=-.02;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+t}`)}function hs(e,t){const r=["@media screen"];return e&&r.push("and",`(min-width: ${Mf(e)})`),t&&r.push("and",`(max-width: ${Mf(t)})`),r.join(" ")}function UP(e){if(!e)return null;e.base=e.base??"0px";const t=o0(e),r=Object.entries(e).sort(a1).map(([i,s],a,l)=>{let[,u]=l[a+1]??[];return u=parseFloat(u)>0?i0(u):void 0,{_minW:i0(s),breakpoint:i,minW:s,maxW:u,maxWQuery:hs(null,u),minWQuery:hs(s),minMaxQuery:hs(s,u)}}),n=HP(e),o=Array.from(n.values());return{keys:n,normalized:t,isResponsive(i){const s=Object.keys(i);return s.length>0&&s.every(a=>n.has(a))},asObject:yp(e),asArray:o0(e),details:r,get(i){return r.find(s=>s.breakpoint===i)},media:[null,...t.map(i=>hs(i)).slice(1)],toArrayValue(i){if(!gt(i))throw new Error("toArrayValue: value must be an object");const s=o.map(a=>i[a]??null);for(;jP(s)===null;)s.pop();return s},toObjectValue(i){if(!Array.isArray(i))throw new Error("toObjectValue: value must be an array");return i.reduce((s,a,l)=>{const u=o[l];return u!=null&&a!=null&&(s[u]=a),s},{})}}}function SV(...e){return function(...r){e.forEach(n=>n?.(...r))}}function Qi(...e){return function(r){e.some(n=>(n?.(r),r?.defaultPrevented))}}function WP(e){return w.Children.toArray(e).filter(t=>w.isValidElement(t))}function vp(e){const t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function GP(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Bi(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:i,defaultValue:s}=e,a=w.createContext(s);a.displayName=t;function l(){const u=w.useContext(a);if(!u&&r){const c=new Error(i??GP(n,o));throw c.name="ContextError",Error.captureStackTrace?.(c,l),c}return u}return[a.Provider,l,a]}const dn=(...e)=>e.filter(Boolean).join(" ");function XP(e,t,r,n){const o=typeof t=="string"?t.split("."):[t];for(n=0;n{const t=new WeakMap;return(n,o,i,s)=>{if(typeof n>"u")return e(n,o,i);t.has(n)||t.set(n,new Map);const a=t.get(n);if(a.has(o))return a.get(o);const l=e(n,o,i,s);return a.set(o,l),l}},l1=qP(XP),YP=e=>e.default||e;function bp(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}function u1(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}const KP=Object.freeze(["base","sm","md","lg","xl","2xl"]);function QP(e,t){return Array.isArray(e)?e.map(r=>r===null?null:t(r)):gt(e)?Object.keys(e).reduce((r,n)=>(r[n]=t(e[n]),r),{}):e!=null?t(e):null}function xV(e,t=KP){const r={};return e.forEach((n,o)=>{const i=t[o];n!=null&&(r[i]=n)}),r}const ZP=e=>typeof e=="function";function Ar(e,...t){return ZP(e)?e(...t):e}function JP(e){const t=e.ownerDocument.defaultView||window,{overflow:r,overflowX:n,overflowY:o}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(r+o+n)}function e2(e){return e.localName==="html"?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}function c1(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:DP(e)&&JP(e)?e:c1(e2(e))}function t2(e,...t){const r=Object.getOwnPropertyDescriptors(e),n=Object.keys(r),o=s=>{const a={};for(let l=0;lo(Array.isArray(s)?s:n.filter(s));return t.map(i).concat(o(n))}function s0(e,t,r={}){const{stop:n,getKey:o}=r;function i(s,a=[]){if(gt(s)||Array.isArray(s)){const l={};for(const[u,c]of Object.entries(s)){const d=o?.(u)??u,f=[...a,d];if(n?.(s,f))return t(s,a);l[d]=i(c,f)}return l}return t(s,a)}return i(e)}var bu={exports:{}};bu.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",o=800,i=16,s=9007199254740991,a="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",m="[object Function]",y="[object GeneratorFunction]",v="[object Map]",x="[object Number]",p="[object Null]",h="[object Object]",g="[object Proxy]",S="[object RegExp]",C="[object Set]",P="[object String]",T="[object Undefined]",A="[object WeakMap]",M="[object ArrayBuffer]",I="[object DataView]",H="[object Float32Array]",ve="[object Float64Array]",he="[object Int8Array]",We="[object Int16Array]",ue="[object Int32Array]",q="[object Uint8Array]",le="[object Uint8ClampedArray]",L="[object Uint16Array]",D="[object Uint32Array]",U=/[\\^$.*+?()[\]{}|]/g,ee=/^\[object .+?Constructor\]$/,te=/^(?:0|[1-9]\d*)$/,G={};G[H]=G[ve]=G[he]=G[We]=G[ue]=G[q]=G[le]=G[L]=G[D]=!0,G[a]=G[l]=G[M]=G[c]=G[I]=G[d]=G[f]=G[m]=G[v]=G[x]=G[h]=G[S]=G[C]=G[P]=G[A]=!1;var Ie=typeof sl=="object"&&sl&&sl.Object===Object&&sl,be=typeof self=="object"&&self&&self.Object===Object&&self,$e=Ie||be||Function("return this")(),ut=t&&!t.nodeType&&t,ct=ut&&!0&&e&&!e.nodeType&&e,hn=ct&&ct.exports===ut,Gn=hn&&Ie.process,pn=function(){try{var b=ct&&ct.require&&ct.require("util").types;return b||Gn&&Gn.binding&&Gn.binding("util")}catch{}}(),me=pn&&pn.isTypedArray;function It(b,E,_){switch(_.length){case 0:return b.call(E);case 1:return b.call(E,_[0]);case 2:return b.call(E,_[0],_[1]);case 3:return b.call(E,_[0],_[1],_[2])}return b.apply(E,_)}function Io(b,E){for(var _=-1,N=Array(b);++_-1}function mE(b,E){var _=this.__data__,N=tl(_,b);return N<0?(++this.size,_.push([b,E])):_[N][1]=E,this}Br.prototype.clear=dE,Br.prototype.delete=fE,Br.prototype.get=hE,Br.prototype.has=pE,Br.prototype.set=mE;function Lo(b){var E=-1,_=b==null?0:b.length;for(this.clear();++E<_;){var N=b[E];this.set(N[0],N[1])}}function gE(){this.size=0,this.__data__={hash:new Kn,map:new(Eg||Br),string:new Kn}}function yE(b){var E=nl(this,b).delete(b);return this.size-=E?1:0,E}function vE(b){return nl(this,b).get(b)}function bE(b){return nl(this,b).has(b)}function SE(b,E){var _=nl(this,b),N=_.size;return _.set(b,E),this.size+=_.size==N?0:1,this}Lo.prototype.clear=gE,Lo.prototype.delete=yE,Lo.prototype.get=vE,Lo.prototype.has=bE,Lo.prototype.set=SE;function Mo(b){var E=this.__data__=new Br(b);this.size=E.size}function xE(){this.__data__=new Br,this.size=0}function wE(b){var E=this.__data__,_=E.delete(b);return this.size=E.size,_}function kE(b){return this.__data__.get(b)}function EE(b){return this.__data__.has(b)}function CE(b,E){var _=this.__data__;if(_ instanceof Br){var N=_.__data__;if(!Eg||N.length1?_[Q-1]:void 0,Ee=Q>2?_[2]:void 0;for(pe=b.length>3&&typeof pe=="function"?(Q--,pe):void 0,Ee&&UE(_[0],_[1],Ee)&&(pe=Q<3?void 0:pe,Q=1),E=Object(E);++N-1&&b%1==0&&b0){if(++E>=o)return arguments[0]}else E=0;return b.apply(void 0,arguments)}}function ZE(b){if(b!=null){try{return Xn.call(b)}catch{}try{return b+""}catch{}}return""}function ol(b,E){return b===E||b!==b&&E!==E}var ld=Cg(function(){return arguments}())?Cg:function(b){return qi(b)&&lr.call(b,"callee")&&!tE.call(b,"callee")},ud=Array.isArray;function cd(b){return b!=null&&Rg(b.length)&&!dd(b)}function JE(b){return qi(b)&&cd(b)}var Ag=nE||oC;function dd(b){if(!Qn(b))return!1;var E=rl(b);return E==m||E==y||E==u||E==g}function Rg(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=s}function Qn(b){var E=typeof b;return b!=null&&(E=="object"||E=="function")}function qi(b){return b!=null&&typeof b=="object"}function eC(b){if(!qi(b)||rl(b)!=h)return!1;var E=xg(b);if(E===null)return!0;var _=lr.call(E,"constructor")&&E.constructor;return typeof _=="function"&&_ instanceof _&&Xn.call(_)==Za}var Ig=me?Wi(me):RE;function tC(b){return zE(b,$g(b))}function $g(b){return cd(b)?TE(b):IE(b)}var rC=FE(function(b,E,_,N){Tg(b,E,_,N)});function nC(b){return function(){return b}}function Lg(b){return b}function oC(){return!1}e.exports=rC})(bu,bu.exports);var r2=bu.exports;const Jt=ip(r2);function Su(e,t=[]){const r=w.useRef(e);return w.useEffect(()=>{r.current=e}),w.useCallback((...n)=>r.current?.(...n),t)}function Sd(e,t,r,n){const o=Su(r);return w.useEffect(()=>{const i=typeof e=="function"?e():e??document;if(!(!r||!i))return i.addEventListener(t,o,n),()=>{i.removeEventListener(t,o,n)}},[t,e,n,o,r]),()=>{(typeof e=="function"?e():e??document)?.removeEventListener(t,o,n)}}function n2(e={}){const{onClose:t,onOpen:r,isOpen:n,id:o}=e,i=Su(r),s=Su(t),[a,l]=w.useState(e.defaultIsOpen||!1),u=n!==void 0?n:a,c=n!==void 0,d=w.useId(),f=o??`disclosure-${d}`,m=w.useCallback(()=>{c||l(!1),s?.()},[c,s]),y=w.useCallback(()=>{c||l(!0),i?.()},[c,i]),v=w.useCallback(()=>{u?m():y()},[u,y,m]);function x(h={}){return{...h,"aria-expanded":u,"aria-controls":f,onClick(g){h.onClick?.(g),v()}}}function p(h={}){return{...h,hidden:!u,id:f}}return{isOpen:u,onOpen:y,onClose:m,onToggle:v,isControlled:c,getButtonProps:x,getDisclosureProps:p}}const xu=globalThis?.document?w.useLayoutEffect:w.useEffect,a0=(e,t)=>{const r=w.useRef(!1),n=w.useRef(!1);w.useEffect(()=>{if(r.current&&n.current)return e();n.current=!0},t),w.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function o2(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function wu(...e){return t=>{e.forEach(r=>{o2(r,t)})}}function wV(...e){return w.useMemo(()=>wu(...e),e)}function i2(e,t){const r=Su(e);w.useEffect(()=>{if(t==null)return;let n=null;return n=window.setTimeout(()=>{r()},t),()=>{n&&window.clearTimeout(n)}},[t,r])}const je={open:(e,t)=>`${e}[data-open], ${e}[open], ${e}[data-state=open] ${t}`,closed:(e,t)=>`${e}[data-closed], ${e}[data-state=closed] ${t}`,hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},xr=e=>d1(t=>e(t,"&"),"[role=group]","[data-group]",".group"),zr=e=>d1(t=>e(t,"~ &"),"[data-peer]",".peer"),d1=(e,...t)=>t.map(e).join(", "),dc={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within, &[data-focus-within]",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty, &[data-empty]",_expanded:"&[aria-expanded=true], &[data-expanded], &[data-state=expanded]",_checked:"&[aria-checked=true], &[data-checked], &[data-state=checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate], &[data-state=indeterminate]",_groupOpen:xr(je.open),_groupClosed:xr(je.closed),_groupHover:xr(je.hover),_peerHover:zr(je.hover),_groupFocus:xr(je.focus),_peerFocus:zr(je.focus),_groupFocusVisible:xr(je.focusVisible),_peerFocusVisible:zr(je.focusVisible),_groupActive:xr(je.active),_peerActive:zr(je.active),_groupDisabled:xr(je.disabled),_peerDisabled:zr(je.disabled),_groupInvalid:xr(je.invalid),_peerInvalid:zr(je.invalid),_groupChecked:xr(je.checked),_peerChecked:zr(je.checked),_groupFocusWithin:xr(je.focusWithin),_peerFocusWithin:zr(je.focusWithin),_peerPlaceholderShown:zr(je.placeholderShown),_placeholder:"&::placeholder, &[data-placeholder]",_placeholderShown:"&:placeholder-shown, &[data-placeholder-shown]",_fullScreen:"&:fullscreen, &[data-fullscreen]",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]",_open:"&[data-open], &[open], &[data-state=open]",_closed:"&[data-closed], &[data-state=closed]",_complete:"&[data-complete]",_incomplete:"&[data-incomplete]",_current:"&[data-current]"},f1=Object.keys(dc),s2=e=>/!(important)?$/.test(e),l0=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,a2=(e,t)=>r=>{const n=String(t),o=s2(n),i=l0(n),s=e?`${e}.${i}`:i;let a=gt(r.__cssMap)&&s in r.__cssMap?r.__cssMap[s].varRef:t;return a=l0(a),o?`${a} !important`:a};function Sp(e){const{scale:t,transform:r,compose:n}=e;return(i,s)=>{const a=a2(t,i)(s);let l=r?.(a,s)??a;return n&&(l=n(l,s)),l}}const dl=(...e)=>t=>e.reduce((r,n)=>n(r),t);function Xt(e,t){return r=>{const n={property:r,scale:e};return n.transform=Sp({scale:e,transform:t}),n}}const l2=({rtl:e,ltr:t})=>r=>r.direction==="rtl"?e:t;function u2(e){const{property:t,scale:r,transform:n}=e;return{scale:r,property:l2(t),transform:r?Sp({scale:r,compose:n}):n}}const h1=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function c2(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...h1].join(" ")}function d2(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...h1].join(" ")}const f2={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},h2={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function p2(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}const m2={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Of={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},g2=new Set(Object.values(Of)),Nf=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),y2=e=>e.trim();function v2(e,t){if(e==null||Nf.has(e))return e;if(!(Df(e)||Nf.has(e)))return`url('${e}')`;const o=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),i=o?.[1],s=o?.[2];if(!i||!s)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[l,...u]=s.split(",").map(y2).filter(Boolean);if(u?.length===0)return e;const c=l in Of?Of[l]:l;u.unshift(c);const d=u.map(f=>{if(g2.has(f))return f;const m=f.indexOf(" "),[y,v]=m!==-1?[f.substr(0,m),f.substr(m+1)]:[f],x=Df(v)?v:v&&v.split(" "),p=`colors.${y}`,h=p in t.__cssMap?t.__cssMap[p].varRef:y;return x?[h,...Array.isArray(x)?x:[x]].join(" "):h});return`${a}(${d.join(", ")})`}const Df=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),b2=(e,t)=>v2(e,t??{});function S2(e){return/^var\(--.+\)$/.test(e)}const x2=e=>{const t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}},wr=e=>t=>`${e}(${t})`,K={filter(e){return e!=="auto"?e:f2},backdropFilter(e){return e!=="auto"?e:h2},ring(e){return p2(K.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?c2():e==="auto-gpu"?d2():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=x2(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const r={left:"right",right:"left"};return t.direction==="rtl"?r[e]:e},degree(e){if(S2(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:b2,blur:wr("blur"),opacity:wr("opacity"),brightness:wr("brightness"),contrast:wr("contrast"),dropShadow:wr("drop-shadow"),grayscale:wr("grayscale"),hueRotate:e=>wr("hue-rotate")(K.degree(e)),invert:wr("invert"),saturate:wr("saturate"),sepia:wr("sepia"),bgImage(e){return e==null||Df(e)||Nf.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:r}=m2[e]??{},n={flexDirection:e};return t&&(n[t]=1),r&&(n[r]=1),n}},k={borderWidths:Xt("borderWidths"),borderStyles:Xt("borderStyles"),colors:Xt("colors"),borders:Xt("borders"),gradients:Xt("gradients",K.gradient),radii:Xt("radii",K.px),space:Xt("space",dl(K.vh,K.px)),spaceT:Xt("space",dl(K.vh,K.px)),degreeT(e){return{property:e,transform:K.degree}},prop(e,t,r){return{property:e,scale:t,...t&&{transform:Sp({scale:t,transform:r})}}},propT(e,t){return{property:e,transform:t}},sizes:Xt("sizes",dl(K.vh,K.px)),sizesT:Xt("sizes",dl(K.vh,K.fraction)),shadows:Xt("shadows"),logical:u2,blur:Xt("blur",K.blur)},Wl={background:k.colors("background"),backgroundColor:k.colors("backgroundColor"),backgroundImage:k.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:K.bgClip},bgSize:k.prop("backgroundSize"),bgPosition:k.prop("backgroundPosition"),bg:k.colors("background"),bgColor:k.colors("backgroundColor"),bgPos:k.prop("backgroundPosition"),bgRepeat:k.prop("backgroundRepeat"),bgAttachment:k.prop("backgroundAttachment"),bgGradient:k.gradients("backgroundImage"),bgClip:{transform:K.bgClip}};Object.assign(Wl,{bgImage:Wl.backgroundImage,bgImg:Wl.backgroundImage});const ne={border:k.borders("border"),borderWidth:k.borderWidths("borderWidth"),borderStyle:k.borderStyles("borderStyle"),borderColor:k.colors("borderColor"),borderRadius:k.radii("borderRadius"),borderTop:k.borders("borderTop"),borderBlockStart:k.borders("borderBlockStart"),borderTopLeftRadius:k.radii("borderTopLeftRadius"),borderStartStartRadius:k.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:k.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:k.radii("borderTopRightRadius"),borderStartEndRadius:k.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:k.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:k.borders("borderRight"),borderInlineEnd:k.borders("borderInlineEnd"),borderBottom:k.borders("borderBottom"),borderBlockEnd:k.borders("borderBlockEnd"),borderBottomLeftRadius:k.radii("borderBottomLeftRadius"),borderBottomRightRadius:k.radii("borderBottomRightRadius"),borderLeft:k.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:k.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:k.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:k.borders(["borderLeft","borderRight"]),borderInline:k.borders("borderInline"),borderY:k.borders(["borderTop","borderBottom"]),borderBlock:k.borders("borderBlock"),borderTopWidth:k.borderWidths("borderTopWidth"),borderBlockStartWidth:k.borderWidths("borderBlockStartWidth"),borderTopColor:k.colors("borderTopColor"),borderBlockStartColor:k.colors("borderBlockStartColor"),borderTopStyle:k.borderStyles("borderTopStyle"),borderBlockStartStyle:k.borderStyles("borderBlockStartStyle"),borderBottomWidth:k.borderWidths("borderBottomWidth"),borderBlockEndWidth:k.borderWidths("borderBlockEndWidth"),borderBottomColor:k.colors("borderBottomColor"),borderBlockEndColor:k.colors("borderBlockEndColor"),borderBottomStyle:k.borderStyles("borderBottomStyle"),borderBlockEndStyle:k.borderStyles("borderBlockEndStyle"),borderLeftWidth:k.borderWidths("borderLeftWidth"),borderInlineStartWidth:k.borderWidths("borderInlineStartWidth"),borderLeftColor:k.colors("borderLeftColor"),borderInlineStartColor:k.colors("borderInlineStartColor"),borderLeftStyle:k.borderStyles("borderLeftStyle"),borderInlineStartStyle:k.borderStyles("borderInlineStartStyle"),borderRightWidth:k.borderWidths("borderRightWidth"),borderInlineEndWidth:k.borderWidths("borderInlineEndWidth"),borderRightColor:k.colors("borderRightColor"),borderInlineEndColor:k.colors("borderInlineEndColor"),borderRightStyle:k.borderStyles("borderRightStyle"),borderInlineEndStyle:k.borderStyles("borderInlineEndStyle"),borderTopRadius:k.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:k.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:k.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:k.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(ne,{rounded:ne.borderRadius,roundedTop:ne.borderTopRadius,roundedTopLeft:ne.borderTopLeftRadius,roundedTopRight:ne.borderTopRightRadius,roundedTopStart:ne.borderStartStartRadius,roundedTopEnd:ne.borderStartEndRadius,roundedBottom:ne.borderBottomRadius,roundedBottomLeft:ne.borderBottomLeftRadius,roundedBottomRight:ne.borderBottomRightRadius,roundedBottomStart:ne.borderEndStartRadius,roundedBottomEnd:ne.borderEndEndRadius,roundedLeft:ne.borderLeftRadius,roundedRight:ne.borderRightRadius,roundedStart:ne.borderInlineStartRadius,roundedEnd:ne.borderInlineEndRadius,borderStart:ne.borderInlineStart,borderEnd:ne.borderInlineEnd,borderTopStartRadius:ne.borderStartStartRadius,borderTopEndRadius:ne.borderStartEndRadius,borderBottomStartRadius:ne.borderEndStartRadius,borderBottomEndRadius:ne.borderEndEndRadius,borderStartRadius:ne.borderInlineStartRadius,borderEndRadius:ne.borderInlineEndRadius,borderStartWidth:ne.borderInlineStartWidth,borderEndWidth:ne.borderInlineEndWidth,borderStartColor:ne.borderInlineStartColor,borderEndColor:ne.borderInlineEndColor,borderStartStyle:ne.borderInlineStartStyle,borderEndStyle:ne.borderInlineEndStyle});const w2={color:k.colors("color"),textColor:k.colors("color"),fill:k.colors("fill"),stroke:k.colors("stroke"),accentColor:k.colors("accentColor"),textFillColor:k.colors("textFillColor")},ku={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:K.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:k.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:k.space("gap"),rowGap:k.space("rowGap"),columnGap:k.space("columnGap")};Object.assign(ku,{flexDir:ku.flexDirection});const Yt={width:k.sizesT("width"),inlineSize:k.sizesT("inlineSize"),height:k.sizes("height"),blockSize:k.sizes("blockSize"),boxSize:k.sizes(["width","height"]),minWidth:k.sizes("minWidth"),minInlineSize:k.sizes("minInlineSize"),minHeight:k.sizes("minHeight"),minBlockSize:k.sizes("minBlockSize"),maxWidth:k.sizes("maxWidth"),maxInlineSize:k.sizes("maxInlineSize"),maxHeight:k.sizes("maxHeight"),maxBlockSize:k.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>({[`@media screen and (min-width: ${t.__breakpoints?.get(e)?.minW??e})`]:{display:"none"}})},hideBelow:{scale:"breakpoints",transform:(e,t)=>({[`@media screen and (max-width: ${t.__breakpoints?.get(e)?._minW??e})`]:{display:"none"}})},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:k.propT("float",K.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Yt,{w:Yt.width,h:Yt.height,minW:Yt.minWidth,maxW:Yt.maxWidth,minH:Yt.minHeight,maxH:Yt.maxHeight,overscroll:Yt.overscrollBehavior,overscrollX:Yt.overscrollBehaviorX,overscrollY:Yt.overscrollBehaviorY});const k2={filter:{transform:K.filter},blur:k.blur("--chakra-blur"),brightness:k.propT("--chakra-brightness",K.brightness),contrast:k.propT("--chakra-contrast",K.contrast),hueRotate:k.propT("--chakra-hue-rotate",K.hueRotate),invert:k.propT("--chakra-invert",K.invert),saturate:k.propT("--chakra-saturate",K.saturate),dropShadow:k.propT("--chakra-drop-shadow",K.dropShadow),backdropFilter:{transform:K.backdropFilter},backdropBlur:k.blur("--chakra-backdrop-blur"),backdropBrightness:k.propT("--chakra-backdrop-brightness",K.brightness),backdropContrast:k.propT("--chakra-backdrop-contrast",K.contrast),backdropHueRotate:k.propT("--chakra-backdrop-hue-rotate",K.hueRotate),backdropInvert:k.propT("--chakra-backdrop-invert",K.invert),backdropSaturate:k.propT("--chakra-backdrop-saturate",K.saturate)},E2={ring:{transform:K.ring},ringColor:k.colors("--chakra-ring-color"),ringOffset:k.prop("--chakra-ring-offset-width"),ringOffsetColor:k.colors("--chakra-ring-offset-color"),ringInset:k.prop("--chakra-ring-inset")},C2={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:K.outline},outlineOffset:!0,outlineColor:k.colors("outlineColor")},p1={gridGap:k.space("gridGap"),gridColumnGap:k.space("gridColumnGap"),gridRowGap:k.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0};function T2(e,t,r,n){const o=typeof t=="string"?t.split("."):[t];for(n=0;n{const t=new WeakMap;return(n,o,i,s)=>{if(typeof n>"u")return e(n,o,i);t.has(n)||t.set(n,new Map);const a=t.get(n);if(a.has(o))return a.get(o);const l=e(n,o,i,s);return a.set(o,l),l}},_2=P2(T2),A2={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},R2={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},xd=(e,t,r)=>{const n={},o=_2(e,t,{});for(const i in o)i in r&&r[i]!=null||(n[i]=o[i]);return n},I2={srOnly:{transform(e){return e===!0?A2:e==="focusable"?R2:{}}},layerStyle:{processResult:!0,transform:(e,t,r)=>xd(t,`layerStyles.${e}`,r)},textStyle:{processResult:!0,transform:(e,t,r)=>xd(t,`textStyles.${e}`,r)},apply:{processResult:!0,transform:(e,t,r)=>xd(t,e,r)}},Cs={position:!0,pos:k.prop("position"),zIndex:k.prop("zIndex","zIndices"),inset:k.spaceT("inset"),insetX:k.spaceT(["left","right"]),insetInline:k.spaceT("insetInline"),insetY:k.spaceT(["top","bottom"]),insetBlock:k.spaceT("insetBlock"),top:k.spaceT("top"),insetBlockStart:k.spaceT("insetBlockStart"),bottom:k.spaceT("bottom"),insetBlockEnd:k.spaceT("insetBlockEnd"),left:k.spaceT("left"),insetInlineStart:k.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:k.spaceT("right"),insetInlineEnd:k.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Cs,{insetStart:Cs.insetInlineStart,insetEnd:Cs.insetInlineEnd});const Bf={boxShadow:k.shadows("boxShadow"),mixBlendMode:!0,blendMode:k.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:k.prop("backgroundBlendMode"),opacity:!0};Object.assign(Bf,{shadow:Bf.boxShadow});const xe={margin:k.spaceT("margin"),marginTop:k.spaceT("marginTop"),marginBlockStart:k.spaceT("marginBlockStart"),marginRight:k.spaceT("marginRight"),marginInlineEnd:k.spaceT("marginInlineEnd"),marginBottom:k.spaceT("marginBottom"),marginBlockEnd:k.spaceT("marginBlockEnd"),marginLeft:k.spaceT("marginLeft"),marginInlineStart:k.spaceT("marginInlineStart"),marginX:k.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:k.spaceT("marginInline"),marginY:k.spaceT(["marginTop","marginBottom"]),marginBlock:k.spaceT("marginBlock"),padding:k.space("padding"),paddingTop:k.space("paddingTop"),paddingBlockStart:k.space("paddingBlockStart"),paddingRight:k.space("paddingRight"),paddingBottom:k.space("paddingBottom"),paddingBlockEnd:k.space("paddingBlockEnd"),paddingLeft:k.space("paddingLeft"),paddingInlineStart:k.space("paddingInlineStart"),paddingInlineEnd:k.space("paddingInlineEnd"),paddingX:k.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:k.space("paddingInline"),paddingY:k.space(["paddingTop","paddingBottom"]),paddingBlock:k.space("paddingBlock")};Object.assign(xe,{m:xe.margin,mt:xe.marginTop,mr:xe.marginRight,me:xe.marginInlineEnd,marginEnd:xe.marginInlineEnd,mb:xe.marginBottom,ml:xe.marginLeft,ms:xe.marginInlineStart,marginStart:xe.marginInlineStart,mx:xe.marginX,my:xe.marginY,p:xe.padding,pt:xe.paddingTop,py:xe.paddingY,px:xe.paddingX,pb:xe.paddingBottom,pl:xe.paddingLeft,ps:xe.paddingInlineStart,paddingStart:xe.paddingInlineStart,pr:xe.paddingRight,pe:xe.paddingInlineEnd,paddingEnd:xe.paddingInlineEnd});const $2={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:k.spaceT("scrollMargin"),scrollMarginTop:k.spaceT("scrollMarginTop"),scrollMarginBottom:k.spaceT("scrollMarginBottom"),scrollMarginLeft:k.spaceT("scrollMarginLeft"),scrollMarginRight:k.spaceT("scrollMarginRight"),scrollMarginX:k.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:k.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:k.spaceT("scrollPadding"),scrollPaddingTop:k.spaceT("scrollPaddingTop"),scrollPaddingBottom:k.spaceT("scrollPaddingBottom"),scrollPaddingLeft:k.spaceT("scrollPaddingLeft"),scrollPaddingRight:k.spaceT("scrollPaddingRight"),scrollPaddingX:k.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:k.spaceT(["scrollPaddingTop","scrollPaddingBottom"])},L2={fontFamily:k.prop("fontFamily","fonts"),fontSize:k.prop("fontSize","fontSizes",K.px),fontWeight:k.prop("fontWeight","fontWeights"),lineHeight:k.prop("lineHeight","lineHeights"),letterSpacing:k.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},M2={textDecorationColor:k.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:k.shadows("textShadow")},O2={clipPath:!0,transform:k.propT("transform",K.transform),transformOrigin:!0,translateX:k.spaceT("--chakra-translate-x"),translateY:k.spaceT("--chakra-translate-y"),skewX:k.degreeT("--chakra-skew-x"),skewY:k.degreeT("--chakra-skew-y"),scaleX:k.prop("--chakra-scale-x"),scaleY:k.prop("--chakra-scale-y"),scale:k.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:k.degreeT("--chakra-rotate")},N2={listStyleType:!0,listStylePosition:!0,listStylePos:k.prop("listStylePosition"),listStyleImage:!0,listStyleImg:k.prop("listStyleImage")},D2={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:k.prop("transitionDuration","transition.duration"),transitionProperty:k.prop("transitionProperty","transition.property"),transitionTimingFunction:k.prop("transitionTimingFunction","transition.easing")},xp=Jt({},Wl,ne,w2,ku,Yt,k2,E2,C2,p1,I2,Cs,Bf,xe,$2,L2,M2,O2,N2,D2),B2=Object.assign({},xe,Yt,ku,p1,Cs),kV=Object.keys(B2),z2=[...Object.keys(xp),...f1],F2={...xp,...dc},j2=e=>e in F2,V2=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:r,toArrayValue:n,media:o}=t.__breakpoints,i={};for(const s in e){let a=Ar(e[s],t);if(a==null)continue;if(a=gt(a)&&r(a)?n(a):a,!Array.isArray(a)){i[s]=a;continue}const l=a.slice(0,o.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!U2(t),G2=(e,t)=>{if(t==null)return t;const r=s=>e.__cssMap?.[s]?.varRef,n=s=>r(s)??s,[o,i]=H2(t);return t=r(o)??n(i)??n(t),t};function X2(e){const{configs:t={},pseudos:r={},theme:n}=e,o=(i,s=!1)=>{const a=Ar(i,n),l=V2(a)(n);let u={};for(let c in l){const d=l[c];let f=Ar(d,n);c in r&&(c=r[c]),W2(c,f)&&(f=G2(n,f));let m=t[c];if(m===!0&&(m={property:c}),gt(f)){u[c]=u[c]??{},u[c]=Jt({},u[c],o(f,!0));continue}let y=m?.transform?.(f,n,a)??f;y=m?.processResult?o(y,!0):y;const v=Ar(m?.property,n);if(!s&&m?.static){const x=Ar(m.static,n);u=Jt({},u,x)}if(v&&Array.isArray(v)){for(const x of v)u[x]=y;continue}if(v){v==="&"&>(y)?u=Jt({},u,y):u[v]=y;continue}if(gt(y)){u=Jt({},u,y);continue}u[c]=y}return u};return o}const m1=e=>t=>X2({theme:t,pseudos:dc,configs:xp})(e);function EV(e){return e}function ye(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function q2(e,t,r){return e.__cssMap?.[`${t}.${r}`]?.varRef??r}function Y2(e,t){if(Array.isArray(e))return e;if(gt(e))return t(e);if(e!=null)return[e]}function K2(e,t){for(let r=t+1;r{Jt(a,{[p]:c?x[p]:{[v]:x[p]}})});continue}if(!d){c?Jt(a,x):a[v]=x;continue}a[v]=x}}return a}}function Z2(e){return t=>{const{variant:r,size:n,theme:o}=t,i=Q2(o);return Jt({},Ar(e.baseStyle??{},t),i(e,"sizes",n,t),i(e,"variants",r,t))}}function zi(e){return bp(e,["styleConfig","size","variant","colorScheme"])}function g1(e){return gt(e)&&e.reference?e.reference:String(e)}const fc=(e,...t)=>t.map(g1).join(` ${e} `).replace(/calc/g,""),u0=(...e)=>`calc(${fc("+",...e)})`,c0=(...e)=>`calc(${fc("-",...e)})`,zf=(...e)=>`calc(${fc("*",...e)})`,d0=(...e)=>`calc(${fc("/",...e)})`,f0=e=>{const t=g1(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:zf(t,-1)},Vr=Object.assign(e=>({add:(...t)=>Vr(u0(e,...t)),subtract:(...t)=>Vr(c0(e,...t)),multiply:(...t)=>Vr(zf(e,...t)),divide:(...t)=>Vr(d0(e,...t)),negate:()=>Vr(f0(e)),toString:()=>e.toString()}),{add:u0,subtract:c0,multiply:zf,divide:d0,negate:f0});function J2(e,t="-"){return e.replace(/\s+/g,t)}function e_(e){const t=J2(e.toString());return r_(t_(t))}function t_(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function r_(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function n_(e,t=""){return[t,e].filter(Boolean).join("-")}function o_(e,t){return`var(${e}${t?`, ${t}`:""})`}function i_(e,t=""){return e_(`--${n_(e,t)}`)}function V(e,t,r){const n=i_(e,r);return{variable:n,reference:o_(n,t)}}function s_(e,t){const r={};for(const n of t){if(Array.isArray(n)){const[o,i]=n;r[o]=V(`${e}-${o}`,i);continue}r[n]=V(`${e}-${n}`)}return r}const a_=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function l_(e){return u1(e,a_)}function u_(e){return e.semanticTokens}function c_(e){const{__cssMap:t,__cssVars:r,__breakpoints:n,...o}=e;return o}function d_(e){const t=l_(e),r=u_(e),n=i=>f1.includes(i)||i==="default",o={};return s0(t,(i,s)=>{i!=null&&(o[s.join(".")]={isSemantic:!1,value:i})}),s0(r,(i,s)=>{i!=null&&(o[s.join(".")]={isSemantic:!0,value:i})},{stop:i=>Object.keys(i).every(n)}),o}function h0(e,t){return V(String(e).replace(/\./g,"-"),void 0,t)}function f_(e){const t=d_(e),r=e.config?.cssVarPrefix;let n={};const o={};function i(s,a){const u=[String(s).split(".")[0],a].join(".");if(!t[u])return a;const{reference:d}=h0(u,r);return d}for(const[s,a]of Object.entries(t)){const{isSemantic:l,value:u}=a,{variable:c,reference:d}=h0(s,r);if(!l){if(s.startsWith("space")){const m=s.split("."),[y,...v]=m,x=`${y}.-${v.join(".")}`,p=Vr.negate(u),h=Vr.negate(d);o[x]={value:p,var:c,varRef:h}}n[c]=u,o[s]={value:u,var:c,varRef:d};continue}const f=gt(u)?u:{default:u};n=Jt(n,Object.entries(f).reduce((m,[y,v])=>{if(!v)return m;const x=i(s,`${v}`);if(y==="default")return m[c]=x,m;const p=dc?.[y]??y;return m[p]={[c]:x},m},{})),o[s]={value:d,var:c,varRef:d}}return{cssVars:n,cssMap:o}}function h_(e){const t=c_(e),{cssMap:r,cssVars:n}=f_(t);return Object.assign(t,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...n},__cssMap:r,__breakpoints:UP(t.breakpoints)}),t}function ae(e,t={}){let r=!1;function n(){if(!r){r=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function o(...c){n();for(const d of c)t[d]=l(d);return ae(e,t)}function i(...c){for(const d of c)d in t||(t[d]=l(d));return ae(e,t)}function s(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.selector]))}function a(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.className]))}function l(c){const m=`chakra-${(["container","root"].includes(c??"")?[e]:[e,c]).filter(Boolean).join("__")}`;return{className:m,selector:`.${m}`,toString:()=>c}}return{parts:o,toPart:l,extend:i,selectors:s,classnames:a,get keys(){return Object.keys(t)},__type:{}}}const p_=ae("accordion").parts("root","container","button","panel","icon"),m_=ae("alert").parts("title","description","container","icon","spinner"),g_=ae("avatar").parts("label","badge","container","excessLabel","group"),y_=ae("breadcrumb").parts("link","item","container","separator");ae("button").parts();const v_=ae("checkbox").parts("control","icon","container","label");ae("progress").parts("track","filledTrack","label");const b_=ae("drawer").parts("overlay","dialogContainer","dialog","header","closeButton","body","footer"),S_=ae("editable").parts("preview","input","textarea"),x_=ae("form").parts("container","requiredIndicator","helperText"),w_=ae("formError").parts("text","icon"),k_=ae("input").parts("addon","field","element","group"),E_=ae("list").parts("container","item","icon"),C_=ae("menu").parts("button","list","item","groupTitle","icon","command","divider"),T_=ae("modal").parts("overlay","dialogContainer","dialog","header","closeButton","body","footer"),P_=ae("numberinput").parts("root","field","stepperGroup","stepper");ae("pininput").parts("field");const __=ae("popover").parts("content","header","body","footer","popper","arrow","closeButton"),A_=ae("progress").parts("label","filledTrack","track"),R_=ae("radio").parts("container","control","label"),I_=ae("select").parts("field","icon"),$_=ae("slider").parts("container","track","thumb","filledTrack","mark"),L_=ae("stat").parts("container","label","helpText","number","icon"),M_=ae("switch").parts("container","track","thumb","label"),O_=ae("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),N_=ae("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),D_=ae("tag").parts("container","label","closeButton"),B_=ae("card").parts("container","header","body","footer");ae("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");const{definePartsStyle:z_,defineMultiStyleConfig:F_}=ye(p_.keys),j_={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},V_={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},H_={pt:"2",px:"4",pb:"5"},U_={fontSize:"1.25em"},W_=z_({container:j_,button:V_,panel:H_,icon:U_}),G_=F_({baseStyle:W_});function ao(e,t,r){return Math.min(Math.max(e,r),t)}class X_ extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var ps=X_;function wp(e){if(typeof e!="string")throw new ps(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=tA.test(e)?K_(e):e;const r=Q_.exec(t);if(r){const s=Array.from(r).slice(1);return[...s.slice(0,3).map(a=>parseInt(Xs(a,2),16)),parseInt(Xs(s[3]||"f",2),16)/255]}const n=Z_.exec(t);if(n){const s=Array.from(n).slice(1);return[...s.slice(0,3).map(a=>parseInt(a,16)),parseInt(s[3]||"ff",16)/255]}const o=J_.exec(t);if(o){const s=Array.from(o).slice(1);return[...s.slice(0,3).map(a=>parseInt(a,10)),parseFloat(s[3]||"1")]}const i=eA.exec(t);if(i){const[s,a,l,u]=Array.from(i).slice(1).map(parseFloat);if(ao(0,100,a)!==a)throw new ps(e);if(ao(0,100,l)!==l)throw new ps(e);return[...rA(s,a,l),Number.isNaN(u)?1:u]}throw new ps(e)}function q_(e){let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return(t>>>0)%2341}const p0=e=>parseInt(e.replace(/_/g,""),36),Y_="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const r=p0(t.substring(0,3)),n=p0(t.substring(3)).toString(16);let o="";for(let i=0;i<6-n.length;i++)o+="0";return e[r]=`${o}${n}`,e},{});function K_(e){const t=e.toLowerCase().trim(),r=Y_[q_(t)];if(!r)throw new ps(e);return`#${r}`}const Xs=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),Q_=new RegExp(`^#${Xs("([a-f0-9])",3)}([a-f0-9])?$`,"i"),Z_=new RegExp(`^#${Xs("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),J_=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Xs(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),eA=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,tA=/^[a-z]+$/i,m0=e=>Math.round(e*255),rA=(e,t,r)=>{let n=r/100;if(t===0)return[n,n,n].map(m0);const o=(e%360+360)%360/60,i=(1-Math.abs(2*n-1))*(t/100),s=i*(1-Math.abs(o%2-1));let a=0,l=0,u=0;o>=0&&o<1?(a=i,l=s):o>=1&&o<2?(a=s,l=i):o>=2&&o<3?(l=i,u=s):o>=3&&o<4?(l=s,u=i):o>=4&&o<5?(a=s,u=i):o>=5&&o<6&&(a=i,u=s);const c=n-i/2,d=a+c,f=l+c,m=u+c;return[d,f,m].map(m0)};function nA(e,t,r,n){return`rgba(${ao(0,255,e).toFixed()}, ${ao(0,255,t).toFixed()}, ${ao(0,255,r).toFixed()}, ${parseFloat(ao(0,1,n).toFixed(3))})`}function oA(e,t){const[r,n,o,i]=wp(e);return nA(r,n,o,i-t)}function iA(e){const[t,r,n,o]=wp(e);let i=s=>{const a=ao(0,255,s).toString(16);return a.length===1?`0${a}`:a};return`#${i(t)}${i(r)}${i(n)}${o<1?i(Math.round(o*255)):""}`}const sA=e=>Object.keys(e).length===0;function aA(e,t,r,n,o){for(t=t.split?t.split("."):t,n=0;n{const n=aA(e,`colors.${t}`,t);try{return iA(n),n}catch{return"#000000"}},lA=e=>{const[t,r,n]=wp(e);return(t*299+r*587+n*114)/1e3},uA=e=>t=>{const r=mt(t,e);return lA(r)<128?"dark":"light"},cA=e=>t=>uA(e)(t)==="dark",bi=(e,t)=>r=>{const n=mt(r,e);return oA(n,1-t)};function g0(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}const dA=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function fA(e){const t=dA();return!e||sA(e)?t:e.string&&e.colors?pA(e.string,e.colors):e.string&&!e.colors?hA(e.string):e.colors&&!e.string?mA(e.colors):t}function hA(e){let t=0;if(e.length===0)return t.toString();for(let n=0;n>n*8&255;r+=`00${o.toString(16)}`.substr(-2)}return r}function pA(e,t){let r=0;if(e.length===0)return t[0];for(let n=0;nr.colorMode==="dark"?t:e}function kp(e){const{orientation:t,vertical:r,horizontal:n}=e;return t?t==="vertical"?r:n:{}}function y1(e){return gt(e)&&e.reference?e.reference:String(e)}const hc=(e,...t)=>t.map(y1).join(` ${e} `).replace(/calc/g,""),y0=(...e)=>`calc(${hc("+",...e)})`,v0=(...e)=>`calc(${hc("-",...e)})`,Ff=(...e)=>`calc(${hc("*",...e)})`,b0=(...e)=>`calc(${hc("/",...e)})`,S0=e=>{const t=y1(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Ff(t,-1)},Hr=Object.assign(e=>({add:(...t)=>Hr(y0(e,...t)),subtract:(...t)=>Hr(v0(e,...t)),multiply:(...t)=>Hr(Ff(e,...t)),divide:(...t)=>Hr(b0(e,...t)),negate:()=>Hr(S0(e)),toString:()=>e.toString()}),{add:y0,subtract:v0,multiply:Ff,divide:b0,negate:S0});function gA(e){return!Number.isInteger(parseFloat(e.toString()))}function yA(e,t="-"){return e.replace(/\s+/g,t)}function v1(e){const t=yA(e.toString());return t.includes("\\.")?e:gA(e)?t.replace(".","\\."):e}function vA(e,t=""){return[t,v1(e)].filter(Boolean).join("-")}function bA(e,t){return`var(${v1(e)}${t?`, ${t}`:""})`}function SA(e,t=""){return`--${vA(e,t)}`}function Ue(e,t){const r=SA(e,t?.prefix);return{variable:r,reference:bA(r,xA(t?.fallback))}}function xA(e){return e?.reference}const{definePartsStyle:Ma,defineMultiStyleConfig:wA}=ye(m_.keys),Nt=V("alert-fg"),nn=V("alert-bg"),kA=Ma({container:{bg:nn.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Nt.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Nt.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function Ep(e){const{theme:t,colorScheme:r}=e,n=bi(`${r}.200`,.16)(t);return{light:`colors.${r}.100`,dark:n}}const EA=Ma(e=>{const{colorScheme:t}=e,r=Ep(e);return{container:{[Nt.variable]:`colors.${t}.600`,[nn.variable]:r.light,_dark:{[Nt.variable]:`colors.${t}.200`,[nn.variable]:r.dark}}}}),CA=Ma(e=>{const{colorScheme:t}=e,r=Ep(e);return{container:{[Nt.variable]:`colors.${t}.600`,[nn.variable]:r.light,_dark:{[Nt.variable]:`colors.${t}.200`,[nn.variable]:r.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Nt.reference}}}),TA=Ma(e=>{const{colorScheme:t}=e,r=Ep(e);return{container:{[Nt.variable]:`colors.${t}.600`,[nn.variable]:r.light,_dark:{[Nt.variable]:`colors.${t}.200`,[nn.variable]:r.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Nt.reference}}}),PA=Ma(e=>{const{colorScheme:t}=e;return{container:{[Nt.variable]:"colors.white",[nn.variable]:`colors.${t}.600`,_dark:{[Nt.variable]:"colors.gray.900",[nn.variable]:`colors.${t}.200`},color:Nt.reference}}}),_A={subtle:EA,"left-accent":CA,"top-accent":TA,solid:PA},AA=wA({baseStyle:kA,variants:_A,defaultProps:{variant:"subtle",colorScheme:"blue"}}),b1={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},RA={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},IA={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},S1={...b1,...RA,container:IA},$A=e=>typeof e=="function";function yt(e,...t){return $A(e)?e(...t):e}const{definePartsStyle:x1,defineMultiStyleConfig:LA}=ye(g_.keys),ai=V("avatar-border-color"),Ts=V("avatar-bg"),qs=V("avatar-font-size"),Si=V("avatar-size"),MA={borderRadius:"full",border:"0.2em solid",borderColor:ai.reference,[ai.variable]:"white",_dark:{[ai.variable]:"colors.gray.800"}},OA={bg:Ts.reference,fontSize:qs.reference,width:Si.reference,height:Si.reference,lineHeight:"1",[Ts.variable]:"colors.gray.200",_dark:{[Ts.variable]:"colors.whiteAlpha.400"}},NA=e=>{const{name:t,theme:r}=e,n=t?fA({string:t}):"colors.gray.400",o=cA(n)(r);let i="white";return o||(i="gray.800"),{bg:Ts.reference,fontSize:qs.reference,color:i,borderColor:ai.reference,verticalAlign:"top",width:Si.reference,height:Si.reference,"&:not([data-loaded])":{[Ts.variable]:n},[ai.variable]:"colors.white",_dark:{[ai.variable]:"colors.gray.800"}}},DA={fontSize:qs.reference,lineHeight:"1"},BA=x1(e=>({badge:yt(MA,e),excessLabel:yt(OA,e),container:yt(NA,e),label:DA}));function gn(e){const t=e!=="100%"?S1[e]:void 0;return x1({container:{[Si.variable]:t??e,[qs.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[Si.variable]:t??e,[qs.variable]:`calc(${t??e} / 2.5)`}})}const zA={"2xs":gn(4),xs:gn(6),sm:gn(8),md:gn(12),lg:gn(16),xl:gn(24),"2xl":gn(32),full:gn("100%")},FA=LA({baseStyle:BA,sizes:zA,defaultProps:{size:"md"}}),Be=s_("badge",["bg","color","shadow"]),jA={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:Be.bg.reference,color:Be.color.reference,boxShadow:Be.shadow.reference},VA=e=>{const{colorScheme:t,theme:r}=e,n=bi(`${t}.500`,.6)(r);return{[Be.bg.variable]:`colors.${t}.500`,[Be.color.variable]:"colors.white",_dark:{[Be.bg.variable]:n,[Be.color.variable]:"colors.whiteAlpha.800"}}},HA=e=>{const{colorScheme:t,theme:r}=e,n=bi(`${t}.200`,.16)(r);return{[Be.bg.variable]:`colors.${t}.100`,[Be.color.variable]:`colors.${t}.800`,_dark:{[Be.bg.variable]:n,[Be.color.variable]:`colors.${t}.200`}}},UA=e=>{const{colorScheme:t,theme:r}=e,n=bi(`${t}.200`,.8)(r);return{[Be.color.variable]:`colors.${t}.500`,_dark:{[Be.color.variable]:n},[Be.shadow.variable]:`inset 0 0 0px 1px ${Be.color.reference}`}},WA={solid:VA,subtle:HA,outline:UA},Ps={baseStyle:jA,variants:WA,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:GA,definePartsStyle:XA}=ye(y_.keys),wd=V("breadcrumb-link-decor"),qA={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:wd.reference,[wd.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[wd.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},YA=XA({link:qA}),KA=GA({baseStyle:YA}),QA={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},w1=e=>{const{colorScheme:t,theme:r}=e;if(t==="gray")return{color:j("gray.800","whiteAlpha.900")(e),_hover:{bg:j("gray.100","whiteAlpha.200")(e)},_active:{bg:j("gray.200","whiteAlpha.300")(e)}};const n=bi(`${t}.200`,.12)(r),o=bi(`${t}.200`,.24)(r);return{color:j(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:j(`${t}.50`,n)(e)},_active:{bg:j(`${t}.100`,o)(e)}}},ZA=e=>{const{colorScheme:t}=e,r=j("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?r:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...yt(w1,e)}},JA={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},eR=e=>{const{colorScheme:t}=e;if(t==="gray"){const a=j("gray.100","whiteAlpha.200")(e);return{bg:a,color:j("gray.800","whiteAlpha.900")(e),_hover:{bg:j("gray.200","whiteAlpha.300")(e),_disabled:{bg:a}},_active:{bg:j("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${t}.500`,color:n="white",hoverBg:o=`${t}.600`,activeBg:i=`${t}.700`}=JA[t]??{},s=j(r,`${t}.200`)(e);return{bg:s,color:j(n,"gray.800")(e),_hover:{bg:j(o,`${t}.300`)(e),_disabled:{bg:s}},_active:{bg:j(i,`${t}.400`)(e)}}},tR=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:j(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:j(`${t}.700`,`${t}.500`)(e)}}},rR={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},nR={ghost:w1,outline:ZA,solid:eR,link:tR,unstyled:rR},oR={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},iR={baseStyle:QA,variants:nR,sizes:oR,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:ho,defineMultiStyleConfig:sR}=ye(B_.keys),Eu=V("card-bg"),Kr=V("card-padding"),k1=V("card-shadow"),Gl=V("card-radius"),E1=V("card-border-width","0"),C1=V("card-border-color"),aR=ho({container:{[Eu.variable]:"colors.chakra-body-bg",backgroundColor:Eu.reference,boxShadow:k1.reference,borderRadius:Gl.reference,color:"chakra-body-text",borderWidth:E1.reference,borderColor:C1.reference},body:{padding:Kr.reference,flex:"1 1 0%"},header:{padding:Kr.reference},footer:{padding:Kr.reference}}),lR={sm:ho({container:{[Gl.variable]:"radii.base",[Kr.variable]:"space.3"}}),md:ho({container:{[Gl.variable]:"radii.md",[Kr.variable]:"space.5"}}),lg:ho({container:{[Gl.variable]:"radii.xl",[Kr.variable]:"space.7"}})},uR={elevated:ho({container:{[k1.variable]:"shadows.base",_dark:{[Eu.variable]:"colors.gray.700"}}}),outline:ho({container:{[E1.variable]:"1px",[C1.variable]:"colors.chakra-border-color"}}),filled:ho({container:{[Eu.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[Kr.variable]:0},header:{[Kr.variable]:0},footer:{[Kr.variable]:0}}},cR=sR({baseStyle:aR,variants:uR,sizes:lR,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:Xl,defineMultiStyleConfig:dR}=ye(v_.keys),_s=V("checkbox-size"),fR=e=>{const{colorScheme:t}=e;return{w:_s.reference,h:_s.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:j(`${t}.500`,`${t}.200`)(e),borderColor:j(`${t}.500`,`${t}.200`)(e),color:j("white","gray.900")(e),_hover:{bg:j(`${t}.600`,`${t}.300`)(e),borderColor:j(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:j("gray.200","transparent")(e),bg:j("gray.200","whiteAlpha.300")(e),color:j("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:j(`${t}.500`,`${t}.200`)(e),borderColor:j(`${t}.500`,`${t}.200`)(e),color:j("white","gray.900")(e)},_disabled:{bg:j("gray.100","whiteAlpha.100")(e),borderColor:j("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:j("red.500","red.300")(e)}}},hR={_disabled:{cursor:"not-allowed"}},pR={userSelect:"none",_disabled:{opacity:.4}},mR={transitionProperty:"transform",transitionDuration:"normal"},gR=Xl(e=>({icon:mR,container:hR,control:yt(fR,e),label:pR})),yR={sm:Xl({control:{[_s.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:Xl({control:{[_s.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:Xl({control:{[_s.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},Cu=dR({baseStyle:gR,sizes:yR,defaultProps:{size:"md",colorScheme:"blue"}}),As=Ue("close-button-size"),Zi=Ue("close-button-bg"),vR={w:[As.reference],h:[As.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Zi.variable]:"colors.blackAlpha.100",_dark:{[Zi.variable]:"colors.whiteAlpha.100"}},_active:{[Zi.variable]:"colors.blackAlpha.200",_dark:{[Zi.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Zi.reference},bR={lg:{[As.variable]:"sizes.10",fontSize:"md"},md:{[As.variable]:"sizes.8",fontSize:"xs"},sm:{[As.variable]:"sizes.6",fontSize:"2xs"}},SR={baseStyle:vR,sizes:bR,defaultProps:{size:"md"}},{variants:xR,defaultProps:wR}=Ps,kR={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:Be.bg.reference,color:Be.color.reference,boxShadow:Be.shadow.reference},ER={baseStyle:kR,variants:xR,defaultProps:wR},CR={w:"100%",mx:"auto",maxW:"prose",px:"4"},TR={baseStyle:CR},PR={opacity:.6,borderColor:"inherit"},_R={borderStyle:"solid"},AR={borderStyle:"dashed"},RR={solid:_R,dashed:AR},IR={baseStyle:PR,variants:RR,defaultProps:{variant:"solid"}},{definePartsStyle:jf,defineMultiStyleConfig:$R}=ye(b_.keys),kd=V("drawer-bg"),Ed=V("drawer-box-shadow");function Oo(e){return jf(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}const LR={bg:"blackAlpha.600",zIndex:"modal"},MR={display:"flex",zIndex:"modal",justifyContent:"center"},OR=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[kd.variable]:"colors.white",[Ed.variable]:"shadows.lg",_dark:{[kd.variable]:"colors.gray.700",[Ed.variable]:"shadows.dark-lg"},bg:kd.reference,boxShadow:Ed.reference}},NR={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},DR={position:"absolute",top:"2",insetEnd:"3"},BR={px:"6",py:"2",flex:"1",overflow:"auto"},zR={px:"6",py:"4"},FR=jf(e=>({overlay:LR,dialogContainer:MR,dialog:yt(OR,e),header:NR,closeButton:DR,body:BR,footer:zR})),jR={xs:Oo("xs"),sm:Oo("md"),md:Oo("lg"),lg:Oo("2xl"),xl:Oo("4xl"),full:Oo("full")},VR=$R({baseStyle:FR,sizes:jR,defaultProps:{size:"xs"}}),{definePartsStyle:HR,defineMultiStyleConfig:UR}=ye(S_.keys),WR={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},GR={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},XR={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},qR=HR({preview:WR,input:GR,textarea:XR}),YR=UR({baseStyle:qR}),{definePartsStyle:KR,defineMultiStyleConfig:QR}=ye(x_.keys),li=V("form-control-color"),ZR={marginStart:"1",[li.variable]:"colors.red.500",_dark:{[li.variable]:"colors.red.300"},color:li.reference},JR={mt:"2",[li.variable]:"colors.gray.600",_dark:{[li.variable]:"colors.whiteAlpha.600"},color:li.reference,lineHeight:"normal",fontSize:"sm"},eI=KR({container:{width:"100%",position:"relative"},requiredIndicator:ZR,helperText:JR}),tI=QR({baseStyle:eI}),{definePartsStyle:rI,defineMultiStyleConfig:nI}=ye(w_.keys),ui=V("form-error-color"),oI={[ui.variable]:"colors.red.500",_dark:{[ui.variable]:"colors.red.300"},color:ui.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},iI={marginEnd:"0.5em",[ui.variable]:"colors.red.500",_dark:{[ui.variable]:"colors.red.300"},color:ui.reference},sI=rI({text:oI,icon:iI}),aI=nI({baseStyle:sI}),lI={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},uI={baseStyle:lI},cI={fontFamily:"heading",fontWeight:"bold"},dI={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},fI={baseStyle:cI,sizes:dI,defaultProps:{size:"xl"}},{definePartsStyle:Gr,defineMultiStyleConfig:hI}=ye(k_.keys),Bo=V("input-height"),zo=V("input-font-size"),Fo=V("input-padding"),jo=V("input-border-radius"),pI=Gr({addon:{height:Bo.reference,fontSize:zo.reference,px:Fo.reference,borderRadius:jo.reference},field:{width:"100%",height:Bo.reference,fontSize:zo.reference,px:Fo.reference,borderRadius:jo.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),yn={lg:{[zo.variable]:"fontSizes.lg",[Fo.variable]:"space.4",[jo.variable]:"radii.md",[Bo.variable]:"sizes.12"},md:{[zo.variable]:"fontSizes.md",[Fo.variable]:"space.4",[jo.variable]:"radii.md",[Bo.variable]:"sizes.10"},sm:{[zo.variable]:"fontSizes.sm",[Fo.variable]:"space.3",[jo.variable]:"radii.sm",[Bo.variable]:"sizes.8"},xs:{[zo.variable]:"fontSizes.xs",[Fo.variable]:"space.2",[jo.variable]:"radii.sm",[Bo.variable]:"sizes.6"}},mI={lg:Gr({field:yn.lg,group:yn.lg}),md:Gr({field:yn.md,group:yn.md}),sm:Gr({field:yn.sm,group:yn.sm}),xs:Gr({field:yn.xs,group:yn.xs})};function Cp(e){const{focusBorderColor:t,errorBorderColor:r}=e;return{focusBorderColor:t||j("blue.500","blue.300")(e),errorBorderColor:r||j("red.500","red.300")(e)}}const gI=Gr(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=Cp(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:j("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:mt(t,n),boxShadow:`0 0 0 1px ${mt(t,n)}`},_focusVisible:{zIndex:1,borderColor:mt(t,r),boxShadow:`0 0 0 1px ${mt(t,r)}`}},addon:{border:"1px solid",borderColor:j("inherit","whiteAlpha.50")(e),bg:j("gray.100","whiteAlpha.300")(e)}}}),yI=Gr(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=Cp(e);return{field:{border:"2px solid",borderColor:"transparent",bg:j("gray.100","whiteAlpha.50")(e),_hover:{bg:j("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:mt(t,n)},_focusVisible:{bg:"transparent",borderColor:mt(t,r)}},addon:{border:"2px solid",borderColor:"transparent",bg:j("gray.100","whiteAlpha.50")(e)}}}),vI=Gr(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=Cp(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:mt(t,n),boxShadow:`0px 1px 0px 0px ${mt(t,n)}`},_focusVisible:{borderColor:mt(t,r),boxShadow:`0px 1px 0px 0px ${mt(t,r)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),bI=Gr({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),SI={outline:gI,filled:yI,flushed:vI,unstyled:bI},se=hI({baseStyle:pI,sizes:mI,variants:SI,defaultProps:{size:"md",variant:"outline"}}),Cd=V("kbd-bg"),xI={[Cd.variable]:"colors.gray.100",_dark:{[Cd.variable]:"colors.whiteAlpha.100"},bg:Cd.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},wI={baseStyle:xI},kI={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},EI={baseStyle:kI},{defineMultiStyleConfig:CI,definePartsStyle:TI}=ye(E_.keys),PI={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},_I=TI({icon:PI}),AI=CI({baseStyle:_I}),{defineMultiStyleConfig:RI,definePartsStyle:II}=ye(C_.keys),Cr=V("menu-bg"),Td=V("menu-shadow"),$I={[Cr.variable]:"#fff",[Td.variable]:"shadows.sm",_dark:{[Cr.variable]:"colors.gray.700",[Td.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:"dropdown",borderRadius:"md",borderWidth:"1px",bg:Cr.reference,boxShadow:Td.reference},LI={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Cr.variable]:"colors.gray.100",_dark:{[Cr.variable]:"colors.whiteAlpha.100"}},_active:{[Cr.variable]:"colors.gray.200",_dark:{[Cr.variable]:"colors.whiteAlpha.200"}},_expanded:{[Cr.variable]:"colors.gray.100",_dark:{[Cr.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Cr.reference},MI={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},OI={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},NI={opacity:.6},DI={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},BI={transitionProperty:"common",transitionDuration:"normal"},zI=II({button:BI,list:$I,item:LI,groupTitle:MI,icon:OI,command:NI,divider:DI}),FI=RI({baseStyle:zI}),{defineMultiStyleConfig:jI,definePartsStyle:Vf}=ye(T_.keys),Pd=V("modal-bg"),_d=V("modal-shadow"),VI={bg:"blackAlpha.600",zIndex:"modal"},HI=e=>{const{isCentered:t,scrollBehavior:r}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:r==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},UI=e=>{const{isCentered:t,scrollBehavior:r}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:r==="inside"?"calc(100% - 7.5rem)":void 0,[Pd.variable]:"colors.white",[_d.variable]:"shadows.lg",_dark:{[Pd.variable]:"colors.gray.700",[_d.variable]:"shadows.dark-lg"},bg:Pd.reference,boxShadow:_d.reference}},WI={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},GI={position:"absolute",top:"2",insetEnd:"3"},XI=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},qI={px:"6",py:"4"},YI=Vf(e=>({overlay:VI,dialogContainer:yt(HI,e),dialog:yt(UI,e),header:WI,closeButton:GI,body:yt(XI,e),footer:qI}));function cr(e){return Vf(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}const KI={xs:cr("xs"),sm:cr("sm"),md:cr("md"),lg:cr("lg"),xl:cr("xl"),"2xl":cr("2xl"),"3xl":cr("3xl"),"4xl":cr("4xl"),"5xl":cr("5xl"),"6xl":cr("6xl"),full:cr("full")},QI=jI({baseStyle:YI,sizes:KI,defaultProps:{size:"md"}}),T1={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},{defineMultiStyleConfig:ZI,definePartsStyle:P1}=ye(P_.keys),Tp=Ue("number-input-stepper-width"),_1=Ue("number-input-input-padding"),JI=Hr(Tp).add("0.5rem").toString(),Ad=Ue("number-input-bg"),Rd=Ue("number-input-color"),Id=Ue("number-input-border-color"),e$={[Tp.variable]:"sizes.6",[_1.variable]:JI},t$=e=>yt(se.baseStyle,e)?.field??{},r$={width:Tp.reference},n$={borderStart:"1px solid",borderStartColor:Id.reference,color:Rd.reference,bg:Ad.reference,[Rd.variable]:"colors.chakra-body-text",[Id.variable]:"colors.chakra-border-color",_dark:{[Rd.variable]:"colors.whiteAlpha.800",[Id.variable]:"colors.whiteAlpha.300"},_active:{[Ad.variable]:"colors.gray.200",_dark:{[Ad.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},o$=P1(e=>({root:e$,field:yt(t$,e)??{},stepperGroup:r$,stepper:n$}));function fl(e){const t=se.sizes?.[e],r={lg:"md",md:"md",sm:"sm",xs:"sm"},n=t.field?.fontSize??"md",o=T1.fontSizes[n];return P1({field:{...t.field,paddingInlineEnd:_1.reference,verticalAlign:"top"},stepper:{fontSize:Hr(o).multiply(.75).toString(),_first:{borderTopEndRadius:r[e]},_last:{borderBottomEndRadius:r[e],mt:"-1px",borderTopWidth:1}}})}const i$={xs:fl("xs"),sm:fl("sm"),md:fl("md"),lg:fl("lg")},s$=ZI({baseStyle:o$,sizes:i$,variants:se.variants,defaultProps:se.defaultProps}),a$={...se.baseStyle?.field,textAlign:"center"},l$={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},u$={outline:e=>yt(se.variants?.outline,e)?.field??{},flushed:e=>yt(se.variants?.flushed,e)?.field??{},filled:e=>yt(se.variants?.filled,e)?.field??{},unstyled:se.variants?.unstyled.field??{}},c$={baseStyle:a$,sizes:l$,variants:u$,defaultProps:se.defaultProps},{defineMultiStyleConfig:d$,definePartsStyle:f$}=ye(__.keys),hl=Ue("popper-bg"),h$=Ue("popper-arrow-bg"),x0=Ue("popper-arrow-shadow-color"),p$={zIndex:"popover"},m$={[hl.variable]:"colors.white",bg:hl.reference,[h$.variable]:hl.reference,[x0.variable]:"colors.gray.200",_dark:{[hl.variable]:"colors.gray.700",[x0.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},g$={px:3,py:2,borderBottomWidth:"1px"},y$={px:3,py:2},v$={px:3,py:2,borderTopWidth:"1px"},b$={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},S$=f$({popper:p$,content:m$,header:g$,body:y$,footer:v$,closeButton:b$}),x$=d$({baseStyle:S$}),{defineMultiStyleConfig:w$,definePartsStyle:ms}=ye(A_.keys),k$=e=>{const{colorScheme:t,theme:r,isIndeterminate:n,hasStripe:o}=e,i=j(g0(),g0("1rem","rgba(0,0,0,0.1)"))(e),s=j(`${t}.500`,`${t}.200`)(e),a=`linear-gradient( + to right, + transparent 0%, + ${mt(r,s)} 50%, + transparent 100% + )`;return{...!n&&o&&i,...n?{bgImage:a}:{bgColor:s}}},E$={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},C$=e=>({bg:j("gray.100","whiteAlpha.300")(e)}),T$=e=>({transitionProperty:"common",transitionDuration:"slow",...k$(e)}),P$=ms(e=>({label:E$,filledTrack:T$(e),track:C$(e)})),_$={xs:ms({track:{h:"1"}}),sm:ms({track:{h:"2"}}),md:ms({track:{h:"3"}}),lg:ms({track:{h:"4"}})},A$=w$({sizes:_$,baseStyle:P$,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:R$,definePartsStyle:ql}=ye(R_.keys),I$=e=>{const t=yt(Cu.baseStyle,e)?.control;return{...t,borderRadius:"full",_checked:{...t?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},$$=ql(e=>({label:Cu.baseStyle?.(e).label,container:Cu.baseStyle?.(e).container,control:I$(e)})),L$={md:ql({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:ql({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:ql({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},M$=R$({baseStyle:$$,sizes:L$,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:O$,definePartsStyle:N$}=ye(I_.keys),pl=V("select-bg"),D$={...se.baseStyle?.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:pl.reference,[pl.variable]:"colors.white",_dark:{[pl.variable]:"colors.gray.700"},"> option, > optgroup":{bg:pl.reference}},B$={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},z$=N$({field:D$,icon:B$}),ml={paddingInlineEnd:"8"},F$={lg:{...se.sizes?.lg,field:{...se.sizes?.lg.field,...ml}},md:{...se.sizes?.md,field:{...se.sizes?.md.field,...ml}},sm:{...se.sizes?.sm,field:{...se.sizes?.sm.field,...ml}},xs:{...se.sizes?.xs,field:{...se.sizes?.xs.field,...ml},icon:{insetEnd:"1"}}},j$=O$({baseStyle:z$,sizes:F$,variants:se.variants,defaultProps:se.defaultProps}),$d=V("skeleton-start-color"),Ld=V("skeleton-end-color"),V$={[$d.variable]:"colors.gray.100",[Ld.variable]:"colors.gray.400",_dark:{[$d.variable]:"colors.gray.800",[Ld.variable]:"colors.gray.600"},background:$d.reference,borderColor:Ld.reference,opacity:.7,borderRadius:"sm"},H$={baseStyle:V$},Md=V("skip-link-bg"),U$={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Md.variable]:"colors.white",_dark:{[Md.variable]:"colors.gray.700"},bg:Md.reference}},W$={baseStyle:U$},{defineMultiStyleConfig:G$,definePartsStyle:pc}=ye($_.keys),xo=V("slider-thumb-size"),Ys=V("slider-track-size"),wn=V("slider-bg"),X$=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...kp({orientation:t,vertical:{h:"100%",px:Vr(xo.reference).divide(2).toString()},horizontal:{w:"100%",py:Vr(xo.reference).divide(2).toString()}})}},q$=e=>({...kp({orientation:e.orientation,horizontal:{h:Ys.reference},vertical:{w:Ys.reference}}),overflow:"hidden",borderRadius:"sm",[wn.variable]:"colors.gray.200",_dark:{[wn.variable]:"colors.whiteAlpha.200"},_disabled:{[wn.variable]:"colors.gray.300",_dark:{[wn.variable]:"colors.whiteAlpha.300"}},bg:wn.reference}),Y$=e=>{const{orientation:t}=e;return{...kp({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:xo.reference,h:xo.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},K$=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[wn.variable]:`colors.${t}.500`,_dark:{[wn.variable]:`colors.${t}.200`},bg:wn.reference}},Q$=pc(e=>({container:X$(e),track:q$(e),thumb:Y$(e),filledTrack:K$(e)})),Z$=pc({container:{[xo.variable]:"sizes.4",[Ys.variable]:"sizes.1"}}),J$=pc({container:{[xo.variable]:"sizes.3.5",[Ys.variable]:"sizes.1"}}),eL=pc({container:{[xo.variable]:"sizes.2.5",[Ys.variable]:"sizes.0.5"}}),tL={lg:Z$,md:J$,sm:eL},rL=G$({baseStyle:Q$,sizes:tL,defaultProps:{size:"md",colorScheme:"blue"}}),io=Ue("spinner-size"),nL={width:[io.reference],height:[io.reference]},oL={xs:{[io.variable]:"sizes.3"},sm:{[io.variable]:"sizes.4"},md:{[io.variable]:"sizes.6"},lg:{[io.variable]:"sizes.8"},xl:{[io.variable]:"sizes.12"}},iL={baseStyle:nL,sizes:oL,defaultProps:{size:"md"}},{defineMultiStyleConfig:sL,definePartsStyle:A1}=ye(L_.keys),aL={fontWeight:"medium"},lL={opacity:.8,marginBottom:"2"},uL={verticalAlign:"baseline",fontWeight:"semibold"},cL={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},dL=A1({container:{},label:aL,helpText:lL,number:uL,icon:cL}),fL={md:A1({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},hL=sL({baseStyle:dL,sizes:fL,defaultProps:{size:"md"}}),{defineMultiStyleConfig:pL,definePartsStyle:gs}=ye(["stepper","step","title","description","indicator","separator","icon","number"]),Ur=V("stepper-indicator-size"),Vo=V("stepper-icon-size"),Ho=V("stepper-title-font-size"),ys=V("stepper-description-font-size"),Ji=V("stepper-accent-color"),mL=gs(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[Ji.variable]:`colors.${e}.500`,_dark:{[Ji.variable]:`colors.${e}.200`}},title:{fontSize:Ho.reference,fontWeight:"medium"},description:{fontSize:ys.reference,color:"chakra-subtle-text"},number:{fontSize:Ho.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:Vo.reference,height:Vo.reference},indicator:{flexShrink:0,borderRadius:"full",width:Ur.reference,height:Ur.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:Ji.reference},"&[data-status=complete]":{bg:Ji.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:Ji.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${Ur.reference} - 8px)`,top:`calc(${Ur.reference} + 4px)`,insetStart:`calc(${Ur.reference} / 2 - 1px)`}}})),gL=pL({baseStyle:mL,sizes:{xs:gs({stepper:{[Ur.variable]:"sizes.4",[Vo.variable]:"sizes.3",[Ho.variable]:"fontSizes.xs",[ys.variable]:"fontSizes.xs"}}),sm:gs({stepper:{[Ur.variable]:"sizes.6",[Vo.variable]:"sizes.4",[Ho.variable]:"fontSizes.sm",[ys.variable]:"fontSizes.xs"}}),md:gs({stepper:{[Ur.variable]:"sizes.8",[Vo.variable]:"sizes.5",[Ho.variable]:"fontSizes.md",[ys.variable]:"fontSizes.sm"}}),lg:gs({stepper:{[Ur.variable]:"sizes.10",[Vo.variable]:"sizes.6",[Ho.variable]:"fontSizes.lg",[ys.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:yL,definePartsStyle:Yl}=ye(M_.keys),Rs=Ue("switch-track-width"),po=Ue("switch-track-height"),Od=Ue("switch-track-diff"),vL=Hr.subtract(Rs,po),Hf=Ue("switch-thumb-x"),es=Ue("switch-bg"),bL=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Rs.reference],height:[po.reference],transitionProperty:"common",transitionDuration:"fast",[es.variable]:"colors.gray.300",_dark:{[es.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[es.variable]:`colors.${t}.500`,_dark:{[es.variable]:`colors.${t}.200`}},bg:es.reference}},SL={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[po.reference],height:[po.reference],_checked:{transform:`translateX(${Hf.reference})`}},xL=Yl(e=>({container:{[Od.variable]:vL,[Hf.variable]:Od.reference,_rtl:{[Hf.variable]:Hr(Od).negate().toString()}},track:bL(e),thumb:SL})),wL={sm:Yl({container:{[Rs.variable]:"1.375rem",[po.variable]:"sizes.3"}}),md:Yl({container:{[Rs.variable]:"1.875rem",[po.variable]:"sizes.4"}}),lg:Yl({container:{[Rs.variable]:"2.875rem",[po.variable]:"sizes.6"}})},kL=yL({baseStyle:xL,sizes:wL,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:EL,definePartsStyle:ci}=ye(O_.keys),CL=ci({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),Tu={"&[data-is-numeric=true]":{textAlign:"end"}},TL=ci(e=>{const{colorScheme:t}=e;return{th:{color:j("gray.600","gray.400")(e),borderBottom:"1px",borderColor:j(`${t}.100`,`${t}.700`)(e),...Tu},td:{borderBottom:"1px",borderColor:j(`${t}.100`,`${t}.700`)(e),...Tu},caption:{color:j("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),PL=ci(e=>{const{colorScheme:t}=e;return{th:{color:j("gray.600","gray.400")(e),borderBottom:"1px",borderColor:j(`${t}.100`,`${t}.700`)(e),...Tu},td:{borderBottom:"1px",borderColor:j(`${t}.100`,`${t}.700`)(e),...Tu},caption:{color:j("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:j(`${t}.100`,`${t}.700`)(e)},td:{background:j(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),_L={simple:TL,striped:PL,unstyled:{}},AL={sm:ci({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:ci({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:ci({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},RL=EL({baseStyle:CL,variants:_L,sizes:AL,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),kt=V("tabs-color"),mr=V("tabs-bg"),gl=V("tabs-border-color"),{defineMultiStyleConfig:IL,definePartsStyle:Rr}=ye(N_.keys),$L=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},LL=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},ML=e=>{const{align:t="start",orientation:r}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:r==="vertical"?"column":"row"}},OL={p:4},NL=Rr(e=>({root:$L(e),tab:LL(e),tablist:ML(e),tabpanel:OL})),DL={sm:Rr({tab:{py:1,px:4,fontSize:"sm"}}),md:Rr({tab:{fontSize:"md",py:2,px:4}}),lg:Rr({tab:{fontSize:"lg",py:3,px:4}})},BL=Rr(e=>{const{colorScheme:t,orientation:r}=e,n=r==="vertical",o=n?"borderStart":"borderBottom",i=n?"marginStart":"marginBottom";return{tablist:{[o]:"2px solid",borderColor:"inherit"},tab:{[o]:"2px solid",borderColor:"transparent",[i]:"-2px",_selected:{[kt.variable]:`colors.${t}.600`,_dark:{[kt.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[mr.variable]:"colors.gray.200",_dark:{[mr.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:kt.reference,bg:mr.reference}}}),zL=Rr(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[gl.variable]:"transparent",_selected:{[kt.variable]:`colors.${t}.600`,[gl.variable]:"colors.white",_dark:{[kt.variable]:`colors.${t}.300`,[gl.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:gl.reference},color:kt.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),FL=Rr(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[mr.variable]:"colors.gray.50",_dark:{[mr.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[mr.variable]:"colors.white",[kt.variable]:`colors.${t}.600`,_dark:{[mr.variable]:"colors.gray.800",[kt.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:kt.reference,bg:mr.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),jL=Rr(e=>{const{colorScheme:t,theme:r}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:mt(r,`${t}.700`),bg:mt(r,`${t}.100`)}}}}),VL=Rr(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[kt.variable]:"colors.gray.600",_dark:{[kt.variable]:"inherit"},_selected:{[kt.variable]:"colors.white",[mr.variable]:`colors.${t}.600`,_dark:{[kt.variable]:"colors.gray.800",[mr.variable]:`colors.${t}.300`}},color:kt.reference,bg:mr.reference}}}),HL=Rr({}),UL={line:BL,enclosed:zL,"enclosed-colored":FL,"soft-rounded":jL,"solid-rounded":VL,unstyled:HL},WL=IL({baseStyle:NL,sizes:DL,variants:UL,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:GL,definePartsStyle:mo}=ye(D_.keys),w0=V("tag-bg"),k0=V("tag-color"),Nd=V("tag-shadow"),Kl=V("tag-min-height"),Ql=V("tag-min-width"),Zl=V("tag-font-size"),Jl=V("tag-padding-inline"),XL={fontWeight:"medium",lineHeight:1.2,outline:0,[k0.variable]:Be.color.reference,[w0.variable]:Be.bg.reference,[Nd.variable]:Be.shadow.reference,color:k0.reference,bg:w0.reference,boxShadow:Nd.reference,borderRadius:"md",minH:Kl.reference,minW:Ql.reference,fontSize:Zl.reference,px:Jl.reference,_focusVisible:{[Nd.variable]:"shadows.outline"}},qL={lineHeight:1.2,overflow:"visible"},YL={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},KL=mo({container:XL,label:qL,closeButton:YL}),QL={sm:mo({container:{[Kl.variable]:"sizes.5",[Ql.variable]:"sizes.5",[Zl.variable]:"fontSizes.xs",[Jl.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:mo({container:{[Kl.variable]:"sizes.6",[Ql.variable]:"sizes.6",[Zl.variable]:"fontSizes.sm",[Jl.variable]:"space.2"}}),lg:mo({container:{[Kl.variable]:"sizes.8",[Ql.variable]:"sizes.8",[Zl.variable]:"fontSizes.md",[Jl.variable]:"space.3"}})},ZL={subtle:mo(e=>({container:Ps.variants?.subtle(e)})),solid:mo(e=>({container:Ps.variants?.solid(e)})),outline:mo(e=>({container:Ps.variants?.outline(e)}))},JL=GL({variants:ZL,baseStyle:KL,sizes:QL,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),eM={...se.baseStyle?.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},tM={outline:e=>se.variants?.outline(e).field??{},flushed:e=>se.variants?.flushed(e).field??{},filled:e=>se.variants?.filled(e).field??{},unstyled:se.variants?.unstyled.field??{}},rM={xs:se.sizes?.xs.field??{},sm:se.sizes?.sm.field??{},md:se.sizes?.md.field??{},lg:se.sizes?.lg.field??{}},nM={baseStyle:eM,sizes:rM,variants:tM,defaultProps:{size:"md",variant:"outline"}},yl=Ue("tooltip-bg"),Dd=Ue("tooltip-fg"),oM=Ue("popper-arrow-bg"),iM={bg:yl.reference,color:Dd.reference,[yl.variable]:"colors.gray.700",[Dd.variable]:"colors.whiteAlpha.900",_dark:{[yl.variable]:"colors.gray.300",[Dd.variable]:"colors.gray.900"},[oM.variable]:yl.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},sM={baseStyle:iM},aM={Accordion:G_,Alert:AA,Avatar:FA,Badge:Ps,Breadcrumb:KA,Button:iR,Checkbox:Cu,CloseButton:SR,Code:ER,Container:TR,Divider:IR,Drawer:VR,Editable:YR,Form:tI,FormError:aI,FormLabel:uI,Heading:fI,Input:se,Kbd:wI,Link:EI,List:AI,Menu:FI,Modal:QI,NumberInput:s$,PinInput:c$,Popover:x$,Progress:A$,Radio:M$,Select:j$,Skeleton:H$,SkipLink:W$,Slider:rL,Spinner:iL,Stat:hL,Switch:kL,Table:RL,Tabs:WL,Tag:JL,Textarea:nM,Tooltip:sM,Card:cR,Stepper:gL},lM={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},uM={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},cM={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"}},dM={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},fM={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},hM={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},pM={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},mM={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},gM={property:hM,easing:pM,duration:mM},yM={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},vM={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},bM={breakpoints:uM,zIndices:yM,radii:dM,blur:vM,colors:cM,...T1,sizes:S1,shadows:fM,space:b1,borders:lM,transition:gM},SM={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},xM={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},wM=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function kM(e){return gt(e)?wM.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}const EM="ltr",CM={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Pu={semanticTokens:SM,direction:EM,...bM,components:aM,styles:xM,config:CM};var TM=!1;function PM(e){if(e.sheet)return e.sheet;for(var t=0;t0?Qe(Fi,--Rt):0,xi--,ze===10&&(xi=1,gc--),ze}function Dt(){return ze=Rt2||Qs(ze)>3?"":" "}function FM(e,t){for(;--t&&Dt()&&!(ze<48||ze>102||ze>57&&ze<65||ze>70&&ze<97););return Oa(e,eu()+(t<6&&Ir()==32&&Dt()==32))}function Wf(e){for(;Dt();)switch(ze){case e:return Rt;case 34:case 39:e!==34&&e!==39&&Wf(ze);break;case 40:e===41&&Wf(e);break;case 92:Dt();break}return Rt}function jM(e,t){for(;Dt()&&e+ze!==57;)if(e+ze===84&&Ir()===47)break;return"/*"+Oa(t,Rt-1)+"*"+mc(e===47?e:Dt())}function VM(e){for(;!Qs(Ir());)Dt();return Oa(e,Rt)}function HM(e){return O1(ru("",null,null,null,[""],e=M1(e),0,[0],e))}function ru(e,t,r,n,o,i,s,a,l){for(var u=0,c=0,d=s,f=0,m=0,y=0,v=1,x=1,p=1,h=0,g="",S=o,C=i,P=n,T=g;x;)switch(y=h,h=Dt()){case 40:if(y!=108&&Qe(T,d-1)==58){Uf(T+=ie(tu(h),"&","&\f"),"&\f")!=-1&&(p=-1);break}case 34:case 39:case 91:T+=tu(h);break;case 9:case 10:case 13:case 32:T+=zM(y);break;case 92:T+=FM(eu()-1,7);continue;case 47:switch(Ir()){case 42:case 47:vl(UM(jM(Dt(),eu()),t,r),l);break;default:T+="/"}break;case 123*v:a[u++]=Tr(T)*p;case 125*v:case 59:case 0:switch(h){case 0:case 125:x=0;case 59+c:p==-1&&(T=ie(T,/\f/g,"")),m>0&&Tr(T)-d&&vl(m>32?C0(T+";",n,r,d-1):C0(ie(T," ","")+";",n,r,d-2),l);break;case 59:T+=";";default:if(vl(P=E0(T,t,r,u,c,o,a,g,S=[],C=[],d),i),h===123)if(c===0)ru(T,t,P,P,S,i,d,a,C);else switch(f===99&&Qe(T,3)===110?100:f){case 100:case 108:case 109:case 115:ru(e,P,P,n&&vl(E0(e,P,P,0,0,o,a,g,o,S=[],d),C),o,C,d,a,n?S:C);break;default:ru(T,P,P,P,[""],C,0,a,C)}}u=c=m=0,v=p=1,g=T="",d=s;break;case 58:d=1+Tr(T),m=y;default:if(v<1){if(h==123)--v;else if(h==125&&v++==0&&BM()==125)continue}switch(T+=mc(h),h*v){case 38:p=c>0?1:(T+="\f",-1);break;case 44:a[u++]=(Tr(T)-1)*p,p=1;break;case 64:Ir()===45&&(T+=tu(Dt())),f=Ir(),c=d=Tr(g=T+=VM(eu())),h++;break;case 45:y===45&&Tr(T)==2&&(v=0)}}return i}function E0(e,t,r,n,o,i,s,a,l,u,c){for(var d=o-1,f=o===0?i:[""],m=Ap(f),y=0,v=0,x=0;y0?f[p]+" "+h:ie(h,/&\f/g,f[p])))&&(l[x++]=g);return yc(e,t,r,o===0?Pp:a,l,u,c)}function UM(e,t,r){return yc(e,t,r,R1,mc(DM()),Ks(e,2,-2),0)}function C0(e,t,r,n){return yc(e,t,r,_p,Ks(e,0,n),Ks(e,n+1,-1),n)}function di(e,t){for(var r="",n=Ap(e),o=0;o6)switch(Qe(e,t+1)){case 109:if(Qe(e,t+4)!==45)break;case 102:return ie(e,/(.+:)(.+)-([^]+)/,"$1"+oe+"$2-$3$1"+_u+(Qe(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Uf(e,"stretch")?D1(ie(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Qe(e,t+1)!==115)break;case 6444:switch(Qe(e,Tr(e)-3-(~Uf(e,"!important")&&10))){case 107:return ie(e,":",":"+oe)+e;case 101:return ie(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+oe+(Qe(e,14)===45?"inline-":"")+"box$3$1"+oe+"$2$3$1"+nt+"$2box$3")+e}break;case 5936:switch(Qe(e,t+11)){case 114:return oe+e+nt+ie(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return oe+e+nt+ie(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return oe+e+nt+ie(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return oe+e+nt+e+e}return e}var JM=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case _p:t.return=D1(t.value,t.length);break;case I1:return di([ts(t,{value:ie(t.value,"@","@"+oe)})],o);case Pp:if(t.length)return NM(t.props,function(i){switch(OM(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return di([ts(t,{props:[ie(i,/:(read-\w+)/,":"+_u+"$1")]})],o);case"::placeholder":return di([ts(t,{props:[ie(i,/:(plac\w+)/,":"+oe+"input-$1")]}),ts(t,{props:[ie(i,/:(plac\w+)/,":"+_u+"$1")]}),ts(t,{props:[ie(i,/:(plac\w+)/,nt+"input-$1")]})],o)}return""})}},eO=[JM],B1=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(v){var x=v.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var o=t.stylisPlugins||eO,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var x=v.getAttribute("data-emotion").split(" "),p=1;p=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var dO={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},fO=!1,hO=/[A-Z]|^ms/g,pO=/_EMO_([^_]+?)_([^]*?)_EMO_/g,U1=function(t){return t.charCodeAt(1)===45},_0=function(t){return t!=null&&typeof t!="boolean"},Bd=N1(function(e){return U1(e)?e:e.replace(hO,"-$&").toLowerCase()}),A0=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(pO,function(n,o,i){return Pr={name:o,styles:i,next:Pr},o})}return dO[t]!==1&&!U1(t)&&typeof r=="number"&&r!==0?r+"px":r},mO="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Zs(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Pr={name:o.name,styles:o.styles,next:Pr},o.name;var i=r;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)Pr={name:s.name,styles:s.styles,next:Pr},s=s.next;var a=i.styles+";";return a}return gO(e,t,r)}case"function":{if(e!==void 0){var l=Pr,u=r(e);return Pr=l,Zs(e,t,u)}break}}var c=r;if(t==null)return c;var d=t[c];return d!==void 0?d:c}function gO(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=o,document.documentElement.style.colorScheme=o,i?.()},setClassName(o){document.body.classList.add(o?bl.dark:bl.light),document.body.classList.remove(o?bl.light:bl.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(o){return n.query().matches??o==="dark"?"dark":"light"},addListener(o){const i=n.query(),s=a=>{o(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(s):i.addEventListener("change",s),()=>{typeof i.removeListener=="function"?i.removeListener(s):i.removeEventListener("change",s)}},preventTransition(){const o=document.createElement("style");return o.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),r!==void 0&&(o.nonce=r),document.head.appendChild(o),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(o)})})}}};return n}const RO="chakra-ui-color-mode";function IO(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let r;try{r=localStorage.getItem(e)||t}catch{}return r||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}const $O=IO(RO),ki=()=>{},LO=BP()?w.useLayoutEffect:w.useEffect;function $0(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}const MO=Ac(function(t,r){const{value:n,children:o,options:{useSystemColorMode:i,initialColorMode:s,disableTransitionOnChange:a}={},colorModeManager:l=$O}=t,u=s==="dark"?"dark":"light",[c,d]=w.useState(()=>$0(l,u)),[f,m]=w.useState(()=>$0(l)),{getSystemTheme:y,setClassName:v,setDataset:x,addListener:p}=w.useMemo(()=>AO({preventTransition:a,nonce:r?.nonce}),[a,r?.nonce]),h=s==="system"&&!c?f:c,g=w.useCallback(P=>{const T=P==="system"?y():P;d(T),v(T==="dark"),x(T),l.set(T)},[l,y,v,x]);LO(()=>{s==="system"&&m(y())},[]),w.useEffect(()=>{const P=l.get();if(P){g(P);return}if(s==="system"){g("system");return}g(u)},[l,u,s,g]);const S=w.useCallback(()=>{g(h==="dark"?"light":"dark")},[h,g]);w.useEffect(()=>{if(i)return p(g)},[i,p,g]);const C=w.useMemo(()=>({colorMode:n??h,toggleColorMode:n?ki:S,setColorMode:n?ki:g,forced:n!==void 0}),[h,S,g,n]);return R.jsx(Na.Provider,{value:C,children:o})});MO.displayName="ColorModeProvider";function q1(e){const t=w.useMemo(()=>({colorMode:"dark",toggleColorMode:ki,setColorMode:ki,forced:!0}),[]);return R.jsx(Na.Provider,{value:t,...e})}q1.displayName="DarkMode";function Y1(e){const t=w.useMemo(()=>({colorMode:"light",toggleColorMode:ki,setColorMode:ki,forced:!0}),[]);return R.jsx(Na.Provider,{value:t,...e})}Y1.displayName="LightMode";const K1=String.raw,OO=K1` + :root, + :host { + --chakra-vh: 100vh; + } + + @supports (height: -webkit-fill-available) { + :root, + :host { + --chakra-vh: -webkit-fill-available; + } + } + + @supports (height: -moz-fill-available) { + :root, + :host { + --chakra-vh: -moz-fill-available; + } + } + + @supports (height: 100dvh) { + :root, + :host { + --chakra-vh: 100dvh; + } + } +`,NO=({scope:e=""})=>R.jsx(Rc,{styles:K1` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + margin: 0; + font-feature-settings: "kern"; + } + + ${e} :where(*, *::before, *::after) { + border-width: 0; + border-style: solid; + box-sizing: border-box; + word-wrap: break-word; + } + + main { + display: block; + } + + ${e} hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + ${e} :where(pre, code, kbd,samp) { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + ${e} a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + ${e} abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + ${e} :where(b, strong) { + font-weight: bold; + } + + ${e} small { + font-size: 80%; + } + + ${e} :where(sub,sup) { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + ${e} sub { + bottom: -0.25em; + } + + ${e} sup { + top: -0.5em; + } + + ${e} img { + border-style: none; + } + + ${e} :where(button, input, optgroup, select, textarea) { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + ${e} :where(button, input) { + overflow: visible; + } + + ${e} :where(button, select) { + text-transform: none; + } + + ${e} :where( + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner + ) { + border-style: none; + padding: 0; + } + + ${e} fieldset { + padding: 0.35em 0.75em 0.625em; + } + + ${e} legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + ${e} progress { + vertical-align: baseline; + } + + ${e} textarea { + overflow: auto; + } + + ${e} :where([type="checkbox"], [type="radio"]) { + box-sizing: border-box; + padding: 0; + } + + ${e} input[type="number"]::-webkit-inner-spin-button, + ${e} input[type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + ${e} input[type="number"] { + -moz-appearance: textfield; + } + + ${e} input[type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + ${e} input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ${e} ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + ${e} details { + display: block; + } + + ${e} summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + ${e} :where( + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre + ) { + margin: 0; + } + + ${e} button { + background: transparent; + padding: 0; + } + + ${e} fieldset { + margin: 0; + padding: 0; + } + + ${e} :where(ol, ul) { + margin: 0; + padding: 0; + } + + ${e} textarea { + resize: vertical; + } + + ${e} :where(button, [role="button"]) { + cursor: pointer; + } + + ${e} button::-moz-focus-inner { + border: 0 !important; + } + + ${e} table { + border-collapse: collapse; + } + + ${e} :where(h1, h2, h3, h4, h5, h6) { + font-size: inherit; + font-weight: inherit; + } + + ${e} :where(button, input, optgroup, select, textarea) { + padding: 0; + line-height: inherit; + color: inherit; + } + + ${e} :where(img, svg, video, canvas, audio, iframe, embed, object) { + display: block; + } + + ${e} :where(img, video) { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] + :focus:not([data-focus-visible-added]):not( + [data-focus-visible-disabled] + ) { + outline: none; + box-shadow: none; + } + + ${e} select::-ms-expand { + display: none; + } + + ${OO} + `});function DO(e){const{cssVarsRoot:t,theme:r,children:n}=e,o=w.useMemo(()=>h_(r),[r]);return R.jsxs(wO,{theme:o,children:[R.jsx(BO,{root:t}),n]})}function BO({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return R.jsx(Rc,{styles:r=>({[t]:r.__cssVars})})}Bi({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function zO(){const{colorMode:e}=Ic();return R.jsx(Rc,{styles:t=>{const r=l1(t,"styles.global"),n=Ar(r,{theme:t,colorMode:e});return n?m1(n)(t):void 0}})}const[PV,FO]=Bi({strict:!1,name:"PortalManagerContext"}),Np=w.createContext({getDocument(){return document},getWindow(){return window}});Np.displayName="EnvironmentContext";function _V({defer:e}={}){const[,t]=w.useReducer(r=>r+1,0);return xu(()=>{e&&t()},[e]),w.useContext(Np)}function Q1(e){const{children:t,environment:r,disabled:n}=e,o=w.useRef(null),i=w.useMemo(()=>r||{getDocument:()=>o.current?.ownerDocument??document,getWindow:()=>o.current?.ownerDocument.defaultView??window},[r]),s=!n||!r;return R.jsxs(Np.Provider,{value:i,children:[t,s&&R.jsx("span",{id:"__chakra_env",hidden:!0,ref:o})]})}Q1.displayName="EnvironmentProvider";const Dp=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),$c=w.createContext({}),Da=w.createContext(null),Bp=typeof window<"u",Z1=Bp?w.useLayoutEffect:w.useEffect,J1=w.createContext({strict:!1}),Lc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),jO="framerAppearId",eS="data-"+Lc(jO),VO={skipAnimations:!1,useManualTiming:!1};function HO(e){let t=new Set,r=new Set,n=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(u){i.has(u)&&(l.schedule(u),e()),u(s)}const l={schedule:(u,c=!1,d=!1)=>{const m=d&&n?t:r;return c&&i.add(u),m.has(u)||m.add(u),u},cancel:u=>{r.delete(u),i.delete(u)},process:u=>{if(s=u,n){o=!0;return}n=!0,[t,r]=[r,t],r.clear(),t.forEach(a),n=!1,o&&(o=!1,l.process(u))}};return l}const Sl=["read","resolveKeyframes","update","preRender","render","postRender"],UO=40;function tS(e,t){let r=!1,n=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,s=Sl.reduce((p,h)=>(p[h]=HO(i),p),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:f}=s,m=()=>{const p=performance.now();r=!1,o.delta=n?1e3/60:Math.max(Math.min(p-o.timestamp,UO),1),o.timestamp=p,o.isProcessing=!0,a.process(o),l.process(o),u.process(o),c.process(o),d.process(o),f.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(m))},y=()=>{r=!0,n=!0,o.isProcessing||e(m)};return{schedule:Sl.reduce((p,h)=>{const g=s[h];return p[h]=(S,C=!1,P=!1)=>(r||y(),g.schedule(S,C,P)),p},{}),cancel:p=>{for(let h=0;h{d&&d.update(r,l)});const m=r[eS],y=w.useRef(!!m&&!window.MotionHandoffIsComplete&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return Z1(()=>{d&&(d.updateFeatures(),zp.render(d.render),y.current&&d.animationState&&d.animationState.animateChanges())}),w.useEffect(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current=!1,L0||(L0=!0,queueMicrotask(GO)))}),d}function GO(){window.MotionHandoffIsComplete=!0}function XO(e,t,r,n){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:nS(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Uo(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:u})}function nS(e){if(e)return e.options.allowProjection!==!1?e.projection:nS(e.parent)}function qO(e,t,r){return w.useCallback(n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):Uo(r)&&(r.current=n))},[t])}function Js(e){return typeof e=="string"||Array.isArray(e)}function ea(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Fp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jp=["initial",...Fp];function Mc(e){return ea(e.animate)||jp.some(t=>Js(e[t]))}function oS(e){return!!(Mc(e)||e.variants)}function YO(e,t){if(Mc(e)){const{initial:r,animate:n}=e;return{initial:r===!1||Js(r)?r:void 0,animate:Js(n)?n:void 0}}return e.inherit!==!1?t:{}}function KO(e){const{initial:t,animate:r}=YO(e,w.useContext($c));return w.useMemo(()=>({initial:t,animate:r}),[M0(t),M0(r)])}function M0(e){return Array.isArray(e)?e.join(" "):e}const O0={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"]},Ei={};for(const e in O0)Ei[e]={isEnabled:t=>O0[e].some(r=>!!t[r])};function QO(e){for(const t in e)Ei[t]={...Ei[t],...e[t]}}const Vp=w.createContext({}),ZO=Symbol.for("motionComponentSymbol"),at=e=>e;let Xf=at;function JO({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:o}){e&&QO(e);function i(a,l){let u;const c={...w.useContext(Dp),...a,layoutId:eN(a)},{isStatic:d}=c,f=KO(a),m=n(a,d);if(!d&&Bp){tN();const y=rN(c);u=y.MeasureLayout,f.visualElement=WO(o,m,c,t,y.ProjectionNode)}return R.jsxs($c.Provider,{value:f,children:[u&&f.visualElement?R.jsx(u,{visualElement:f.visualElement,...c}):null,r(o,a,qO(m,f.visualElement,l),m,d,f.visualElement)]})}const s=w.forwardRef(i);return s[ZO]=o,s}function eN({layoutId:e}){const t=w.useContext(Vp).id;return t&&e!==void 0?t+"-"+e:e}function tN(e,t){w.useContext(J1).strict}function rN(e){const{drag:t,layout:r}=Ei;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function nN(e){function t(n,o={}){return JO(e(n,o))}if(typeof Proxy>"u")return t;const r=new Map;return new Proxy(t,{get:(n,o)=>(r.has(o)||r.set(o,t(o)),r.get(o))})}const oN=["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 Hp(e){return typeof e!="string"||e.includes("-")?!1:!!(oN.indexOf(e)>-1||/[A-Z]/u.test(e))}const Ru={};function iN(e){Object.assign(Ru,e)}const Ba=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fn=new Set(Ba);function iS(e,{layout:t,layoutId:r}){return Fn.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Ru[e]||e==="opacity")}const st=e=>!!(e&&e.getVelocity),sS=(e,t)=>t&&typeof e=="number"?t.transform(e):e,On=(e,t,r)=>r>t?t:rtypeof e=="number",parse:parseFloat,transform:e=>e},Is={...ji,transform:e=>On(0,1,e)},xl={...ji,default:1},$s=e=>Math.round(e*1e5)/1e5,Up=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,sN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,aN=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function za(e){return typeof e=="string"}function lN(e){return e==null}const Fa=e=>({test:t=>za(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),bn=Fa("deg"),$r=Fa("%"),W=Fa("px"),uN=Fa("vh"),cN=Fa("vw"),N0={...$r,parse:e=>$r.parse(e)/100,transform:e=>$r.transform(e*100)},D0={...ji,transform:Math.round},Wp={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,size:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,rotate:bn,rotateX:bn,rotateY:bn,rotateZ:bn,scale:xl,scaleX:xl,scaleY:xl,scaleZ:xl,skew:bn,skewX:bn,skewY:bn,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:Is,originX:N0,originY:N0,originZ:W,zIndex:D0,backgroundPositionX:W,backgroundPositionY:W,fillOpacity:Is,strokeOpacity:Is,numOctaves:D0},dN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fN=Ba.length;function hN(e,t,r){let n="",o=!0;for(let i=0;it=>typeof t=="string"&&t.startsWith(e),lS=aS("--"),pN=aS("var(--"),Gp=e=>pN(e)?mN.test(e.split("/*")[0].trim()):!1,mN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Xp(e,t,r){const{style:n,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const u=t[l];if(Fn.has(l)){s=!0;continue}else if(lS(l)){o[l]=u;continue}else{const c=sS(u,Wp[l]);l.startsWith("origin")?(a=!0,i[l]=c):n[l]=c}}if(t.transform||(s||r?n.transform=hN(t,e.transform,r):n.transform&&(n.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=i;n.transformOrigin=`${l} ${u} ${c}`}}const qp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function uS(e,t,r){for(const n in t)!st(t[n])&&!iS(n,r)&&(e[n]=t[n])}function gN({transformTemplate:e},t){return w.useMemo(()=>{const r=qp();return Xp(r,t,e),Object.assign({},r.vars,r.style)},[t])}function yN(e,t){const r=e.style||{},n={};return uS(n,r,e),Object.assign(n,gN(e,t)),n}function vN(e,t){const r={},n=yN(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const bN=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 Iu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||bN.has(e)}let cS=e=>!Iu(e);function SN(e){e&&(cS=t=>t.startsWith("on")?!Iu(t):e(t))}try{SN(require("@emotion/is-prop-valid").default)}catch{}function xN(e,t,r){const n={};for(const o in e)o==="values"&&typeof e.values=="object"||(cS(o)||r===!0&&Iu(o)||!t&&!Iu(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}function B0(e,t,r){return typeof e=="string"?e:W.transform(t+r*e)}function wN(e,t,r){const n=B0(t,e.x,e.width),o=B0(r,e.y,e.height);return`${n} ${o}`}const kN={offset:"stroke-dashoffset",array:"stroke-dasharray"},EN={offset:"strokeDashoffset",array:"strokeDasharray"};function CN(e,t,r=1,n=0,o=!0){e.pathLength=1;const i=o?kN:EN;e[i.offset]=W.transform(-n);const s=W.transform(t),a=W.transform(r);e[i.array]=`${s} ${a}`}function Yp(e,{attrX:t,attrY:r,attrScale:n,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d){if(Xp(e,u,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m,dimensions:y}=e;f.transform&&(y&&(m.transform=f.transform),delete f.transform),y&&(o!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=wN(y,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),s!==void 0&&CN(f,s,a,l,!1)}const dS=()=>({...qp(),attrs:{}}),Kp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function TN(e,t,r,n){const o=w.useMemo(()=>{const i=dS();return Yp(i,t,Kp(n),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};uS(i,e.style,e),o.style={...i,...o.style}}return o}function PN(e=!1){return(r,n,o,{latestValues:i},s)=>{const l=(Hp(r)?TN:vN)(n,i,s,r),u=xN(n,typeof r=="string",e),c=r!==w.Fragment?{...u,...l,ref:o}:{},{children:d}=n,f=w.useMemo(()=>st(d)?d.get():d,[d]);return w.createElement(r,{...c,children:f})}}function fS(e,{style:t,vars:r},n,o){Object.assign(e.style,t,o&&o.getProjectionStyles(n));for(const i in r)e.style.setProperty(i,r[i])}const hS=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 pS(e,t,r,n){fS(e,t,void 0,n);for(const o in t.attrs)e.setAttribute(hS.has(o)?o:Lc(o),t.attrs[o])}function Qp(e,t,r){var n;const{style:o}=e,i={};for(const s in o)(st(o[s])||t.style&&st(t.style[s])||iS(s,e)||((n=r?.getValue(s))===null||n===void 0?void 0:n.liveStyle)!==void 0)&&(i[s]=o[s]);return r&&o&&typeof o.willChange=="string"&&(r.applyWillChange=!1),i}function mS(e,t,r){const n=Qp(e,t,r);for(const o in e)if(st(e[o])||st(t[o])){const i=Ba.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;n[i]=e[o]}return n}function z0(e){const t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function Zp(e,t,r,n){if(typeof t=="function"){const[o,i]=z0(n);t=t(r!==void 0?r:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=z0(n);t=t(r!==void 0?r:e.custom,o,i)}return t}function Jp(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const qf=e=>Array.isArray(e),_N=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),AN=e=>qf(e)?e[e.length-1]||0:e;function nu(e){const t=st(e)?e.get():e;return _N(t)?t.toValue():t}const gS=new Set(["opacity","clipPath","filter","transform"]);function yS(e){if(Fn.has(e))return"transform";if(gS.has(e))return Lc(e)}function Oc(e,t){e.indexOf(t)===-1&&e.push(t)}function Nc(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}function RN({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:r,onMount:n},o,i,s,a){const l={latestValues:$N(o,i,s,a?!1:e,t),renderState:r()};return n&&(l.mount=u=>n(o,u,l)),l}const vS=e=>(t,r)=>{const n=w.useContext($c),o=w.useContext(Da),i=()=>RN(e,t,n,o,r);return r?i():Jp(i)};function IN(e,t){const r=yS(t);r&&Oc(e,r)}function F0(e,t,r){const n=Array.isArray(t)?t:[t];for(let o=0;o{for(const h in x){let g=x[h];if(Array.isArray(g)){const S=y?g.length-1:0;g=g[S]}g!==null&&(s[h]=g)}for(const h in p)s[h]=p[h]}),l&&(d&&c!==!1&&!ea(d)&&F0(e,d,x=>{for(const p in x)IN(a,p)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:ce,cancel:on,state:Ke,steps:zd}=tS(typeof requestAnimationFrame<"u"?requestAnimationFrame:at,!0),LN={useVisualState:vS({scrapeMotionValuesFromProps:mS,createRenderState:dS,onMount:(e,t,{renderState:r,latestValues:n})=>{ce.read(()=>{try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),ce.render(()=>{Yp(r,n,Kp(t.tagName),e.transformTemplate),pS(t,r)})}})},MN={useVisualState:vS({applyWillChange:!0,scrapeMotionValuesFromProps:Qp,createRenderState:qp})};function ON(e,{forwardMotionProps:t=!1},r,n){return{...Hp(e)?LN:MN,preloadedFeatures:r,useRender:PN(t),createVisualElement:n,Component:e}}function Xr(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const bS=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Dc(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const NN=e=>t=>bS(t)&&e(t,Dc(t));function Qr(e,t,r,n){return Xr(e,t,NN(r),n)}const DN=(e,t)=>r=>t(e(r)),Zr=(...e)=>e.reduce(DN);function SS(e){let t=null;return()=>{const r=()=>{t=null};return t===null?(t=e,r):!1}}const j0=SS("dragHorizontal"),V0=SS("dragVertical");function xS(e){let t=!1;if(e==="y")t=V0();else if(e==="x")t=j0();else{const r=j0(),n=V0();r&&n?t=()=>{r(),n()}:(r&&r(),n&&n())}return t}function wS(){const e=xS(!0);return e?(e(),!1):!0}class jn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function H0(e,t){const r=t?"pointerenter":"pointerleave",n=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||wS())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[n];l&&ce.postRender(()=>l(i,s))};return Qr(e.current,r,o,{passive:!e.getProps()[n]})}class BN extends jn{mount(){this.unmount=Zr(H0(this.node,!0),H0(this.node,!1))}unmount(){}}class zN extends jn{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=Zr(Xr(this.node.current,"focus",()=>this.onFocus()),Xr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const kS=(e,t)=>t?e===t?!0:kS(e,t.parentElement):!1;function Fd(e,t){if(!t)return;const r=new PointerEvent("pointer"+e);t(r,Dc(r))}class FN extends jn{constructor(){super(...arguments),this.removeStartListeners=at,this.removeEndListeners=at,this.removeAccessibleListeners=at,this.startPointerPress=(t,r)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=Qr(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!kS(this.node.current,a.target)?c:u;f&&ce.update(()=>f(a,l))},{passive:!(n.onTap||n.onPointerUp)}),s=Qr(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Zr(i,s),this.startPress(t,r)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Fd("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&ce.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=Xr(this.node.current,"keyup",s),Fd("down",(a,l)=>{this.startPress(a,l)})},r=Xr(this.node.current,"keydown",t),n=()=>{this.isPressing&&Fd("cancel",(i,s)=>this.cancelPress(i,s))},o=Xr(this.node.current,"blur",n);this.removeAccessibleListeners=Zr(r,o)}}startPress(t,r){this.isPressing=!0;const{onTapStart:n,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&ce.postRender(()=>n(t,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!wS()}cancelPress(t,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&ce.postRender(()=>n(t,r))}mount(){const t=this.node.getProps(),r=Qr(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Xr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Zr(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Yf=new WeakMap,jd=new WeakMap,jN=e=>{const t=Yf.get(e.target);t&&t(e)},VN=e=>{e.forEach(jN)};function HN({root:e,...t}){const r=e||document;jd.has(r)||jd.set(r,{});const n=jd.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(VN,{root:e,...t})),n[o]}function UN(e,t,r){const n=HN(t);return Yf.set(e,r),n.observe(e),()=>{Yf.delete(e),n.unobserve(e)}}const WN={some:0,all:1};class GN extends jn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:i}=t,s={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:WN[o]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return UN(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(XN(t,r))&&this.startObserver()}unmount(){}}function XN({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const qN={inView:{Feature:GN},tap:{Feature:FN},focus:{Feature:zN},hover:{Feature:BN}};function ES(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;ne*1e3,en=e=>e/1e3,YN={type:"spring",stiffness:500,damping:25,restSpeed:10},KN=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),QN={type:"keyframes",duration:.8},ZN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},JN=(e,{keyframes:t})=>t.length>2?QN:Fn.has(e)?e.startsWith("scale")?KN(t[1]):YN:ZN;function eD({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function em(e,t){return e[t]||e.default||e}const tD=e=>e!==null;function zc(e,{repeat:t,repeatType:r="loop"},n){const o=e.filter(tD),i=t&&r!=="loop"&&t%2===1?0:o.length-1;return!i||n===void 0?o[i]:n}const CS=e=>/^0[^.\s]+$/u.test(e);function rD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||CS(e):!0}const TS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),nD=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function oD(e){const t=nD.exec(e);if(!t)return[,];const[,r,n,o]=t;return[`--${r??n}`,o]}function PS(e,t,r=1){const[n,o]=oD(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const s=i.trim();return TS(s)?parseFloat(s):s}return Gp(o)?PS(o,t,r+1):o}const iD=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),U0=e=>e===ji||e===W,W0=(e,t)=>parseFloat(e.split(", ")[t]),G0=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const o=n.match(/^matrix3d\((.+)\)$/u);if(o)return W0(o[1],t);{const i=n.match(/^matrix\((.+)\)$/u);return i?W0(i[1],e):0}},sD=new Set(["x","y","z"]),aD=Ba.filter(e=>!sD.has(e));function lD(e){const t=[];return aD.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const Ci={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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:G0(4,13),y:G0(5,14)};Ci.translateX=Ci.x;Ci.translateY=Ci.y;const _S=e=>t=>t.test(e),uD={test:e=>e==="auto",parse:e=>e},AS=[ji,W,$r,bn,cN,uN,uD],X0=e=>AS.find(_S(e)),go=new Set;let Kf=!1,Qf=!1;function RS(){if(Qf){const e=Array.from(go).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const o=lD(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const o=r.get(n);o&&o.forEach(([i,s])=>{var a;(a=n.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Qf=!1,Kf=!1,go.forEach(e=>e.complete()),go.clear()}function IS(){go.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qf=!0)})}function cD(){IS(),RS()}class tm{constructor(t,r,n,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(go.add(this),Kf||(Kf=!0,ce.read(IS),ce.resolveKeyframes(RS))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;for(let i=0;ir=>!!(za(r)&&aN.test(r)&&r.startsWith(e)||t&&!lN(r)&&Object.prototype.hasOwnProperty.call(r,t)),$S=(e,t,r)=>n=>{if(!za(n))return n;const[o,i,s,a]=n.match(Up);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},dD=e=>On(0,255,e),Vd={...ji,transform:e=>Math.round(dD(e))},lo={test:rm("rgb","red"),parse:$S("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Vd.transform(e)+", "+Vd.transform(t)+", "+Vd.transform(r)+", "+$s(Is.transform(n))+")"};function fD(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}const Zf={test:rm("#"),parse:fD,transform:lo.transform},Wo={test:rm("hsl","hue"),parse:$S("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+$r.transform($s(t))+", "+$r.transform($s(r))+", "+$s(Is.transform(n))+")"},ot={test:e=>lo.test(e)||Zf.test(e)||Wo.test(e),parse:e=>lo.test(e)?lo.parse(e):Wo.test(e)?Wo.parse(e):Zf.parse(e),transform:e=>za(e)?e:e.hasOwnProperty("red")?lo.transform(e):Wo.transform(e)};function hD(e){var t,r;return isNaN(e)&&za(e)&&(((t=e.match(Up))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(sN))===null||r===void 0?void 0:r.length)||0)>0}const LS="number",MS="color",pD="var",mD="var(",q0="${}",gD=/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 ta(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(gD,l=>(ot.test(l)?(n.color.push(i),o.push(MS),r.push(ot.parse(l))):l.startsWith(mD)?(n.var.push(i),o.push(pD),r.push(l)):(n.number.push(i),o.push(LS),r.push(parseFloat(l))),++i,q0)).split(q0);return{values:r,split:a,indexes:n,types:o}}function OS(e){return ta(e).values}function NS(e){const{split:t,types:r}=ta(e),n=t.length;return o=>{let i="";for(let s=0;stypeof e=="number"?0:e;function vD(e){const t=OS(e);return NS(e)(t.map(yD))}const Nn={test:hD,parse:OS,createTransformer:NS,getAnimatableNone:vD},bD=new Set(["brightness","contrast","saturate","opacity"]);function SD(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Up)||[];if(!n)return e;const o=r.replace(n,"");let i=bD.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}const xD=/\b([a-z-]*)\(.*?\)/gu,Jf={...Nn,getAnimatableNone:e=>{const t=e.match(xD);return t?t.map(SD).join(" "):e}},wD={...Wp,color:ot,backgroundColor:ot,outlineColor:ot,fill:ot,stroke:ot,borderColor:ot,borderTopColor:ot,borderRightColor:ot,borderBottomColor:ot,borderLeftColor:ot,filter:Jf,WebkitFilter:Jf},nm=e=>wD[e];function DS(e,t){let r=nm(e);return r!==Jf&&(r=Nn),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const kD=new Set(["auto","none","0"]);function ED(e,t,r){let n=0,o;for(;n{r.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function zS(e){let t;return()=>(t===void 0&&(t=e()),t)}let ou;function CD(){ou=void 0}const tn={now:()=>(ou===void 0&&tn.set(Ke.isProcessing||VO.useManualTiming?Ke.timestamp:performance.now()),ou),set:e=>{ou=e,queueMicrotask(CD)}},Y0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Nn.test(e)||e==="0")&&!e.startsWith("url("));function TD(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r_D?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&cD(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=tn.now(),this.hasAttemptedResolve=!0;const{name:n,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!PD(t,n,o,i))if(s)this.options.duration=0;else{l?.(zc(t,this.options,r)),a?.(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,r);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...c},this.onPostResolved())}onPostResolved(){}then(t,r){return this.currentFinishedPromise.then(t,r)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function jS(e,t){return t?e*(1e3/t):0}const AD=5;function VS(e,t,r){const n=Math.max(t-AD,0);return jS(r-e(n),t-n)}const Hd=.001,RD=.01,ID=10,$D=.05,LD=1;function MD({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let o,i,s=1-t;s=On($D,LD,s),e=On(RD,ID,en(e)),s<1?(o=u=>{const c=u*s,d=c*e,f=c-r,m=eh(u,s),y=Math.exp(-d);return Hd-f/m*y},i=u=>{const d=u*s*e,f=d*r+r,m=Math.pow(s,2)*Math.pow(u,2)*e,y=Math.exp(-d),v=eh(Math.pow(u,2),s);return(-o(u)+Hd>0?-1:1)*((f-m)*y)/v}):(o=u=>{const c=Math.exp(-u*e),d=(u-r)*e+1;return-Hd+c*d},i=u=>{const c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});const a=5/e,l=ND(o,i,a);if(e=Jr(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:s*2*Math.sqrt(n*u),duration:e}}}const OD=12;function ND(e,t,r){let n=r;for(let o=1;oe[r]!==void 0)}function zD(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!K0(e,BD)&&K0(e,DD)){const r=MD(e);t={...t,...r,mass:1},t.isResolvedFromDuration=!0}return t}function HS({keyframes:e,restDelta:t,restSpeed:r,...n}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:f}=zD({...n,velocity:-en(n.velocity||0)}),m=d||0,y=l/(2*Math.sqrt(a*u)),v=i-o,x=en(Math.sqrt(a/u)),p=Math.abs(v)<5;r||(r=p?.01:2),t||(t=p?.005:.5);let h;if(y<1){const g=eh(x,y);h=S=>{const C=Math.exp(-y*x*S);return i-C*((m+y*x*v)/g*Math.sin(g*S)+v*Math.cos(g*S))}}else if(y===1)h=g=>i-Math.exp(-x*g)*(v+(m+x*v)*g);else{const g=x*Math.sqrt(y*y-1);h=S=>{const C=Math.exp(-y*x*S),P=Math.min(g*S,300);return i-C*((m+y*x*v)*Math.sinh(P)+g*v*Math.cosh(P))/g}}return{calculatedDuration:f&&c||null,next:g=>{const S=h(g);if(f)s.done=g>=c;else{let C=0;y<1&&(C=g===0?Jr(m):VS(h,g,S));const P=Math.abs(C)<=r,T=Math.abs(i-S)<=t;s.done=P&&T}return s.value=s.done?i:S,s}}}function Q0({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},m=A=>a!==void 0&&Al,y=A=>a===void 0?l:l===void 0||Math.abs(a-A)-v*Math.exp(-A/n),g=A=>p+h(A),S=A=>{const M=h(A),I=g(A);f.done=Math.abs(M)<=u,f.value=f.done?p:I};let C,P;const T=A=>{m(f.value)&&(C=A,P=HS({keyframes:[f.value,y(f.value)],velocity:VS(g,A,f.value),damping:o,stiffness:i,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:A=>{let M=!1;return!P&&C===void 0&&(M=!0,S(A),T(A)),C!==void 0&&A>=C?P.next(A-C):(!M&&S(A),f)}}}const US=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,FD=1e-7,jD=12;function VD(e,t,r,n,o){let i,s,a=0;do s=t+(r-t)/2,i=US(s,n,o)-e,i>0?r=s:t=s;while(Math.abs(i)>FD&&++aVD(i,0,1,e,r);return i=>i===0||i===1?i:US(o(i),t,n)}const HD=ja(.42,0,1,1),UD=ja(0,0,.58,1),WS=ja(.42,0,.58,1),WD=e=>Array.isArray(e)&&typeof e[0]!="number",GS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,XS=e=>t=>1-e(1-t),om=e=>1-Math.sin(Math.acos(e)),qS=XS(om),GD=GS(om),YS=ja(.33,1.53,.69,.99),im=XS(YS),XD=GS(im),qD=e=>(e*=2)<1?.5*im(e):.5*(2-Math.pow(2,-10*(e-1))),Z0={linear:at,easeIn:HD,easeInOut:WS,easeOut:UD,circIn:om,circInOut:GD,circOut:qS,backIn:im,backInOut:XD,backOut:YS,anticipate:qD},J0=e=>{if(Array.isArray(e)){Xf(e.length===4);const[t,r,n,o]=e;return ja(t,r,n,o)}else if(typeof e=="string")return Xf(Z0[e]!==void 0),Z0[e];return e},ra=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},_e=(e,t,r)=>e+(t-e)*r;function Ud(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function YD({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,i=0,s=0;if(!t)o=i=s=r;else{const a=r<.5?r*(1+t):r+t-r*t,l=2*r-a;o=Ud(l,a,e+1/3),i=Ud(l,a,e),s=Ud(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:n}}function $u(e,t){return r=>r>0?t:e}const Wd=(e,t,r)=>{const n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},KD=[Zf,lo,Wo],QD=e=>KD.find(t=>t.test(e));function ey(e){const t=QD(e);if(!t)return!1;let r=t.parse(e);return t===Wo&&(r=YD(r)),r}const ty=(e,t)=>{const r=ey(e),n=ey(t);if(!r||!n)return $u(e,t);const o={...r};return i=>(o.red=Wd(r.red,n.red,i),o.green=Wd(r.green,n.green,i),o.blue=Wd(r.blue,n.blue,i),o.alpha=_e(r.alpha,n.alpha,i),lo.transform(o))},th=new Set(["none","hidden"]);function ZD(e,t){return th.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function JD(e,t){return r=>_e(e,t,r)}function sm(e){return typeof e=="number"?JD:typeof e=="string"?Gp(e)?$u:ot.test(e)?ty:r5:Array.isArray(e)?KS:typeof e=="object"?ot.test(e)?ty:e5:$u}function KS(e,t){const r=[...e],n=r.length,o=e.map((i,s)=>sm(i)(i,t[s]));return i=>{for(let s=0;s{for(const i in n)r[i]=n[i](o);return r}}function t5(e,t){var r;const n=[],o={color:0,var:0,number:0};for(let i=0;i{const r=Nn.createTransformer(t),n=ta(e),o=ta(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?th.has(e)&&!o.values.length||th.has(t)&&!n.values.length?ZD(e,t):Zr(KS(t5(n,o),o.values),r):$u(e,t)};function QS(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?_e(e,t,r):sm(e)(e,t)}function n5(e,t,r){const n=[],o=r||QS,i=e.length-1;for(let s=0;st[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=n5(t,n,o),a=s.length,l=u=>{let c=0;if(a>1)for(;cl(On(e[0],e[i-1],u)):l}function i5(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=ra(0,t,n);e.push(_e(r,1,o))}}function s5(e){const t=[0];return i5(t,e.length-1),t}function a5(e,t){return e.map(r=>r*t)}function l5(e,t){return e.map(()=>t||WS).splice(0,e.length-1)}function Lu({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const o=WD(n)?n.map(J0):J0(n),i={done:!1,value:t[0]},s=a5(r&&r.length===t.length?r:s5(t),e),a=o5(s,t,{ease:Array.isArray(o)?o:l5(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const ry=2e4;function u5(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t=ry?1/0:t}const c5=e=>{const t=({timestamp:r})=>e(r);return{start:()=>ce.update(t,!0),stop:()=>on(t),now:()=>Ke.isProcessing?Ke.timestamp:tn.now()}},d5={decay:Q0,inertia:Q0,tween:Lu,keyframes:Lu,spring:HS},f5=e=>e/100;class am extends FS{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:l}=this.options;l&&l()};const{name:r,motionValue:n,element:o,keyframes:i}=this.options,s=o?.KeyframeResolver||tm,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new s(i,a,r,n,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:r="keyframes",repeat:n=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=d5[r]||Lu;let l,u;a!==Lu&&typeof t[0]!="number"&&(l=Zr(f5,QS(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});i==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=u5(c));const{calculatedDuration:d}=c,f=d+o,m=f*(n+1)-o;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,r=!1){const{resolved:n}=this;if(!n){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:d}=n;if(this.startTime===null)return i.next(0);const{delay:f,repeat:m,repeatType:y,repeatDelay:v,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),r?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const p=this.currentTime-f*(this.speed>=0?1:-1),h=this.speed>=0?p<0:p>c;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let g=this.currentTime,S=i;if(m){const A=Math.min(this.currentTime,c)/d;let M=Math.floor(A),I=A%1;!I&&A>=1&&(I=1),I===1&&M--,M=Math.min(M,m+1),!!(M%2)&&(y==="reverse"?(I=1-I,v&&(I-=v/d)):y==="mirror"&&(S=s)),g=On(0,1,I)*d}const C=h?{done:!1,value:l[0]}:S.next(g);a&&(C.value=a(C.value));let{done:P}=C;!h&&u!==null&&(P=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return T&&o!==void 0&&(C.value=zc(l,this.options,o)),x&&x(C.value),T&&this.finish(),C}get duration(){const{resolved:t}=this;return t?en(t.calculatedDuration):0}get time(){return en(this.currentTime)}set time(t){t=Jr(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 r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=en(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=c5,onPlay:r,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),r&&r();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=n??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 ZS=e=>Array.isArray(e)&&typeof e[0]=="number";function JS(e){return!!(!e||typeof e=="string"&&e in lm||ZS(e)||Array.isArray(e)&&e.every(JS))}const vs=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,lm={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vs([0,.65,.55,1]),circOut:vs([.55,0,1,.45]),backIn:vs([.31,.01,.66,-.59]),backOut:vs([.33,1.53,.69,.99])};function h5(e){return ex(e)||lm.easeOut}function ex(e){if(e)return ZS(e)?vs(e):Array.isArray(e)?e.map(h5):lm[e]}function p5(e,t,r,{delay:n=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:r};l&&(u.offset=l);const c=ex(a);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:n,duration:o,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const m5=zS(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Mu=10,g5=2e4;function y5(e){return e.type==="spring"||!JS(e.ease)}function v5(e,t){const r=new am({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let n={done:!1,value:e[0]};const o=[];let i=0;for(;!n.done&&ithis.onKeyframesResolved(s,a),r,n,o),this.resolver.scheduleResolve()}initPlayback(t,r){var n;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:u,startTime:c}=this.options;if(!(!((n=l.owner)===null||n===void 0)&&n.current))return!1;if(y5(this.options)){const{onComplete:f,onUpdate:m,motionValue:y,element:v,...x}=this.options,p=v5(t,x);t=p.keyframes,t.length===1&&(t[1]=t[0]),o=p.duration,i=p.times,s=p.ease,a="keyframes"}const d=p5(l.owner.current,u,t,{...this.options,duration:o,times:i,ease:s});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(d.timeline=this.pendingTimeline,this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(zc(t,this.options,r)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:o,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:r}=t;return en(r)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:r}=t;return en(r.currentTime||0)}set time(t){const{resolved:r}=this;if(!r)return;const{animation:n}=r;n.currentTime=Jr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:r}=t;return r.playbackRate}set speed(t){const{resolved:r}=this;if(!r)return;const{animation:n}=r;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:r}=t;return r.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:r}=t;return r.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:r}=this;if(!r)return at;const{animation:n}=r;n.timeline=t,n.onfinish=null}return at}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:r}=t;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:r}=t;r.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:r,keyframes:n,duration:o,type:i,ease:s,times:a}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:d,element:f,...m}=this.options,y=new am({...m,keyframes:n,duration:o,type:i,ease:s,times:a,isGenerator:!0}),v=Jr(this.time);u.setWithVelocity(y.sample(v-Mu).value,y.sample(v).value,Mu)}const{onStop:l}=this.options;l&&l(),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:r,name:n,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return m5()&&n&&gS.has(n)&&r&&r.owner&&r.owner.current instanceof HTMLElement&&!r.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function b5(e,t){let r;const n=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;r!==s&&e(s),r=s};return ce.update(n,!0),()=>on(n)}const S5=zS(()=>window.ScrollTimeline!==void 0);class x5{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,r){return Promise.all(this.animations).then(t).catch(r)}getAll(t){return this.animations[0][t]}setAll(t,r){for(let n=0;n{if(S5()&&n.attachTimeline)n.attachTimeline(t);else return n.pause(),b5(o=>{n.time=n.duration*o},t)});return()=>{r.forEach((n,o)=>{n&&n(),this.animations[o].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 r=0;rr[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const um=(e,t,r,n={},o,i,s)=>a=>{const l=em(n,e)||{},u=l.delay||n.delay||0;let{elapsed:c=0}=n;c=c-Jr(u);let d={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};eD(l)||(d={...d,...JN(e,d)}),d.duration&&(d.duration=Jr(d.duration)),d.repeatDelay&&(d.repeatDelay=Jr(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const m=zc(d.keyframes,l);if(m!==void 0)return ce.update(()=>{d.onUpdate(m),d.onComplete()}),new x5([])}return!i&&ny.supports(d)?new ny(d):new am(d)};class cm{constructor(){this.subscriptions=[]}add(t){return Oc(this.subscriptions,t),()=>Nc(this.subscriptions,t)}notify(t,r,n){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let i=0;i!isNaN(parseFloat(e));class tx{constructor(t,r={}){this.version="11.3.31",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,o=!0)=>{const i=tn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=tn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=w5(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new cm);const n=this.events[t].add(r);return t==="change"?()=>{n(),ce.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=tn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>oy)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,oy);return jS(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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 na(e,t){return new tx(e,t)}function k5(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,na(r))}function E5(e,t){const r=Bc(e,t);let{transitionEnd:n={},transition:o={},...i}=r||{};i={...i,...n};for(const s in i){const a=AN(i[s]);k5(e,s,a)}}function rx(e){return e.props[eS]}class C5 extends tx{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const r=yS(t);if(!r)return;const n=this.counts.get(r)||0;this.counts.set(r,n+1),n===0&&(this.output.push(r),this.update());let o=!1;return()=>{if(o)return;o=!0;const i=this.counts.get(r)-1;this.counts.set(r,i),i===0&&(Nc(this.output,r),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function T5(e){return!!(st(e)&&e.add)}function rh(e,t){var r;if(!e.applyWillChange)return;let n=e.getValue("willChange");if(!n&&!(!((r=e.props.style)===null||r===void 0)&&r.willChange)&&(n=new C5("auto"),e.addValue("willChange",n)),T5(n))return n.add(t)}function P5({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function nx(e,t,{delay:r=0,transitionOverride:n,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;n&&(s=n);const u=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),m=l[d];if(m===void 0||c&&P5(c,d))continue;const y={delay:r,...em(s||{},d)};let v=!1;if(window.MotionHandoffAnimation){const p=rx(e);if(p){const h=window.MotionHandoffAnimation(p,d,ce);h!==null&&(y.startTime=h,v=!0)}}f.start(um(d,f,m,e.shouldReduceMotion&&Fn.has(d)?{type:!1}:y,e,v,rh(e,d)));const x=f.animation;x&&u.push(x)}return a&&Promise.all(u).then(()=>{ce.update(()=>{a&&E5(e,a)})}),u}function nh(e,t,r={}){var n;const o=Bc(e,t,r.type==="exit"?(n=e.presenceContext)===null||n===void 0?void 0:n.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(i=r.transitionOverride);const s=o?()=>Promise.all(nx(e,o,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return _5(e,t,c+u,d,f,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,c]=l==="beforeChildren"?[s,a]:[a,s];return u().then(()=>c())}else return Promise.all([s(),a(r.delay)])}function _5(e,t,r=0,n=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*n,l=o===1?(u=0)=>u*n:(u=0)=>a-u*n;return Array.from(e.variantChildren).sort(A5).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(nh(u,t,{...i,delay:r+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function A5(e,t){return e.sortNodePosition(t)}function R5(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const o=t.map(i=>nh(e,i,r));n=Promise.all(o)}else if(typeof t=="string")n=nh(e,t,r);else{const o=typeof t=="function"?Bc(e,t,r.custom):t;n=Promise.all(nx(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}const I5=[...Fp].reverse(),$5=Fp.length;function L5(e){return t=>Promise.all(t.map(({animation:r,options:n})=>R5(e,r,n)))}function M5(e){let t=L5(e),r=iy(),n=!0;const o=l=>(u,c)=>{var d;const f=Bc(e,c,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:m,transitionEnd:y,...v}=f;u={...u,...v,...y}}return u};function i(l){t=l(e)}function s(l){const u=e.getProps(),c=e.getVariantContext(!0)||{},d=[],f=new Set;let m={},y=1/0;for(let x=0;x<$5;x++){const p=I5[x],h=r[p],g=u[p]!==void 0?u[p]:c[p],S=Js(g),C=p===l?h.isActive:null;C===!1&&(y=x);let P=g===c[p]&&g!==u[p]&&S;if(P&&n&&e.manuallyAnimateOnMount&&(P=!1),h.protectedKeys={...m},!h.isActive&&C===null||!g&&!h.prevProp||ea(g)||typeof g=="boolean")continue;let A=O5(h.prevProp,g)||p===l&&h.isActive&&!P&&S||x>y&&S,M=!1;const I=Array.isArray(g)?g:[g];let H=I.reduce(o(p),{});C===!1&&(H={});const{prevResolvedValues:ve={}}=h,he={...ve,...H},We=ue=>{A=!0,f.has(ue)&&(M=!0,f.delete(ue)),h.needsAnimating[ue]=!0;const q=e.getValue(ue);q&&(q.liveStyle=!1)};for(const ue in he){const q=H[ue],le=ve[ue];if(m.hasOwnProperty(ue))continue;let L=!1;qf(q)&&qf(le)?L=!ES(q,le):L=q!==le,L?q!=null?We(ue):f.add(ue):q!==void 0&&f.has(ue)?We(ue):h.protectedKeys[ue]=!0}h.prevProp=g,h.prevResolvedValues=H,h.isActive&&(m={...m,...H}),n&&e.blockInitialAnimation&&(A=!1),A&&(!P||M)&&d.push(...I.map(ue=>({animation:ue,options:{type:p}})))}if(f.size){const x={};f.forEach(p=>{const h=e.getBaseTarget(p),g=e.getValue(p);g&&(g.liveStyle=!0),x[p]=h??null}),d.push({animation:x})}let v=!!d.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),n=!1,v?t(d):Promise.resolve()}function a(l,u){var c;if(r[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var m;return(m=f.animationState)===null||m===void 0?void 0:m.setActive(l,u)}),r[l].isActive=u;const d=s(l);for(const f in r)r[f].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>r,reset:()=>{r=iy(),n=!0}}}function O5(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ES(t,e):!1}function Jn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iy(){return{animate:Jn(!0),whileInView:Jn(),whileHover:Jn(),whileTap:Jn(),whileDrag:Jn(),whileFocus:Jn(),exit:Jn()}}class N5 extends jn{constructor(t){super(t),t.animationState||(t.animationState=M5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ea(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let D5=0;class B5 extends jn{constructor(){super(...arguments),this.id=D5++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>r(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const z5={animation:{Feature:N5},exit:{Feature:B5}},sy=(e,t)=>Math.abs(e-t);function F5(e,t){const r=sy(e.x,t.x),n=sy(e.y,t.y);return Math.sqrt(r**2+n**2)}class ox{constructor(t,r,{transformPagePoint:n,contextWindow:o,dragSnapToOrigin:i=!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 d=Xd(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=F5(d.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:y}=d,{timestamp:v}=Ke;this.history.push({...y,timestamp:v});const{onStart:x,onMove:p}=this.handlers;f||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Gd(f,this.transformPagePoint),ce.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Xd(d.type==="pointercancel"?this.lastMoveEventInfo:Gd(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,x),y&&y(d,x)},!bS(t))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.contextWindow=o||window;const s=Dc(t),a=Gd(s,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ke;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=r;c&&c(t,Xd(a,this.history)),this.removeListeners=Zr(Qr(this.contextWindow,"pointermove",this.handlePointerMove),Qr(this.contextWindow,"pointerup",this.handlePointerUp),Qr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),on(this.updatePoint)}}function Gd(e,t){return t?{point:t(e.point)}:e}function ay(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xd({point:e},t){return{point:e,delta:ay(e,ix(t)),offset:ay(e,j5(t)),velocity:V5(t,.1)}}function j5(e){return e[0]}function ix(e){return e[e.length-1]}function V5(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const o=ix(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>Jr(t)));)r--;if(!n)return{x:0,y:0};const i=en(o.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const sx=1e-4,H5=1-sx,U5=1+sx,ax=.01,W5=0-ax,G5=0+ax;function zt(e){return e.max-e.min}function X5(e,t,r){return Math.abs(e-t)<=r}function ly(e,t,r,n=.5){e.origin=n,e.originPoint=_e(t.min,t.max,e.origin),e.scale=zt(r)/zt(t),e.translate=_e(r.min,r.max,e.origin)-e.originPoint,(e.scale>=H5&&e.scale<=U5||isNaN(e.scale))&&(e.scale=1),(e.translate>=W5&&e.translate<=G5||isNaN(e.translate))&&(e.translate=0)}function Ls(e,t,r,n){ly(e.x,t.x,r.x,n?n.originX:void 0),ly(e.y,t.y,r.y,n?n.originY:void 0)}function uy(e,t,r){e.min=r.min+t.min,e.max=e.min+zt(t)}function q5(e,t,r){uy(e.x,t.x,r.x),uy(e.y,t.y,r.y)}function cy(e,t,r){e.min=t.min-r.min,e.max=e.min+zt(t)}function Ms(e,t,r){cy(e.x,t.x,r.x),cy(e.y,t.y,r.y)}function Y5(e,{min:t,max:r},n){return t!==void 0&&er&&(e=n?_e(r,e,n.max):Math.min(e,r)),e}function dy(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function K5(e,{top:t,left:r,bottom:n,right:o}){return{x:dy(e.x,r,o),y:dy(e.y,t,n)}}function fy(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.minn?r=ra(t.min,t.max-n,e.min):n>o&&(r=ra(e.min,e.max-o,t.min)),On(0,1,r)}function J5(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const oh=.35;function eB(e=oh){return e===!1?e=0:e===!0&&(e=oh),{x:hy(e,"left","right"),y:hy(e,"top","bottom")}}function hy(e,t,r){return{min:py(e,t),max:py(e,r)}}function py(e,t){return typeof e=="number"?e:e[t]||0}const my=()=>({translate:0,scale:1,origin:0,originPoint:0}),Go=()=>({x:my(),y:my()}),gy=()=>({min:0,max:0}),Ne=()=>({x:gy(),y:gy()});function Kt(e){return[e("x"),e("y")]}function lx({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function tB({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rB(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function qd(e){return e===void 0||e===1}function ih({scale:e,scaleX:t,scaleY:r}){return!qd(e)||!qd(t)||!qd(r)}function to(e){return ih(e)||ux(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ux(e){return yy(e.x)||yy(e.y)}function yy(e){return e&&e!=="0%"}function Ou(e,t,r){const n=e-r,o=t*n;return r+o}function vy(e,t,r,n,o){return o!==void 0&&(e=Ou(e,o,n)),Ou(e,r,n)+t}function sh(e,t=0,r=1,n,o){e.min=vy(e.min,t,r,n,o),e.max=vy(e.max,t,r,n,o)}function cx(e,{x:t,y:r}){sh(e.x,t.translate,t.scale,t.originPoint),sh(e.y,r.translate,r.scale,r.originPoint)}const by=.999999999999,Sy=1.0000000000001;function nB(e,t,r,n=!1){const o=r.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;aby&&(t.x=1),t.yby&&(t.y=1)}function Xo(e,t){e.min=e.min+t,e.max=e.max+t}function xy(e,t,r,n,o=.5){const i=_e(e.min,e.max,o);sh(e,t,r,i,n)}function qo(e,t){xy(e.x,t.x,t.scaleX,t.scale,t.originX),xy(e.y,t.y,t.scaleY,t.scale,t.originY)}function dx(e,t){return lx(rB(e.getBoundingClientRect(),t))}function oB(e,t,r){const n=dx(e,r),{scroll:o}=t;return o&&(Xo(n.x,o.offset.x),Xo(n.y,o.offset.y)),n}const fx=({current:e})=>e?e.ownerDocument.defaultView:null,iB=new WeakMap;class sB{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ne(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const o=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Dc(c,"page").point)},i=(c,d)=>{var f;const{drag:m,dragPropagation:y,onDragStart:v}=this.getProps();if(m&&!y&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=xS(m),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Kt(p=>{let h=this.getAxisMotionValue(p).get()||0;if($r.test(h)){const{projection:g}=this.visualElement;if(g&&g.layout){const S=g.layout.layoutBox[p];S&&(h=zt(S)*(parseFloat(h)/100))}}this.originPoint[p]=h}),v&&ce.postRender(()=>v(c,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=rh(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},s=(c,d)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:y,onDrag:v}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:x}=d;if(m&&this.currentDirection===null){this.currentDirection=aB(x),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),v&&v(c,d)},a=(c,d)=>this.stop(c,d),l=()=>Kt(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ox(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:fx(this.visualElement)})}stop(t,r){var n;(n=this.removeWillChange)===null||n===void 0||n.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&ce.postRender(()=>s(t,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:o}=this.getProps();if(!n||!wl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=Y5(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:r,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;r&&Uo(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=K5(o.layoutBox,r):this.constraints=!1,this.elastic=eB(n),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Kt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=J5(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Uo(t))return!1;const n=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=oB(n,o.root,this.visualElement.getTransformPagePoint());let s=Q5(o.layout.layoutBox,i);if(r){const a=r(tB(s));this.hasMutatedConstraints=!!a,a&&(s=lx(a))}return s}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Kt(c=>{if(!wl(c,r,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});const f=o?200:1e6,m=o?40:1e7,y={type:"inertia",velocity:n?t[c]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,y)});return Promise.all(u).then(a)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return n.start(um(t,n,0,r,this.visualElement,!1,rh(this.visualElement,t)))}stopAnimation(){Kt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Kt(t=>{var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Kt(r=>{const{drag:n}=this.getProps();if(!wl(r,n,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(r);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[r];i.set(t[r]-_e(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!Uo(r)||!n||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Kt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=Z5({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Kt(s=>{if(!wl(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(_e(l,u,o[s]))})}addListeners(){if(!this.visualElement.current)return;iB.set(this.visualElement,this);const t=this.visualElement.current,r=Qr(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),n=()=>{const{dragConstraints:l}=this.getProps();Uo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",n);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ce.read(n);const s=Xr(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Kt(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),r(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=oh,dragMomentum:a=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function wl(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function aB(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class lB extends jn{constructor(t){super(t),this.removeGroupControls=at,this.removeListeners=at,this.controls=new sB(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||at}unmount(){this.removeGroupControls(),this.removeListeners()}}const wy=e=>(t,r)=>{e&&ce.postRender(()=>e(t,r))};class uB extends jn{constructor(){super(...arguments),this.removePointerDownListener=at}onPointerDown(t){this.session=new ox(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:wy(t),onStart:wy(r),onMove:n,onEnd:(i,s)=>{delete this.session,o&&ce.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=Qr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function cB(){const e=w.useContext(Da);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:r,register:n}=e,o=w.useId();w.useEffect(()=>n(o),[]);const i=w.useCallback(()=>r&&r(o),[o,r]);return!t&&r?[!1,i]:[!0]}function dB(){return fB(w.useContext(Da))}function fB(e){return e===null?!0:e.isPresent}const iu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ky(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const rs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(W.test(e))e=parseFloat(e);else return e;const r=ky(e,t.target.x),n=ky(e,t.target.y);return`${r}% ${n}%`}},hB={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,o=Nn.parse(e);if(o.length>5)return n;const i=Nn.createTransformer(e),s=typeof o[0]!="number"?1:0,a=r.x.scale*t.x,l=r.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const u=_e(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=u),typeof o[3+s]=="number"&&(o[3+s]/=u),i(o)}};class pB extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:i}=t;iN(mB),i&&(r.group&&r.group.add(i),n&&n.register&&o&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),iu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:o,isPresent:i}=this.props,s=n.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==r||r===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||ce.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),zp.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function hx(e){const[t,r]=cB(),n=w.useContext(Vp);return R.jsx(pB,{...e,layoutGroup:n,switchLayoutGroup:w.useContext(rS),isPresent:t,safeToRemove:r})}const mB={borderRadius:{...rs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rs,borderTopRightRadius:rs,borderBottomLeftRadius:rs,borderBottomRightRadius:rs,boxShadow:hB},px=["TopLeft","TopRight","BottomLeft","BottomRight"],gB=px.length,Ey=e=>typeof e=="string"?parseFloat(e):e,Cy=e=>typeof e=="number"||W.test(e);function yB(e,t,r,n,o,i){o?(e.opacity=_e(0,r.opacity!==void 0?r.opacity:1,vB(n)),e.opacityExit=_e(t.opacity!==void 0?t.opacity:1,0,bB(n))):i&&(e.opacity=_e(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let s=0;snt?1:r(ra(e,t,n))}function Py(e,t){e.min=t.min,e.max=t.max}function qt(e,t){Py(e.x,t.x),Py(e.y,t.y)}function _y(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ay(e,t,r,n,o){return e-=t,e=Ou(e,1/r,n),o!==void 0&&(e=Ou(e,1/o,n)),e}function SB(e,t=0,r=1,n=.5,o,i=e,s=e){if($r.test(t)&&(t=parseFloat(t),t=_e(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=_e(i.min,i.max,n);e===i&&(a-=t),e.min=Ay(e.min,t,r,a,o),e.max=Ay(e.max,t,r,a,o)}function Ry(e,t,[r,n,o],i,s){SB(e,t[r],t[n],t[o],t.scale,i,s)}const xB=["x","scaleX","originX"],wB=["y","scaleY","originY"];function Iy(e,t,r,n){Ry(e.x,t,xB,r?r.x:void 0,n?n.x:void 0),Ry(e.y,t,wB,r?r.y:void 0,n?n.y:void 0)}function $y(e){return e.translate===0&&e.scale===1}function gx(e){return $y(e.x)&&$y(e.y)}function Ly(e,t){return e.min===t.min&&e.max===t.max}function kB(e,t){return Ly(e.x,t.x)&&Ly(e.y,t.y)}function My(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yx(e,t){return My(e.x,t.x)&&My(e.y,t.y)}function Oy(e){return zt(e.x)/zt(e.y)}function Ny(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class EB{constructor(){this.members=[]}add(t){Oc(this.members,t),t.scheduleRender()}remove(t){if(Nc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(o=>t===o);if(r===0)return!1;let n;for(let o=r;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function CB(e,t,r){let n="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=r?.z||0;if((o||i||s)&&(n=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:m,skewY:y}=r;u&&(n=`perspective(${u}px) ${n}`),c&&(n+=`rotate(${c}deg) `),d&&(n+=`rotateX(${d}deg) `),f&&(n+=`rotateY(${f}deg) `),m&&(n+=`skewX(${m}deg) `),y&&(n+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(n+=`scale(${a}, ${l})`),n||"none"}const TB=(e,t)=>e.depth-t.depth;class PB{constructor(){this.children=[],this.isDirty=!1}add(t){Oc(this.children,t),this.isDirty=!0}remove(t){Nc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(TB),this.isDirty=!1,this.children.forEach(t)}}function _B(e,t){const r=tn.now(),n=({timestamp:o})=>{const i=o-r;i>=t&&(on(n),e(i-t))};return ce.read(n,!0),()=>on(n)}function AB(e){return e instanceof SVGElement&&e.tagName!=="svg"}function RB(e,t,r){const n=st(e)?e:na(e);return n.start(um("",n,t,r)),n.animation}const ro={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},bs=typeof window<"u"&&window.MotionDebug!==void 0,Yd=["","X","Y","Z"],IB={visibility:"hidden"},Dy=1e3;let $B=0;function Kd(e,t,r,n){const{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function vx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=rx(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",ce,!(o||i))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&vx(n)}function bx({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=$B++,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,bs&&(ro.totalNodes=ro.resolvedTargetDeltas=ro.recalculatedProjection=0),this.nodes.forEach(OB),this.nodes.forEach(FB),this.nodes.forEach(jB),this.nodes.forEach(NB),bs&&window.MotionDebug.record(ro)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=_B(f,250),iu.hasAnimatedSinceResize&&(iu.hasAnimatedSinceResize=!1,this.nodes.forEach(zy))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||GB,{onLayoutAnimationStart:x,onLayoutAnimationComplete:p}=c.getProps(),h=!this.targetLayout||!yx(this.targetLayout,y)||m,g=!f&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const S={...em(v,"layout"),onPlay:x,onComplete:p};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||zy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,on(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(VB),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&vx(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{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 l=0;l{const C=S/1e3;Fy(d.x,s.x,C),Fy(d.y,s.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ms(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),UB(this.relativeTarget,this.relativeTargetOrigin,f,C),g&&kB(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=Ne()),qt(g,this.relativeTarget)),v&&(this.animationValues=c,yB(c,u,this.latestValues,C,h,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(on(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ce.update(()=>{iu.hasAnimatedSinceResize=!0,this.currentAnimation=RB(0,Dy,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Dy),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&Sx(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ne();const d=zt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=zt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}qt(a,l),qo(a,c),Ls(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new EB),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Kd("z",s,u,this.animationValues);for(let c=0;c{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(By),this.root.sharedNodes.clear()}}}function LB(e){e.updateLayout()}function MB(e){var t;const r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:o}=e.layout,{animationType:i}=e.options,s=r.source!==e.layout.source;i==="size"?Kt(d=>{const f=s?r.measuredBox[d]:r.layoutBox[d],m=zt(f);f.min=n[d].min,f.max=f.min+m}):Sx(i,r.layoutBox,n)&&Kt(d=>{const f=s?r.measuredBox[d]:r.layoutBox[d],m=zt(n[d]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const a=Go();Ls(a,n,r.layoutBox);const l=Go();s?Ls(l,e.applyTransform(o,!0),r.measuredBox):Ls(l,n,r.layoutBox);const u=!gx(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:m}=d;if(f&&m){const y=Ne();Ms(y,r.layoutBox,f.layoutBox);const v=Ne();Ms(v,n,m.layoutBox),yx(y,v)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function OB(e){bs&&ro.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 NB(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function DB(e){e.clearSnapshot()}function By(e){e.clearMeasurements()}function BB(e){e.isLayoutDirty=!1}function zB(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function FB(e){e.resolveTargetDelta()}function jB(e){e.calcProjection()}function VB(e){e.resetSkewAndRotation()}function HB(e){e.removeLeadSnapshot()}function Fy(e,t,r){e.translate=_e(t.translate,0,r),e.scale=_e(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function jy(e,t,r,n){e.min=_e(t.min,r.min,n),e.max=_e(t.max,r.max,n)}function UB(e,t,r,n){jy(e.x,t.x,r.x,n),jy(e.y,t.y,r.y,n)}function WB(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const GB={duration:.45,ease:[.4,0,.1,1]},Vy=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hy=Vy("applewebkit/")&&!Vy("chrome/")?Math.round:at;function Uy(e){e.min=Hy(e.min),e.max=Hy(e.max)}function XB(e){Uy(e.x),Uy(e.y)}function Sx(e,t,r){return e==="position"||e==="preserve-aspect"&&!X5(Oy(t),Oy(r),.2)}function qB(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const YB=bx({attachResizeListener:(e,t)=>Xr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Qd={current:void 0},xx=bx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Qd.current){const e=new YB({});e.mount(window),e.setOptions({layoutScroll:!0}),Qd.current=e}return Qd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),KB={pan:{Feature:uB},drag:{Feature:lB,ProjectionNode:xx,MeasureLayout:hx}},ah={current:null},wx={current:!1};function QB(){if(wx.current=!0,!!Bp)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ah.current=e.matches;e.addListener(t),t()}else ah.current=!1}function ZB(e,t,r){for(const n in t){const o=t[n],i=r[n];if(st(o))e.addValue(n,o);else if(st(i))e.addValue(n,na(o,{owner:e}));else if(i!==o)if(e.hasValue(n)){const s=e.getValue(n);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(n);e.addValue(n,na(s!==void 0?s:o,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const Wy=new WeakMap,JB=[...AS,ot,Nn],e3=e=>JB.find(_S(e)),Gy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],t3=jp.length;class r3{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=tm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,ce.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Mc(r),this.isVariantNode=oS(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(r,{},this);for(const f in d){const m=d[f];l[f]!==void 0&&st(m)&&m.set(l[f],!1)}}mount(t){this.current=t,Wy.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((r,n)=>this.bindToMotionValue(n,r)),wx.current||QB(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ah.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Wy.delete(this.current),this.projection&&this.projection.unmount(),on(this.notifyUpdate),on(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 r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Fn.has(t),o=r.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ce.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),i(),s&&s(),r.owner&&r.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 Ei){const r=Ei[t];if(!r)continue;const{isEnabled:n,Feature:o}=r;if(!this.features[t]&&o&&n(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ne()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;nr.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=na(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var n;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(TS(o)||CS(o))?o=parseFloat(o):!e3(o)&&Nn.test(r)&&(o=DS(t,r)),this.setBaseTarget(t,st(o)?o.get():o)),st(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const s=Zp(this.props,n,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);s&&(o=s[t])}if(n&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!st(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new cm),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class kx extends r3{constructor(){super(...arguments),this.KeyframeResolver=BS}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}}function n3(e){return window.getComputedStyle(e)}class o3 extends kx{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=fS}readValueFromInstance(t,r){if(Fn.has(r)){const n=nm(r);return n&&n.default||0}else{const n=n3(t),o=(lS(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return dx(t,r)}build(t,r,n){Xp(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return Qp(t,r,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;st(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class i3 extends kx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ne}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Fn.has(r)){const n=nm(r);return n&&n.default||0}return r=hS.has(r)?r:Lc(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return mS(t,r,n)}build(t,r,n){Yp(t,r,this.isSVGTag,n.transformTemplate)}renderInstance(t,r,n,o){pS(t,r,n,o)}mount(t){this.isSVGTag=Kp(t.tagName),super.mount(t)}}const s3=(e,t)=>Hp(e)?new i3(t):new o3(t,{allowProjection:e!==w.Fragment}),a3={layout:{ProjectionNode:xx,MeasureLayout:hx}},l3={...z5,...qN,...KB,...a3},Ex=nN((e,t)=>ON(e,t,l3,s3));class u3 extends w.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function c3({children:e,isPresent:t}){const r=w.useId(),n=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=w.useContext(Dp);return w.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:u}=o.current;if(t||!n.current||!s||!a)return;n.current.dataset.motionPopId=r;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` + [data-motion-pop-id="${r}"] { + position: absolute !important; + width: ${s}px !important; + height: ${a}px !important; + top: ${l}px !important; + left: ${u}px !important; + } + `),()=>{document.head.removeChild(c)}},[t]),R.jsx(u3,{isPresent:t,childRef:n,sizeRef:o,children:w.cloneElement(e,{ref:n})})}const d3=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=Jp(f3),l=w.useId(),u=w.useMemo(()=>({id:l,initial:t,isPresent:r,custom:o,onExitComplete:c=>{a.set(c,!0);for(const d of a.values())if(!d)return;n&&n()},register:c=>(a.set(c,!1),()=>a.delete(c))}),i?[Math.random()]:[r]);return w.useMemo(()=>{a.forEach((c,d)=>a.set(d,!1))},[r]),w.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),s==="popLayout"&&(e=R.jsx(c3,{isPresent:r,children:e})),R.jsx(Da.Provider,{value:u,children:e})};function f3(){return new Map}const kl=e=>e.key||"";function Xy(e){const t=[];return w.Children.forEach(e,r=>{w.isValidElement(r)&&t.push(r)}),t}const Cx=({children:e,exitBeforeEnter:t,custom:r,initial:n=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{const a=w.useMemo(()=>Xy(e),[e]),l=a.map(kl),u=w.useRef(!0),c=w.useRef(a),d=Jp(()=>new Map),[f,m]=w.useState(a),[y,v]=w.useState(a);Z1(()=>{u.current=!1,c.current=a;for(let h=0;h{const g=kl(h),S=a===y||l.includes(g),C=()=>{if(d.has(g))d.set(g,!0);else return;let P=!0;d.forEach(T=>{T||(P=!1)}),P&&(p?.(),v(c.current),o&&o())};return R.jsx(d3,{isPresent:S,initial:!u.current||n?void 0:!1,custom:S?void 0:r,presenceAffectsLayout:i,mode:s,onExitComplete:S?void 0:C,children:h},g)})})},h3=(e,t)=>e.find(r=>r.id===t);function qy(e,t){const r=Tx(e,t),n=r?e[r].findIndex(o=>o.id===t):-1;return{position:r,index:n}}function Tx(e,t){for(const[r,n]of Object.entries(e))if(h3(n,t))return r}function p3(e){const t=e.includes("right"),r=e.includes("left");let n="center";return t&&(n="flex-end"),r&&(n="flex-start"),{display:"flex",flexDirection:"column",alignItems:n}}function m3(e){const r=e==="top"||e==="bottom"?"0 auto":void 0,n=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,o=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,i=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",s=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:r,top:n,bottom:o,right:i,left:s}}var g3=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,y3=N1(function(e){return g3.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),v3=y3,b3=function(t){return t!=="theme"},Yy=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?v3:b3},Ky=function(t,r,n){var o;if(r){var i=r.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},S3=!1,x3=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Lp(r,n,o),G1(function(){return Mp(r,n,o)}),null},w3=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,i,s;r!==void 0&&(i=r.label,s=r.target);var a=Ky(t,r,n),l=a||Yy(o),u=!l("as");return function(){var c=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var f=c.length,m=1;mt=>{const{theme:r,css:n,__css:o,sx:i,...s}=t,[a]=t2(s,j2),l=Ar(e,t),u=FP({},o,l,vp(a),i),c=m1(u)(t.theme);return n?[c,n]:c};function Zd(e,t){const{baseStyle:r,...n}=t??{};n.shouldForwardProp||(n.shouldForwardProp=T3);const o=_3({baseStyle:r}),i=P3(e,n)(o);return w.forwardRef(function(l,u){const{children:c,...d}=l,{colorMode:f,forced:m}=Ic(),y=m?f:void 0;return w.createElement(i,{ref:u,"data-theme":y,...d},c)})}function A3(){const e=new Map;return new Proxy(Zd,{apply(t,r,n){return Zd(...n)},get(t,r){return e.has(r)||e.set(r,Zd(r)),e.get(r)}})}const Oe=A3(),R3={initial:e=>{const{position:t}=e,r=["top","bottom"].includes(t)?"y":"x";let n=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(n=1),{opacity:0,[r]:n*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},Px=w.memo(e=>{const{id:t,message:r,onCloseComplete:n,onRequestRemove:o,requestClose:i=!1,position:s="bottom",duration:a=5e3,containerStyle:l,motionVariants:u=R3,toastSpacing:c="0.5rem"}=e,[d,f]=w.useState(a),m=dB();a0(()=>{m||n?.()},[m]),a0(()=>{f(a)},[a]);const y=()=>f(null),v=()=>f(a),x=()=>{m&&o()};w.useEffect(()=>{m&&i&&o()},[m,i,o]),i2(x,d);const p=w.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:c,...l}),[l,c]),h=w.useMemo(()=>p3(s),[s]);return R.jsx(Ex.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:y,onHoverEnd:v,custom:{position:s},style:h,children:R.jsx(Oe.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:p,children:Ar(r,{id:t,onClose:x})})})});Px.displayName="ToastComponent";function Sr(e){return w.forwardRef(e)}var I3=typeof Element<"u",$3=typeof Map=="function",L3=typeof Set=="function",M3=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function su(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!su(e[n],t[n]))return!1;return!0}var i;if($3&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;for(i=e.entries();!(n=i.next()).done;)if(!su(n.value[1],t.get(n.value[0])))return!1;return!0}if(L3&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(M3&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;if(I3&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((o[n]==="_owner"||o[n]==="__v"||o[n]==="__o")&&e.$$typeof)&&!su(e[o[n]],t[o[n]]))return!1;return!0}return e!==e&&t!==t}var O3=function(t,r){try{return su(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const N3=ip(O3);function dm(){const e=w.useContext(wi);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function D3(){const e=Ic(),t=dm();return{...e,theme:t}}function B3(e,t,r){if(t==null)return t;const n=o=>e.__cssMap?.[o]?.value;return n(t)??n(r)??r}function IV(e,t,r){const n=dm();return z3(e,t,r)(n)}function z3(e,t,r){const n=Array.isArray(t)?t:[t],o=Array.isArray(r)?r:[r];return i=>{const s=o.filter(Boolean),a=n.map((l,u)=>{const c=`${e}.${l}`;return B3(i,c,s[u]??l)});return Array.isArray(t)?a:a[0]}}function _x(e,t={}){const{styleConfig:r,...n}=t,{theme:o,colorMode:i}=D3(),s=e?l1(o,`components.${e}`):void 0,a=r||s,l=Jt({theme:o,colorMode:i},a?.defaultProps??{},vp(bp(n,["children"])),(c,d)=>c?void 0:d),u=w.useRef({});if(a){const d=Z2(a)(l);N3(u.current,d)||(u.current=d)}return u.current}function Vi(e,t={}){return _x(e,t)}function F3(e,t={}){return _x(e,t)}const Qy={path:R.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[R.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),R.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),R.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Va=Sr((e,t)=>{const{as:r,viewBox:n,color:o="currentColor",focusable:i=!1,children:s,className:a,__css:l,...u}=e,c=dn("chakra-icon",a),d=Vi("Icon",e),f={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...l,...d},m={ref:t,focusable:i,className:c,__css:f},y=n??Qy.viewBox;if(r&&typeof r!="string")return R.jsx(Oe.svg,{as:r,...m,...u});const v=s??Qy.path;return R.jsx(Oe.svg,{verticalAlign:"middle",viewBox:y,...m,...u,children:v})});Va.displayName="Icon";function j3(e){return R.jsx(Va,{viewBox:"0 0 24 24",...e,children:R.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function V3(e){return R.jsx(Va,{viewBox:"0 0 24 24",...e,children:R.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function Zy(e){return R.jsx(Va,{viewBox:"0 0 24 24",...e,children:R.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}const H3=_O({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Ax=Sr((e,t)=>{const r=Vi("Spinner",e),{label:n="Loading...",thickness:o="2px",speed:i="0.45s",emptyColor:s="transparent",className:a,...l}=zi(e),u=dn("chakra-spinner",a),c={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:o,borderBottomColor:s,borderLeftColor:s,animation:`${H3} ${i} linear infinite`,...r};return R.jsx(Oe.div,{ref:t,__css:c,className:u,...l,children:n&&R.jsx(Oe.span,{srOnly:!0,children:n})})});Ax.displayName="Spinner";const[U3,fm]=Bi({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[W3,hm]=Bi({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Rx={info:{icon:V3,colorScheme:"blue"},warning:{icon:Zy,colorScheme:"orange"},success:{icon:j3,colorScheme:"green"},error:{icon:Zy,colorScheme:"red"},loading:{icon:Ax,colorScheme:"blue"}};function G3(e){return Rx[e].colorScheme}function X3(e){return Rx[e].icon}const pm=Sr(function(t,r){const{status:n="info",addRole:o=!0,...i}=zi(t),s=t.colorScheme??G3(n),a=F3("Alert",{...t,colorScheme:s}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...a.container};return R.jsx(U3,{value:{status:n},children:R.jsx(W3,{value:a,children:R.jsx(Oe.div,{"data-status":n,role:o?"alert":void 0,ref:r,...i,className:dn("chakra-alert",t.className),__css:l})})})});pm.displayName="Alert";function mm(e){const{status:t}=fm(),r=X3(t),n=hm(),o=t==="loading"?n.spinner:n.icon;return R.jsx(Oe.span,{display:"inherit","data-status":t,...e,className:dn("chakra-alert__icon",e.className),__css:o,children:e.children||R.jsx(r,{h:"100%",w:"100%"})})}mm.displayName="AlertIcon";const gm=Sr(function(t,r){const n=hm(),{status:o}=fm();return R.jsx(Oe.div,{ref:r,"data-status":o,...t,className:dn("chakra-alert__title",t.className),__css:n.title})});gm.displayName="AlertTitle";const ym=Sr(function(t,r){const{status:n}=fm(),o=hm(),i={display:"inline",...o.description};return R.jsx(Oe.div,{ref:r,"data-status":n,...t,className:dn("chakra-alert__desc",t.className),__css:i})});ym.displayName="AlertDescription";function q3(e){return R.jsx(Va,{focusable:"false","aria-hidden":!0,...e,children:R.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}const Ix=Sr(function(t,r){const n=Vi("CloseButton",t),{children:o,isDisabled:i,__css:s,...a}=zi(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return R.jsx(Oe.button,{type:"button","aria-label":"Close",ref:r,disabled:i,__css:{...l,...n,...s},...a,children:o||R.jsx(q3,{width:"1em",height:"1em"})})});Ix.displayName="CloseButton";const Y3=e=>{const{status:t,variant:r="solid",id:n,title:o,isClosable:i,onClose:s,description:a,colorScheme:l,icon:u}=e,c=n?{root:`toast-${n}`,title:`toast-${n}-title`,description:`toast-${n}-description`}:void 0;return R.jsxs(pm,{addRole:!1,status:t,variant:r,id:c?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[R.jsx(mm,{children:u}),R.jsxs(Oe.div,{flex:"1",maxWidth:"100%",children:[o&&R.jsx(gm,{id:c?.title,children:o}),a&&R.jsx(ym,{id:c?.description,display:"block",children:a})]}),i&&R.jsx(Ix,{size:"sm",onClick:s,position:"absolute",insetEnd:1,top:1})]})};function K3(e={}){const{render:t,toastComponent:r=Y3}=e;return o=>typeof t=="function"?t({...o,...e}):R.jsx(r,{...o,...e})}const Q3={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Os=Z3(Q3);function Z3(e){let t=e;const r=new Set,n=o=>{t=o(t),r.forEach(i=>i())};return{getState:()=>t,subscribe:o=>(r.add(o),()=>{n(()=>e),r.delete(o)}),removeToast:(o,i)=>{n(s=>({...s,[i]:s[i].filter(a=>a.id!=o)}))},notify:(o,i)=>{const s=J3(o,i),{position:a,id:l}=s;return n(u=>{const d=a.includes("top")?[s,...u[a]??[]]:[...u[a]??[],s];return{...u,[a]:d}}),l},update:(o,i)=>{o&&n(s=>{const a={...s},{position:l,index:u}=qy(a,o);return l&&u!==-1&&(a[l][u]={...a[l][u],...i,message:K3(i)}),a})},closeAll:({positions:o}={})=>{n(i=>(o??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=i[u].map(c=>({...c,requestClose:!0})),l),{...i}))},close:o=>{n(i=>{const s=Tx(i,o);return s?{...i,[s]:i[s].map(a=>a.id==o?{...a,requestClose:!0}:a)}:i})},isActive:o=>!!qy(Os.getState(),o).position}}let Jy=0;function J3(e,t={}){Jy+=1;const r=t.id??Jy,n=t.position??"bottom";return{id:r,message:e,position:n,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Os.removeToast(String(r),n),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var $x={exports:{}},Ht={},Lx={exports:{}},Mx={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(e){function t(L,D){var U=L.length;L.push(D);e:for(;0>>1,te=L[ee];if(0>>1;eeo(be,U))$eo(ut,be)?(L[ee]=ut,L[$e]=U,ee=$e):(L[ee]=be,L[Ie]=U,ee=Ie);else if($eo(ut,U))L[ee]=ut,L[$e]=U,ee=$e;else break e}}return D}function o(L,D){var U=L.sortIndex-D.sortIndex;return U!==0?U:L.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,m=!1,y=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(L){for(var D=r(u);D!==null;){if(D.callback===null)n(u);else if(D.startTime<=L)n(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=r(u)}}function S(L){if(v=!1,g(L),!y)if(r(l)!==null)y=!0,q(C);else{var D=r(u);D!==null&&le(S,D.startTime-L)}}function C(L,D){y=!1,v&&(v=!1,p(A),A=-1),m=!0;var U=f;try{for(g(D),d=r(l);d!==null&&(!(d.expirationTime>D)||L&&!H());){var ee=d.callback;if(typeof ee=="function"){d.callback=null,f=d.priorityLevel;var te=ee(d.expirationTime<=D);D=e.unstable_now(),typeof te=="function"?d.callback=te:d===r(l)&&n(l),g(D)}else n(l);d=r(l)}if(d!==null)var G=!0;else{var Ie=r(u);Ie!==null&&le(S,Ie.startTime-D),G=!1}return G}finally{d=null,f=U,m=!1}}var P=!1,T=null,A=-1,M=5,I=-1;function H(){return!(e.unstable_now()-IL||125ee?(L.sortIndex=U,t(u,L),r(l)===null&&L===r(u)&&(v?(p(A),A=-1):v=!0,le(S,U-ee))):(L.sortIndex=te,t(l,L),y||m||(y=!0,q(C))),L},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(L){var D=f;return function(){var U=f;f=D;try{return L.apply(this,arguments)}finally{f=U}}}})(Mx);Lx.exports=Mx;var ez=Lx.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var tz=w,Ft=ez;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uh=Object.prototype.hasOwnProperty,rz=/^[: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]*$/,ev={},tv={};function nz(e){return uh.call(tv,e)?!0:uh.call(ev,e)?!1:rz.test(e)?tv[e]=!0:(ev[e]=!0,!1)}function oz(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function iz(e,t,r,n){if(t===null||typeof t>"u"||oz(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function St(e,t,r,n,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){et[e]=new St(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];et[t]=new St(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){et[e]=new St(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){et[e]=new St(e,2,!1,e,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(e){et[e]=new St(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){et[e]=new St(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){et[e]=new St(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){et[e]=new St(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){et[e]=new St(e,5,!1,e.toLowerCase(),null,!1,!1)});var vm=/[\-:]([a-z])/g;function bm(e){return e[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(e){var t=e.replace(vm,bm);et[t]=new St(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(vm,bm);et[t]=new St(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(vm,bm);et[t]=new St(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){et[e]=new St(e,1,!1,e.toLowerCase(),null,!1,!1)});et.xlinkHref=new St("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){et[e]=new St(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sm(e,t,r,n){var o=et.hasOwnProperty(t)?et[t]:null;(o!==null?o.type!==0:n||!(2a||o[s]!==i[a]){var l=` +`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{ef=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ss(e):""}function sz(e){switch(e.tag){case 5:return Ss(e.type);case 16:return Ss("Lazy");case 13:return Ss("Suspense");case 19:return Ss("SuspenseList");case 0:case 2:case 15:return e=tf(e.type,!1),e;case 11:return e=tf(e.type.render,!1),e;case 1:return e=tf(e.type,!0),e;default:return""}}function hh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ko:return"Fragment";case Yo:return"Portal";case ch:return"Profiler";case xm:return"StrictMode";case dh:return"Suspense";case fh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Dx:return(e.displayName||"Context")+".Consumer";case Nx:return(e._context.displayName||"Context")+".Provider";case wm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case km:return t=e.displayName||null,t!==null?t:hh(e.type)||"Memo";case Sn:t=e._payload,e=e._init;try{return hh(e(t))}catch{}}return null}function az(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return hh(t);case 8:return t===xm?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Dn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lz(e){var t=zx(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){n=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Cl(e){e._valueTracker||(e._valueTracker=lz(e))}function Fx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=zx(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Nu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ph(e,t){var r=t.checked;return Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function nv(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Dn(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function jx(e,t){t=t.checked,t!=null&&Sm(e,"checked",t,!1)}function mh(e,t){jx(e,t);var r=Dn(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?gh(e,t.type,r):t.hasOwnProperty("defaultValue")&&gh(e,t.type,Dn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ov(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function gh(e,t,r){(t!=="number"||Nu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var xs=Array.isArray;function fi(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Tl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ia(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ns={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},uz=["Webkit","ms","Moz","O"];Object.keys(Ns).forEach(function(e){uz.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ns[t]=Ns[e]})});function Wx(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ns.hasOwnProperty(e)&&Ns[e]?(""+t).trim():t+"px"}function Gx(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=Wx(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var cz=Re({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 bh(e,t){if(t){if(cz[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function Sh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 xh=null;function Em(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wh=null,hi=null,pi=null;function av(e){if(e=Wa(e)){if(typeof wh!="function")throw Error($(280));var t=e.stateNode;t&&(t=Uc(t),wh(e.stateNode,e.type,t))}}function Xx(e){hi?pi?pi.push(e):pi=[e]:hi=e}function qx(){if(hi){var e=hi,t=pi;if(pi=hi=null,av(e),t)for(e=0;e>>=0,e===0?32:31-(xz(e)/wz|0)|0}var Pl=64,_l=4194304;function ws(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Fu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,s=r&268435455;if(s!==0){var a=s&~o;a!==0?n=ws(a):(i&=s,i!==0&&(n=ws(i)))}else s=r&~o,s!==0?n=ws(s):i!==0&&(n=ws(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Ha(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gr(t),e[t]=r}function Tz(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Bs),gv=" ",yv=!1;function pw(e,t){switch(e){case"keyup":return e4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qo=!1;function r4(e,t){switch(e){case"compositionend":return mw(t);case"keypress":return t.which!==32?null:(yv=!0,gv);case"textInput":return e=t.data,e===gv&&yv?null:e;default:return null}}function n4(e,t){if(Qo)return e==="compositionend"||!$m&&pw(e,t)?(e=fw(),lu=Am=Cn=null,Qo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=xv(r)}}function bw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sw(){for(var e=window,t=Nu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Nu(e.document)}return t}function Lm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function f4(e){var t=Sw(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&bw(r.ownerDocument.documentElement,r)){if(n!==null&&Lm(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=wv(r,i);var s=wv(r,n);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Zo=null,_h=null,Fs=null,Ah=!1;function kv(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ah||Zo==null||Zo!==Nu(n)||(n=Zo,"selectionStart"in n&&Lm(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Fs&&da(Fs,n)||(Fs=n,n=Hu(_h,"onSelect"),0ti||(e.current=Oh[ti],Oh[ti]=null,ti--)}function ge(e,t){ti++,Oh[ti]=e.current,e.current=t}var Bn={},lt=Hn(Bn),Ct=Hn(!1),wo=Bn;function Pi(e,t){var r=e.type.contextTypes;if(!r)return Bn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Tt(e){return e=e.childContextTypes,e!=null}function Wu(){ke(Ct),ke(lt)}function Rv(e,t,r){if(lt.current!==Bn)throw Error($(168));ge(lt,t),ge(Ct,r)}function Aw(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error($(108,az(e)||"Unknown",o));return Re({},r,n)}function Gu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bn,wo=lt.current,ge(lt,e),ge(Ct,Ct.current),!0}function Iv(e,t,r){var n=e.stateNode;if(!n)throw Error($(169));r?(e=Aw(e,t,wo),n.__reactInternalMemoizedMergedChildContext=e,ke(Ct),ke(lt),ge(lt,e)):ke(Ct),ge(Ct,r)}var jr=null,Wc=!1,gf=!1;function Rw(e){jr===null?jr=[e]:jr.push(e)}function E4(e){Wc=!0,Rw(e)}function Un(){if(!gf&&jr!==null){gf=!0;var e=0,t=de;try{var r=jr;for(de=1;e>=s,o-=s,qr=1<<32-gr(t)+o|r<A?(M=T,T=null):M=T.sibling;var I=f(p,T,g[A],S);if(I===null){T===null&&(T=M);break}e&&T&&I.alternate===null&&t(p,T),h=i(I,h,A),P===null?C=I:P.sibling=I,P=I,T=M}if(A===g.length)return r(p,T),Te&&no(p,A),C;if(T===null){for(;AA?(M=T,T=null):M=T.sibling;var H=f(p,T,I.value,S);if(H===null){T===null&&(T=M);break}e&&T&&H.alternate===null&&t(p,T),h=i(H,h,A),P===null?C=H:P.sibling=H,P=H,T=M}if(I.done)return r(p,T),Te&&no(p,A),C;if(T===null){for(;!I.done;A++,I=g.next())I=d(p,I.value,S),I!==null&&(h=i(I,h,A),P===null?C=I:P.sibling=I,P=I);return Te&&no(p,A),C}for(T=n(p,T);!I.done;A++,I=g.next())I=m(T,p,A,I.value,S),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?A:I.key),h=i(I,h,A),P===null?C=I:P.sibling=I,P=I);return e&&T.forEach(function(ve){return t(p,ve)}),Te&&no(p,A),C}function x(p,h,g,S){if(typeof g=="object"&&g!==null&&g.type===Ko&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case El:e:{for(var C=g.key,P=h;P!==null;){if(P.key===C){if(C=g.type,C===Ko){if(P.tag===7){r(p,P.sibling),h=o(P,g.props.children),h.return=p,p=h;break e}}else if(P.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Sn&&Mv(C)===P.type){r(p,P.sibling),h=o(P,g.props),h.ref=ls(p,P,g),h.return=p,p=h;break e}r(p,P);break}else t(p,P);P=P.sibling}g.type===Ko?(h=vo(g.props.children,p.mode,S,g.key),h.return=p,p=h):(S=gu(g.type,g.key,g.props,null,p.mode,S),S.ref=ls(p,h,g),S.return=p,p=S)}return s(p);case Yo:e:{for(P=g.key;h!==null;){if(h.key===P)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){r(p,h.sibling),h=o(h,g.children||[]),h.return=p,p=h;break e}else{r(p,h);break}else t(p,h);h=h.sibling}h=Ef(g,p.mode,S),h.return=p,p=h}return s(p);case Sn:return P=g._init,x(p,h,P(g._payload),S)}if(xs(g))return y(p,h,g,S);if(ns(g))return v(p,h,g,S);Ol(p,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,h!==null&&h.tag===6?(r(p,h.sibling),h=o(h,g),h.return=p,p=h):(r(p,h),h=kf(g,p.mode,S),h.return=p,p=h),s(p)):r(p,h)}return x}var Ai=Mw(!0),Ow=Mw(!1),Yu=Hn(null),Ku=null,oi=null,Dm=null;function Bm(){Dm=oi=Ku=null}function zm(e){var t=Yu.current;ke(Yu),e._currentValue=t}function Bh(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function gi(e,t){Ku=e,Dm=oi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Et=!0),e.firstContext=null)}function nr(e){var t=e._currentValue;if(Dm!==e)if(e={context:e,memoizedValue:t,next:null},oi===null){if(Ku===null)throw Error($(308));oi=e,Ku.dependencies={lanes:0,firstContext:e}}else oi=oi.next=e;return t}var co=null;function Fm(e){co===null?co=[e]:co.push(e)}function Nw(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,Fm(t)):(r.next=o.next,o.next=r),t.interleaved=r,ln(e,n)}function ln(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var xn=!1;function jm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Dw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function rn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function In(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,J&2){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,ln(e,r)}return o=n.interleaved,o===null?(t.next=t,Fm(n)):(t.next=o.next,o.next=t),n.interleaved=t,ln(e,r)}function cu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Tm(e,r)}}function Ov(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=s:i=i.next=s,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Qu(e,t,r,n){var o=e.updateQueue;xn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,c=u=l=null,a=i;do{var f=a.lane,m=a.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,v=a;switch(f=t,m=r,v.tag){case 1:if(y=v.payload,typeof y=="function"){d=y.call(m,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,f=typeof y=="function"?y.call(m,d,f):y,f==null)break e;d=Re({},d,f);break e;case 2:xn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=m,l=d):c=c.next=m,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Co|=s,e.lanes=s,e.memoizedState=d}}function Nv(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=vf.transition;vf.transition={};try{e(!1),t()}finally{de=r,vf.transition=n}}function ek(){return or().memoizedState}function _4(e,t,r){var n=Ln(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},tk(e))rk(t,r);else if(r=Nw(e,t,r,n),r!==null){var o=vt();yr(r,e,n,o),nk(r,t,n)}}function A4(e,t,r){var n=Ln(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(tk(e))rk(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,r);if(o.hasEagerState=!0,o.eagerState=a,vr(a,s)){var l=t.interleaved;l===null?(o.next=o,Fm(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=Nw(e,t,o,n),r!==null&&(o=vt(),yr(r,e,n,o),nk(r,t,n))}}function tk(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function rk(e,t){js=Ju=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function nk(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Tm(e,r)}}var ec={readContext:nr,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useInsertionEffect:tt,useLayoutEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useMutableSource:tt,useSyncExternalStore:tt,useId:tt,unstable_isNewReconciler:!1},R4={readContext:nr,useCallback:function(e,t){return Er().memoizedState=[e,t===void 0?null:t],e},useContext:nr,useEffect:Bv,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,fu(4194308,4,Yw.bind(null,t,e),r)},useLayoutEffect:function(e,t){return fu(4194308,4,e,t)},useInsertionEffect:function(e,t){return fu(4,2,e,t)},useMemo:function(e,t){var r=Er();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Er();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=_4.bind(null,Ae,e),[n.memoizedState,e]},useRef:function(e){var t=Er();return e={current:e},t.memoizedState=e},useState:Dv,useDebugValue:Ym,useDeferredValue:function(e){return Er().memoizedState=e},useTransition:function(){var e=Dv(!1),t=e[0];return e=P4.bind(null,e[1]),Er().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ae,o=Er();if(Te){if(r===void 0)throw Error($(407));r=r()}else{if(r=t(),Xe===null)throw Error($(349));Eo&30||jw(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,Bv(Hw.bind(null,n,i,e),[e]),n.flags|=2048,ba(9,Vw.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Er(),t=Xe.identifierPrefix;if(Te){var r=Yr,n=qr;r=(n&~(1<<32-gr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ya++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[_r]=t,e[pa]=n,hk(e,t,!1,!1),t.stateNode=e;e:{switch(s=Sh(r,n),r){case"dialog":Se("cancel",e),Se("close",e),o=n;break;case"iframe":case"object":case"embed":Se("load",e),o=n;break;case"video":case"audio":for(o=0;o$i&&(t.flags|=128,n=!0,us(i,!1),t.lanes=4194304)}else{if(!n)if(e=Zu(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),us(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Te)return rt(t),null}else 2*De()-i.renderingStartTime>$i&&r!==1073741824&&(t.flags|=128,n=!0,us(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(r=i.last,r!==null?r.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=De(),t.sibling=null,r=Pe.current,ge(Pe,n?r&1|2:r&1),t):(rt(t),null);case 22:case 23:return tg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Mt&1073741824&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function B4(e,t){switch(Om(t),t.tag){case 1:return Tt(t.type)&&Wu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ri(),ke(Ct),ke(lt),Um(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Hm(t),null;case 13:if(ke(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));_i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(Pe),null;case 4:return Ri(),null;case 10:return zm(t.type._context),null;case 22:case 23:return tg(),null;case 24:return null;default:return null}}var Dl=!1,it=!1,z4=typeof WeakSet=="function"?WeakSet:Set,O=null;function ii(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Me(e,t,n)}else r.current=null}function Xh(e,t,r){try{r()}catch(n){Me(e,t,n)}}var Yv=!1;function F4(e,t){if(Rh=ju,e=Sw(),Lm(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var m;d!==r||o!==0&&d.nodeType!==3||(a=s+o),d!==i||n!==0&&d.nodeType!==3||(l=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(m=d.firstChild)!==null;)f=d,d=m;for(;;){if(d===e)break t;if(f===r&&++u===o&&(a=s),f===i&&++c===n&&(l=s),(m=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=m}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Ih={focusedElem:e,selectionRange:r},ju=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,x=y.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:fr(t.type,v),x);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(S){Me(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return y=Yv,Yv=!1,y}function Vs(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Xh(t,r,i)}o=o.next}while(o!==n)}}function qc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function qh(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function gk(e){var t=e.alternate;t!==null&&(e.alternate=null,gk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_r],delete t[pa],delete t[Mh],delete t[w4],delete t[k4])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function yk(e){return e.tag===5||e.tag===3||e.tag===4}function Kv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yk(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yh(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Uu));else if(n!==4&&(e=e.child,e!==null))for(Yh(e,t,r),e=e.sibling;e!==null;)Yh(e,t,r),e=e.sibling}function Kh(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Kh(e,t,r),e=e.sibling;e!==null;)Kh(e,t,r),e=e.sibling}var Ye=null,hr=!1;function vn(e,t,r){for(r=r.child;r!==null;)vk(e,t,r),r=r.sibling}function vk(e,t,r){if(Lr&&typeof Lr.onCommitFiberUnmount=="function")try{Lr.onCommitFiberUnmount(Fc,r)}catch{}switch(r.tag){case 5:it||ii(r,t);case 6:var n=Ye,o=hr;Ye=null,vn(e,t,r),Ye=n,hr=o,Ye!==null&&(hr?(e=Ye,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ye.removeChild(r.stateNode));break;case 18:Ye!==null&&(hr?(e=Ye,r=r.stateNode,e.nodeType===8?mf(e.parentNode,r):e.nodeType===1&&mf(e,r),ua(e)):mf(Ye,r.stateNode));break;case 4:n=Ye,o=hr,Ye=r.stateNode.containerInfo,hr=!0,vn(e,t,r),Ye=n,hr=o;break;case 0:case 11:case 14:case 15:if(!it&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Xh(r,t,s),o=o.next}while(o!==n)}vn(e,t,r);break;case 1:if(!it&&(ii(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Me(r,t,a)}vn(e,t,r);break;case 21:vn(e,t,r);break;case 22:r.mode&1?(it=(n=it)||r.memoizedState!==null,vn(e,t,r),it=n):vn(e,t,r);break;default:vn(e,t,r)}}function Qv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new z4),t.forEach(function(n){var o=Y4.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function dr(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=s),n&=~i}if(n=o,n=De()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*V4(n/1960))-n,10e?16:e,Tn===null)var n=!1;else{if(e=Tn,Tn=null,nc=0,J&6)throw Error($(331));var o=J;for(J|=4,O=e.current;O!==null;){var i=O,s=i.child;if(O.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lDe()-Jm?yo(e,0):Zm|=r),Pt(e,t)}function Tk(e,t){t===0&&(e.mode&1?(t=_l,_l<<=1,!(_l&130023424)&&(_l=4194304)):t=1);var r=vt();e=ln(e,t),e!==null&&(Ha(e,t,r),Pt(e,r))}function q4(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Tk(e,r)}function Y4(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error($(314))}n!==null&&n.delete(t),Tk(e,r)}var Pk;Pk=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ct.current)Et=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Et=!1,N4(e,t,r);Et=!!(e.flags&131072)}else Et=!1,Te&&t.flags&1048576&&Iw(t,qu,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;hu(e,t),e=t.pendingProps;var o=Pi(t,lt.current);gi(t,r),o=Gm(null,t,n,e,o,r);var i=Xm();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Tt(n)?(i=!0,Gu(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,jm(t),o.updater=Xc,t.stateNode=o,o._reactInternals=t,Fh(t,n,e,r),t=Hh(null,t,n,!0,i,r)):(t.tag=0,Te&&i&&Mm(t),ft(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(hu(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=Q4(n),e=fr(n,e),o){case 0:t=Vh(null,t,n,e,r);break e;case 1:t=Gv(null,t,n,e,r);break e;case 11:t=Uv(null,t,n,e,r);break e;case 14:t=Wv(null,t,n,fr(n.type,e),r);break e}throw Error($(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:fr(n,o),Vh(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:fr(n,o),Gv(e,t,n,o,r);case 3:e:{if(ck(t),e===null)throw Error($(387));n=t.pendingProps,i=t.memoizedState,o=i.element,Dw(e,t),Qu(t,n,null,r);var s=t.memoizedState;if(n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Ii(Error($(423)),t),t=Xv(e,t,n,r,o);break e}else if(n!==o){o=Ii(Error($(424)),t),t=Xv(e,t,n,r,o);break e}else for(Ot=Rn(t.stateNode.containerInfo.firstChild),Bt=t,Te=!0,pr=null,r=Ow(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(_i(),n===o){t=un(e,t,r);break e}ft(e,t,n,r)}t=t.child}return t;case 5:return Bw(t),e===null&&Dh(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,$h(n,o)?s=null:i!==null&&$h(n,i)&&(t.flags|=32),uk(e,t),ft(e,t,s,r),t.child;case 6:return e===null&&Dh(t),null;case 13:return dk(e,t,r);case 4:return Vm(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ai(t,null,n,r):ft(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:fr(n,o),Uv(e,t,n,o,r);case 7:return ft(e,t,t.pendingProps,r),t.child;case 8:return ft(e,t,t.pendingProps.children,r),t.child;case 12:return ft(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ge(Yu,n._currentValue),n._currentValue=s,i!==null)if(vr(i.value,s)){if(i.children===o.children&&!Ct.current){t=un(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=rn(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Bh(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error($(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),Bh(s,r,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}ft(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,gi(t,r),o=nr(o),n=n(o),t.flags|=1,ft(e,t,n,r),t.child;case 14:return n=t.type,o=fr(n,t.pendingProps),o=fr(n.type,o),Wv(e,t,n,o,r);case 15:return ak(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:fr(n,o),hu(e,t),t.tag=1,Tt(n)?(e=!0,Gu(t)):e=!1,gi(t,r),ok(t,n,o),Fh(t,n,o,r),Hh(null,t,n,!0,e,r);case 19:return fk(e,t,r);case 22:return lk(e,t,r)}throw Error($(156,t.tag))};function _k(e,t){return tw(e,t)}function K4(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function er(e,t,r,n){return new K4(e,t,r,n)}function ng(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Q4(e){if(typeof e=="function")return ng(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wm)return 11;if(e===km)return 14}return 2}function Mn(e,t){var r=e.alternate;return r===null?(r=er(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function gu(e,t,r,n,o,i){var s=2;if(n=e,typeof e=="function")ng(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Ko:return vo(r.children,o,i,t);case xm:s=8,o|=8;break;case ch:return e=er(12,r,t,o|2),e.elementType=ch,e.lanes=i,e;case dh:return e=er(13,r,t,o),e.elementType=dh,e.lanes=i,e;case fh:return e=er(19,r,t,o),e.elementType=fh,e.lanes=i,e;case Bx:return Kc(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nx:s=10;break e;case Dx:s=9;break e;case wm:s=11;break e;case km:s=14;break e;case Sn:s=16,n=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=er(s,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function vo(e,t,r,n){return e=er(7,e,n,t),e.lanes=r,e}function Kc(e,t,r,n){return e=er(22,e,n,t),e.elementType=Bx,e.lanes=r,e.stateNode={isHidden:!1},e}function kf(e,t,r){return e=er(6,e,null,t),e.lanes=r,e}function Ef(e,t,r){return t=er(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Z4(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nf(0),this.expirationTimes=nf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nf(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function og(e,t,r,n,o,i,s,a,l){return e=new Z4(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=er(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},jm(i),e}function J4(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($k)}catch(e){console.error(e)}}$k(),$x.exports=Ht;var lg=$x.exports;const[Lk,oF]=Bi({strict:!1,name:"PortalContext"}),ug="chakra-portal",iF=".chakra-portal",sF=e=>R.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),aF=e=>{const{appendToParentPortal:t,children:r}=e,[n,o]=w.useState(null),i=w.useRef(null),[,s]=w.useState({});w.useEffect(()=>s({}),[]);const a=oF(),l=FO();xu(()=>{if(!n)return;const c=n.ownerDocument,d=t?a??c.body:c.body;if(!d)return;i.current=c.createElement("div"),i.current.className=ug,d.appendChild(i.current),s({});const f=i.current;return()=>{d.contains(f)&&d.removeChild(f)}},[n]);const u=l?.zIndex?R.jsx(sF,{zIndex:l?.zIndex,children:r}):r;return i.current?lg.createPortal(R.jsx(Lk,{value:i.current,children:u}),i.current):R.jsx("span",{ref:c=>{c&&o(c)}})},lF=e=>{const{children:t,containerRef:r,appendToParentPortal:n}=e,o=r.current,i=o??(typeof window<"u"?document.body:void 0),s=w.useMemo(()=>{const l=o?.ownerDocument.createElement("div");return l&&(l.className=ug),l},[o]),[,a]=w.useState({});return xu(()=>a({}),[]),xu(()=>{if(!(!s||!i))return i.appendChild(s),()=>{i.removeChild(s)}},[s,i]),i&&s?lg.createPortal(R.jsx(Lk,{value:n?s:null,children:t}),s):null};function Xa(e){const t={appendToParentPortal:!0,...e},{containerRef:r,...n}=t;return r?R.jsx(lF,{containerRef:r,...n}):R.jsx(aF,{...n})}Xa.className=ug;Xa.selector=iF;Xa.displayName="Portal";const[uF,$V]=Bi({name:"ToastOptionsContext",strict:!1}),cF=e=>{const t=w.useSyncExternalStore(Os.subscribe,Os.getState,Os.getState),{motionVariants:r,component:n=Px,portalProps:o,animatePresenceProps:i}=e,a=Object.keys(t).map(l=>{const u=t[l];return R.jsx("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${l}`,id:`chakra-toast-manager-${l}`,style:m3(l),children:R.jsx(Cx,{...i,initial:!1,children:u.map(c=>R.jsx(n,{motionVariants:r,...c},c.id))})},l)});return R.jsx(Xa,{...o,children:a})},Mk=Oe("div");Mk.displayName="Box";function Es(e){return typeof e=="function"}function dF(...e){return t=>e.reduce((r,n)=>n(r),t)}const fF=e=>function(...r){let n=[...r],o=r[r.length-1];return kM(o)&&n.length>1?n=n.slice(0,n.length-1):o=e,dF(...n.map(i=>s=>Es(i)?i(s):Ok(s,i)))(o)},cg=fF(Pu);function Ok(...e){return Jt({},...e,Nk)}function Nk(e,t,r,n){if((Es(e)||Es(t))&&Object.prototype.hasOwnProperty.call(n,r))return(...o)=>{const i=Es(e)?e(...o):e,s=Es(t)?t(...o):t;return Jt({},i,s,Nk)};if(Ul(e)&&Ul(t))return[...e,...t];if(Ul(e)&>(t))return t}function hF({colorScheme:e,components:t}){return r=>{let n=Object.keys(r.components||{});return Array.isArray(t)?n=t:gt(t)&&(n=Object.keys(t)),Ok(r,{components:Object.fromEntries(n.map(o=>[o,{defaultProps:{colorScheme:e}}]))})}}var _t="top",ir="bottom",sr="right",At="left",dg="auto",qa=[_t,ir,sr,At],Li="start",xa="end",pF="clippingParents",Dk="viewport",ds="popper",mF="reference",ib=qa.reduce(function(e,t){return e.concat([t+"-"+Li,t+"-"+xa])},[]),Bk=[].concat(qa,[dg]).reduce(function(e,t){return e.concat([t,t+"-"+Li,t+"-"+xa])},[]),gF="beforeRead",yF="read",vF="afterRead",bF="beforeMain",SF="main",xF="afterMain",wF="beforeWrite",kF="write",EF="afterWrite",CF=[gF,yF,vF,bF,SF,xF,wF,kF,EF];function Dr(e){return e?(e.nodeName||"").toLowerCase():null}function jt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Po(e){var t=jt(e).Element;return e instanceof t||e instanceof Element}function rr(e){var t=jt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function fg(e){if(typeof ShadowRoot>"u")return!1;var t=jt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function TF(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},o=t.attributes[r]||{},i=t.elements[r];!rr(i)||!Dr(i)||(Object.assign(i.style,n),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function PF(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var o=t.elements[n],i=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),a=s.reduce(function(l,u){return l[u]="",l},{});!rr(o)||!Dr(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const _F={name:"applyStyles",enabled:!0,phase:"write",fn:TF,effect:PF,requires:["computeStyles"]};function Or(e){return e.split("-")[0]}var bo=Math.max,sc=Math.min,Mi=Math.round;function tp(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function zk(){return!/^((?!chrome|android).)*safari/i.test(tp())}function Oi(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&rr(e)&&(o=e.offsetWidth>0&&Mi(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Mi(n.height)/e.offsetHeight||1);var s=Po(e)?jt(e):window,a=s.visualViewport,l=!zk()&&r,u=(n.left+(l&&a?a.offsetLeft:0))/o,c=(n.top+(l&&a?a.offsetTop:0))/i,d=n.width/o,f=n.height/i;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function hg(e){var t=Oi(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function Fk(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&fg(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function cn(e){return jt(e).getComputedStyle(e)}function AF(e){return["table","td","th"].indexOf(Dr(e))>=0}function Wn(e){return((Po(e)?e.ownerDocument:e.document)||window.document).documentElement}function td(e){return Dr(e)==="html"?e:e.assignedSlot||e.parentNode||(fg(e)?e.host:null)||Wn(e)}function sb(e){return!rr(e)||cn(e).position==="fixed"?null:e.offsetParent}function RF(e){var t=/firefox/i.test(tp()),r=/Trident/i.test(tp());if(r&&rr(e)){var n=cn(e);if(n.position==="fixed")return null}var o=td(e);for(fg(o)&&(o=o.host);rr(o)&&["html","body"].indexOf(Dr(o))<0;){var i=cn(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function Ya(e){for(var t=jt(e),r=sb(e);r&&AF(r)&&cn(r).position==="static";)r=sb(r);return r&&(Dr(r)==="html"||Dr(r)==="body"&&cn(r).position==="static")?t:r||RF(e)||t}function pg(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ws(e,t,r){return bo(e,sc(t,r))}function IF(e,t,r){var n=Ws(e,t,r);return n>r?r:n}function jk(){return{top:0,right:0,bottom:0,left:0}}function Vk(e){return Object.assign({},jk(),e)}function Hk(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var $F=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Vk(typeof t!="number"?t:Hk(t,qa))};function LF(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,s=r.modifiersData.popperOffsets,a=Or(r.placement),l=pg(a),u=[At,sr].indexOf(a)>=0,c=u?"height":"width";if(!(!i||!s)){var d=$F(o.padding,r),f=hg(i),m=l==="y"?_t:At,y=l==="y"?ir:sr,v=r.rects.reference[c]+r.rects.reference[l]-s[l]-r.rects.popper[c],x=s[l]-r.rects.reference[l],p=Ya(i),h=p?l==="y"?p.clientHeight||0:p.clientWidth||0:0,g=v/2-x/2,S=d[m],C=h-f[c]-d[y],P=h/2-f[c]/2+g,T=Ws(S,P,C),A=l;r.modifiersData[n]=(t={},t[A]=T,t.centerOffset=T-P,t)}}function MF(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Fk(t.elements.popper,o)&&(t.elements.arrow=o))}const OF={name:"arrow",enabled:!0,phase:"main",fn:LF,effect:MF,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ni(e){return e.split("-")[1]}var NF={top:"auto",right:"auto",bottom:"auto",left:"auto"};function DF(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:Mi(r*o)/o||0,y:Mi(n*o)/o||0}}function ab(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=s.x,m=f===void 0?0:f,y=s.y,v=y===void 0?0:y,x=typeof c=="function"?c({x:m,y:v}):{x:m,y:v};m=x.x,v=x.y;var p=s.hasOwnProperty("x"),h=s.hasOwnProperty("y"),g=At,S=_t,C=window;if(u){var P=Ya(r),T="clientHeight",A="clientWidth";if(P===jt(r)&&(P=Wn(r),cn(P).position!=="static"&&a==="absolute"&&(T="scrollHeight",A="scrollWidth")),P=P,o===_t||(o===At||o===sr)&&i===xa){S=ir;var M=d&&P===C&&C.visualViewport?C.visualViewport.height:P[T];v-=M-n.height,v*=l?1:-1}if(o===At||(o===_t||o===ir)&&i===xa){g=sr;var I=d&&P===C&&C.visualViewport?C.visualViewport.width:P[A];m-=I-n.width,m*=l?1:-1}}var H=Object.assign({position:a},u&&NF),ve=c===!0?DF({x:m,y:v},jt(r)):{x:m,y:v};if(m=ve.x,v=ve.y,l){var he;return Object.assign({},H,(he={},he[S]=h?"0":"",he[g]=p?"0":"",he.transform=(C.devicePixelRatio||1)<=1?"translate("+m+"px, "+v+"px)":"translate3d("+m+"px, "+v+"px, 0)",he))}return Object.assign({},H,(t={},t[S]=h?v+"px":"",t[g]=p?m+"px":"",t.transform="",t))}function BF(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=n===void 0?!0:n,i=r.adaptive,s=i===void 0?!0:i,a=r.roundOffsets,l=a===void 0?!0:a,u={placement:Or(t.placement),variation:Ni(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,ab(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ab(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const zF={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:BF,data:{}};var Fl={passive:!0};function FF(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=o===void 0?!0:o,s=n.resize,a=s===void 0?!0:s,l=jt(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",r.update,Fl)}),a&&l.addEventListener("resize",r.update,Fl),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",r.update,Fl)}),a&&l.removeEventListener("resize",r.update,Fl)}}const jF={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:FF,data:{}};var VF={left:"right",right:"left",bottom:"top",top:"bottom"};function yu(e){return e.replace(/left|right|bottom|top/g,function(t){return VF[t]})}var HF={start:"end",end:"start"};function lb(e){return e.replace(/start|end/g,function(t){return HF[t]})}function mg(e){var t=jt(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function gg(e){return Oi(Wn(e)).left+mg(e).scrollLeft}function UF(e,t){var r=jt(e),n=Wn(e),o=r.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var u=zk();(u||!u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+gg(e),y:l}}function WF(e){var t,r=Wn(e),n=mg(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=bo(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=bo(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+gg(e),l=-n.scrollTop;return cn(o||r).direction==="rtl"&&(a+=bo(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function yg(e){var t=cn(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function Uk(e){return["html","body","#document"].indexOf(Dr(e))>=0?e.ownerDocument.body:rr(e)&&yg(e)?e:Uk(td(e))}function Gs(e,t){var r;t===void 0&&(t=[]);var n=Uk(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=jt(n),s=o?[i].concat(i.visualViewport||[],yg(n)?n:[]):n,a=t.concat(s);return o?a:a.concat(Gs(td(s)))}function rp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function GF(e,t){var r=Oi(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function ub(e,t,r){return t===Dk?rp(UF(e,r)):Po(t)?GF(t,r):rp(WF(Wn(e)))}function XF(e){var t=Gs(td(e)),r=["absolute","fixed"].indexOf(cn(e).position)>=0,n=r&&rr(e)?Ya(e):e;return Po(n)?t.filter(function(o){return Po(o)&&Fk(o,n)&&Dr(o)!=="body"}):[]}function qF(e,t,r,n){var o=t==="clippingParents"?XF(e):[].concat(t),i=[].concat(o,[r]),s=i[0],a=i.reduce(function(l,u){var c=ub(e,u,n);return l.top=bo(c.top,l.top),l.right=sc(c.right,l.right),l.bottom=sc(c.bottom,l.bottom),l.left=bo(c.left,l.left),l},ub(e,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Wk(e){var t=e.reference,r=e.element,n=e.placement,o=n?Or(n):null,i=n?Ni(n):null,s=t.x+t.width/2-r.width/2,a=t.y+t.height/2-r.height/2,l;switch(o){case _t:l={x:s,y:t.y-r.height};break;case ir:l={x:s,y:t.y+t.height};break;case sr:l={x:t.x+t.width,y:a};break;case At:l={x:t.x-r.width,y:a};break;default:l={x:t.x,y:t.y}}var u=o?pg(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Li:l[u]=l[u]-(t[c]/2-r[c]/2);break;case xa:l[u]=l[u]+(t[c]/2-r[c]/2);break}}return l}function wa(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,i=r.strategy,s=i===void 0?e.strategy:i,a=r.boundary,l=a===void 0?pF:a,u=r.rootBoundary,c=u===void 0?Dk:u,d=r.elementContext,f=d===void 0?ds:d,m=r.altBoundary,y=m===void 0?!1:m,v=r.padding,x=v===void 0?0:v,p=Vk(typeof x!="number"?x:Hk(x,qa)),h=f===ds?mF:ds,g=e.rects.popper,S=e.elements[y?h:f],C=qF(Po(S)?S:S.contextElement||Wn(e.elements.popper),l,c,s),P=Oi(e.elements.reference),T=Wk({reference:P,element:g,strategy:"absolute",placement:o}),A=rp(Object.assign({},g,T)),M=f===ds?A:P,I={top:C.top-M.top+p.top,bottom:M.bottom-C.bottom+p.bottom,left:C.left-M.left+p.left,right:M.right-C.right+p.right},H=e.modifiersData.offset;if(f===ds&&H){var ve=H[o];Object.keys(I).forEach(function(he){var We=[sr,ir].indexOf(he)>=0?1:-1,ue=[_t,ir].indexOf(he)>=0?"y":"x";I[he]+=ve[ue]*We})}return I}function YF(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,s=r.padding,a=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?Bk:l,c=Ni(n),d=c?a?ib:ib.filter(function(y){return Ni(y)===c}):qa,f=d.filter(function(y){return u.indexOf(y)>=0});f.length===0&&(f=d);var m=f.reduce(function(y,v){return y[v]=wa(e,{placement:v,boundary:o,rootBoundary:i,padding:s})[Or(v)],y},{});return Object.keys(m).sort(function(y,v){return m[y]-m[v]})}function KF(e){if(Or(e)===dg)return[];var t=yu(e);return[lb(e),t,lb(t)]}function QF(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=o===void 0?!0:o,s=r.altAxis,a=s===void 0?!0:s,l=r.fallbackPlacements,u=r.padding,c=r.boundary,d=r.rootBoundary,f=r.altBoundary,m=r.flipVariations,y=m===void 0?!0:m,v=r.allowedAutoPlacements,x=t.options.placement,p=Or(x),h=p===x,g=l||(h||!y?[yu(x)]:KF(x)),S=[x].concat(g).reduce(function(Ie,be){return Ie.concat(Or(be)===dg?YF(t,{placement:be,boundary:c,rootBoundary:d,padding:u,flipVariations:y,allowedAutoPlacements:v}):be)},[]),C=t.rects.reference,P=t.rects.popper,T=new Map,A=!0,M=S[0],I=0;I=0,ue=We?"width":"height",q=wa(t,{placement:H,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),le=We?he?sr:At:he?ir:_t;C[ue]>P[ue]&&(le=yu(le));var L=yu(le),D=[];if(i&&D.push(q[ve]<=0),a&&D.push(q[le]<=0,q[L]<=0),D.every(function(Ie){return Ie})){M=H,A=!1;break}T.set(H,D)}if(A)for(var U=y?3:1,ee=function(be){var $e=S.find(function(ut){var ct=T.get(ut);if(ct)return ct.slice(0,be).every(function(hn){return hn})});if($e)return M=$e,"break"},te=U;te>0;te--){var G=ee(te);if(G==="break")break}t.placement!==M&&(t.modifiersData[n]._skip=!0,t.placement=M,t.reset=!0)}}const ZF={name:"flip",enabled:!0,phase:"main",fn:QF,requiresIfExists:["offset"],data:{_skip:!1}};function cb(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function db(e){return[_t,sr,ir,At].some(function(t){return e[t]>=0})}function JF(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=wa(t,{elementContext:"reference"}),a=wa(t,{altBoundary:!0}),l=cb(s,n),u=cb(a,o,i),c=db(l),d=db(u);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const ej={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:JF};function tj(e,t,r){var n=Or(e),o=[At,_t].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[At,sr].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function rj(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=o===void 0?[0,0]:o,s=Bk.reduce(function(c,d){return c[d]=tj(d,t.rects,i),c},{}),a=s[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=s}const nj={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rj};function oj(e){var t=e.state,r=e.name;t.modifiersData[r]=Wk({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ij={name:"popperOffsets",enabled:!0,phase:"read",fn:oj,data:{}};function sj(e){return e==="x"?"y":"x"}function aj(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=o===void 0?!0:o,s=r.altAxis,a=s===void 0?!1:s,l=r.boundary,u=r.rootBoundary,c=r.altBoundary,d=r.padding,f=r.tether,m=f===void 0?!0:f,y=r.tetherOffset,v=y===void 0?0:y,x=wa(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),p=Or(t.placement),h=Ni(t.placement),g=!h,S=pg(p),C=sj(S),P=t.modifiersData.popperOffsets,T=t.rects.reference,A=t.rects.popper,M=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,I=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ve={x:0,y:0};if(P){if(i){var he,We=S==="y"?_t:At,ue=S==="y"?ir:sr,q=S==="y"?"height":"width",le=P[S],L=le+x[We],D=le-x[ue],U=m?-A[q]/2:0,ee=h===Li?T[q]:A[q],te=h===Li?-A[q]:-T[q],G=t.elements.arrow,Ie=m&&G?hg(G):{width:0,height:0},be=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:jk(),$e=be[We],ut=be[ue],ct=Ws(0,T[q],Ie[q]),hn=g?T[q]/2-U-ct-$e-I.mainAxis:ee-ct-$e-I.mainAxis,Gn=g?-T[q]/2+U+ct+ut+I.mainAxis:te+ct+ut+I.mainAxis,pn=t.elements.arrow&&Ya(t.elements.arrow),me=pn?S==="y"?pn.clientTop||0:pn.clientLeft||0:0,It=(he=H?.[S])!=null?he:0,Io=le+hn-It-me,Wi=le+Gn-It,Ka=Ws(m?sc(L,Io):L,le,m?bo(D,Wi):D);P[S]=Ka,ve[S]=Ka-le}if(a){var Qa,rd=S==="x"?_t:At,nd=S==="x"?ir:sr,Wt=P[C],mn=C==="y"?"height":"width",Xn=Wt+x[rd],lr=Wt-x[nd],$o=[_t,At].indexOf(p)!==-1,Gi=(Qa=H?.[C])!=null?Qa:0,Za=$o?Xn:Wt-T[mn]-A[mn]-Gi+I.altAxis,Ja=$o?Wt+T[mn]+A[mn]-Gi-I.altAxis:lr,qn=m&&$o?IF(Za,Wt,Ja):Ws(m?Za:Xn,Wt,m?Ja:lr);P[C]=qn,ve[C]=qn-Wt}t.modifiersData[n]=ve}}const lj={name:"preventOverflow",enabled:!0,phase:"main",fn:aj,requiresIfExists:["offset"]};function uj(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function cj(e){return e===jt(e)||!rr(e)?mg(e):uj(e)}function dj(e){var t=e.getBoundingClientRect(),r=Mi(t.width)/e.offsetWidth||1,n=Mi(t.height)/e.offsetHeight||1;return r!==1||n!==1}function fj(e,t,r){r===void 0&&(r=!1);var n=rr(t),o=rr(t)&&dj(t),i=Wn(t),s=Oi(e,o,r),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((Dr(t)!=="body"||yg(i))&&(a=cj(t)),rr(t)?(l=Oi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=gg(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function hj(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function o(i){r.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!r.has(a)){var l=t.get(a);l&&o(l)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||o(i)}),n}function pj(e){var t=hj(e);return CF.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function mj(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function gj(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var fb={placement:"bottom",modifiers:[],strategy:"absolute"};function hb(){for(var e=arguments.length,t=new Array(e),r=0;r({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Ze={arrowShadowColor:Do("--popper-arrow-shadow-color"),arrowSize:Do("--popper-arrow-size","8px"),arrowSizeHalf:Do("--popper-arrow-size-half"),arrowBg:Do("--popper-arrow-bg"),transformOrigin:Do("--popper-transform-origin"),arrowOffset:Do("--popper-arrow-offset")};function Sj(e){if(e.includes("top"))return"1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 0px 0 var(--popper-arrow-shadow-color)"}const xj={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},wj=e=>xj[e],pb={scroll:!0,resize:!0};function kj(e){let t;return typeof e=="object"?t={enabled:!0,options:{...pb,...e}}:t={enabled:e,options:pb},t}const Ej={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},Cj={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{mb(e)},effect:({state:e})=>()=>{mb(e)}},mb=e=>{e.elements.popper.style.setProperty(Ze.transformOrigin.var,wj(e.placement))},Tj={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{Pj(e)}},Pj=e=>{if(!e.placement)return;const t=_j(e.placement);if(e.elements?.arrow&&t){Object.assign(e.elements.arrow.style,{[t.property]:t.value,width:Ze.arrowSize.varRef,height:Ze.arrowSize.varRef,zIndex:-1});const r={[Ze.arrowSizeHalf.var]:`calc(${Ze.arrowSize.varRef} / 2 - 1px)`,[Ze.arrowOffset.var]:`calc(${Ze.arrowSizeHalf.varRef} * -1)`};for(const n in r)e.elements.arrow.style.setProperty(n,r[n])}},_j=e=>{if(e.startsWith("top"))return{property:"bottom",value:Ze.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Ze.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Ze.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Ze.arrowOffset.varRef}},Aj={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{gb(e)},effect:({state:e})=>()=>{gb(e)}},gb=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const r=Sj(e.placement);r&&t.style.setProperty("--popper-arrow-default-shadow",r),Object.assign(t.style,{transform:"rotate(45deg)",background:Ze.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},Rj={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Ij={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function $j(e,t="ltr"){const r=Rj[e]?.[t]||e;return t==="ltr"?r:Ij[e]??r}function Lj(e={}){const{enabled:t=!0,modifiers:r,placement:n="bottom",strategy:o="absolute",arrowPadding:i=8,eventListeners:s=!0,offset:a,gutter:l=8,flip:u=!0,boundary:c="clippingParents",preventOverflow:d=!0,matchWidth:f,direction:m="ltr"}=e,y=w.useRef(null),v=w.useRef(null),x=w.useRef(null),p=$j(n,m),h=w.useRef(()=>{}),g=w.useCallback(()=>{!t||!y.current||!v.current||(h.current?.(),x.current=bj(y.current,v.current,{placement:p,modifiers:[Aj,Tj,Cj,{...Ej,enabled:!!f},{name:"eventListeners",...kj(s)},{name:"arrow",options:{padding:i}},{name:"offset",options:{offset:a??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!d,options:{boundary:c}},...r??[]],strategy:o}),x.current.forceUpdate(),h.current=x.current.destroy)},[p,t,r,f,s,i,a,l,u,d,c,o]);w.useEffect(()=>()=>{!y.current&&!v.current&&(x.current?.destroy(),x.current=null)},[]);const S=w.useCallback(I=>{y.current=I,g()},[g]),C=w.useCallback((I={},H=null)=>({...I,ref:wu(S,H)}),[S]),P=w.useCallback(I=>{v.current=I,g()},[g]),T=w.useCallback((I={},H=null)=>({...I,ref:wu(P,H),style:{...I.style,position:o,minWidth:f?void 0:"max-content",inset:"0 auto auto 0"}}),[o,P,f]),A=w.useCallback((I={},H=null)=>{const{size:ve,shadowColor:he,bg:We,style:ue,...q}=I;return{...q,ref:H,"data-popper-arrow":"",style:Mj(I)}},[]),M=w.useCallback((I={},H=null)=>({...I,ref:H,"data-popper-arrow-inner":""}),[]);return{update(){x.current?.update()},forceUpdate(){x.current?.forceUpdate()},transformOrigin:Ze.transformOrigin.varRef,referenceRef:S,popperRef:P,getPopperProps:T,getArrowProps:A,getArrowInnerProps:M,getReferenceProps:C}}function Mj(e){const{size:t,shadowColor:r,bg:n,style:o}=e,i={...o,position:"absolute"};return t&&(i["--popper-arrow-size"]=t),r&&(i["--popper-arrow-shadow-color"]=r),n&&(i["--popper-arrow-bg"]=n),i}const Gk=e=>R.jsx(Oe.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Gk.displayName="StackItem";function Oj(e){const{spacing:t,direction:r}=e,n={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":QP(r,o=>n[o])}}const Xk=Sr((e,t)=>{const{isInline:r,direction:n,align:o,justify:i,spacing:s="0.5rem",wrap:a,children:l,divider:u,className:c,shouldWrapChildren:d,...f}=e,m=r?"row":n??"column",y=w.useMemo(()=>Oj({spacing:s,direction:m}),[s,m]),v=!!u,x=!d&&!v,p=w.useMemo(()=>{const g=WP(l);return x?g:g.map((S,C)=>{const P=typeof S.key<"u"?S.key:C,T=C+1===g.length,M=d?R.jsx(Gk,{children:S},P):S;if(!v)return M;const I=w.cloneElement(u,{__css:y}),H=T?null:I;return R.jsxs(w.Fragment,{children:[M,H]},P)})},[u,y,v,x,d,l]),h=dn("chakra-stack",c);return R.jsx(Oe.div,{ref:t,display:"flex",alignItems:o,justifyContent:i,flexDirection:m,flexWrap:a,gap:v?void 0:s,className:h,...f,children:p})});Xk.displayName="Stack";const qk=Sr((e,t)=>R.jsx(Xk,{align:"center",...e,direction:"column",ref:t}));qk.displayName="VStack";const Nj={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},np=e=>e.current?.ownerDocument||document,vu=e=>e.current?.ownerDocument?.defaultView||window;function Dj(e={}){const{openDelay:t=0,closeDelay:r=0,closeOnClick:n=!0,closeOnMouseDown:o,closeOnScroll:i,closeOnPointerDown:s=o,closeOnEsc:a=!0,onOpen:l,onClose:u,placement:c,id:d,isOpen:f,defaultIsOpen:m,arrowSize:y=10,arrowShadowColor:v,arrowPadding:x,modifiers:p,isDisabled:h,gutter:g,offset:S,direction:C,...P}=e,{isOpen:T,onOpen:A,onClose:M}=n2({isOpen:f,defaultIsOpen:m,onOpen:l,onClose:u}),{referenceRef:I,getPopperProps:H,getArrowInnerProps:ve,getArrowProps:he}=Lj({enabled:T,placement:c,arrowPadding:x,modifiers:p,gutter:g,offset:S,direction:C}),We=w.useId(),q=`tooltip-${d??We}`,le=w.useRef(null),L=w.useRef(),D=w.useCallback(()=>{L.current&&(clearTimeout(L.current),L.current=void 0)},[]),U=w.useRef(),ee=w.useCallback(()=>{U.current&&(clearTimeout(U.current),U.current=void 0)},[]),te=w.useCallback(()=>{ee(),M()},[M,ee]),G=Bj(le,te),Ie=w.useCallback(()=>{if(!h&&!L.current){T&&G();const me=vu(le);L.current=me.setTimeout(A,t)}},[G,h,T,A,t]),be=w.useCallback(()=>{D();const me=vu(le);U.current=me.setTimeout(te,r)},[r,te,D]),$e=w.useCallback(()=>{T&&n&&be()},[n,be,T]),ut=w.useCallback(()=>{T&&s&&be()},[s,be,T]),ct=w.useCallback(me=>{T&&me.key==="Escape"&&be()},[T,be]);Sd(()=>np(le),"keydown",a?ct:void 0),Sd(()=>{if(!i)return null;const me=le.current;if(!me)return null;const It=c1(me);return It.localName==="body"?vu(le):It},"scroll",()=>{T&&i&&te()},{passive:!0,capture:!0}),w.useEffect(()=>{h&&(D(),T&&M())},[h,T,M,D]),w.useEffect(()=>()=>{D(),ee()},[D,ee]),Sd(()=>le.current,"pointerleave",be);const hn=w.useCallback((me={},It=null)=>({...me,ref:wu(le,It,I),onPointerEnter:Qi(me.onPointerEnter,Wi=>{Wi.pointerType!=="touch"&&Ie()}),onClick:Qi(me.onClick,$e),onPointerDown:Qi(me.onPointerDown,ut),onFocus:Qi(me.onFocus,Ie),onBlur:Qi(me.onBlur,be),"aria-describedby":T?q:void 0}),[Ie,be,ut,T,q,$e,I]),Gn=w.useCallback((me={},It=null)=>H({...me,style:{...me.style,[Ze.arrowSize.var]:y?`${y}px`:void 0,[Ze.arrowShadowColor.var]:v}},It),[H,y,v]),pn=w.useCallback((me={},It=null)=>{const Io={...me.style,position:"relative",transformOrigin:Ze.transformOrigin.varRef};return{ref:It,...P,...me,id:q,role:"tooltip",style:Io}},[P,q]);return{isOpen:T,show:Ie,hide:be,getTriggerProps:hn,getTooltipProps:pn,getTooltipPositionerProps:Gn,getArrowProps:he,getArrowInnerProps:ve}}const Cf="chakra-ui:close-tooltip";function Bj(e,t){return w.useEffect(()=>{const r=np(e);return r.addEventListener(Cf,t),()=>r.removeEventListener(Cf,t)},[t,e]),()=>{const r=np(e),n=vu(e);r.dispatchEvent(new n.CustomEvent(Cf))}}const zj=Oe(Ex.div),Yk=Sr((e,t)=>{const r=Vi("Tooltip",e),n=zi(e),o=dm(),{children:i,label:s,shouldWrapChildren:a,"aria-label":l,hasArrow:u,bg:c,portalProps:d,background:f,backgroundColor:m,bgColor:y,motionProps:v,animatePresenceProps:x,...p}=n,h=f??m??c??y;if(h){r.bg=h;const I=q2(o,"colors",h);r[Ze.arrowBg.var]=I}const g=Dj({...p,direction:o.direction}),S=!w.isValidElement(i)||a;let C;if(S)C=R.jsx(Oe.span,{display:"inline-block",tabIndex:0,...g.getTriggerProps(),children:i});else{const I=w.Children.only(i);C=w.cloneElement(I,g.getTriggerProps(I.props,I.ref))}const P=!!l,T=g.getTooltipProps({},t),A=P?bp(T,["role","id"]):T,M=u1(T,["role","id"]);return s?R.jsxs(R.Fragment,{children:[C,R.jsx(Cx,{...x,children:g.isOpen&&R.jsx(Xa,{...d,children:R.jsx(Oe.div,{...g.getTooltipPositionerProps(),__css:{zIndex:r.zIndex,pointerEvents:"none"},children:R.jsxs(zj,{variants:Nj,initial:"exit",animate:"enter",exit:"exit",...v,...A,__css:r,children:[s,P&&R.jsx(Oe.span,{srOnly:!0,...M,children:l}),u&&R.jsx(Oe.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:R.jsx(Oe.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:r.bg}})})]})})})})]}):R.jsx(R.Fragment,{children:i})});Yk.displayName="Tooltip";const Kk=Sr(function(t,r){const n=Vi("Heading",t),{className:o,...i}=zi(t);return R.jsx(Oe.h2,{ref:r,className:dn("chakra-heading",t.className),...i,__css:n})});Kk.displayName="Heading";const Fj=Sr(function(t,r){const n=Vi("Text",t),{className:o,align:i,decoration:s,casing:a,...l}=zi(t),u=vp({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return R.jsx(Oe.p,{ref:r,className:dn("chakra-text",t.className),...u,...l,__css:n})});Fj.displayName="Text";const Qk=w.createContext(void 0),jj=Qk.Provider,LV=Vj(Yk);function Vj(e){function t(r){const n=Hj(),o={...r};return o.portalProps={containerRef:n,...r.portalProps},R.jsx(e,{...o})}return t.displayName=`FixPortalLocation(${Uj(e)})`,t}function Hj(){const e=w.useContext(Qk);if(!e)throw new Error("Failed to find portal container: chakra-ui integration was not set up correctly.");return e}function Uj(e){return e.displayName||e.name||"Component"}const Wj=` +.chakra-host { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + position: relative; + min-height: 100%; + height: 100%; + font-feature-settings: 'kern'; +}`,Gj={light:"chakra-ui-light",dark:"chakra-ui-dark"},Xj=({container:e,colorMode:t,children:r,theme:n})=>{const o=Kj(e),i=w.useMemo(()=>Yj(n),[n]),s=w.useRef(null),a={portalProps:{containerRef:s}},l=qj(s,t);return R.jsx("div",{className:"chakra-host",ref:s,children:R.jsx(bO,{value:o,children:R.jsx(DO,{theme:i,children:R.jsx(Q1,{children:R.jsxs(l,{children:[R.jsx(NO,{}),R.jsx(Rc,{styles:Wj}),R.jsx(zO,{}),R.jsx(uF,{value:a?.defaultOptions,children:R.jsx(jj,{value:s,children:r})}),R.jsx(cF,{...a})]})})})})})};function qj(e,t){const r=t??"light";return w.useEffect(()=>{const o=e.current;if(!o)return;const i=Gj[r];return o.classList.add(i),o.dataset.theme=r,()=>{o.classList.remove(i),o.dataset.theme=void 0}},[e,r]),r==="light"?Y1:q1}function Yj(e=Pu){return cg({styles:{global:{".chakra-host":Pu.styles.global.body}}},e)}function Kj(e){const t=w.useRef();return t.current||(t.current=B1({key:"css",container:e})),t.current}const Qj={},Zj={trails:{50:"#eaf2f5",100:"#d5e5ec",200:"#abcbd9",300:"#81b1c5",400:"#5797b2",500:"#2d7d9f",600:"#24647f",700:"#1b4b5f",800:"#123240",900:"#091920"}},Jj={colors:{background_body:"white",background_primary:"trails.500",background_light:"trails.50",placeholder:"gray.500",font_primary:"black",font_inverse:"white",font_link:"trails.600",border:"gray.300","chakra-body-text":"font_primary","chakra-body-bg":"background_body","chakra-border-color":"border","chakra-placeholder-color":"placeholder"}},eV=cg({fonts:Qj,colors:Zj,semanticTokens:Jj},Pu),eo=(e,t)=>{const r=t.semanticTokens.colors[e];if(r&&r.includes(".")){const n=r.split("."),o=n[0],i=n[1];return t.colors[o][i]}return r},tV=cg(hF({colorScheme:"trails"}),{styles:{global({theme:e}){return{".chakra-host":{"--trails-theme-shadow-color":`${eo("background_primary",e)}99`}}}},shadows:{outline:"0 0 0 3px var(--trails-theme-shadow-color)"},components:{Button:{defaultProps:{}},Checkbox:{defaultProps:{}},Divider:{baseStyle:{borderColor:"background_primary"}},Input:{defaultProps:{},variants:{outline({theme:e}){return{field:{borderColor:"border",_focusVisible:{borderColor:"background_primary",boxShadow:`0 0 0 1px ${eo("background_primary",e)}`}},addon:{borderColor:"border",bg:"background_primary"}}},filled:{field:{_focusVisible:{borderColor:"background_primary"}},addon:{bg:"background_primary"}},flushed({theme:e}){return{field:{_focusVisible:{borderColor:"background_primary",boxShadow:`0px 1px 0px 0px ${eo("background_primary",e)}`}}}}}},Link:{baseStyle:{color:"font_link"}},Radio:{defaultProps:{}},Select:{defaultProps:{},variants:{outline({theme:e}){return{field:{borderColor:"border",_focusVisible:{borderColor:"background_primary",boxShadow:`0 0 0 1px ${eo("background_primary",e)}`}}}},filled:{field:{_focusVisible:{borderColor:"background_primary"}},addon:{bg:"background_primary"}},flushed({theme:e}){return{field:{_focusVisible:{borderColor:"background_primary",boxShadow:`0px 1px 0px 0px ${eo("background_primary",e)}`}}}}}},Slider:{defaultProps:{},baseStyle:{thumb:{borderColor:"background_primary",_hover:{bg:"background_primary"}}}},Switch:{defaultProps:{}},Textarea:{defaultProps:{},variants:{outline({theme:e}){return{borderColor:"border",_focusVisible:{borderColor:"background_primary",boxShadow:`0 0 0 1px ${eo("background_primary",e)}`}}},filled:{_focusVisible:{borderColor:"background_primary"}},flushed({theme:e}){return{_focusVisible:{borderColor:"background_primary",boxShadow:`0px 1px 0px 0px ${eo("background_primary",e)}`}}}}},Tooltip:{baseStyle:{borderRadius:"md"}}}},eV),vg=w.createContext(null);var Zk,yb=lg;Zk=yb.createRoot,yb.hydrateRoot;class ka{containerNode;theme;root;packageContext;static createForApp(t){const{serviceLayer:r,packages:n}=t,o=rV(r,n);return new ka({...t,packageContext:o})}static createForErrorScreen(t){const r=()=>{throw new z(F.INVALID_STATE,"Hook cannot be used within the error screen.")},n={getIntl:r,getProperties:r,getService:r,getServices:r};return new ka({...t,packageContext:n})}constructor(t){this.containerNode=t.container,this.theme=t.theme,this.root=Zk(t.rootNode),this.packageContext=t.packageContext}render(t){this.root.render(R.jsx(w.StrictMode,{children:R.jsx(Xj,{container:this.containerNode,colorMode:"light",theme:this.theme??tV,children:R.jsx(vg.Provider,{value:this.packageContext,children:t})})}))}destroy(){this.root.unmount()}}function rV(e,t){const r=o=>{const i=t.get(o);if(!i)throw new z(F.INTERNAL,`Package '${o}' was not found in application.`);return i};return{getService:(o,i,s)=>{const a={interfaceName:i,...s},l=e.getService(o,a);if(l.type==="found")return l.value.getInstanceOrThrow();const u=ac(a);switch(l.type){case"unimplemented":throw new z(F.INTERFACE_NOT_FOUND,`The UI of package '${o}' requested the unimplemented interface ${u}.`);case"undeclared":throw new z(F.UNDECLARED_DEPENDENCY,`Package '${o}' did not declare an UI dependency on interface ${u}. Add the dependency to the package configuration or remove the usage.`);case"ambiguous":{const c=Ob(l.choices);throw new z(F.AMBIGUOUS_DEPENDENCY,`The UI of package '${o}' requires the ambiguous interface ${u}. Possible choices are: ${c}.`)}case"unknown-package":throw new z(F.MISSING_PACKAGE,vb(o,i))}},getServices:(o,i)=>{const s=e.getServices(o,i);if(s.type==="found")return s.value.map(a=>a.getInstanceOrThrow());switch(s.type){case"undeclared":throw new z(F.UNDECLARED_DEPENDENCY,`Package '${o}' did not declare an UI dependency on all services implementing interface '${i}'. Add the dependency ("all": true) to the package configuration or remove the usage.`);case"unknown-package":throw new z(F.MISSING_PACKAGE,vb(o,i))}},getProperties:o=>r(o).properties,getIntl:o=>r(o).intl}}function vb(e,t){return`Package '${e}' was not found in the application's metadata while it attempted to reference the interface '${t}'. Check that the dependency is declared correctly in the packages that use '${e}'.`}const nV={title:"Anwendungsstart fehlgeschlagen",alertTitle:"Fehler",alertDescription:"Leider ist beim Start der Anwendung ein Fehler aufgetreten.","details.title":"Fehlerdetails","details.inspect":"Konsole öffnen, um weitere Details zu sehen.","details.errorMessage":"Fehler: {message}"},oV={title:"Application start failed",alertTitle:"Error",alertDescription:"Unfortunately an error occurred during application start.","details.title":"Error details","details.inspect":"Inspect the console to see more details.","details.errorMessage":"Error: {message}"},Tf={en:oV,de:nV},iV=!1;function sV(e){const t=e.intl;return R.jsx(Mk,{width:"100%",height:"100%",minWidth:"350px",minHeight:"150px",children:R.jsxs(qk,{padding:4,width:"100%",height:"100%",children:[R.jsx(Kk,{size:"md",children:t.formatMessage({id:"title"})}),R.jsxs(pm,{status:"error",maxWidth:550,borderRadius:"4px",mt:2,children:[R.jsx(mm,{}),R.jsx(gm,{children:t.formatMessage({id:"alertTitle"})}),R.jsx(ym,{children:t.formatMessage({id:"alertDescription"})})]}),iV]})})}const Wr=$a("runtime:CustomElement");function MV(e){var r,n,o,i,Jk,op;class t extends HTMLElement{constructor(){super();Gt(this,i);Gt(this,r);Gt(this,n);Gt(this,o);Lt(this,r,this.attachShadow({mode:"open"}))}static get observedAttributes(){return[]}connectedCallback(){Wr.debug("Launching application"),Le(this,n)&&Le(this,n).destroy(),Lt(this,n,il(this,i,op).call(this)),Le(this,n).start()}disconnectedCallback(){Wr.debug("Shutting down application"),Le(this,o)&&clearTimeout(Le(this,o)),Le(this,n)?.destroy(),Lt(this,n,void 0),Wr.debug("Application destroyed")}when(){return Le(this,n)?Le(this,n).whenAPI():Promise.reject(new z(F.NOT_MOUNTED,"Cannot use the application's API because the HTML element has not yet been mounted into the DOM."))}}return r=new WeakMap,n=new WeakMap,o=new WeakMap,i=new WeakSet,Jk=function(c){Le(this,o)&&clearTimeout(Le(this,o)),Lt(this,o,setTimeout(()=>{Le(this,n)&&(Wr.debug("Restarting application with new options",c),Le(this,n).destroy(),Lt(this,n,il(this,i,op).call(this,c)),Le(this,n).start())},1))},op=function(c){return new aV({hostElement:this,shadowRoot:Le(this,r),elementOptions:e,overrides:c,restart:il(this,i,Jk).bind(this)})},t}class aV{options;apiPromise;api;state="not-started";container;config;serviceLayer;lifecycleEvents;reactIntegration;stylesWatch;constructor(t){this.options=t}start(){if(this.state!=="not-started")throw new z(F.INTERNAL,`Cannot start element in state '${this.state}'`);this.state="starting",this.startImpl().catch(t=>{this.state!=="destroyed"&&(dV(t),this.reset(),this.state="error",this.showErrorScreen(t))})}destroy(){if(this.state!=="destroyed"){if(this.state==="started")try{this.triggerApplicationLifecycleEvent("before-stop")}catch{}this.state="destroyed",this.reset()}}reset(){this.apiPromise?.reject(Lb()),this.reactIntegration=gd(this.reactIntegration),this.options.shadowRoot.replaceChildren(),this.container=void 0,this.lifecycleEvents=void 0,this.serviceLayer=gd(this.serviceLayer),this.stylesWatch=gd(this.stylesWatch)}whenAPI(){return this.api?Promise.resolve(this.api):(this.apiPromise??=IC()).promise}async startImpl(){const{shadowRoot:t,hostElement:r,elementOptions:n,overrides:o}=this.options,i=this.config=await uV(r,n,o);this.checkAbort(),Wr.debug("Application config is",i);const s=await pP(n.appMetadata,i.locale);this.checkAbort();const a=this.container=bb(s.locale),l=this.initStyles();t.replaceChildren(a,...l);const{serviceLayer:u,packages:c}=this.initServiceLayer({container:a,properties:i.properties,i18n:s});this.lifecycleEvents=Sb(u,gp),await this.initAPI(u),this.checkAbort(),this.reactIntegration=ka.createForApp({rootNode:a,container:t,theme:n.theme,serviceLayer:u,packages:c});const d=this.options.elementOptions.component??fV;this.reactIntegration.render(w.createElement(d)),this.state="started",this.triggerApplicationLifecycleEvent("after-start"),Wr.debug("Application started")}initStyles(){const t=":host { all: initial; display: block; }",r=document.createElement("style");xb(r,{value:t});const n=this.options.elementOptions.appMetadata?.styles,o=document.createElement("style");return xb(o,n),[r,o]}initServiceLayer(t){const{hostElement:r,shadowRoot:n,elementOptions:o,restart:i}=this.options,{container:s,properties:a,i18n:l}=t,u=o.appMetadata?.packages??{},c=TP({host:r,shadowRoot:n,container:s,locale:l.locale,supportedLocales:l.supportedMessageLocales,changeLocale(m){const y=l.supportedMessageLocales;if(m!=null&&!l.supportsLocale(m))throw new z(F.UNSUPPORTED_LOCALE,`Unsupported locale '${m}' (supported locales: ${y.join(", ")}).`);i({locale:m})}}),{serviceLayer:d,packages:f}=lV({packageMetadata:u,builtinPackage:c,properties:a,i18n:l});return this.serviceLayer=d,Wr.isDebug()&&Wr.debug("Launching service layer with packages",Object.fromEntries(f)),d.start(),{serviceLayer:d,packages:f}}async initAPI(t){const r=Sb(t,mp);try{const n=this.api=await r.getApi();Wr.debug("Application API initialized to",n),this.apiPromise?.resolve(n)}catch(n){throw new z(F.INTERNAL,"Failed to gather the application's API methods.",{cause:n})}}triggerApplicationLifecycleEvent(t){this.lifecycleEvents?.emitLifecycleEvent(t)}checkAbort(){this.state==="destroyed"&&EC()}showErrorScreen(t){const{shadowRoot:r,elementOptions:n}=this.options,o=o1(),i=new n1(Object.keys(Tf)),{locale:s,messageLocale:a}=i.pickSupportedLocale(void 0,o),l=this.container=bb(s);l.classList.add("pioneer-root-error-screen");const u=Tf[a]??Tf.en,c=pp(s,u);this.reactIntegration=ka.createForErrorScreen({rootNode:l,container:r,theme:n.theme}),this.reactIntegration.render(w.createElement(sV,{intl:c,error:t})),r.replaceChildren(l)}}function bb(e){const t=document.createElement("div");return t.classList.add("pioneer-root"),t.style.minHeight="100%",t.style.height="100%",e&&(t.lang=e),t}function lV(e){const{packageMetadata:t,properties:r,builtinPackage:n,i18n:o}=e;let i;try{i=NC(t??{},o,r)}catch(l){throw new z(F.INVALID_METADATA,"Failed to parse package metadata.",{cause:l})}{const l=i.findIndex(u=>u.name===n.name);l>=0&&i.splice(l,1),i.push(n)}const s=[{interfaceName:mp},{interfaceName:gp},{interfaceName:CP,all:!0}],a=new _P(i,s);return{packages:new Map(i.map(l=>[l.name,l])),serviceLayer:a}}function Sb(e,t){const r=e.getService("@open-pioneer/runtime",{interfaceName:t},{ignoreDeclarationCheck:!0});if(r.type!=="found")throw new z(F.INTERNAL,`Failed to find instance of '${t}' (result type '${r.type}'). This is a builtin service that must be present exactly once.`);return r.value.getInstanceOrThrow()}async function uV(e,t,r){let n;try{const i=t.config??{},s=await t.resolveConfig?.({hostElement:e,getAttribute(a){return e.getAttribute(a)??void 0}})??{};n=[i,s]}catch(i){throw new z(F.CONFIG_RESOLUTION_FAILED,"Failed to resolve application properties.",{cause:i})}const o=cV(n);return r?.locale&&(o.locale=r.locale),o}function cV(e){const t=Object.assign({locale:void 0,properties:{}},...e),r=t.properties={};for(const n of e)for(const[o,i]of Object.entries(n.properties??{})){const s=r[o]??={};Object.assign(s,i)}return t}function xb(e,t){let r=t?.value??"";r=r.replace(/\/\*# sourceMappingURL=.*$/,"");const n=document.createTextNode(r);e.replaceChildren(n)}function dV(e){if(e instanceof z){const t=wC(e).reverse();if(t.length===1){console.error(e);return}let r=1;for(const n of t)console.error(`#${r}`,n),++r}else console.error("Unexpected error",e)}function fV(){return null}function OV(e){return{value:e}}const hV="modulepreload",pV=function(e,t){return new URL(e,t).href},wb={},NV=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){const s=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");o=Promise.allSettled(r.map(u=>{if(u=pV(u,n),u in wb)return;wb[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(!!n)for(let y=s.length-1;y>=0;y--){const v=s[y];if(v.href===u&&(!c||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${d}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":hV,c||(m.as="script"),m.crossOrigin="",m.href=u,l&&m.setAttribute("nonce",l),document.head.appendChild(m),c)return new Promise((y,v)=>{m.addEventListener("load",y),m.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};function DV(e,t,r){const n=w.useContext(vg);return w.useMemo(()=>eE("useService",n).getService(e,t,r??{}),[n,e,t,r])}function BV(e){const t=w.useContext(vg);return eE("useIntl",t).getIntl(e)}function eE(e,t){if(!t)throw new z(F.INTERNAL,`"Failed to access package context from '${e}': react integration was not set up properly.`);return t}export{_O as $,Lj as A,Mk as B,F3 as C,Ar as D,kV as E,Os as F,K3 as G,Kk as H,Va as I,D3 as J,$V as K,cg as L,tV as M,$a as N,gd as O,ip as P,lg as Q,B as R,kC as S,Fj as T,IC as U,Lb as V,yV as W,EC as X,LV as Y,xC as Z,NV as _,BV as a,CV as a0,Au as a1,PO as a2,Ax as a3,TV as a4,IV as a5,xu as a6,Qi as a7,SV as a8,Xk as a9,EV as aa,wV as ab,Oe as b,OV as c,MV as d,zP as e,bV as f,vV as g,Sd as h,DP as i,R as j,a0 as k,Su as l,Bi as m,wu as n,Sr as o,Vi as p,zi as q,w as r,dn as s,_V as t,DV as u,dm as v,gt as w,KP as x,xV as y,n2 as z}; diff --git a/starter/assets/Bscpkux00yZG.js b/starter/assets/Bscpkux00yZG.js deleted file mode 100644 index 417f9891d..000000000 --- a/starter/assets/Bscpkux00yZG.js +++ /dev/null @@ -1 +0,0 @@ -import{f as o,o as i,k as c,j as l,b as m,l as f}from"./CZJiGrdGqn8U.js";var x=o(function(a,e){const{className:n,centerContent:s,...t}=i(a),r=c("Container",a);return l.jsx(m.div,{ref:e,className:f("chakra-container",n),...t,__css:{...r,...s&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});x.displayName="Container";export{x as C}; diff --git a/starter/assets/C8FqsqT4ziZ5.js b/starter/assets/C8FqsqT4ziZ5.js new file mode 100644 index 000000000..80ddb223c --- /dev/null +++ b/starter/assets/C8FqsqT4ziZ5.js @@ -0,0 +1 @@ +import{o as r,q as i,p as c,j as l,b as m,s as f}from"./BUVr5rEhM7JP.js";const x=r(function(s,e){const{className:n,centerContent:a,...t}=i(s),o=c("Container",s);return l.jsx(m.div,{ref:e,className:f("chakra-container",n),...t,__css:{...o,...a&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});x.displayName="Container";export{x as C}; diff --git a/starter/assets/D2LfgHXD-fJK.js b/starter/assets/CBOaykVBBzNZ.js similarity index 88% rename from starter/assets/D2LfgHXD-fJK.js rename to starter/assets/CBOaykVBBzNZ.js index 400b52bb5..751a8620a 100644 --- a/starter/assets/D2LfgHXD-fJK.js +++ b/starter/assets/CBOaykVBBzNZ.js @@ -1 +1 @@ -import{_ as a,c as p,u as c,a as m,j as r,B as l,b as t,H as u,T as s,d}from"./CZJiGrdGqn8U.js";import{u as f}from"./C3lYQNvj0qtw.js";import{C as g}from"./Bscpkux00yZG.js";class h{greet(){return"Hello from Greeter"}}const x={empty:{name:"empty",services:{},ui:{references:[{name:"sample-package.Greeter",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"sample-package":{name:"sample-package",services:{GreeterImpl:{name:"GreeterImpl",clazz:h,provides:[{name:"sample-package.Greeter",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}}},v="",_=["en"];function j(e){switch(e){case"en":return a(()=>import("./BjrNetrYEFpt.js"),[],import.meta.url).then(n=>n.default)}throw new Error(`Unsupported locale: '${e}'`)}const k=p(v),I=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:j,locales:_,packages:x,styles:k},Symbol.toStringTag,{value:"Module"})),o="empty",b=c.bind(void 0,o),C=m.bind(void 0,o),E=e=>{const{textToShow:n}=e,{containerProps:i}=f("simple-ui",e);return r.jsx(l,{...i,border:"1.5px solid",textAlign:"center",children:r.jsx(t.p,{children:n})})};function S(){const e=C(),n=b("sample-package.Greeter");return r.jsxs(g,{children:[r.jsx(u,{as:"h1",size:"lg",children:e.formatMessage({id:"heading"})}),r.jsx(s,{pt:5,children:e.formatMessage({id:"text"})}),r.jsxs(s,{pt:5,children:["This messages comes from the sample package","'","s greeter service: ",n.greet()]}),r.jsx(t.div,{mt:5,children:r.jsx(E,{textToShow:"This text is rendered inside the sample UI-Component 'SimpleUiComponent'"})})]})}const y=d({component:S,appMetadata:I});customElements.define("empty-app",y); +import{_ as a,c as p,u as c,a as m,j as r,B as l,b as t,H as u,T as s,d}from"./BUVr5rEhM7JP.js";import{u as f}from"./D_NXjk9T_0pm.js";import{C as g}from"./C8FqsqT4ziZ5.js";class h{greet(){return"Hello from Greeter"}}const x={empty:{name:"empty",services:{},ui:{references:[{name:"sample-package.Greeter",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"sample-package":{name:"sample-package",services:{GreeterImpl:{name:"GreeterImpl",clazz:h,provides:[{name:"sample-package.Greeter",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},v="",_=["en"];function j(e){switch(e){case"en":return a(()=>import("./BjrNetrYEFpt.js"),[],import.meta.url).then(n=>n.default)}throw new Error(`Unsupported locale: '${e}'`)}const k=p(v),I=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:j,locales:_,packages:x,styles:k},Symbol.toStringTag,{value:"Module"})),o="empty",b=c.bind(void 0,o),C=m.bind(void 0,o),E=e=>{const{textToShow:n}=e,{containerProps:i}=f("simple-ui",e);return r.jsx(l,{...i,border:"1.5px solid",textAlign:"center",children:r.jsx(t.p,{children:n})})};function S(){const e=C(),n=b("sample-package.Greeter");return r.jsxs(g,{children:[r.jsx(u,{as:"h1",size:"lg",children:e.formatMessage({id:"heading"})}),r.jsx(s,{pt:5,children:e.formatMessage({id:"text"})}),r.jsxs(s,{pt:5,children:["This messages comes from the sample package","'","s greeter service: ",n.greet()]}),r.jsx(t.div,{mt:5,children:r.jsx(E,{textToShow:"This text is rendered inside the sample UI-Component 'SimpleUiComponent'"})})]})}const y=d({component:S,appMetadata:I});customElements.define("empty-app",y); diff --git a/starter/assets/CN15WY9Csywr.js b/starter/assets/CN15WY9Csywr.js deleted file mode 100644 index 7c09ffa98..000000000 --- a/starter/assets/CN15WY9Csywr.js +++ /dev/null @@ -1,23 +0,0 @@ -var Ip=Object.defineProperty;var ju=i=>{throw TypeError(i)};var Rp=(i,t,e)=>t in i?Ip(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var Rt=(i,t,e)=>Rp(i,typeof t!="symbol"?t+"":t,e),Nl=(i,t,e)=>t.has(i)||ju("Cannot "+e);var R=(i,t,e)=>(Nl(i,t,"read from private field"),e?e.call(i):t.get(i)),H=(i,t,e)=>t.has(i)?ju("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),Q=(i,t,e,n)=>(Nl(i,t,"write to private field"),n?n.call(i,e):t.set(i,e),e),ot=(i,t,e)=>(Nl(i,t,"access private method"),e);var Bu=(i,t,e,n)=>({set _(s){Q(i,t,s,e)},get _(){return R(i,t,n)}});import{r as b,f as Qn,j as S,I as sl,e as Tp,g as Pp,h as Op,i as pc,m as Lp,k as _c,o as rl,b as Oe,l as Ws,n as Xf,p as Ap,q as ba,s as qf,t as Yf,v as Dp,w as kp,x as Fp,y as Np,z as Gp,A as Vp,C as Ci,D as zp,E as jp,F as Bp,G as Wp,J as Up,K as ii,L as $p,M as Zf,B as Mt,u as vc,N as Wu,O as Uu,P as Hp,Q as $u,R as Xp,S as qp,_ as Hu,c as Yp,U as Kf,a as ts,V as Xn,T as al,W as Xu,X as Zp,Y,Z as K,$ as Jf,a0 as Kp,a1 as qu,a2 as Jp,d as Qp}from"./CZJiGrdGqn8U.js";import{u as Ae,c as yc,T as Yu,S as Zu}from"./C3lYQNvj0qtw.js";import{u as Qf,a as t_,b as e_,c as i_,d as tg,B as eg,F as ig,H as n_}from"./DOkIEgc2QT0S.js";const Va=Symbol("EventEmitterState");class xc{[Va]=new s_;on(t,e){return this[Va].on(t,{listener:e})}once(t,e){return this[Va].on(t,{listener:e,once:!0})}emit(t,...e){this[Va].emit(t,e[0])}}class s_{handlers=new Map;on(t,e){let n=this.handlers.get(t);return n||(n=new Set,this.handlers.set(t,n)),n.add(e),{destroy(){e.removed=!0,n?.delete(e),n=void 0}}}emit(t,e){const n=this.handlers.get(t);if(!n)return;const s=[...n];for(const r of s)r.removed||(r.once&&(r.removed=!0,n.delete(r)),r.listener(e))}}function r_(i){const{viewBox:t="0 0 24 24",d:e,displayName:n,defaultProps:s={}}=i,r=b.Children.toArray(i.path),a=Qn((o,l)=>S.jsx(sl,{ref:l,viewBox:t,...s,...o,children:r.length?r:S.jsx("path",{fill:"currentColor",d:e})}));return a.displayName=n,a}function a_(i){const{theme:t}=Tp(),e=Pp();return b.useMemo(()=>Op(t.direction,{...e,...i}),[i,t.direction,e])}var o_=Object.defineProperty,l_=(i,t,e)=>t in i?o_(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,At=(i,t,e)=>(l_(i,typeof t!="symbol"?t+"":t,e),e);function Ku(i){return i.sort((t,e)=>{const n=t.compareDocumentPosition(e);if(n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var h_=i=>typeof i=="object"&&"nodeType"in i&&i.nodeType===Node.ELEMENT_NODE;function Ju(i,t,e){let n=i+1;return e&&n>=t&&(n=0),n}function Qu(i,t,e){let n=i-1;return e&&n<0&&(n=t),n}var Eh=typeof window<"u"?b.useLayoutEffect:b.useEffect,xo=i=>i,c_=class{constructor(){At(this,"descendants",new Map),At(this,"register",i=>{if(i!=null)return h_(i)?this.registerNode(i):t=>{this.registerNode(t,i)}}),At(this,"unregister",i=>{this.descendants.delete(i);const t=Ku(Array.from(this.descendants.keys()));this.assignIndex(t)}),At(this,"destroy",()=>{this.descendants.clear()}),At(this,"assignIndex",i=>{this.descendants.forEach(t=>{const e=i.indexOf(t.node);t.index=e,t.node.dataset.index=t.index.toString()})}),At(this,"count",()=>this.descendants.size),At(this,"enabledCount",()=>this.enabledValues().length),At(this,"values",()=>Array.from(this.descendants.values()).sort((t,e)=>t.index-e.index)),At(this,"enabledValues",()=>this.values().filter(i=>!i.disabled)),At(this,"item",i=>{if(this.count()!==0)return this.values()[i]}),At(this,"enabledItem",i=>{if(this.enabledCount()!==0)return this.enabledValues()[i]}),At(this,"first",()=>this.item(0)),At(this,"firstEnabled",()=>this.enabledItem(0)),At(this,"last",()=>this.item(this.descendants.size-1)),At(this,"lastEnabled",()=>{const i=this.enabledValues().length-1;return this.enabledItem(i)}),At(this,"indexOf",i=>{var t,e;return i&&(e=(t=this.descendants.get(i))==null?void 0:t.index)!=null?e:-1}),At(this,"enabledIndexOf",i=>i==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(i))),At(this,"next",(i,t=!0)=>{const e=Ju(i,this.count(),t);return this.item(e)}),At(this,"nextEnabled",(i,t=!0)=>{const e=this.item(i);if(!e)return;const n=this.enabledIndexOf(e.node),s=Ju(n,this.enabledCount(),t);return this.enabledItem(s)}),At(this,"prev",(i,t=!0)=>{const e=Qu(i,this.count()-1,t);return this.item(e)}),At(this,"prevEnabled",(i,t=!0)=>{const e=this.item(i);if(!e)return;const n=this.enabledIndexOf(e.node),s=Qu(n,this.enabledCount()-1,t);return this.enabledItem(s)}),At(this,"registerNode",(i,t)=>{if(!i||this.descendants.has(i))return;const e=Array.from(this.descendants.keys()).concat(i),n=Ku(e);t?.disabled&&(t.disabled=!!t.disabled);const s={node:i,index:-1,...t};this.descendants.set(i,s),this.assignIndex(n)})}};function u_(){const i=b.useRef(new c_);return Eh(()=>()=>i.current.destroy()),i.current}var[d_,ng]=pc({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function f_(i){const t=ng(),[e,n]=b.useState(-1),s=b.useRef(null);Eh(()=>()=>{s.current&&t.unregister(s.current)},[]),Eh(()=>{if(!s.current)return;const a=Number(s.current.dataset.index);e!=a&&!Number.isNaN(a)&&n(a)});const r=xo(i?t.register(i):t.register);return{descendants:t,index:e,enabledIndex:t.enabledIndexOf(s.current),register:Lp(r,s)}}function g_(){return[xo(d_),()=>xo(ng()),()=>u_(),s=>f_(s)]}var bc=Qn(function(t,e){var n;const s=_c("FormLabel",t),r=rl(t),{className:a,children:o,requiredIndicator:l=S.jsx(sg,{}),optionalIndicator:h=null,...c}=r,u=Qf(),d=(n=u?.getLabelProps(c,e))!=null?n:{ref:e,...c};return S.jsxs(Oe.label,{...d,className:Ws("chakra-form__label",r.className),__css:{display:"block",textAlign:"start",...s},children:[o,u?.isRequired?l:h]})});bc.displayName="FormLabel";var sg=Qn(function(t,e){const n=Qf(),s=t_();if(!n?.isRequired)return null;const r=Ws("chakra-form__required-indicator",t.className);return S.jsx(Oe.span,{...n?.getRequiredIndicatorProps(t,e),__css:s.requiredIndicator,className:r})});sg.displayName="RequiredIndicator";function m_(i,t){if(i==null)return{};var e={};for(var n in i)if({}.hasOwnProperty.call(i,n)){if(t.includes(n))continue;e[n]=i[n]}return e}function Sh(i,t){return Sh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},Sh(i,t)}function Yn(i){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(i)}function p_(i,t){if(Yn(i)!="object"||!i)return i;var e=i[Symbol.toPrimitive];if(e!==void 0){var n=e.call(i,t||"default");if(Yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(i)}function rg(i){var t=p_(i,"string");return Yn(t)=="symbol"?t:t+""}function ys(i,t,e){return(t=rg(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var ag=i=>i.hasAttribute("tabindex"),__=i=>ag(i)&&i.tabIndex===-1;function v_(i){return!!i.getAttribute("disabled")||!!i.getAttribute("aria-disabled")}function og(i){return i.parentElement&&og(i.parentElement)?!0:i.hidden}function y_(i){const t=i.getAttribute("contenteditable");return t!=="false"&&t!=null}function x_(i){if(!Xf(i)||og(i)||v_(i))return!1;const{localName:t}=i;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const n={a:()=>i.hasAttribute("href"),audio:()=>i.hasAttribute("controls"),video:()=>i.hasAttribute("controls")};return t in n?n[t]():y_(i)?!0:ag(i)}function b_(i){return i?Xf(i)&&x_(i)&&!__(i):!1}var Mc=Qn(function(t,e){const{borderLeftWidth:n,borderBottomWidth:s,borderTopWidth:r,borderRightWidth:a,borderWidth:o,borderStyle:l,borderColor:h,...c}=_c("Divider",t),{className:u,orientation:d="horizontal",__css:f,...g}=rl(t),m={vertical:{borderLeftWidth:n||a||o||"1px",height:"100%"},horizontal:{borderBottomWidth:s||r||o||"1px",width:"100%"}};return S.jsx(Oe.hr,{ref:e,"aria-orientation":d,...g,__css:{...c,border:"0",borderColor:h,borderStyle:l,...m[d],...f},className:Ws("chakra-divider",u)})});Mc.displayName="Divider";var xs=Qn(function(t,e){const{direction:n,align:s,justify:r,wrap:a,basis:o,grow:l,shrink:h,...c}=t,u={display:"flex",flexDirection:n,alignItems:s,justifyContent:r,flexWrap:a,flexBasis:o,flexGrow:l,flexShrink:h};return S.jsx(Oe.div,{ref:e,__css:u,...c})});xs.displayName="Flex";function M_(i,t={}){const{ssr:e=!0,fallback:n}=t,{getWindow:s}=Ap(),r=Array.isArray(i)?i:[i];let a=Array.isArray(n)?n:[n];a=a.filter(h=>h!=null);const[o,l]=b.useState(()=>r.map((h,c)=>({media:h,matches:e?!!a[c]:s().matchMedia(h).matches})));return b.useEffect(()=>{const h=s();l(r.map(d=>({media:d,matches:h.matchMedia(d).matches})));const c=r.map(d=>h.matchMedia(d)),u=d=>{l(f=>f.slice().map(g=>g.media===d.media?{...g,matches:d.matches}:g))};return c.forEach(d=>{typeof d.addListener=="function"?d.addListener(u):d.addEventListener("change",u)}),()=>{c.forEach(d=>{typeof d.removeListener=="function"?d.removeListener(u):d.removeEventListener("change",u)})}},[s]),o.map(h=>h.matches)}function C_(i,t,e=e_){let n=Object.keys(i).indexOf(t);if(n!==-1)return i[t];let s=e.indexOf(t);for(;s>=0;){const r=e[s];if(i.hasOwnProperty(r)){n=s;break}s-=1}if(n!==-1){const r=e[n];return i[r]}}function w_(i){var t,e;const n=qf(i)?i:{fallback:i??"base"},r=ba().__breakpoints.details.map(({minMaxQuery:h,breakpoint:c})=>({breakpoint:c,query:h.replace("@media screen and ","")})),a=r.map(h=>h.breakpoint===n.fallback),l=M_(r.map(h=>h.query),{fallback:a,ssr:n.ssr}).findIndex(h=>h==!0);return(e=(t=r[l])==null?void 0:t.breakpoint)!=null?e:n.fallback}function E_(i,t){var e;const n=qf(t)?t:{fallback:t??"base"},s=w_(n),r=ba();if(!s)return;const a=Array.from(((e=r.__breakpoints)==null?void 0:e.keys)||[]),o=Array.isArray(i)?Object.fromEntries(Object.entries(i_(i,a)).map(([l,h])=>[l,h])):i;return C_(o,s,a)}function S_(i){const t=i.current;if(!t)return!1;const e=Dp(t);return!e||t.contains(e)?!1:!!b_(e)}function I_(i,t){const{shouldFocus:e,visible:n,focusRef:s}=t,r=e&&!n;Yf(()=>{if(!r||S_(i))return;const a=s?.current||i.current;let o;if(a)return o=requestAnimationFrame(()=>{a.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(o)}},[r,i,s])}function R_(i){const{ref:t,handler:e,enabled:n=!0}=i,s=kp(e),a=b.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;b.useEffect(()=>{if(!n)return;const o=u=>{Gl(u,t)&&(a.isPointerDown=!0)},l=u=>{if(a.ignoreEmulatedMouseEvents){a.ignoreEmulatedMouseEvents=!1;return}a.isPointerDown&&e&&Gl(u,t)&&(a.isPointerDown=!1,s(u))},h=u=>{a.ignoreEmulatedMouseEvents=!0,e&&a.isPointerDown&&Gl(u,t)&&(a.isPointerDown=!1,s(u))},c=lg(t.current);return c.addEventListener("mousedown",o,!0),c.addEventListener("mouseup",l,!0),c.addEventListener("touchstart",o,!0),c.addEventListener("touchend",h,!0),()=>{c.removeEventListener("mousedown",o,!0),c.removeEventListener("mouseup",l,!0),c.removeEventListener("touchstart",o,!0),c.removeEventListener("touchend",h,!0)}},[e,t,s,a,n])}function Gl(i,t){var e;const n=i.target;return n&&!lg(n).contains(n)?!1:!((e=t.current)!=null&&i.composedPath().includes(e))}function lg(i){var t;return(t=i?.ownerDocument)!=null?t:document}function T_(i){const{isOpen:t,ref:e}=i,[n,s]=b.useState(t),[r,a]=b.useState(!1);return b.useEffect(()=>{r||(s(t),a(!0))},[t,r,n]),Fp(()=>e.current,"animationend",()=>{s(t)}),{present:!(t?!1:!n),onComplete(){var l;const h=Np(e.current),c=new h.CustomEvent("animationend",{bubbles:!0});(l=e.current)==null||l.dispatchEvent(c)}}}var[P_,aL,O_,oL]=g_(),[L_,lL]=pc({strict:!1,name:"MenuContext"});function A_(i,...t){const e=b.useId(),n=i||e;return b.useMemo(()=>t.map(s=>`${s}-${n}`),[n,t])}function D_(i){var t;return(t=i?.ownerDocument)!=null?t:document}function k_(i={}){const{id:t,closeOnSelect:e=!0,closeOnBlur:n=!0,initialFocusRef:s,autoSelect:r=!0,isLazy:a,isOpen:o,defaultIsOpen:l,onClose:h,onOpen:c,placement:u="bottom-start",lazyBehavior:d="unmount",direction:f,computePositionOnMount:g=!1,...m}=i,p=b.useRef(null),_=b.useRef(null),v=O_(),y=b.useCallback(()=>{requestAnimationFrame(()=>{var U;(U=p.current)==null||U.focus({preventScroll:!1})})},[]),x=b.useCallback(()=>{const U=setTimeout(()=>{var P;if(s)(P=s.current)==null||P.focus();else{const lt=v.firstEnabled();lt&&G(lt.index)}});B.current.add(U)},[v,s]),M=b.useCallback(()=>{const U=setTimeout(()=>{const P=v.lastEnabled();P&&G(P.index)});B.current.add(U)},[v]),w=b.useCallback(()=>{c?.(),r?x():y()},[r,x,y,c]),{isOpen:E,onOpen:C,onClose:I,onToggle:D}=Gp({isOpen:o,defaultIsOpen:l,onClose:h,onOpen:w});R_({enabled:E&&n,ref:p,handler:U=>{var P;(P=_.current)!=null&&U.composedPath().includes(P)||I()}});const k=Vp({...m,enabled:E||g,placement:u,direction:f}),[A,G]=b.useState(-1);Yf(()=>{E||G(-1)},[E]),I_(p,{focusRef:_,visible:E,shouldFocus:!0});const z=T_({isOpen:E,ref:p}),[V,O]=A_(t,"menu-button","menu-list"),J=b.useCallback(()=>{C(),y()},[C,y]),B=b.useRef(new Set([]));b.useEffect(()=>{const U=B.current;return()=>{U.forEach(P=>clearTimeout(P)),U.clear()}},[]);const at=b.useCallback(()=>{C(),x()},[x,C]),X=b.useCallback(()=>{C(),M()},[C,M]),nt=b.useCallback(()=>{var U,P;const lt=D_(p.current),ct=(U=p.current)==null?void 0:U.contains(lt.activeElement);if(!(E&&!ct))return;const wt=(P=v.item(A))==null?void 0:P.node;wt?.focus({preventScroll:!0})},[E,A,v]),j=b.useRef(null);return{openAndFocusMenu:J,openAndFocusFirstItem:at,openAndFocusLastItem:X,onTransitionEnd:nt,unstable__animationState:z,descendants:v,popper:k,buttonId:V,menuId:O,forceUpdate:k.forceUpdate,orientation:"vertical",isOpen:E,onToggle:D,onOpen:C,onClose:I,menuRef:p,buttonRef:_,focusedIndex:A,closeOnSelect:e,closeOnBlur:n,autoSelect:r,setFocusedIndex:G,isLazy:a,lazyBehavior:d,initialFocusRef:s,rafId:j}}var[F_,N_]=pc({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),hg=i=>{const{children:t}=i,e=Ci("Menu",i),n=rl(i),{direction:s}=ba(),{descendants:r,...a}=k_({...n,direction:s}),o=b.useMemo(()=>a,[a]),{isOpen:l,onClose:h,forceUpdate:c}=o;return S.jsx(P_,{value:r,children:S.jsx(L_,{value:o,children:S.jsx(F_,{value:e,children:zp(t,{isOpen:l,onClose:h,forceUpdate:c})})})})};hg.displayName="Menu";var cg=i=>{const{className:t,children:e,...n}=i,s=N_(),r=b.Children.only(e),a=b.isValidElement(r)?b.cloneElement(r,{focusable:"false","aria-hidden":!0,className:Ws("chakra-menu__icon",r.props.className)}):null,o=Ws("chakra-menu__icon-wrapper",t);return S.jsx(Oe.span,{className:o,...n,__css:s.icon,children:a})};cg.displayName="MenuIcon";var ug=Qn(function(t,e){const{children:n,placeholder:s,className:r,...a}=t;return S.jsxs(Oe.select,{...a,ref:e,className:Ws("chakra-select",r),children:[s&&S.jsx("option",{value:"",children:s}),n]})});ug.displayName="SelectField";function G_(i,t){const e={},n={};for(const[s,r]of Object.entries(i))t.includes(s)?e[s]=r:n[s]=r;return[e,n]}var dg=Qn((i,t)=>{var e;const n=Ci("Select",i),{rootProps:s,placeholder:r,icon:a,color:o,height:l,h,minH:c,minHeight:u,iconColor:d,iconSize:f,...g}=rl(i),[m,p]=G_(g,Bp),_=tg(p),v={width:"100%",height:"fit-content",position:"relative",color:o},y={paddingEnd:"2rem",...n.field,_focus:{zIndex:"unset",...(e=n.field)==null?void 0:e._focus}};return S.jsxs(Oe.div,{className:"chakra-select__wrapper",__css:v,...m,...s,children:[S.jsx(ug,{ref:t,height:h??l,minH:c??u,placeholder:r,..._,__css:y,children:i.children}),S.jsx(fg,{"data-disabled":jp(_.disabled),...(d||o)&&{color:d||o},__css:n.icon,...f&&{fontSize:f},children:a})]})});dg.displayName="Select";var V_=i=>S.jsx("svg",{viewBox:"0 0 24 24",...i,children:S.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),z_=Oe("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),fg=i=>{const{children:t=S.jsx(V_,{}),...e}=i,n=b.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return S.jsx(z_,{...e,className:"chakra-select__icon-wrapper",children:b.isValidElement(t)?n:null})};fg.displayName="SelectIcon";function Ih(i){const t=b.useRef(null);return b.useLayoutEffect(()=>{t.current=i}),b.useCallback((...n)=>{const s=t.current;return s(...n)},[])}const j_=Wp({},Up);class Cc{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}class ni{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}function B_(i,t,e){let n,s;e=e||Ni;let r=0,a=i.length,o=!1;for(;r>1),s=+e(i[n],t),s<0?r=n+1:(a=n,o=!s);return o?r:~r}function Ni(i,t){return i>t?1:i0?s-1:s}return n-1}if(e>0){for(let s=1;s0||a===0)})}function Us(){return!0}function sr(){return!1}function $s(){}function gg(i){let t=!1,e,n,s;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==s||!yn(r,n))&&(t=!0,s=this,n=r,e=i.apply(this,arguments)),e}}function $_(i){function t(){let e;try{e=i()}catch(n){return Promise.reject(n)}return e instanceof Promise?e:Promise.resolve(e)}return t()}function Ma(i){for(const t in i)delete i[t]}function Hs(i){let t;for(t in i)return!1;return!t}class ol extends Cc{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const n=this.listeners_||(this.listeners_={}),s=n[t]||(n[t]=[]);s.includes(e)||s.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,s=this.listeners_&&this.listeners_[n];if(!s)return;const r=e?new ni(t):t;r.target||(r.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),o=this.pendingRemovals_||(this.pendingRemovals_={});n in a||(a[n]=0,o[n]=0),++a[n];let l;for(let h=0,c=s.length;h0:!1}removeEventListener(t,e){if(!this.listeners_)return;const n=this.listeners_[t];if(!n)return;const s=n.indexOf(e);s!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[s]=$s,++this.pendingRemovals_[t]):(n.splice(s,1),n.length===0&&delete this.listeners_[t]))}}const et={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function ht(i,t,e,n,s){if(n&&n!==i&&(e=e.bind(n)),s){const a=e;e=function(){i.removeEventListener(t,e),a.apply(this,arguments)}}const r={target:i,type:t,listener:e};return i.addEventListener(t,e),r}function jr(i,t,e,n){return ht(i,t,e,n,!0)}function St(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),Ma(i))}class Ca extends ol{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(et.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,s=new Array(n);for(let r=0;r1?(e=s,n=r):l>0&&(e+=a*l,n+=o*l)}return Gi(i,t,e,n)}function Gi(i,t,e,n){const s=e-i,r=n-t;return s*s+r*r}function q_(i){const t=i.length;for(let n=0;nr&&(r=l,s=o)}if(r===0)return null;const a=i[s];i[s]=i[n],i[n]=a;for(let o=n+1;o=0;n--){e[n]=i[n][t]/i[n][n];for(let s=n-1;s>=0;s--)i[s][t]-=i[s][n]*e[n]}return e}function ed(i){return i*180/Math.PI}function yi(i){return i*Math.PI/180}function Ts(i,t){const e=i%t;return e*t<0?e+t:e}function Ie(i,t,e){return i+e*(t-i)}function ll(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function za(i,t){return Math.floor(ll(i,t))}function ja(i,t){return Math.ceil(ll(i,t))}class mg extends $e{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[Ct.OPACITY]=t.opacity!==void 0?t.opacity:1,ft(typeof e[Ct.OPACITY]=="number","Layer opacity must be a number"),e[Ct.VISIBLE]=t.visible!==void 0?t.visible:!0,e[Ct.Z_INDEX]=t.zIndex,e[Ct.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[Ct.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[Ct.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[Ct.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:t===void 0?!0:t},n=this.getZIndex();return e.opacity=Ot(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=n===void 0&&!e.managed?1/0:n,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return mt()}getLayerStatesArray(t){return mt()}getExtent(){return this.get(Ct.EXTENT)}getMaxResolution(){return this.get(Ct.MAX_RESOLUTION)}getMinResolution(){return this.get(Ct.MIN_RESOLUTION)}getMinZoom(){return this.get(Ct.MIN_ZOOM)}getMaxZoom(){return this.get(Ct.MAX_ZOOM)}getOpacity(){return this.get(Ct.OPACITY)}getSourceState(){return mt()}getVisible(){return this.get(Ct.VISIBLE)}getZIndex(){return this.get(Ct.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(Ct.EXTENT,t)}setMaxResolution(t){this.set(Ct.MAX_RESOLUTION,t)}setMinResolution(t){this.set(Ct.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(Ct.MAX_ZOOM,t)}setMinZoom(t){this.set(Ct.MIN_ZOOM,t)}setOpacity(t){ft(typeof t=="number","Layer opacity must be a number"),this.set(Ct.OPACITY,t)}setVisible(t){this.set(Ct.VISIBLE,t)}setZIndex(t){this.set(Ct.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Be={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},ie={ANIMATING:0,INTERACTING:1},Ee={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Y_=42,Ec=256,Xs={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};let Sc=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Xs[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const wa=6378137,bs=Math.PI*wa,Z_=[-bs,-bs,bs,bs],K_=[-180,-85,180,85],Ba=wa*Math.log(Math.tan(Math.PI/2));class rs extends Sc{constructor(t){super({code:t,units:"m",extent:Z_,global:!0,worldExtent:K_,getPointResolution:function(e,n){return e/Math.cosh(n[1]/wa)}})}}const id=[new rs("EPSG:3857"),new rs("EPSG:102100"),new rs("EPSG:102113"),new rs("EPSG:900913"),new rs("http://www.opengis.net/def/crs/EPSG/0/3857"),new rs("http://www.opengis.net/gml/srs/epsg.xml#3857")];function J_(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let s=0;sBa?r=Ba:r<-Ba&&(r=-Ba),t[s+1]=r}return t}function Q_(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let s=0;ss&&(l=l|Bt.RIGHT),or&&(l=l|Bt.ABOVE),l===Bt.UNKNOWN&&(l=Bt.INTERSECTING),l}function Le(){return[1/0,1/0,-1/0,-1/0]}function ji(i,t,e,n,s){return s?(s[0]=i,s[1]=t,s[2]=e,s[3]=n,s):[i,t,e,n]}function Ea(i){return ji(1/0,1/0,-1/0,-1/0,i)}function vg(i,t){const e=i[0],n=i[1];return ji(e,n,e,n,t)}function Tc(i,t,e,n,s){const r=Ea(s);return yg(r,i,t,e,n)}function Zs(i,t){return i[0]==t[0]&&i[2]==t[2]&&i[1]==t[1]&&i[3]==t[3]}function Pc(i,t){return t[0]i[2]&&(i[2]=t[2]),t[1]i[3]&&(i[3]=t[3]),i}function Or(i,t){t[0]i[2]&&(i[2]=t[0]),t[1]i[3]&&(i[3]=t[1])}function yg(i,t,e,n,s){for(;et[0]?n[0]=i[0]:n[0]=t[0],i[1]>t[1]?n[1]=i[1]:n[1]=t[1],i[2]=t[0]&&i[1]<=t[3]&&i[3]>=t[1]}function ul(i){return i[2]=a&&m<=l),!n&&r&Bt.RIGHT&&!(s&Bt.RIGHT)&&(p=f-(d-l)*g,n=p>=o&&p<=h),!n&&r&Bt.BELOW&&!(s&Bt.BELOW)&&(m=d-(f-o)/g,n=m>=a&&m<=l),!n&&r&Bt.LEFT&&!(s&Bt.LEFT)&&(p=f-(d-a)*g,n=p>=o&&p<=h)}return n}function xg(i,t){const e=t.getExtent(),n=ti(i);if(t.canWrapX()&&(n[0]=e[2])){const s=dt(e),a=Math.floor((n[0]-e[0])/s)*s;i[0]-=a,i[2]-=a}return i}function bg(i,t,e){if(t.canWrapX()){const n=t.getExtent();if(!isFinite(i[0])||!isFinite(i[2]))return[[n[0],i[1],n[2],i[3]]];xg(i,t);const s=dt(n);if(dt(i)>s&&!e)return[[n[0],i[1],n[2],i[3]]];if(i[0]n[2])return[[i[0],i[1],n[2],i[3]],[n[0],i[1],i[2]-s,i[3]]]}return[i]}function hv(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function Mo(i,t){let e=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=t[n]){e=!1;break}return e}function Lc(i,t){const e=Math.cos(t),n=Math.sin(t),s=i[0]*e-i[1]*n,r=i[1]*e+i[0]*n;return i[0]=s,i[1]=r,i}function cv(i,t){return i[0]*=t,i[1]*=t,i}function Mg(i,t){const e=i[0]-t[0],n=i[1]-t[1];return e*e+n*n}function Cg(i,t){return Math.sqrt(Mg(i,t))}function wg(i,t){if(t.canWrapX()){const e=dt(t.getExtent()),n=Eg(i,t,e);n&&(i[0]-=n*e)}return i}function Eg(i,t,e){const n=t.getExtent();let s=0;return t.canWrapX()&&(i[0]n[2])&&(e=e||dt(n),s=Math.floor((i[0]-n[0])/e)),s}const dl=63710088e-1;function Ah(i,t,e){e=e||dl;const n=yi(i[1]),s=yi(t[1]),r=(s-n)/2,a=yi(t[0]-i[0])/2,o=Math.sin(r)*Math.sin(r)+Math.sin(a)*Math.sin(a)*Math.cos(n)*Math.cos(s);return 2*e*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))}function Vl(i,t){let e=0;for(let n=0,s=i.length;n=o?t[r+l]:a[l]}return e}}function mv(i,t,e,n){const s=Gt(i),r=Gt(t);qs(s,r,rd(e)),qs(r,s,rd(n))}function ds(i,t){if(i===t)return!0;const e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||fl(i,t)===Ac)&&e}function fl(i,t){const e=i.getCode(),n=t.getCode();let s=pg(e,n);return s||(s=Dc),s}function Co(i,t){const e=Gt(i),n=Gt(t);return fl(e,n)}function Pg(i,t,e){return Co(t,e)(i,void 0,i.length)}function Fh(i,t){return i}function qe(i,t){return Dh&&!Mo(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(Dh=!1,Rg("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function Og(i,t){return i}function Dn(i,t){return i}function ad(i,t,e){return function(n){let s,r;if(i.canWrapX()){const a=i.getExtent(),o=dt(a);n=n.slice(0),r=Eg(n,i,o),r&&(n[0]=n[0]-r*o),n[0]=Ot(n[0],a[0],a[2]),n[1]=Ot(n[1],a[1],a[3]),s=e(n)}else s=e(n);return r&&t.canWrapX()&&(s[0]+=r*dt(t.getExtent())),s}}function pv(){kh(id),kh(sd),gv(sd,id,J_,Q_)}pv();function od(i,t,e){return function(n,s,r,a,o){if(!n)return;if(!s&&!t)return n;const l=t?0:r[0]*s,h=t?0:r[1]*s,c=o?o[0]:0,u=o?o[1]:0;let d=i[0]+l/2+c,f=i[2]-l/2+c,g=i[1]+h/2+u,m=i[3]-h/2+u;d>f&&(d=(f+d)/2,f=d),g>m&&(g=(m+g)/2,m=g);let p=Ot(n[0],d,f),_=Ot(n[1],g,m);if(a&&e&&s){const v=30*s;p+=-v*Math.log(1+Math.max(0,d-n[0])/v)+v*Math.log(1+Math.max(0,n[0]-f)/v),_+=-v*Math.log(1+Math.max(0,g-n[1])/v)+v*Math.log(1+Math.max(0,n[1]-m)/v)}return[p,_]}}function _v(i){return i}function Fc(i,t,e,n){const s=dt(t)/e[0],r=Zt(t)/e[1];return n?Math.min(i,Math.max(s,r)):Math.min(i,Math.min(s,r))}function Nc(i,t,e){let n=Math.min(i,t);const s=50;return n*=Math.log(1+s*Math.max(0,i/t-1))/s+1,e&&(n=Math.max(n,e),n/=Math.log(1+s*Math.max(0,e/i-1))/s+1),Ot(n,e/2,t*2)}function vv(i,t,e,n){return t=t!==void 0?t:!0,function(s,r,a,o){if(s!==void 0){const l=i[0],h=i[i.length-1],c=e?Fc(l,e,a,n):l;if(o)return t?Nc(s,c,h):Ot(s,h,c);const u=Math.min(c,s),d=Math.floor(wc(i,u,r));return i[d]>c&&dMath.round(e*cd[n])/cd[n]).join(", ")+")"}function gn(i,t,e,n,s,r){r=r||[];let a=0;for(let o=t;o{if(!n)return this.getSimplifiedGeometry(e);const s=this.clone();return s.applyTransform(n),s.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return mt()}closestPointXY(t,e,n,s){return mt()}containsXY(t,e){const n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return mt()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Ea(e),this.extentRevision_=this.getRevision()}return av(this.extent_,t)}rotate(t,e){mt()}scale(t,e,n){mt()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return mt()}getType(){return mt()}applyTransform(t){mt()}intersectsExtent(t){return mt()}translate(t,e){mt()}transform(t,e){const n=Gt(t),s=n.getUnits()=="tile-pixels"?function(r,a,o){const l=n.getExtent(),h=n.getWorldExtent(),c=Zt(h)/Zt(l);return Bi(ud,h[0],h[3],c,-c,0,0,0),gn(r,0,r.length,o,ud,a),Co(n,e)(r,a,o)}:Co(n,e);return this.applyTransform(s),this}}class bn extends Dg{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return Tc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return mt()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length1)u=e;else if(d>0){for(let f=0;fs&&(s=h),r=o,a=l}return s}function jc(i,t,e,n,s){for(let r=0,a=e.length;r0;){const u=h.pop(),d=h.pop();let f=0;const g=i[d],m=i[d+1],p=i[u],_=i[u+1];for(let v=d+n;vf&&(c=v,f=M)}f>s&&(l[(c-t)/n]=1,d+n0&&m>f)&&(g<0&&p0&&p>g)){h=u,c=d;continue}r[a++]=h,r[a++]=c,o=h,l=c,h=u,c=d}return r[a++]=h,r[a++]=c,a}function $c(i,t,e,n,s,r,a,o){for(let l=0,h=e.length;lr&&(h-o)*(r-l)-(s-o)*(c-l)>0&&a++:c<=r&&(h-o)*(r-l)-(s-o)*(c-l)<0&&a--,o=h,l=c}return a!==0}function Hc(i,t,e,n,s,r){if(e.length===0||!kn(i,t,e[0],n,s,r))return!1;for(let a=1,o=e.length;a_&&(h=(c+u)/2,Hc(i,t,e,n,h,g)&&(p=h,_=v)),c=u}return isNaN(p)&&(p=s[r]),a?(a.push(p,g,_),a):[p,g,_]}function zg(i,t,e,n,s){let r=[];for(let a=0,o=e.length;a=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:jg(i,t,e,n,function(a,o){return lv(s,a,o)}):!1}function Vv(i,t,e,n,s){for(let r=0,a=e.length;r0}function Ug(i,t,e,n,s){s=s!==void 0?s:!1;for(let r=0,a=e.length;r1&&typeof arguments[e-1]=="function"&&(n=arguments[e-1],--e);let s=0;for(;s0}getInteracting(){return this.hints_[ie.INTERACTING]>0}cancelAnimations(){this.setHint(ie.ANIMATING,-this.hints_[ie.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e=0;--n){const s=this.animations_[n];let r=!0;for(let a=0,o=s.length;a0?h/l.duration:1;c>=1?(l.complete=!0,c=1):r=!1;const u=l.easing(c);if(l.sourceCenter){const d=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const p=d+u*(g-d),_=f+u*(m-f);this.targetCenter_=[p,_]}if(l.sourceResolution&&l.targetResolution){const d=u===1?l.targetResolution:l.sourceResolution+u*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(d,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=d,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const d=u===1?Ts(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+u*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(d,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=d}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(r){this.animations_[n]=null,this.setHint(ie.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const a=s[0].callback;a&&Ua(a,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let n;const s=this.getCenterInternal();return s!==void 0&&(n=[s[0]-e[0],s[1]-e[1]],Lc(n,t-this.getRotation()),hv(n,e)),n}calculateCenterZoom(t,e){let n;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const a=e[0]-t*(e[0]-s[0])/r,o=e[1]-t*(e[1]-s[1])/r;n=[a,o]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],s=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(s*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(s*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&Fh(t,this.getProjection())}getCenterInternal(){return this.get(Ee.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return Og(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();ft(e,"The view center is not defined");const n=this.getResolution();ft(n!==void 0,"The view resolution is not defined");const s=this.getRotation();return ft(s!==void 0,"The view rotation is not defined"),Oh(e,n,s,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Ee.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Dn(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=dt(t)/e[0],s=Zt(t)/e[1];return Math.max(n,s)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(e/n)/Math.log(t);return function(r){return e/Math.pow(t,r*s)}}getRotation(){return this.get(Ee.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(n/s)/e;return function(a){return Math.log(n/a)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),n=this.getRotation();let s=this.getCenterInternal();const r=this.padding_;if(r){const a=this.getViewportSizeMinusPadding_();s=jl(s,this.getViewportSize_(),[a[0]/2+r[3],a[1]/2+r[0]],e,n)}return{center:s.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,n,s;if(this.resolutions_){const r=wc(this.resolutions_,t,1);e=r,n=this.resolutions_[r],r==this.resolutions_.length-1?s=2:s=n/this.resolutions_[r+1]}else n=this.maxResolution_,s=this.zoomFactor_;return e+Math.log(n/t)/Math.log(s)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=Ot(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Ot(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(ft(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){ft(!ul(t),"Cannot fit empty extent provided as `geometry`");const s=Dn(t,this.getProjection());n=Vh(s)}else if(t.getType()==="Circle"){const s=Dn(t.getExtent(),this.getProjection());n=Vh(s),n.rotate(this.getRotation(),ti(s))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),s=Math.sin(-e),r=t.getFlatCoordinates(),a=t.getStride();let o=1/0,l=1/0,h=-1/0,c=-1/0;for(let u=0,d=r.length;u{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e;const n=this.getMapInternal();!t&&n&&(t=n.getView()),t instanceof me?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&n&&(e.layerStatesArray=n.getLayerGroup().getLayerStatesArray());let s;e.layerStatesArray?s=e.layerStatesArray.find(a=>a.layer===this):s=this.getLayerState();const r=this.getExtent();return Yc(s,e.viewState)&&(!r||oe(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const n=this.getSource();if(n&&(e=n.getAttributions()),!e)return[];const s=t instanceof me?t.getViewStateAndExtent():t;let r=e(s);return Array.isArray(r)||(r=[r]),r}render(t,e){const n=this.getRenderer();return n.prepareFrame(t)?(this.rendered=!0,n.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(Ct.MAP,t)}getMapInternal(){return this.get(Ct.MAP)}setMap(t){this.mapPrecomposeKey_&&(St(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(St(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=ht(t,Be.PRECOMPOSE,function(e){const s=e.frameState.layerStatesArray,r=this.getLayerState(!1);ft(!s.some(function(a){return a.layer===r.layer}),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),s.push(r)},this),this.mapRenderKey_=ht(this,et.CHANGE,t.render,t),this.changed())}setSource(t){this.set(Ct.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function Yc(i,t){if(!i.visible)return!1;const e=t.resolution;if(e=i.maxResolution)return!1;const n=t.zoom;return n>i.minZoom&&n<=i.maxZoom}var Xt=[];for(var Bl=0;Bl<256;++Bl)Xt.push((Bl+256).toString(16).slice(1));function Yv(i,t=0){return(Xt[i[t+0]]+Xt[i[t+1]]+Xt[i[t+2]]+Xt[i[t+3]]+"-"+Xt[i[t+4]]+Xt[i[t+5]]+"-"+Xt[i[t+6]]+Xt[i[t+7]]+"-"+Xt[i[t+8]]+Xt[i[t+9]]+"-"+Xt[i[t+10]]+Xt[i[t+11]]+Xt[i[t+12]]+Xt[i[t+13]]+Xt[i[t+14]]+Xt[i[t+15]]).toLowerCase()}var $a,Zv=new Uint8Array(16);function Kv(){if(!$a&&($a=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!$a))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $a(Zv)}var Jv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const gd={randomUUID:Jv};function Qv(i,t,e){if(gd.randomUUID&&!t&&!i)return gd.randomUUID();i=i||{};var n=i.random||(i.rng||Kv)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Yv(n)}const ty=ii("map:AbstractLayerModel");var Ns,aa,Gn,Vn,zn,Gs;class ey extends xc{constructor(e){super();H(this,Ns);H(this,aa);H(this,Gn);H(this,Vn);H(this,zn);H(this,Gs,!1);Q(this,aa,e.id??Qv()),Q(this,zn,e.attributes??{}),Q(this,Gn,e.title),Q(this,Vn,e.description??"")}get __destroyed(){return R(this,Gs)}get map(){const e=R(this,Ns);if(!e)throw new Error(`Layer '${this.id}' has not been attached to a map yet.`);return e}get id(){return R(this,aa)}get title(){return R(this,Gn)}get description(){return R(this,Vn)}get attributes(){return R(this,zn)}destroy(){if(!R(this,Gs)){Q(this,Gs,!0),this.sublayers?.destroy();try{this.emit("destroy")}catch(e){ty.warn("Unexpected error from event listener during layer destruction:",e)}}}__attachToMap(e){if(R(this,Ns))throw new Error(`Layer '${this.id}' has already been attached to the map '${this.map.id}'`);Q(this,Ns,e)}setTitle(e){e!==R(this,Gn)&&(Q(this,Gn,e),this.__emitChangeEvent("changed:title"))}setDescription(e){e!==R(this,Vn)&&(Q(this,Vn,e),this.__emitChangeEvent("changed:description"))}updateAttributes(e){const n=R(this,zn),s=Reflect.ownKeys(e);let r=!1;for(const a of s){const o=n[a],l=e[a];o!==l&&(n[a]=l,r=!0)}r&&this.__emitChangeEvent("changed:attributes")}deleteAttribute(e){const n=R(this,zn);n[e]&&(delete n[e],this.__emitChangeEvent("changed:attributes"))}__emitChangeEvent(e){this.emit(e),this.emit("changed")}}Ns=new WeakMap,aa=new WeakMap,Gn=new WeakMap,Vn=new WeakMap,zn=new WeakMap,Gs=new WeakMap;const uo=ii("map:AbstractLayer");var nn,oa,la,Di,jn,ha,ca,zh;class Eo extends ey{constructor(e){super(e);H(this,ca);H(this,nn);H(this,oa);H(this,la);H(this,Di);H(this,jn);H(this,ha);Q(this,nn,e.olLayer),Q(this,oa,e.isBaseLayer??!1),Q(this,la,e.healthCheck),Q(this,Di,e.visible??!0),Q(this,jn,Bh(jh(R(this,nn)))),this.__setVisible(R(this,Di))}get visible(){return R(this,Di)}get olLayer(){return R(this,nn)}get isBaseLayer(){return R(this,oa)}get loadState(){return R(this,jn)}destroy(){this.__destroyed||(R(this,ha)?.destroy(),this.olLayer.dispose(),super.destroy())}__attach(e){super.__attachToMap(e);const{initial:n,resource:s}=iy(this,R(this,la),r=>{ot(this,ca,zh).call(this,r)});Q(this,ha,s),ot(this,ca,zh).call(this,n)}setVisible(e){if(this.isBaseLayer){uo.warn(`Cannot change visibility of base layer '${this.id}': use activateBaseLayer() on the map's LayerCollection instead.`);return}this.__setVisible(e)}__setVisible(e){let n=!1;R(this,Di)!==e&&(Q(this,Di,e),n=!0),R(this,nn).getVisible()!=R(this,Di)&&R(this,nn).setVisible(e),n&&this.__emitChangeEvent("changed:visible")}}nn=new WeakMap,oa=new WeakMap,la=new WeakMap,Di=new WeakMap,jn=new WeakMap,ha=new WeakMap,ca=new WeakSet,zh=function(e){e!==R(this,jn)&&(Q(this,jn,e),this.__emitChangeEvent("changed:loadState"))};function iy(i,t,e){const n=i.olLayer;if(!(n instanceof ar))return{initial:"loaded",resource:{destroy(){}}};let s=jh(n);const r=Bh(s);let a=r,o="loading";r!=="error"&&ny(i,t).then(u=>{o=u,l()});const l=()=>{const u=Bh(s),d=o==="error"?"error":u;a!==d&&(a=d,e(a))};let h;h=s?.on("change",()=>{l()});const c=n.on("change:source",()=>{h&&Pe(h),h=void 0,s=jh(n),h=s?.on("change",()=>{l()}),l()});return{initial:a,resource:{destroy(){h&&Pe(h),Pe(c)}}}}async function ny(i,t){if(t==null)return"loaded";let e;if(typeof t=="function")e=t;else if(typeof t=="string")e=async()=>{const s=await i.map.__sharedDependencies.httpService.fetch(t);return s.ok?"loaded":(uo.warn(`Health check failed for layer '${i.id}' (http status ${s.status})`),"error")};else return uo.error(`Unexpected object for 'healthCheck' parameter of layer '${i.id}'`,t),"error";try{return await e(i)}catch(n){return uo.warn(`Health check failed for layer '${i.id}'`,n),"error"}}function jh(i){if(i instanceof ar)return i?.getSource()??void 0}function Bh(i){switch(i?.getState()){case void 0:return"loaded";case"undefined":return"not-loaded";case"loading":return"loading";case"ready":return"loaded";case"error":return"error"}}class sy extends Eo{get type(){return"simple"}get legend(){}get sublayers(){}}const ry=sy,rt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class ay extends Ca{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t}getFeatures(t){return mt()}getData(t){return null}prepareFrame(t){return mt()}renderFrame(t,e){return mt()}loadedTileCallback(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n}createLoadedTileFinder(t,e,n){return(s,r)=>{const a=this.loadedTileCallback.bind(this,n,s);return t.forEachLoadedTile(e,s,r,a)}}forEachFeatureAtCoordinate(t,e,n,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===rt.LOADED||e.getState()===rt.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=rt.LOADED&&e!=rt.ERROR&&t.addEventListener(et.CHANGE,this.boundHandleImageChange_),e==rt.IDLE&&(t.load(),e=t.getState()),e==rt.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class $g extends ni{constructor(t,e,n,s){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=s}}const pn=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",oy=pn.includes("firefox"),ly=pn.includes("safari")&&!pn.includes("chrom");ly&&(pn.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(pn));const hy=pn.includes("webkit")&&!pn.includes("edge"),Hg=pn.includes("macintosh"),Xg=typeof devicePixelRatio<"u"?devicePixelRatio:1,qg=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,Yg=typeof Image<"u"&&Image.prototype.decode,Zg=function(){let i=!1;try{const t=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return i}();function Jt(i,t,e,n){let s;return e&&e.length?s=e.shift():qg?s=new OffscreenCanvas(i||300,t||300):s=document.createElement("canvas"),i&&(s.width=i),t&&(s.height=t),s.getContext("2d",n)}let Wl;function So(){return Wl||(Wl=Jt(1,1)),Wl}function _l(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}function cy(i){let t=i.offsetWidth;const e=getComputedStyle(i);return t+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10),t}function uy(i){let t=i.offsetHeight;const e=getComputedStyle(i);return t+=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10),t}function Io(i,t){const e=t.parentNode;e&&e.replaceChild(i,t)}function Ro(i){return i&&i.parentNode?i.parentNode.removeChild(i):null}function Kg(i){for(;i.lastChild;)i.removeChild(i.lastChild)}function dy(i,t){const e=i.childNodes;for(let n=0;;++n){const s=e[n],r=t[n];if(!s&&!r)break;if(s!==r){if(!s){i.appendChild(r);continue}if(!r){i.removeChild(s),--n;continue}i.insertBefore(r,s)}}}class Jg{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(So(),{get:(t,e)=>{if(typeof So()[e]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,n)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,n),!0)})}pushMethodArgs_=(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this);pushFunction(t){this.instructions_[this.zIndex+this.offset_].push(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let n=0,s=e.length;n.0031308?1.055*Math.pow(r,1/2.4)-.055:r=r*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[r*255,a*255,o*255]};$r.xyz=function(i,t){var e=i[0]/255,n=i[1]/255,s=i[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=e*.41239079926595+n*.35758433938387+s*.18048078840183,a=e*.21263900587151+n*.71516867876775+s*.072192315360733,o=e*.019330818715591+n*.11919477979462+s*.95053215224966;return t=t||Kt.whitepoint[2].E,[r*t[0],a*t[1],o*t[2]]};const Zc={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(i,t,e){var n,s,r,a,o,l,h,c,u,d,f,g,m;if(r=i[0],a=i[1],o=i[2],r===0)return[0,0,0];var p=.0011070564598794539;return t=t||"D65",e=e||2,u=Kt.whitepoint[e][t][0],d=Kt.whitepoint[e][t][1],f=Kt.whitepoint[e][t][2],g=4*u/(u+15*d+3*f),m=9*d/(u+15*d+3*f),n=a/(13*r)+g||0,s=o/(13*r)+m||0,h=r>8?d*Math.pow((r+16)/116,3):d*r*p,l=h*9*n/(4*s)||0,c=h*(12-3*n-20*s)/(4*s)||0,[l,h,c]}};Kt.luv=function(i,t,e){var n,s,r,a,o,l,h,c,u,d,f,g,m,p=.008856451679035631,_=903.2962962962961;t=t||"D65",e=e||2,u=Kt.whitepoint[e][t][0],d=Kt.whitepoint[e][t][1],f=Kt.whitepoint[e][t][2],g=4*u/(u+15*d+3*f),m=9*d/(u+15*d+3*f),l=i[0],h=i[1],c=i[2],n=4*l/(l+15*h+3*c)||0,s=9*h/(l+15*h+3*c)||0;var v=h/d;return r=v<=p?_*v:116*Math.pow(v,1/3)-16,a=13*r*(n-g),o=13*r*(s-m),[r,a,o]};var Qg={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(i){var t=i[0],e=i[1],n=i[2],s,r,a;return a=n/360*2*Math.PI,s=e*Math.cos(a),r=e*Math.sin(a),[t,s,r]},xyz:function(i){return Zc.xyz(Qg.luv(i))}};Zc.lchuv=function(i){var t=i[0],e=i[1],n=i[2],s=Math.sqrt(e*e+n*n),r=Math.atan2(n,e),a=r*360/2/Math.PI;return a<0&&(a+=360),[t,s,a]};Kt.lchuv=function(i){return Zc.lchuv(Kt.luv(i))};var fy={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const md=$p(fy);var pd={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function gy(i){var t,e=[],n=1,s;if(typeof i=="number")return{space:"rgb",values:[i>>>16,(i&65280)>>>8,i&255],alpha:1};if(typeof i=="number")return{space:"rgb",values:[i>>>16,(i&65280)>>>8,i&255],alpha:1};if(i=String(i).toLowerCase(),md[i])e=md[i].slice(),s="rgb";else if(i==="transparent")n=0,s="rgb",e=[0,0,0];else if(i[0]==="#"){var r=i.slice(1),a=r.length,o=a<=4;n=1,o?(e=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],a===4&&(n=parseInt(r[3]+r[3],16)/255)):(e=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],a===8&&(n=parseInt(r[6]+r[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),s="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(i)){var l=t[1];s=l.replace(/a$/,"");var h=s==="cmyk"?4:s==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/),s==="color"&&(s=e.shift()),e=e.map(function(c,u){if(c[c.length-1]==="%")return c=parseFloat(c)/100,u===3?c:s==="rgb"?c*255:s[0]==="h"||s[0]==="l"&&!u?c*100:s==="lab"?c*125:s==="lch"?u<2?c*150:c*360:s[0]==="o"&&!u?c:s==="oklab"?c*.4:s==="oklch"?u<2?c*.4:c*360:c;if(s[u]==="h"||u===2&&s[s.length-1]==="h"){if(pd[c]!==void 0)return pd[c];if(c.endsWith("deg"))return parseFloat(c);if(c.endsWith("turn"))return parseFloat(c)*360;if(c.endsWith("grad"))return parseFloat(c)*360/400;if(c.endsWith("rad"))return parseFloat(c)*180/Math.PI}return c==="none"?0:parseFloat(c)}),n=e.length>h?e.pop():1}else/[0-9](?:\s|\/|,)/.test(i)&&(e=i.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),s=i.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:s,values:e,alpha:n}}const Ul={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(i){var t=i[0]/360,e=i[1]/100,n=i[2]/100,s,r,a,o,l,h=0;if(e===0)return l=n*255,[l,l,l];for(r=n<.5?n*(1+e):n+e-n*e,s=2*n-r,o=[0,0,0];h<3;)a=t+1/3*-(h-1),a<0?a++:a>1&&a--,l=6*a<1?s+(r-s)*6*a:2*a<1?r:3*a<2?s+(r-s)*(2/3-a)*6:s,o[h++]=l*255;return o}};$r.hsl=function(i){var t=i[0]/255,e=i[1]/255,n=i[2]/255,s=Math.min(t,e,n),r=Math.max(t,e,n),a=r-s,o,l,h;return r===s?o=0:t===r?o=(e-n)/a:e===r?o=2+(n-t)/a:n===r&&(o=4+(t-e)/a),o=Math.min(o*60,360),o<0&&(o+=360),h=(s+r)/2,r===s?l=0:h<=.5?l=a/(r+s):l=a/(2-r-s),[o,l*100,h*100]};function my(i){Array.isArray(i)&&i.raw&&(i=String.raw(...arguments)),i instanceof Number&&(i=+i);var t,e=gy(i);if(!e.space)return[];const n=e.space[0]==="h"?Ul.min:$r.min,s=e.space[0]==="h"?Ul.max:$r.max;return t=Array(3),t[0]=Math.min(Math.max(e.values[0],n[0]),s[0]),t[1]=Math.min(Math.max(e.values[1],n[1]),s[1]),t[2]=Math.min(Math.max(e.values[2],n[2]),s[2]),e.space[0]==="h"&&(t=Ul.rgb(t)),t.push(Math.min(Math.max(e.alpha,0),1)),t}function py(i){return typeof i=="string"?i:Jc(i)}const _y=1024,pr={};let $l=0;function vy(i){if(i.length===4)return i;const t=i.slice();return t[3]=1,t}function _d(i){const t=Kt.lchuv($r.xyz(i));return t[3]=i[3],t}function yy(i){const t=Kt.rgb(Qg.xyz(i));return t[3]=i[3],t}function Kc(i){if(pr.hasOwnProperty(i))return pr[i];if($l>=_y){let e=0;for(const n in pr)e++&3||(delete pr[n],--$l)}const t=my(i);if(t.length!==4)throw new Error('Failed to parse "'+i+'" as color');for(const e of t)if(isNaN(e))throw new Error('Failed to parse "'+i+'" as color');return t0(t),pr[i]=t,++$l,t}function Hr(i){return Array.isArray(i)?i:Kc(i)}function t0(i){return i[0]=Ot(i[0]+.5|0,0,255),i[1]=Ot(i[1]+.5|0,0,255),i[2]=Ot(i[2]+.5|0,0,255),i[3]=Ot(i[3],0,1),i}function Jc(i){let t=i[0];t!=(t|0)&&(t=t+.5|0);let e=i[1];e!=(e|0)&&(e=e+.5|0);let n=i[2];n!=(n|0)&&(n=n+.5|0);const s=i[3]===void 0?1:Math.round(i[3]*1e3)/1e3;return"rgba("+t+","+e+","+n+","+s+")"}function xy(i){try{return Kc(i),!0}catch{return!1}}const vd=[];let fs=null;function by(){fs=Jt(1,1,void 0,{willReadFrequently:!0})}class e0 extends ay{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Ke(),this.pixelTransform=Ke(),this.inversePixelTransform=Ke(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){fs||by(),fs.clearRect(0,0,1,1);let s;try{fs.drawImage(t,e,n,1,1,0,0,1,1),s=fs.getImageData(0,0,1,1).data}catch{return fs=null,null}return s}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const s=this.getLayer().getClassName();let r,a;if(t&&t.className===s&&(!n||t&&t.style.backgroundColor&&yn(Hr(t.style.backgroundColor),Hr(n)))){const o=t.firstElementChild;o instanceof HTMLCanvasElement&&(a=o.getContext("2d"))}if(a&&a.canvas.style.transform===e?(this.container=t,this.context=a,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){r=document.createElement("div"),r.className=s;let o=r.style;o.position="absolute",o.width="100%",o.height="100%",a=Jt();const l=a.canvas;r.appendChild(l),o=l.style,o.position="absolute",o.left="0",o.transformOrigin="top left",this.container=r,this.context=a}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const s=xn(n),r=cl(n),a=Sa(n),o=hl(n);Yt(e.coordinateToPixelTransform,s),Yt(e.coordinateToPixelTransform,r),Yt(e.coordinateToPixelTransform,a),Yt(e.coordinateToPixelTransform,o);const l=this.inversePixelTransform;Yt(l,s),Yt(l,r),Yt(l,a),Yt(l,o),t.save(),t.beginPath(),t.moveTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}prepareContainer(t,e){const n=t.extent,s=t.viewState.resolution,r=t.viewState.rotation,a=t.pixelRatio,o=Math.round(dt(n)/s*a),l=Math.round(Zt(n)/s*a);Bi(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,r,-o/2,-l/2),Ag(this.inversePixelTransform,this.pixelTransform);const h=Sv(this.pixelTransform);if(this.useContainer(e,h,this.getBackground(t)),!this.containerReused){const c=this.context.canvas;c.width!=o||c.height!=l?(c.width=o,c.height=l):this.context.clearRect(0,0,o,l),h!==c.style.transform&&(c.style.transform=h)}}dispatchRenderEvent_(t,e,n){const s=this.getLayer();if(s.hasListener(t)){const r=new $g(t,this.inversePixelTransform,n,e);s.dispatchEvent(r)}}preRender(t,e){this.frameState=e,!e.declutter&&this.dispatchRenderEvent_(Be.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(Be.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new Jg),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(Be.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(Be.POSTRENDER,this.context,t))}getRenderTransform(t,e,n,s,r,a,o){const l=r/2,h=a/2,c=s/e,u=-c,d=-t[0]+o,f=-t[1];return Bi(this.tempTransform,l,h,c,u,-n,d,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}function My(i,t,e){const n=i;let s=!0,r=!1,a=!1;const o=[jr(n,et.LOAD,function(){a=!0,r||t()})];return n.src&&Yg?(r=!0,n.decode().then(function(){s&&t()}).catch(function(l){s&&(a?t():e())})):o.push(jr(n,et.ERROR,e)),function(){s=!1,o.forEach(St)}}function Cy(i,t){return new Promise((e,n)=>{function s(){a(),e(i)}function r(){a(),n(new Error("Image load error"))}function a(){i.removeEventListener("load",s),i.removeEventListener("error",r)}i.addEventListener("load",s),i.addEventListener("error",r)})}function wy(i,t){return t&&(i.src=t),i.src&&Yg?new Promise((e,n)=>i.decode().then(()=>e(i)).catch(s=>i.complete&&i.width?e(i):n(s))):Cy(i)}const Ey=.5,Sy=10,yd=.25;class Iy{constructor(t,e,n,s,r,a){this.sourceProj_=t,this.targetProj_=e;let o={};const l=Co(this.targetProj_,this.sourceProj_);this.transformInv_=function(v){const y=v[0]+"/"+v[1];return o[y]||(o[y]=l(v)),o[y]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&dt(s)>=dt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?dt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?dt(this.targetProj_.getExtent()):null;const h=xn(n),c=cl(n),u=Sa(n),d=hl(n),f=this.transformInv_(h),g=this.transformInv_(c),m=this.transformInv_(u),p=this.transformInv_(d),_=Sy+(a?Math.max(0,Math.ceil(Math.log2(bo(n)/(a*a*256*256)))):0);if(this.addQuad_(h,c,u,d,f,g,m,p,_),this.wrapsXInSource_){let v=1/0;this.triangles_.forEach(function(y,x,M){v=Math.min(v,y.source[0][0],y.source[1][0],y.source[2][0])}),this.triangles_.forEach(y=>{if(Math.max(y.source[0][0],y.source[1][0],y.source[2][0])-v>this.sourceWorldWidth_/2){const x=[[y.source[0][0],y.source[0][1]],[y.source[1][0],y.source[1][1]],[y.source[2][0],y.source[2][1]]];x[0][0]-v>this.sourceWorldWidth_/2&&(x[0][0]-=this.sourceWorldWidth_),x[1][0]-v>this.sourceWorldWidth_/2&&(x[1][0]-=this.sourceWorldWidth_),x[2][0]-v>this.sourceWorldWidth_/2&&(x[2][0]-=this.sourceWorldWidth_);const M=Math.min(x[0][0],x[1][0],x[2][0]);Math.max(x[0][0],x[1][0],x[2][0])-M.5&&u<1;let g=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const p=Th([t,e,n,s]);g=dt(p)/this.targetWorldWidth_>yd||g}!f&&this.sourceProj_.isGlobal()&&u&&(g=u>yd||g)}if(!g&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3])&&!oe(c,this.maxSourceExtent_))return;let m=0;if(!g&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(l[0])||!isFinite(l[1]))){if(h>0)g=!0;else if(m=(!isFinite(r[0])||!isFinite(r[1])?8:0)+(!isFinite(a[0])||!isFinite(a[1])?4:0)+(!isFinite(o[0])||!isFinite(o[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),m!=1&&m!=2&&m!=4&&m!=8)return}if(h>0){if(!g){const p=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(p);let v;f?v=(Ts(r[0],d)+Ts(o[0],d))/2-Ts(_[0],d):v=(r[0]+o[0])/2-_[0];const y=(r[1]+o[1])/2-_[1];g=v*v+y*y>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){const p=[(e[0]+n[0])/2,(e[1]+n[1])/2],_=this.transformInv_(p),v=[(s[0]+t[0])/2,(s[1]+t[1])/2],y=this.transformInv_(v);this.addQuad_(t,e,p,v,r,a,_,y,h-1),this.addQuad_(v,p,n,s,y,_,o,l,h-1)}else{const p=[(t[0]+e[0])/2,(t[1]+e[1])/2],_=this.transformInv_(p),v=[(n[0]+s[0])/2,(n[1]+s[1])/2],y=this.transformInv_(v);this.addQuad_(t,p,v,s,r,_,y,l,h-1),this.addQuad_(p,e,n,v,_,a,o,y,h-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}m&11||this.addTriangle_(t,n,s,r,o,l),m&14||this.addTriangle_(t,n,e,r,o,a),m&&(m&13||this.addTriangle_(e,s,t,a,l,r),m&7||this.addTriangle_(e,s,n,a,l,o))}calculateSourceExtent(){const t=Le();return this.triangles_.forEach(function(e,n,s){const r=e.source;Or(t,r[0]),Or(t,r[1]),Or(t,r[2])}),t}getTriangles(){return this.triangles_}}let Hl;const Os=[];function xd(i,t,e,n,s){i.beginPath(),i.moveTo(0,0),i.lineTo(t,e),i.lineTo(n,s),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(t,n)+1,Math.max(e,s)),i.restore()}function Xl(i,t){return Math.abs(i[t*4]-210)>2||Math.abs(i[t*4+3]-.75*255)>2}function Ry(){if(Hl===void 0){const i=Jt(6,6,Os);i.globalCompositeOperation="lighter",i.fillStyle="rgba(210, 0, 0, 0.75)",xd(i,4,5,4,0),xd(i,4,5,0,5);const t=i.getImageData(0,0,3,3).data;Hl=Xl(t,0)||Xl(t,4)||Xl(t,8),_l(i),Os.push(i.canvas)}return Hl}function bd(i,t,e,n){const s=Pg(e,t,i);let r=Br(t,n,e);const a=t.getMetersPerUnit();a!==void 0&&(r*=a);const o=i.getMetersPerUnit();o!==void 0&&(r/=o);const l=i.getExtent();if(!l||Ys(l,s)){const h=Br(i,r,s)/r;isFinite(h)&&h>0&&(r/=h)}return r}function Ty(i,t,e,n){const s=ti(e);let r=bd(i,t,s,n);return(!isFinite(r)||r<=0)&&Oc(e,function(a){return r=bd(i,t,a,n),isFinite(r)&&r>0}),r}function Py(i,t,e,n,s,r,a,o,l,h,c,u,d,f){const g=Jt(Math.round(e*i),Math.round(e*t),Os);if(u||(g.imageSmoothingEnabled=!1),l.length===0)return g.canvas;g.scale(e,e);function m(M){return Math.round(M*e)/e}g.globalCompositeOperation="lighter";const p=Le();l.forEach(function(M,w,E){Pc(p,M.extent)});let _;const v=e/n,y=(u?1:1+Math.pow(2,-24))/v;{if(_=Jt(Math.round(dt(p)*v),Math.round(Zt(p)*v),Os),u||(_.imageSmoothingEnabled=!1),s&&f){const M=(s[0]-p[0])*v,w=-(s[3]-p[3])*v,E=dt(s)*v,C=Zt(s)*v;_.rect(M,w,E,C),_.clip()}l.forEach(function(M,w,E){if(M.image.width>0&&M.image.height>0){if(M.clipExtent){_.save();const A=(M.clipExtent[0]-p[0])*v,G=-(M.clipExtent[3]-p[3])*v,z=dt(M.clipExtent)*v,V=Zt(M.clipExtent)*v;_.rect(u?A:Math.round(A),u?G:Math.round(G),u?z:Math.round(A+z)-Math.round(A),u?V:Math.round(G+V)-Math.round(G)),_.clip()}const C=(M.extent[0]-p[0])*v,I=-(M.extent[3]-p[3])*v,D=dt(M.extent)*v,k=Zt(M.extent)*v;_.drawImage(M.image,h,h,M.image.width-2*h,M.image.height-2*h,u?C:Math.round(C),u?I:Math.round(I),u?D:Math.round(C+D)-Math.round(C),u?k:Math.round(I+k)-Math.round(I)),M.clipExtent&&_.restore()}})}const x=xn(a);return o.getTriangles().forEach(function(M,w,E){const C=M.source,I=M.target;let D=C[0][0],k=C[0][1],A=C[1][0],G=C[1][1],z=C[2][0],V=C[2][1];const O=m((I[0][0]-x[0])/r),J=m(-(I[0][1]-x[1])/r),B=m((I[1][0]-x[0])/r),at=m(-(I[1][1]-x[1])/r),X=m((I[2][0]-x[0])/r),nt=m(-(I[2][1]-x[1])/r),j=D,U=k;D=0,k=0,A-=j,G-=U,z-=j,V-=U;const P=[[A,G,0,0,B-O],[z,V,0,0,X-O],[0,0,A,G,at-J],[0,0,z,V,nt-J]],lt=q_(P);if(!lt)return;if(g.save(),g.beginPath(),Ry()||!u){g.moveTo(B,at);const gt=4,wt=O-B,ce=J-at;for(let Vt=0;Vtt)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){mt()}getAlpha(t,e){if(!this.transition_)return 1;let n=this.transitionStarts_[t];if(!n)n=e,this.transitionStarts_[t]=n;else if(n===-1)return 1;const s=e-n+1e3/60;return s>=this.transition_?1:Lg(s/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}class s0 extends n0{constructor(t,e,n,s,r,a){super(t,e,a),this.crossOrigin_=s,this.src_=n,this.key=n,this.image_=new Image,s!==null&&(this.image_.crossOrigin=s),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=Z.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=Z.ERROR,this.unlistenImage_(),this.image_=Ly(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=Z.LOADED:this.state=Z.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==Z.ERROR&&(this.state=Z.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==Z.IDLE&&(this.state=Z.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=My(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Ly(){const i=Jt(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}class Wh extends n0{constructor(t,e,n,s,r,a,o,l,h,c,u,d){super(r,Z.IDLE,d),this.renderEdges_=u!==void 0?u:!1,this.pixelRatio_=o,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=s,this.wrappedTileCoord_=a||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=t.canWrapX()?t.getExtent():void 0;const f=s.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const p=g?Lr(f,g):f;if(bo(p)===0){this.state=Z.EMPTY;return}const _=t.getExtent();_&&(m?m=Lr(m,_):m=_);const v=s.getResolution(this.wrappedTileCoord_[0]),y=Ty(t,n,p,v);if(!isFinite(y)||y<=0){this.state=Z.EMPTY;return}const x=c!==void 0?c:Ey;if(this.triangulation_=new Iy(t,n,p,m,y*x,v),this.triangulation_.getTriangles().length===0){this.state=Z.EMPTY;return}this.sourceZ_=e.getZForResolution(y);let M=this.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(M[1]=Ot(M[1],m[1],m[3]),M[3]=Ot(M[3],m[1],m[3])):M=Lr(M,m)),!bo(M))this.state=Z.EMPTY;else{let w=0,E=0;t.canWrapX()&&(w=dt(_),E=Math.floor((M[0]-_[0])/w)),bg(M.slice(),t,!0).forEach(I=>{const D=e.getTileRangeForExtentAndZ(I,this.sourceZ_);for(let k=D.minX;k<=D.maxX;k++)for(let A=D.minY;A<=D.maxY;A++){const G=h(this.sourceZ_,k,A,o);if(G){const z=E*w;this.sourceTiles_.push({tile:G,offset:z})}}++E}),this.sourceTiles_.length===0&&(this.state=Z.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{const n=e.tile;if(n&&n.getState()==Z.LOADED){const s=this.sourceTileGrid_.getTileCoordExtent(n.tileCoord);s[0]+=e.offset,s[2]+=e.offset;const r=this.clipExtent_?.slice();r&&(r[0]+=e.offset,r[2]+=e.offset),t.push({extent:s,clipExtent:r,image:n.getImage()})}}),this.sourceTiles_.length=0,t.length===0)this.state=Z.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),s=typeof n=="number"?n:n[0],r=typeof n=="number"?n:n[1],a=this.targetTileGrid_.getResolution(e),o=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Py(s,r,this.pixelRatio_,o,this.sourceTileGrid_.getExtent(),a,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=Z.LOADED}this.changed()}load(){if(this.state==Z.IDLE){this.state=Z.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:e})=>{const n=e.getState();if(n==Z.IDLE||n==Z.LOADING){t++;const s=ht(e,et.CHANGE,function(r){const a=e.getState();(a==Z.LOADED||a==Z.ERROR||a==Z.EMPTY)&&(St(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:e},n,s){e.getState()==Z.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(St),this.sourcesListenerKeys_=null}release(){this.canvas_&&(_l(this.canvas_.getContext("2d")),Os.push(this.canvas_),this.canvas_=null),super.release()}}class Qc{constructor(t,e,n,s){this.minX=t,this.maxX=e,this.minY=n,this.maxY=s}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function as(i,t,e,n,s){return s!==void 0?(s.minX=i,s.maxX=t,s.minY=e,s.maxY=n,s):new Qc(i,t,e,n)}function Cd(i){return i[0]>0&&i[1]>0}function Ay(i,t,e){return e===void 0&&(e=[0,0]),e[0]=i[0]*t+.5|0,e[1]=i[1]*t+.5|0,e}function Te(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}class Dy extends e0{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=Le(),this.tmpTileRange_=new Qc(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),s=e.getUseInterimTilesOnError();return n==Z.LOADED||n==Z.EMPTY||n==Z.ERROR&&!s}getTile(t,e,n,s){const r=s.pixelRatio,a=s.viewState.projection,o=this.getLayer();let h=o.getSource().getTile(t,e,n,r,a);return h.getState()==Z.ERROR&&o.getUseInterimTilesOnError()&&o.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(h)||(h=h.getInterimTile()),h}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),s=Yt(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!Ys(r,s))return null;const a=e.pixelRatio,o=e.viewState.projection,l=e.viewState,h=n.getRenderSource(),c=h.getTileGridForProjection(l.projection),u=h.getTilePixelRatio(e.pixelRatio);for(let d=c.getZForResolution(l.resolution);d>=c.getMinZoom();--d){const f=c.getTileCoordForCoordAndZ(s,d),g=h.getTile(d,f[1],f[2],a,o);if(!(g instanceof s0||g instanceof Wh)||g instanceof Wh&&g.getState()===Z.EMPTY)return null;if(g.getState()!==Z.LOADED)continue;const m=c.getOrigin(d),p=Te(c.getTileSize(d)),_=c.getResolution(d),v=Math.floor(u*((s[0]-m[0])/_-f[1]*p[0])),y=Math.floor(u*((m[1]-s[1])/_-f[2]*p[1])),x=Math.round(u*h.getGutterForProjection(l.projection));return this.getImageData(g.getImage(),v+x,y+x)}return null}loadedTileCallback(t,e,n){return this.isDrawableTile(n)?super.loadedTileCallback(t,e,n):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const n=t.layerStatesArray[t.layerIndex],s=t.viewState,r=s.projection,a=s.resolution,o=s.center,l=s.rotation,h=t.pixelRatio,c=this.getLayer(),u=c.getSource(),d=u.getRevision(),f=u.getTileGridForProjection(r),g=f.getZForResolution(a,u.zDirection),m=f.getResolution(g);let p=t.extent;const _=t.viewState.resolution,v=u.getTilePixelRatio(h);this.prepareContainer(t,e);const y=this.context.canvas.width,x=this.context.canvas.height,M=n.extent&&Dn(n.extent);M&&(p=Lr(p,Dn(n.extent)));const w=m*y/2/v,E=m*x/2/v,C=[o[0]-w,o[1]-E,o[0]+w,o[1]+E],I=f.getTileRangeForExtentAndZ(p,g),D={};D[g]={};const k=this.createLoadedTileFinder(u,r,D),A=this.tmpExtent,G=this.tmpTileRange_;this.newTiles_=!1;const z=l?Lh(s.center,_,l,t.size):void 0;for(let nt=I.minX;nt<=I.maxX;++nt)for(let j=I.minY;j<=I.maxY;++j){if(l&&!f.tileCoordIntersectsViewport([g,nt,j],z))continue;const U=this.getTile(g,nt,j,t);if(this.isDrawableTile(U)){const ct=bt(this);if(U.getState()==Z.LOADED){D[g][U.tileCoord.toString()]=U;let gt=U.inTransition(ct);gt&&n.opacity!==1&&(U.endTransition(ct),gt=!1),!this.newTiles_&&(gt||!this.renderedTiles.includes(U))&&(this.newTiles_=!0)}if(U.getAlpha(ct,t.time)===1)continue}const P=f.getTileCoordChildTileRange(U.tileCoord,G,A);let lt=!1;P&&(lt=k(g+1,P)),lt||f.forEachTileCoordParentTileRange(U.tileCoord,k,G,A)}const V=m/a*h/v,O=this.getRenderContext(t);Bi(this.tempTransform,y/2,x/2,V,V,0,-y/2,-x/2),M&&this.clipUnrotated(O,t,M),u.getInterpolate()||(O.imageSmoothingEnabled=!1),this.preRender(O,t),this.renderedTiles.length=0;let J=Object.keys(D).map(Number);J.sort(Ni);let B,at,X;n.opacity===1&&(!this.containerReused||u.getOpaque(t.viewState.projection))?J=J.reverse():(B=[],at=[]);for(let nt=J.length-1;nt>=0;--nt){const j=J[nt],U=u.getTilePixelSize(j,h,r),lt=f.getResolution(j)/m,ct=U[0]*lt*V,gt=U[1]*lt*V,wt=f.getTileCoordForCoordAndZ(xn(C),j),ce=f.getTileCoordExtent(wt),Vt=Yt(this.tempTransform,[v*(ce[0]-C[0])/m,v*(C[3]-ce[3])/m]),Ei=v*u.getGutterForProjection(r),He=D[j];for(const wn in He){const Ce=He[wn],Xe=Ce.tileCoord,oi=wt[1]-Xe[1],En=Math.round(Vt[0]-(oi-1)*ct),li=wt[2]-Xe[2],hi=Math.round(Vt[1]-(li-1)*gt),It=Math.round(Vt[0]-oi*ct),ue=Math.round(Vt[1]-li*gt),we=En-It,Sn=hi-ue,In=g===j,Hi=In&&Ce.getAlpha(bt(this),t.time)!==1;let Rn=!1;if(!Hi)if(B){X=[It,ue,It+we,ue,It+we,ue+Sn,It,ue+Sn];for(let Xi=0,ss=B.length;Xi0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const n=this.entries_[t];return ft(n!==void 0,"Tried to get a value for a key that does not exist in the cache"),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_}remove(t){const e=this.entries_[t];return ft(e!==void 0,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t}getValues(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){ft(!(t in this.entries_),"Tried to set a value for a key that is used already");const n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_}setSize(t){this.highWaterMark=t}}function wd(i,t,e,n){return n!==void 0?(n[0]=i,n[1]=t,n[2]=e,n):[i,t,e]}function vl(i,t,e){return i+"/"+t+"/"+e}function r0(i){return vl(i[0],i[1],i[2])}function Fy(i){return i.split("/").map(Number)}function Ny(i){return(i[1]<e||e>t.getMaxZoom())return!1;const r=t.getFullTileRange(e);return r?r.containsXY(n,s):!0}class a0 extends ky{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const t=this.peekFirstKey(),n=Fy(t)[0];this.forEach(s=>{s.tileCoord[0]!==n&&(this.remove(r0(s.tileCoord)),s.release())})}}const ql={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},os=[0,0,0],qi=5;class o0{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,ft(U_(this.resolutions_,(s,r)=>r-s),"`resolutions` must be sorted in descending order");let e;if(!t.origins){for(let s=0,r=this.resolutions_.length-1;s{const a=new Qc(Math.min(0,s[0]),Math.max(s[0]-1,-1),Math.min(0,s[1]),Math.max(s[1]-1,-1));if(n){const o=this.getTileRangeForExtentAndZ(n,r);a.minX=Math.max(o.minX,a.minX),a.maxX=Math.min(o.maxX,a.maxX),a.minY=Math.max(o.minY,a.minY),a.maxY=Math.min(o.maxY,a.maxY)}return a}):n&&this.calculateTileRanges_(n)}forEachTileCoord(t,e,n){const s=this.getTileRangeForExtentAndZ(t,e);for(let r=s.minX,a=s.maxX;r<=a;++r)for(let o=s.minY,l=s.maxY;o<=l;++o)n([e,r,o])}forEachTileCoordParentTileRange(t,e,n,s){let r,a,o,l=null,h=t[0]-1;for(this.zoomFactor_===2?(a=t[1],o=t[2]):l=this.getTileCoordExtent(t,s);h>=this.minZoom;){if(a!==void 0&&o!==void 0?(a=Math.floor(a/2),o=Math.floor(o/2),r=as(a,a,o,o,n)):r=this.getTileRangeForExtentAndZ(l,h,n),e(h,r))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,n){if(t[0]this.maxZoom||e0?n:Math.max(r/e[0],s/e[1]);const a=t+1,o=new Array(a);for(let l=0;ln.highWaterMark&&(n.highWaterMark=t)}useTile(t,e,n,s){}}class Uy extends ni{constructor(t,e){super(t),this.tile=e}}function $y(i,t){const e=/\{z\}/g,n=/\{x\}/g,s=/\{y\}/g,r=/\{-y\}/g;return function(a,o,l){if(a)return i.replace(e,a[0].toString()).replace(n,a[1].toString()).replace(s,a[2].toString()).replace(r,function(){const h=a[0],c=t.getFullTileRange(h);if(!c)throw new Error("The {-y} placeholder requires a tile grid with extent");return(c.getHeight()-a[2]-1).toString()})}}function Hy(i,t){const e=i.length,n=new Array(e);for(let s=0;sthis.getTileInternal(p,_,v,y,a),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return m.key=u,h?(m.interimTile=h,m.refreshInterimChain(),o.replace(c,m)):o.set(c,m),m}getTileInternal(t,e,n,s,r){let a=null;const o=vl(t,e,n),l=this.getKey();if(!this.tileCache.containsKey(o))a=this.createTile_(t,e,n,s,r,l),this.tileCache.set(o,a);else if(a=this.tileCache.get(o),a.key!=l){const h=a;a=this.createTile_(t,e,n,s,r,l),h.getState()==Z.IDLE?a.interimTile=h.interimTile:a.interimTile=h,a.refreshInterimChain(),this.tileCache.replace(o,a)}return a}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(t,e){const n=Gt(t);if(n){const s=bt(n);s in this.tileGridForProjection||(this.tileGridForProjection[s]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function Zy(i,t){i.getImage().src=t}const fe={ADD:"add",REMOVE:"remove"},Ed={LENGTH:"length"};class Xa extends ni{constructor(t,e,n){super(t),this.element=e,this.index=n}}class We extends $e{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let n=0,s=this.array_.length;n0;)this.pop()}extend(t){for(let e=0,n=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new Xa(fe.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let n=0,s=e.length;n=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Xa(fe.REMOVE,e,t)),e}setAt(t,e){const n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const s=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Xa(fe.REMOVE,s,t)),this.dispatchEvent(new Xa(fe.ADD,e,t))}updateLength_(){this.set(Ed.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,s=this.array_.length;nthis.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const n=this.cache_[e];!(t++&3)&&!n.hasListener()&&(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,n){const s=Yl(t,e,n);return s in this.cache_?this.cache_[s]:null}getPattern(t,e,n){const s=Yl(t,e,n);return s in this.patternCache_?this.patternCache_[s]:null}set(t,e,n,s,r){const a=Yl(t,e,n),o=a in this.cache_;this.cache_[a]=s,r&&(s.getImageState()===rt.IDLE&&s.load(),s.getImageState()===rt.LOADING?s.ready().then(()=>{this.patternCache_[a]=So().createPattern(s.getImage(1),"repeat")}):this.patternCache_[a]=So().createPattern(s.getImage(1),"repeat")),o||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function Yl(i,t,e){const n=e?Hr(e):"null";return t+":"+i+":"+n}const pi=new e1;let _r=null;class i1 extends ol{constructor(t,e,n,s,r){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=n,this.canvas_={},this.color_=r,this.imageState_=s===void 0?rt.IDLE:s,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===rt.LOADED){_r||(_r=Jt(1,1,void 0,{willReadFrequently:!0})),_r.drawImage(this.image_,0,0);try{_r.getImageData(0,0,1,1),this.tainted_=!1}catch{_r=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(et.CHANGE)}handleImageError_(){this.imageState_=rt.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=rt.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],n=Jt(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===rt.IDLE){this.image_||this.initializeImage_(),this.imageState_=rt.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&wy(this.image_,this.src_).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==rt.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const s=n.getContext("2d");s.scale(t,t),s.drawImage(e,0,0),s.globalCompositeOperation="multiply",s.fillStyle=py(this.color_),s.fillRect(0,0,n.width/t,n.height/t),s.globalCompositeOperation="destination-in",s.drawImage(e,0,0),this.canvas_[t]=n}ready(){return this.ready_||(this.ready_=new Promise(t=>{this.imageState_===rt.LOADED||this.imageState_===rt.ERROR?t():this.addEventListener(et.CHANGE,function e(){(this.imageState_===rt.LOADED||this.imageState_===rt.ERROR)&&(this.removeEventListener(et.CHANGE,e),t())})})),this.ready_}}function nu(i,t,e,n,s,r){let a=t===void 0?void 0:pi.get(t,e,s);return a||(a=new i1(i,i&&"src"in i?i.src||void 0:t,e,n,s),pi.set(t,e,s,a,r)),r&&a&&!pi.getPattern(t,e,s)&&pi.set(t,e,s,a,r),a}class xe{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,t.color!==void 0&&this.setColor(t.color)}clone(){const t=this.getColor();return new xe({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(t!==null&&typeof t=="object"&&"src"in t){const e=nu(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then(()=>{this.patternImage_=null}),e.getImageState()===rt.IDLE&&e.load(),e.getImageState()===rt.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}function To(i,t,e,n,s,r,a){let o,l;const h=(e-t)/n;if(h===1)o=t;else if(h===2)o=t,l=s;else if(h!==0){let c=i[t],u=i[t+1],d=0;const f=[0];for(let p=t+n;p1?a:2,r=r||new Array(a);for(let c=0;c>1;sMath.max(s,Lo(i,r)),0);return e[t]=n,n}function h1(i,t){const e=[],n=[],s=[];let r=0,a=0,o=0,l=0;for(let h=0,c=t.length;h<=c;h+=2){const u=t[h];if(u===` -`||h===c){r=Math.max(r,a),s.push(a),a=0,o+=l,l=0;continue}const d=t[h+1]||i.font,f=Lo(d,u);e.push(f),a+=f;const g=l1(d);n.push(g),l=Math.max(l,g)}return{width:r,height:o,widths:e,heights:n,lineWidths:s}}function c1(i,t,e,n,s,r,a,o,l,h,c){i.save(),e!==1&&(i.globalAlpha===void 0?i.globalAlpha=u=>u.globalAlpha*=e:i.globalAlpha*=e),t&&i.transform.apply(i,t),n.contextInstructions?(i.translate(l,h),i.scale(c[0],c[1]),u1(n,i)):c[0]<0||c[1]<0?(i.translate(l,h),i.scale(c[0],c[1]),i.drawImage(n,s,r,a,o,0,0,a,o)):i.drawImage(n,s,r,a,o,l,h,a*c[0],o*c[1]),i.restore()}function u1(i,t){const e=i.contextInstructions;for(let n=0,s=e.length;nthis.imageState_=rt.LOADED),this.render()}clone(){const t=this.getScale(),e=new bl({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const n=this.renderOptions_,s=Jt(n.size*t,n.size*t);this.draw_(n,s,t),e=s.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let s=this.radius_,r=this.radius2_===void 0?s:this.radius2_;if(se;){if(n-e>600){var r=n-e+1,a=t-e+1,o=Math.log(r),l=.5*Math.exp(2*o/3),h=.5*Math.sqrt(o*l*(r-l)/r)*(a-r/2<0?-1:1),c=Math.max(e,Math.floor(t-a*l/r+h)),u=Math.min(n,Math.floor(t+(r-a)*l/r+h));m0(i,t,c,u,s)}var d=i[t],f=e,g=n;for(vr(i,e,t),s(i[n],d)>0&&vr(i,e,n);f0;)g--}s(i[e],d)===0?vr(i,e,g):(g++,vr(i,g,n)),g<=t&&(e=g+1),t<=g&&(n=g-1)}}function vr(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function m1(i,t){return it?1:0}let p0=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!Za(t,e))return n;const s=this.toBBox,r=[];for(;e;){for(let a=0;a=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)}_split(t,e){const n=t[e],s=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,s);const a=this._chooseSplitIndex(n,r,s),o=ms(n.children.splice(a,n.children.length-a));o.height=n.height,o.leaf=n.leaf,ls(n,this.toBBox),ls(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(n,o)}_splitRoot(t,e){this.data=ms([t,e]),this.data.height=t.height+1,this.data.leaf=!1,ls(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let s,r=1/0,a=1/0;for(let o=e;o<=n-e;o++){const l=wr(t,0,o,this.toBBox),h=wr(t,o,n,this.toBBox),c=x1(l,h),u=Kl(l)+Kl(h);c=e;h--){const c=t.children[h];Er(o,t.leaf?r(c):c),l+=Ya(o)}return l}_adjustParentBBoxes(t,e,n){for(let s=n;s>=0;s--)Er(e[s],t)}_condense(t){for(let e=t.length-1,n;e>=0;e--)t[e].children.length===0?e>0?(n=t[e-1].children,n.splice(n.indexOf(t[e]),1)):this.clear():ls(t[e],this.toBBox)}};function p1(i,t,e){if(!e)return t.indexOf(i);for(let n=0;n=i.minX&&t.maxY>=i.minY}function ms(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Td(i,t,e,n,s){const r=[t,e];for(;r.length;){if(e=r.pop(),t=r.pop(),e-t<=n)continue;const a=t+Math.ceil((e-t)/n/2)*n;g1(i,a,t,e,s),r.push(t,a,a,e)}}function Pd(i,t,e,n){return e!==void 0&&n!==void 0?[e/i,n/t]:e!==void 0?e/i:n!==void 0?n/t:1}class Qs extends yl{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,s=t.scale!==void 0?t.scale:1,r=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:s,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const a=t.img!==void 0?t.img:null;let o=t.src;ft(!(o!==void 0&&a),"`image` and `src` cannot be provided at the same time"),(o===void 0||o.length===0)&&a&&(o=a.src||bt(a)),ft(o!==void 0&&o.length>0,"A defined and non-empty `src` or `image` must be provided"),ft(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let l;if(t.src!==void 0?l=rt.IDLE:a!==void 0&&("complete"in a?a.complete?l=a.src?rt.LOADED:rt.IDLE:l=rt.LOADING:l=rt.LOADED),this.color_=t.color!==void 0?Hr(t.color):null,this.iconImage_=nu(a,o,this.crossOrigin_,l,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,t.width!==void 0||t.height!==void 0){let h,c;if(t.size)[h,c]=t.size;else{const u=this.getImage(1);if(u.width&&u.height)h=u.width,c=u.height;else if(u instanceof HTMLImageElement){this.initialOptions_=t;const d=()=>{if(this.unlistenImageChange(d),!this.initialOptions_)return;const f=this.iconImage_.getSize();this.setScale(Pd(f[0],f[1],t.width,t.height))};this.listenImageChange(d);return}}h!==void 0&&this.setScale(Pd(h,c,t.width,t.height))}}clone(){let t,e,n;return this.initialOptions_?(e=this.initialOptions_.width,n=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Qs({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:n,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=s[0]),this.anchorYUnits_=="fraction"&&(t[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+s[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==rt.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==rt.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(et.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(et.CHANGE,t)}ready(){return this.iconImage_.ready()}}let ns=0;const lr=0,Dt=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string"},E1={[T.Get]:tt(([i,t])=>t!==void 0?w1(t.value):te,st(1,2),S1),[T.Var]:tt(([i])=>i.type,st(1,1),I1),[T.Id]:tt($|Re,yr,R1),[T.Concat]:tt(Re,st(2,1/0),ut(te)),[T.GeometryType]:tt(Re,yr,T1),[T.Resolution]:tt($,yr),[T.Zoom]:tt($,yr),[T.Time]:tt($,yr),[T.Any]:tt(Dt,st(2,1/0),ut(Dt)),[T.All]:tt(Dt,st(2,1/0),ut(Dt)),[T.Not]:tt(Dt,st(1,1),ut(Dt)),[T.Equal]:tt(Dt,st(2,2),ut(te),Yi),[T.NotEqual]:tt(Dt,st(2,2),ut(te),Yi),[T.GreaterThan]:tt(Dt,st(2,2),ut(te),Yi),[T.GreaterThanOrEqualTo]:tt(Dt,st(2,2),ut(te),Yi),[T.LessThan]:tt(Dt,st(2,2),ut(te),Yi),[T.LessThanOrEqualTo]:tt(Dt,st(2,2),ut(te),Yi),[T.Multiply]:tt(i=>{let t=$|Ut;for(let e=0;e{let t=te;for(let e=1;e{let t=te;for(let e=2;e{let t=Ut|$;for(let e=3;e{let t=te;for(let e=1;ei.length===2?xi|Ar:i.length===3||i.length===4?xi|Ut:xi,st(1,1/0),ut($)),[T.Color]:tt(Ut,st(1,4),ut($)),[T.Band]:tt($,st(1,3),ut($)),[T.Palette]:tt(Ut,st(2,2),k1),[T.ToString]:tt(Re,st(1,1),ut(Dt|$|Re|Ut))};function S1(i,t){const e=xt(i[1],t);if(!(e instanceof dn))throw new Error("Expected a literal argument for get operation");if(typeof e.value!="string")throw new Error("Expected a string argument for get operation");if(t.properties.add(e.value),i.length===3){const n=xt(i[2],t);return[e,n]}return[e]}function I1(i,t,e,n){const s=i[1];if(typeof s!="string")throw new Error("Expected a string argument for var operation");if(t.variables.add(s),!("variables"in t.style)||t.style.variables[s]===void 0)return[new dn(te,s)];const r=t.style.variables[s],a=xt(r,t);if(a.value=s,n&&!bi(n,a.type))throw new Error(`The variable ${s} has type ${se(a.type)} but the following type was expected: ${se(n)}`);return[a]}function R1(i,t){t.featureId=!0}function T1(i,t){t.geometryType=!0}function yr(i,t){const e=i[0];if(i.length!==1)throw new Error(`Expected no arguments for ${e} operation`);return[]}function st(i,t){return function(e,n){const s=e[0],r=e.length-1;if(i===t){if(r!==i){const a=i===1?"":"s";throw new Error(`Expected ${i} argument${a} for ${s}, got ${r}`)}}else if(rt){const a=t===1/0?`${i} or more`:`${i} to ${t}`;throw new Error(`Expected ${a} arguments for ${s}, got ${r}`)}}}function ut(i){return function(t,e){const n=t[0],s=t.length-1,r=new Array(s);for(let a=0;an.featureId;case T.GeometryType:return n=>n.geometryType;case T.Concat:{const n=i.args.map(s=>ei(s));return s=>"".concat(...n.map(r=>r(s).toString()))}case T.Resolution:return n=>n.resolution;case T.Any:case T.All:case T.Between:case T.In:case T.Not:return z1(i);case T.Equal:case T.NotEqual:case T.LessThan:case T.LessThanOrEqualTo:case T.GreaterThan:case T.GreaterThanOrEqualTo:return V1(i);case T.Multiply:case T.Divide:case T.Add:case T.Subtract:case T.Clamp:case T.Mod:case T.Pow:case T.Abs:case T.Floor:case T.Ceil:case T.Round:case T.Sin:case T.Cos:case T.Atan:case T.Sqrt:return j1(i);case T.Case:return B1(i);case T.Match:return W1(i);case T.Interpolate:return U1(i);case T.ToString:return $1(i);default:throw new Error(`Unsupported operator ${e}`)}}function N1(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{for(let a=0;a{for(let a=0;as.properties[n];case T.Var:return s=>s.variables[n];default:throw new Error(`Unsupported accessor operator ${i.operator}`)}}function V1(i,t){const e=i.operator,n=ei(i.args[0]),s=ei(i.args[1]);switch(e){case T.Equal:return r=>n(r)===s(r);case T.NotEqual:return r=>n(r)!==s(r);case T.LessThan:return r=>n(r)n(r)<=s(r);case T.GreaterThan:return r=>n(r)>s(r);case T.GreaterThanOrEqualTo:return r=>n(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${e}`)}}function z1(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{for(let a=0;a{for(let a=0;a{const a=s[0](r),o=s[1](r),l=s[2](r);return a>=o&&a<=l};case T.In:return r=>{const a=s[0](r);for(let o=1;o!s[0](r);default:throw new Error(`Unsupported logical operator ${e}`)}}function j1(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{let a=1;for(let o=0;os[0](r)/s[1](r);case T.Add:return r=>{let a=0;for(let o=0;os[0](r)-s[1](r);case T.Clamp:return r=>{const a=s[0](r),o=s[1](r);if(al?l:a};case T.Mod:return r=>s[0](r)%s[1](r);case T.Pow:return r=>Math.pow(s[0](r),s[1](r));case T.Abs:return r=>Math.abs(s[0](r));case T.Floor:return r=>Math.floor(s[0](r));case T.Ceil:return r=>Math.ceil(s[0](r));case T.Round:return r=>Math.round(s[0](r));case T.Sin:return r=>Math.sin(s[0](r));case T.Cos:return r=>Math.cos(s[0](r));case T.Atan:return n===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case T.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${e}`)}}function B1(i,t){const e=i.args.length,n=new Array(e);for(let s=0;s{for(let r=0;r{const r=n[0](s);for(let a=1;a{const r=n[0](s),a=n[1](s);let o,l;for(let h=2;h=a)return h===2?u:d?H1(r,a,o,l,c,u):Sr(r,a,o,l,c,u);o=c,l=u}return l}}function $1(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{const a=s[0](r);return i.args[0].type===Ut?Jc(a):a.toString()};default:throw new Error(`Unsupported convert operator ${e}`)}}function Sr(i,t,e,n,s,r){const a=s-e;if(a===0)return n;const o=t-e,l=i===1?o/a:(Math.pow(i,o)-1)/(Math.pow(i,a)-1);return n+l*(r-n)}function H1(i,t,e,n,s,r){if(s-e===0)return n;const o=_d(n),l=_d(r);let h=l[2]-o[2];h>180?h-=360:h<-180&&(h+=360);const c=[Sr(i,t,e,o[0],s,l[0]),Sr(i,t,e,o[1],s,l[1]),o[2]+Sr(i,t,e,0,s,h),Sr(i,t,e,n[3],s,r[3])];return t0(yy(c))}function X1(i){return!0}function q1(i){const t=v0(),e=Y1(i,t),n=x0();return function(s,r){if(n.properties=s.getPropertiesInternal(),n.resolution=r,t.featureId){const a=s.getId();a!==void 0?n.featureId=a:n.featureId=null}return t.geometryType&&(n.geometryType=y0(s.getGeometry())),e(n)}}function Ld(i){const t=v0(),e=i.length,n=new Array(e);for(let a=0;a4)throw new Error(`Expected a color with 3 or 4 values for ${t}`);return e}function w0(i,t){const e=Ia(i,t);if(e.length!==2)throw new Error(`Expected an array of two numbers for ${t}`);return e}function ax(i,t){return typeof i=="number"?i:w0(i,t)}const Fd={RENDER_ORDER:"renderOrder"};class E0 extends ar{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Fd.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const n=this.getDeclutter();n in t.declutter||(t.declutter[n]=new p0(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(Fd.RENDER_ORDER,t)}setStyle(t){this.style_=t===void 0?g0:t;const e=ox(t);this.styleFunction_=t===null?void 0:su(e),this.changed()}}function ox(i){if(i===void 0)return g0;if(!i)return null;if(typeof i=="function"||i instanceof Et)return i;if(!Array.isArray(i))return Ld([i]);if(i.length===0)return[];const t=i.length,e=i[0];if(e instanceof Et){const s=new Array(t);for(let r=0;rl&&(this.instructions.push([q.CUSTOM,l,c,t,n,un,r]),this.hitDetectionInstructions.push([q.CUSTOM,l,c,t,s||n,un,r]));break;case"Point":h=t.getFlatCoordinates(),this.coordinates.push(h[0],h[1]),c=this.coordinates.length,this.instructions.push([q.CUSTOM,l,c,t,n,void 0,r]),this.hitDetectionInstructions.push([q.CUSTOM,l,c,t,s||n,void 0,r]);break}this.endGeometry(e)}beginGeometry(t,e,n){this.beginGeometryInstruction1_=[q.BEGIN_GEOMETRY,e,0,t,n],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[q.BEGIN_GEOMETRY,e,0,t,n],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let s,r,a=-1;for(e=0;ethis.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(t){const e=t.fillStyle,n=[q.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(t.fillPatternScale),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[q.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,s=t.lineCap,r=t.lineDash,a=t.lineDashOffset,o=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=s||r!=t.currentLineDash&&!yn(t.currentLineDash,r)||t.currentLineDashOffset!=a||t.currentLineJoin!=o||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=s,t.currentLineDash=r,t.currentLineDashOffset=a,t.currentLineJoin=o,t.currentLineWidth=l,t.currentMiterLimit=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[q.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=_g(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;Ic(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class lx extends Ra{constructor(t,e,n,s){super(t,e,n,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,n){if(!this.image_||this.maxExtent&&!Ys(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,n);const s=t.getFlatCoordinates(),r=t.getStride(),a=this.coordinates.length,o=this.appendFlatPointCoordinates(s,r);this.instructions.push([q.DRAW_IMAGE,a,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([q.DRAW_IMAGE,a,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,n){if(!this.image_)return;this.beginGeometry(t,e,n);const s=t.getFlatCoordinates(),r=[];for(let l=0,h=s.length;l=i){const g=(i-o+f)/f,m=Ie(h,u,g),p=Ie(c,d,g);l.push(m,p),r.push(l),l=[m,p],o==i&&(a+=s),o=0}else if(o0&&r.push(l),r}function ux(i,t,e,n,s){let r=e,a=e,o=0,l=0,h=e,c,u,d,f,g,m,p,_,v,y;for(u=e;ui&&(l>o&&(o=l,r=h,a=u),l=0,h=u-s)),d=f,p=v,_=y),g=x,m=M}return l+=f,l>o?[h,u]:[r,a]}const ko={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class dx extends Ra{constructor(t,e,n,s){super(t,e,n,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[ge]={fillStyle:ge},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,n){const s=this.textFillState_,r=this.textStrokeState_,a=this.textState_;if(this.text_===""||!a||!s&&!r)return;const o=this.coordinates;let l=o.length;const h=t.getType();let c=null,u=t.getStride();if(a.placement==="line"&&(h=="LineString"||h=="MultiLineString"||h=="Polygon"||h=="MultiPolygon")){if(!oe(this.maxExtent,t.getExtent()))return;let d;if(c=t.getFlatCoordinates(),h=="LineString")d=[c.length];else if(h=="MultiLineString")d=t.getEnds();else if(h=="Polygon")d=t.getEnds().slice(0,1);else if(h=="MultiPolygon"){const p=t.getEndss();d=[];for(let _=0,v=p.length;_{const M=o[(v+x)*2]===c[x*u]&&o[(v+x)*2+1]===c[x*u+1];return M||--v,M})}this.saveTextStates_(),(a.backgroundFill||a.backgroundStroke)&&(this.setFillStrokeStyle(a.backgroundFill,a.backgroundStroke),a.backgroundFill&&this.updateFillStyle(this.state,this.createFill),a.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,n);let g=a.padding;if(g!=Fn&&(a.scale[0]<0||a.scale[1]<0)){let v=a.padding[0],y=a.padding[1],x=a.padding[2],M=a.padding[3];a.scale[0]<0&&(y=-y,M=-M),a.scale[1]<0&&(v=-v,x=-x),g=[v,y,x,M]}const m=this.pixelRatio;this.instructions.push([q.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,g==Fn?Fn:g.map(function(v){return v*m}),!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const p=1/m,_=this.state.fillStyle;a.backgroundFill&&(this.state.fillStyle=ge,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([q.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[p,p],NaN,this.declutterMode_,this.declutterImageWithText_,g,!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?ge:this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),a.backgroundFill&&(this.state.fillStyle=_,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||Yr,justify:e.justify,textBaseline:e.textBaseline||Oo,scale:e.scale});const a=this.fillKey_;n&&(a in this.fillStates||(this.fillStates[a]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,a=this.textKey_,o=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=ko[s.textBaseline],c=this.textOffsetY_*l,u=this.text_,d=n?n.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([q.DRAW_CHARS,t,e,h,s.overflow,o,s.maxAngle,l,c,r,d*l,u,a,1,this.declutterMode_]),this.hitDetectionInstructions.push([q.DRAW_CHARS,t,e,h,s.overflow,o&&ge,s.maxAngle,l,c,r,d*l,u,a,1/l,this.declutterMode_])}setTextStyle(t,e){let n,s,r;if(!t)this.text_="";else{const a=t.getFill();a?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=_i(a.getColor()||ge)):(s=null,this.textFillState_=s);const o=t.getStroke();if(!o)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const g=o.getLineDash(),m=o.getLineDashOffset(),p=o.getWidth(),_=o.getMiterLimit();r.lineCap=o.getLineCap()||Ks,r.lineDash=g?g.slice():Vi,r.lineDashOffset=m===void 0?zi:m,r.lineJoin=o.getLineJoin()||Js,r.lineWidth=p===void 0?Zr:p,r.miterLimit=_===void 0?Xr:_,r.strokeStyle=_i(o.getColor()||qr)}n=this.textState_;const l=t.getFont()||d0;o1(l);const h=t.getScaleArray();n.overflow=t.getOverflow(),n.font=l,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.repeat=t.getRepeat(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||Oo,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||Fn,n.scale=h===void 0?[1,1]:h;const c=t.getOffsetX(),u=t.getOffsetY(),d=t.getRotateWithView(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=c===void 0?0:c,this.textOffsetY_=u===void 0?0:u,this.textRotateWithView_=d===void 0?!1:d,this.textRotation_=f===void 0?0:f,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:bt(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.repeat||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=s&&s.fillStyle?typeof s.fillStyle=="string"?s.fillStyle:"|"+bt(s.fillStyle):""}this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const fx={Circle:Gd,Default:Ra,Image:lx,LineString:hx,Polygon:Gd,Text:dx};class gx{constructor(t,e,n,s){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=s,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const s in n){const r=n[s].finish();t[e][s]=r}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let s=this.buildersByZIndex_[n];s===void 0&&(s={},this.buildersByZIndex_[n]=s);let r=s[e];if(r===void 0){const a=fx[e];r=new a(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=r}return r}}function mx(i,t,e,n,s,r,a,o,l,h,c,u){let d=i[t],f=i[t+1],g=0,m=0,p=0,_=0;function v(){g=d,m=f,t+=n,d=i[t],f=i[t+1],_+=p,p=Math.sqrt((d-g)*(d-g)+(f-m)*(f-m))}do v();while(tO[2]}else k=x>I;const A=Math.PI,G=[],z=w+n===t;t=w,p=0,_=E,d=i[t],f=i[t+1];let V;if(z){v(),V=Math.atan2(f-m,d-g),k&&(V+=V>0?-A:A);const O=(I+x)/2,J=(D+M)/2;return G[0]=[O,J,(C-r)/2,V,s],G}s=s.replace(/\n/g," ");for(let O=0,J=s.length;O0?-A:A),V!==void 0){let P=B-V;if(P+=P>A?-2*A:P<-A?2*A:0,Math.abs(P)>a)return null}V=B;const at=O;let X=0;for(;O0&&i.push(` -`,""),i.push(t,""),i}class _x{constructor(t,e,n,s,r){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=Ke(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new Jg:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,n,s){const r=t+e+n+s;if(this.labels_[r])return this.labels_[r];const a=s?this.strokeStates[s]:null,o=n?this.fillStates[n]:null,l=this.textStates[e],h=this.pixelRatio,c=[l.scale[0]*h,l.scale[1]*h],u=Array.isArray(t),d=l.justify?ko[l.justify]:Ql(Array.isArray(t)?t[0]:t,l.textAlign||Yr),f=s&&a.lineWidth?a.lineWidth:0,g=u?t:t.split(` -`).reduce(px,[]),{width:m,height:p,widths:_,heights:v,lineWidths:y}=h1(l,g),x=m+f,M=[],w=(x+2)*c[0],E=(p+f)*c[1],C={width:w<0?Math.floor(w):Math.ceil(w),height:E<0?Math.floor(E):Math.ceil(E),contextInstructions:M};(c[0]!=1||c[1]!=1)&&M.push("scale",c),s&&(M.push("strokeStyle",a.strokeStyle),M.push("lineWidth",f),M.push("lineCap",a.lineCap),M.push("lineJoin",a.lineJoin),M.push("miterLimit",a.miterLimit),M.push("setLineDash",[a.lineDash]),M.push("lineDashOffset",a.lineDashOffset)),n&&M.push("fillStyle",o.fillStyle),M.push("textBaseline","middle"),M.push("textAlign","center");const I=.5-d;let D=d*x+I*f;const k=[],A=[];let G=0,z=0,V=0,O=0,J;for(let B=0,at=g.length;Bt?t-h:r,x=a+c>e?e-c:a,M=g[3]+y*d[0]+g[1],w=g[0]+x*d[1]+g[2],E=_-g[3],C=v-g[0];(m||u!==0)&&(Zi[0]=E,Ki[0]=E,Zi[1]=C,Ti[1]=C,Ti[0]=E+M,Pi[0]=Ti[0],Pi[1]=C+w,Ki[1]=Pi[1]);let I;return u!==0?(I=Bi(Ke(),n,s,1,1,u,-n,-s),Yt(I,Zi),Yt(I,Ti),Yt(I,Pi),Yt(I,Ki),ji(Math.min(Zi[0],Ti[0],Pi[0],Ki[0]),Math.min(Zi[1],Ti[1],Pi[1],Ki[1]),Math.max(Zi[0],Ti[0],Pi[0],Ki[0]),Math.max(Zi[1],Ti[1],Pi[1],Ki[1]),hs)):ji(Math.min(E,E+M),Math.min(C,C+w),Math.max(E,E+M),Math.max(C,C+w),hs),f&&(_=Math.round(_),v=Math.round(v)),{drawImageX:_,drawImageY:v,drawImageW:y,drawImageH:x,originX:h,originY:c,declutterBox:{minX:hs[0],minY:hs[1],maxX:hs[2],maxY:hs[3],value:p},canvasTransform:I,scale:d}}replayImageOrLabel_(t,e,n,s,r,a,o){const l=!!(a||o),h=s.declutterBox,c=o?o[2]*s.scale[0]/2:0;return h.minX-c<=e[0]&&h.maxX+c>=0&&h.minY-c<=e[1]&&h.maxY+c>=0&&(l&&this.replayTextBackground_(t,Zi,Ti,Pi,Ki,a,o),c1(t,s.canvasTransform,r,n,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const n=Yt(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;t.save(),t.translate(n[0]%s,n[1]%s),e!==1&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,n,s){const r=this.textStates[e],a=this.createLabel(t,e,s,n),o=this.strokeStates[n],l=this.pixelRatio,h=Ql(Array.isArray(t)?t[0]:t,r.textAlign||Yr),c=ko[r.textBaseline||Oo],u=o&&o.lineWidth?o.lineWidth:0,d=a.width/l-2*r.scale[0],f=h*d+2*(.5-h)*u,g=c*a.height/l+2*(.5-c)*u;return{label:a,anchorX:f,anchorY:g}}execute_(t,e,n,s,r,a,o,l){const h=this.zIndexContext_;let c;this.pixelCoordinates_&&yn(n,this.renderedTransform_)?c=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),c=gn(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),wv(this.renderedTransform_,n));let u=0;const d=s.length;let f=0,g,m,p,_,v,y,x,M,w,E,C,I,D,k=0,A=0,G=null,z=null;const V=this.coordinateCache_,O=this.viewRotation_,J=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,B={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:O},at=this.instructions!=s||this.overlaps?0:200;let X,nt,j,U;for(;uat&&(this.fill_(t),k=0),A>at&&(t.stroke(),A=0),!k&&!A&&(t.beginPath(),v=NaN,y=NaN),++u;break;case q.CIRCLE:f=P[1];const ct=c[f],gt=c[f+1],wt=c[f+2],ce=c[f+3],Vt=wt-ct,Ei=ce-gt,He=Math.sqrt(Vt*Vt+Ei*Ei);t.moveTo(ct+He,gt),t.arc(ct,gt,He,0,2*Math.PI,!0),++u;break;case q.CLOSE_PATH:t.closePath(),++u;break;case q.CUSTOM:f=P[1],g=P[2];const wn=P[3],Ce=P[4],Xe=P[5];B.geometry=wn,B.feature=X,u in V||(V[u]=[]);const oi=V[u];Xe?Xe(c,f,g,2,oi):(oi[0]=c[f],oi[1]=c[f+1],oi.length=2),h&&(h.zIndex=P[6]),Ce(oi,B),++u;break;case q.DRAW_IMAGE:f=P[1],g=P[2],w=P[3],m=P[4],p=P[5];let En=P[6];const li=P[7],hi=P[8],It=P[9],ue=P[10];let we=P[11];const Sn=P[12];let In=P[13];_=P[14]||"declutter";const Hi=P[15];if(!w&&P.length>=20){E=P[19],C=P[20],I=P[21],D=P[22];const De=this.drawLabelWithPointPlacement_(E,C,I,D);w=De.label,P[3]=w;const Tn=P[23];m=(De.anchorX-Tn)*this.pixelRatio,P[4]=m;const ke=P[24];p=(De.anchorY-ke)*this.pixelRatio,P[5]=p,En=w.height,P[6]=En,In=w.width,P[13]=In}let Rn;P.length>25&&(Rn=P[25]);let Xi,ss,Ht;P.length>17?(Xi=P[16],ss=P[17],Ht=P[18]):(Xi=Fn,ss=!1,Ht=!1),ue&&J?we+=O:!ue&&!J&&(we-=O);let Cp=0;for(;f!I0.includes(i));class yx{constructor(t,e,n,s,r,a,o){this.maxExtent_=t,this.overlaps_=s,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=a,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Ke(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,o)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t,e){for(const n in t){let s=this.executorsByZIndex_[n];s===void 0&&(s={},this.executorsByZIndex_[n]=s);const r=t[n];for(const a in r){const o=r[a];s[a]=new _x(this.resolution_,this.pixelRatio_,this.overlaps_,o,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let s=0,r=t.length;s0){if(!a||E==="none"||f!=="Image"&&f!=="Text"||a.includes(M)){const k=(d[I]-3)/4,A=s-k%o,G=s-(k/o|0),z=r(M,w,A*A+G*G);if(z)return z}c.clearRect(0,0,o,o);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(Ni);let p,_,v,y,x;for(p=m.length-1;p>=0;--p){const M=m[p].toString();for(v=this.executorsByZIndex_[M],_=Ms.length-1;_>=0;--_)if(f=Ms[_],y=v[f],y!==void 0&&(x=y.executeHitDetection(c,l,n,g,u),x))return x}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],s=e[1],r=e[2],a=e[3],o=[n,s,n,a,r,a,r,s];return gn(o,0,8,2,t,o),o}isEmpty(){return Hs(this.executorsByZIndex_)}execute(t,e,n,s,r,a,o){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(Ni),a=a||Ms;const h=Ms.length;let c,u,d,f,g;for(o&&l.reverse(),c=0,u=l.length;c_.execute(M,e,n,s,r,o)),x&&y.restore(),v){v.offset();const M=l[c]*h+d;this.deferredZIndexContexts_[M]||(this.deferredZIndexContexts_[M]=[]),this.deferredZIndexContexts_[M].push(v)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(Ni);for(let n=0,s=e.length;n{r.draw(this.renderedContext_),r.clear()}),t[e[n]].length=0}}const th={};function xx(i){if(th[i]!==void 0)return th[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let r=0;r<=i;++r)for(let a=0;a<=i;++a){const o=r*r+a*a;if(o>e)break;let l=n[o];l||(l=[],n[o]=l),l.push(((i+r)*t+(i+a))*4+3),r>0&&l.push(((i-r)*t+(i+a))*4+3),a>0&&(l.push(((i+r)*t+(i-a))*4+3),r>0&&l.push(((i-r)*t+(i-a))*4+3))}const s=[];for(let r=0,a=n.length;ru*this.pixelRatio_),lineDashOffset:(a||zi)*this.pixelRatio_,lineJoin:o!==void 0?o:Js,lineWidth:(l!==void 0?l:Zr)*this.pixelRatio_,miterLimit:h!==void 0?h:Xr,strokeStyle:_i(n||qr)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),s=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*n,this.imageAnchorY_=s[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const a=t.getScaleArray();this.imageScale_=[a[0]*this.pixelRatio_/n,a[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const f=e.getColor();this.textFillState_={fillStyle:_i(f||ge)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const f=n.getColor(),g=n.getLineCap(),m=n.getLineDash(),p=n.getLineDashOffset(),_=n.getLineJoin(),v=n.getWidth(),y=n.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:Ks,lineDash:m||Vi,lineDashOffset:p||zi,lineJoin:_!==void 0?_:Js,lineWidth:v!==void 0?v:Zr,miterLimit:y!==void 0?y:Xr,strokeStyle:_i(f||qr)}}const s=t.getFont(),r=t.getOffsetX(),a=t.getOffsetY(),o=t.getRotateWithView(),l=t.getRotation(),h=t.getScaleArray(),c=t.getText(),u=t.getTextAlign(),d=t.getTextBaseline();this.textState_={font:s!==void 0?s:d0,textAlign:u!==void 0?u:Yr,textBaseline:d!==void 0?d:Oo},this.text_=c!==void 0?Array.isArray(c)?c.reduce((f,g,m)=>f+=m%2?" ":g,""):c:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=a!==void 0?this.pixelRatio_*a:0,this.textRotateWithView_=o!==void 0?o:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}}}const mi=.5;function Mx(i,t,e,n,s,r,a,o,l){const h=s,c=i[0]*mi,u=i[1]*mi,d=Jt(c,u);d.imageSmoothingEnabled=!1;const f=d.canvas,g=new bx(d,mi,s,null,a,o,null),m=e.length,p=Math.floor((256*256*256-1)/m),_={};for(let y=1;y<=m;++y){const x=e[y-1],M=x.getStyleFunction()||n;if(!M)continue;let w=M(x,r);if(!w)continue;Array.isArray(w)||(w=[w]);const C=(y*p).toString(16).padStart(7,"#00000");for(let I=0,D=w.length;I0;return u&&Promise.all(l).then(()=>s(null)),Ix(i,t,e,n,r,a,o),u}function Ix(i,t,e,n,s,r,a){const o=e.getGeometryFunction()(t);if(!o)return;const l=o.simplifyTransformed(n,s);if(e.getRenderer())P0(i,l,e,t,a);else{const c=R0[l.getType()];c(i,l,e,t,a,r)}}function P0(i,t,e,n,s){if(t.getType()=="GeometryCollection"){const a=t.getGeometries();for(let o=0,l=a.length;o{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=this.frameState.size.slice(),s=this.renderedCenter_,r=this.renderedResolution_,a=this.renderedRotation_,o=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),c=[],u=n[0]*mi,d=n[1]*mi;c.push(this.getRenderTransform(s,r,a,mi,u,d,0).slice());const f=h.getSource(),g=o.getExtent();if(f.getWrapX()&&o.canWrapX()&&!cn(g,l)){let m=l[0];const p=dt(g);let _=0,v;for(;mg[2];)++_,v=p*_,c.push(this.getRenderTransform(s,r,a,mi,u,d,v).slice()),m-=p}this.hitDetectionImageData_=Mx(n,c,this.renderedFeatures_,h.getStyleFunction(),l,r,a,jd(r,this.renderedPixelRatio_))}e(Cx(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,n,s,r){if(!this.replayGroup_)return;const a=e.viewState.resolution,o=e.viewState.rotation,l=this.getLayer(),h={},c=function(g,m,p){const _=bt(g),v=h[_];if(v){if(v!==!0&&pu=g.forEachFeatureAtCoordinate(t,a,o,n,c,f&&e.declutter[f]?e.declutter[f].all().map(m=>m.value):null)),u}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const s=t.viewHints[ie.ANIMATING],r=t.viewHints[ie.INTERACTING],a=e.getUpdateWhileAnimating(),o=e.getUpdateWhileInteracting();if(this.ready&&!a&&s||!o&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,h=t.viewState,c=h.projection,u=h.resolution,d=t.pixelRatio,f=e.getRevision(),g=e.getRenderBuffer();let m=e.getRenderOrder();m===void 0&&(m=Ex);const p=h.center.slice(),_=Ic(l,g*u),v=_.slice(),y=[_.slice()],x=c.getExtent();if(n.getWrapX()&&c.canWrapX()&&!cn(x,t.extent)){const z=dt(x),V=Math.max(dt(_)/2,z);_[0]=x[0]-V,_[2]=x[2]+V,wg(p,c);const O=xg(y[0],c);O[0]x[0]&&O[2]>x[2]&&y.push([O[0]-z,O[1],O[2]-z,O[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==f&&this.renderedRenderOrder_==m&&this.renderedFrameDeclutter_===!!t.declutter&&cn(this.wrappedRenderedExtent_,_))return yn(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const M=new gx(T0(u,d),_,u,d);let w;for(let z=0,V=y.length;z{let O;const J=z.getStyleFunction()||e.getStyleFunction();if(J&&(O=J(z,u)),O){const B=this.renderFeature(z,E,O,M,w,this.getLayer().getDeclutter(),V);C=C&&!B}},D=Og(_),k=n.getFeaturesInExtent(D);m&&k.sort(m);for(let z=0,V=k.length;z=n[0]||t[1]<=n[1]&&t[3]>=n[1]?!0:Oc(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],s=t.slice();s[e]=s[0]+n;for(let r=1;rt.clone())}class ta extends bn{constructor(t,e,n){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&n)this.setFlatCoordinates(e,t),this.ends_=n;else{const s=t,r=[],a=[];for(let l=0,h=s.length;l{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const n=this.simplifiedGeometry_.getFlatCoordinates();let s;switch(this.type_){case"LineString":n.length=ml(n,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,n,0),s=[n.length];break;case"MultiLineString":s=[],n.length=Fg(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,n,0,s);break;case"Polygon":s=[],n.length=$c(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),n,0,s);break}return s&&(this.simplifiedGeometry_=new je(this.type_,n,s,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}je.prototype.getFlatCoordinates=je.prototype.getOrientedFlatCoordinates;const Ne={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Fx(i,t){return[[-1/0,-1/0,1/0,1/0]]}let Nx=!1;function Gx(i,t,e,n,s,r,a){const o=new XMLHttpRequest;o.open("GET",typeof i=="function"?i(e,n,s):i,!0),t.getType()=="arraybuffer"&&(o.responseType="arraybuffer"),o.withCredentials=Nx,o.onload=function(l){if(!o.status||o.status>=200&&o.status<300){const h=t.getType();try{let c;h=="text"||h=="json"?c=o.responseText:h=="xml"?c=o.responseXML||o.responseText:h=="arraybuffer"&&(c=o.response),c?r(t.readFeatures(c,{extent:e,featureProjection:s}),t.readProjection(c)):a()}catch{a()}}else a()},o.onerror=a,o.send()}function $d(i,t){return function(e,n,s,r,a){const o=this;Gx(i,t,e,n,s,function(l,h){o.addFeatures(l),r!==void 0&&r(l)},a||$s)}}class Ji extends ni{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Rl extends i0{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=$s,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(ft(this.format_,"`format` must be set when `url` is set"),this.loader_=$d(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Fx;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Wd:null,this.loadedExtentsRtree_=new Wd,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,s;Array.isArray(t.features)?s=t.features:t.features&&(n=t.features,s=n.getArray()),!e&&n===void 0&&(n=new We(s)),s!==void 0&&this.addFeaturesInternal(s),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=bt(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const s=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Ji(Ne.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof je||(this.featureChangeKeys_[t]=[ht(e,et.CHANGE,this.handleFeatureChange_,this),ht(e,Zn.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let n=!0;if(e.getId()!==void 0){const s=String(e.getId());if(!(s in this.idIndex_))this.idIndex_[s]=e;else if(e instanceof je){const r=this.idIndex_[s];r instanceof je?Array.isArray(r)?r.push(e):this.idIndex_[s]=[r,e]:n=!1}else n=!1}return n&&(ft(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],s=[];for(let r=0,a=t.length;r{e||(e=!0,this.addFeature(n.element),e=!1)}),t.addEventListener(fe.REMOVE,n=>{e||(e=!0,this.removeFeature(n.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(St);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=s=>{this.removeFeatureInternal(s)};this.featuresRtree_.forEach(n);for(const s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new Ji(Ne.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(s){const r=s.getGeometry();if(r instanceof je||r.intersectsCoordinate(t))return e(s)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(n){const s=n.getGeometry();if(s instanceof je||s.intersectsExtent(t)){const r=e(n);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),Hs(this.nullGeometryFeatures_)||Ze(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const s=bg(t,e);return[].concat(...s.map(r=>this.featuresRtree_.getInExtent(r)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],s=t[1];let r=null;const a=[NaN,NaN];let o=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||Us,this.featuresRtree_.forEachInExtent(l,function(h){if(e(h)){const c=h.getGeometry(),u=o;if(o=c instanceof je?0:c.closestPointXY(n,s,a,o),o{--this.loadingExtentsCount_,this.dispatchEvent(new Ji(Ne.FEATURESLOADEND,void 0,c))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Ji(Ne.FEATURESLOADERROR))}),s.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let n;e.forEachInExtent(t,function(s){if(Zs(s.extent,t))return n=s,!0}),n&&e.remove(n)}removeFeatures(t){const e=[];for(let n=0,s=t.length;n0&&this.changed()}removeFeature(t){if(!t)return;this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=bt(t);if(!(e in this.uidIndex_))return;e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.featureChangeKeys_[e]?.forEach(St),delete this.featureChangeKeys_[e];const s=t.getId();if(s!==void 0){const r=s.toString(),a=this.idIndex_[r];a===t?delete this.idIndex_[r]:Array.isArray(a)&&(a.splice(a.indexOf(t),1),a.length===1&&(this.idIndex_[r]=a[0]))}return delete this.uidIndex_[e],this.hasListener(Ne.REMOVEFEATURE)&&this.dispatchEvent(new Ji(Ne.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const n in this.idIndex_){const s=this.idIndex_[n];if(t instanceof je&&Array.isArray(s)&&s.includes(t))s.splice(s.indexOf(t),1);else if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}}return e}setLoader(t){this.loader_=t}setUrl(t){ft(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader($d(t,this.format_))}}class Vx{constructor(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[n+2]>t;)n-=3;const s=this.points_[e+2]-this.points_[n+2];if(s<1e3/60)return!1;const r=this.points_[e]-this.points_[n],a=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(a,r),this.initialVelocity_=Math.sqrt(r*r+a*a)/s,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}class zx extends Cc{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){mt()}calculateMatrices2D(t){const e=t.viewState,n=t.coordinateToPixelTransform,s=t.pixelToCoordinateTransform;Bi(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Ag(s,n)}forEachFeatureAtCoordinate(t,e,n,s,r,a,o,l){let h;const c=e.viewState;function u(x,M,w,E){return r.call(a,M,x?w:null,E)}const d=c.projection,f=wg(t.slice(),d),g=[[0,0]];if(d.canWrapX()&&s){const x=d.getExtent(),M=dt(x);g.push([-M,0],[M,0])}const m=e.layerStatesArray,p=m.length,_=[],v=[];for(let x=0;x=0;--M){const w=m[M],E=w.layer;if(E.hasRenderer()&&Yc(w,c)&&o.call(l,E)){const C=E.getRenderer(),I=E.getSource();if(C&&I){const D=I.getWrapX()?f:t,k=u.bind(null,w.managed);v[0]=D[0]+g[x][0],v[1]=D[1]+g[x][1],h=C.forEachFeatureAtCoordinate(v,e,n,k,_)}if(h)return h}}if(_.length===0)return;const y=1/_.length;return _.forEach((x,M)=>x.distanceSq+=M*y),_.sort((x,M)=>x.distanceSq-M.distanceSq),_.some(x=>h=x.callback(x.feature,x.layer,x.geometry)),h}hasFeatureAtCoordinate(t,e,n,s,r,a){return this.forEachFeatureAtCoordinate(t,e,n,s,Us,this,r,a)!==void 0}getMap(){return this.map_}renderFrame(t){mt()}scheduleExpireIconCache(t){pi.canExpireCache()&&t.postRenderFunctions.push(jx)}}function jx(i,t){pi.expire()}class Bx extends zx{constructor(t){super(t),this.fontChangeListenerKey_=ht(Oi,Zn.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=or+" ol-layers";const n=t.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const n=this.getMap();if(n.hasListener(t)){const s=new $g(t,void 0,e);n.dispatchEvent(s)}}disposeInternal(){St(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(Be.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(o,l){return o.zIndex-l.zIndex});e.some(o=>o.layer instanceof E0&&o.layer.getDeclutter())&&(t.declutter={});const s=t.viewState;this.children_.length=0;const r=[];let a=null;for(let o=0,l=e.length;o=0;--n){const s=e[n],r=s.layer;r.getDeclutter()&&r.renderDeclutter(t,s)}e.forEach(n=>n.layer.renderDeferred(t))}}}class en extends ni{constructor(t,e){super(t),this.layer=e}}const ih={LAYERS:"layers"};class hr extends mg{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let n=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(ih.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new We(n.slice(),{unique:!0}):ft(typeof n.getArray=="function","Expected `layers` to be an array or a `Collection`"):n=new We(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(St),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(ht(t,fe.ADD,this.handleLayersAdd_,this),ht(t,fe.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(St);Ma(this.listenerKeys_);const e=t.getArray();for(let n=0,s=e.length;n{this.clickTimeoutId_=void 0;const n=new Li(pt.SINGLECLICK,this.map_,t);this.dispatchEvent(n)},250)}updateActivePointers_(t){const e=t,n=e.pointerId;if(e.type==pt.POINTERUP||e.type==pt.POINTERCANCEL){delete this.trackedTouches_[n];for(const s in this.trackedTouches_)if(this.trackedTouches_[s].target!==e.target){delete this.trackedTouches_[s];break}}else(e.type==pt.POINTERDOWN||e.type==pt.POINTERMOVE)&&(this.trackedTouches_[n]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new Li(pt.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(St),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new Li(pt.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(ht(n,pt.POINTERMOVE,this.handlePointerMove_,this),ht(n,pt.POINTERUP,this.handlePointerUp_,this),ht(this.element_,pt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(ht(this.element_.getRootNode(),pt.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new Li(pt.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new Li(pt.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(St(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(et.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(St(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(St),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const di={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},zt={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},No=1/0;class Ux{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Ma(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const s=this.keyFunction_(n);return delete this.queuedElements_[s],n}enqueue(t){ft(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=No?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,n=this.priorities_,s=e.length,r=e[t],a=n[t],o=t;for(;t>1;){const l=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),c=ht;){const o=this.getParentIndex_(e);if(s[o]>a)n[e]=n[o],s[e]=s[o],e=o;else break}n[e]=r,s[e]=a}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let s=0;const r=e.length;let a,o,l;for(o=0;o0;)r=this.dequeue()[0],a=r.getKey(),s=r.getState(),s===Z.IDLE&&!(a in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[a]=!0,++this.tilesLoading_,++n,r.load())}}function Hx(i,t,e,n,s){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return No;const r=i.viewState.center,a=n[0]-r[0],o=n[1]-r[1];return 65536*Math.log(s)+Math.sqrt(a*a+o*o)/s}let Ta=class extends $e{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){Ro(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&Ro(this.element);for(let e=0,n=this.listenerKeys.length;es.getAttributions(t)))),n=!this.getMap().getAllLayers().some(s=>s.getSource()&&s.getSource().getAttributionsCollapsible()===!1);return this.overrideCollapsible_||this.setCollapsible(n),e}async updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=await Promise.all(this.collectSourceAttributions_(t).map(s=>$_(()=>s))),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!yn(e,this.renderedAttributions_)){Kg(this.ulElement_);for(let s=0,r=e.length;s0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:rr}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const s="rotate("+n+"rad)";if(this.autoHide_){const r=this.element.classList.contains(qa);!r&&n===0?this.element.classList.add(qa):r&&n!==0&&this.element.classList.remove(qa)}this.label_.style.transform=s}this.rotation_=n}}let qx=class extends Ta{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",n=t.delta!==void 0?t.delta:1,s=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",r=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",a=t.zoomInLabel!==void 0?t.zoomInLabel:"+",o=t.zoomOutLabel!==void 0?t.zoomOutLabel:"–",l=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",h=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",c=document.createElement("button");c.className=s,c.setAttribute("type","button"),c.title=l,c.appendChild(typeof a=="string"?document.createTextNode(a):a),c.addEventListener(et.CLICK,this.handleClick_.bind(this,n),!1);const u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=h,u.appendChild(typeof o=="string"?document.createTextNode(o):o),u.addEventListener(et.CLICK,this.handleClick_.bind(this,-n),!1);const d=e+" "+or+" "+xl,f=this.element;f.className=d,f.appendChild(c),f.appendChild(u),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const n=this.getMap().getView();if(!n)return;const s=n.getZoom();if(s!==void 0){const r=n.getConstrainedZoom(s+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.duration_,easing:rr})):n.setZoom(r)}}};function Yx(i){i=i||{};const t=new We;return(i.zoom!==void 0?i.zoom:!0)&&t.push(new qx(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&t.push(new Xx(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&t.push(new L0(i.attributionOptions)),t}const Zh={ACTIVE:"active"};class Pa extends $e{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Zh.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(Zh.ACTIVE,t)}setMap(t){this.map_=t}}function Zx(i,t,e){const n=i.getCenterInternal();if(n){const s=[n[0]+t[0],n[1]+t[1]];i.animateInternal({duration:e!==void 0?e:250,easing:Cv,center:i.getConstrainedCenter(s)})}}function ou(i,t,e,n){const s=i.getZoom();if(s===void 0)return;const r=i.getConstrainedZoom(s+t),a=i.getResolutionForZoom(r);i.getAnimating()&&i.cancelAnimations(),i.animate({resolution:a,anchor:e,duration:n!==void 0?n:250,easing:rr})}class Kx extends Pa{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==pt.DBLCLICK){const n=t.originalEvent,s=t.map,r=t.coordinate,a=n.shiftKey?-this.delta_:this.delta_,o=s.getView();ou(o,a,r,this.duration_),n.preventDefault(),e=!0}return!e}}class cr extends Pa{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==pt.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==pt.POINTERUP){const n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==pt.POINTERDOWN){const n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==pt.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function lu(i){const t=i.length;let e=0,n=0;for(let s=0;s0&&this.condition_(t)){const n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class sb extends cr{constructor(t){t=t||{},super({stopDown:sr}),this.condition_=t.condition?t.condition:Jx,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!nh(t))return;const e=t.map,n=e.getView();if(n.getConstraints().rotation===Gc)return;const s=e.getSize(),r=t.pixel,a=Math.atan2(s[1]/2-r[1],r[0]-s[0]/2);if(this.lastAngle_!==void 0){const o=a-this.lastAngle_;n.adjustRotationInternal(-o)}this.lastAngle_=a}handleUpEvent(t){return nh(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return nh(t)&&D0(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class rb extends Cc{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,n="px",s=this.element_.style;s.left=Math.min(t[0],e[0])+n,s.top=Math.min(t[1],e[1])+n,s.width=Math.abs(e[0]-t[0])+n,s.height=Math.abs(e[1]-t[1])+n}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,s=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);s[4]=s[0].slice(),this.geometry_?this.geometry_.setCoordinates([s]):this.geometry_=new ye([s])}getGeometry(){return this.geometry_}}const xr={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Ja extends ni{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class ab extends cr{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new rb(t.className||"ol-dragbox"),this.minArea_=t.minArea!==void 0?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:D0,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const s=n[0]-e[0],r=n[1]-e[1];return s*s+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Ja(xr.BOXDRAG,t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Ja(e?xr.BOXEND:xr.BOXCANCEL,t.coordinate,t)),!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Ja(xr.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new Ja(xr.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}}class N0 extends ab{constructor(t){t=t||{};const e=t.condition?t.condition:k0;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const n=this.getMap().getView();let s=this.getGeometry();if(this.out_){const r=n.rotatedExtentForGeometry(s),a=n.getResolutionForExtentInternal(r),o=n.getResolution()/a;s=s.clone(),s.scale(o*o)}n.fitInternal(s,{duration:this.duration_,easing:rr})}}const On={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class ob extends Pa{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return hu(e)&&F0(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==et.KEYDOWN){const n=t.originalEvent,s=n.key;if(this.condition_(t)&&(s==On.DOWN||s==On.LEFT||s==On.RIGHT||s==On.UP)){const a=t.map.getView(),o=a.getResolution()*this.pixelDelta_;let l=0,h=0;s==On.DOWN?h=-o:s==On.LEFT?l=-o:s==On.RIGHT?l=o:h=o;const c=[l,h];Lc(c,a.getRotation()),Zx(a,c,this.duration_),n.preventDefault(),e=!0}}return!e}}class lb extends Pa{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(e){return!eb(e)&&F0(e)},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==et.KEYDOWN||t.type==et.KEYPRESS){const n=t.originalEvent,s=n.key;if(this.condition_(t)&&(s==="+"||s==="-")){const r=t.map,a=s==="+"?this.delta_:-this.delta_,o=r.getView();ou(o,a,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}class hb extends Pa{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:Jh;this.condition_=t.onFocusOnly?Kh(A0,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t)||t.type!==et.WHEEL)return!0;const n=t.map,s=t.originalEvent;s.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let r;if(t.type==et.WHEEL&&(r=s.deltaY,oy&&s.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=Xg),s.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),r===0)return!1;this.lastDelta_=r;const a=Date.now();this.startTime_===void 0&&(this.startTime_=a),(!this.mode_||a-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<4?"trackpad":"wheel");const o=n.getView();if(this.mode_==="trackpad"&&!(o.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-r/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=a,!1;this.totalDelta_+=r;const l=Math.max(this.timeout_-(a-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let n=-Ot(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),ou(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}class cb extends cr{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=sr),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const n=this.targetPointers[0],s=this.targetPointers[1],r=Math.atan2(s.clientY-n.clientY,s.clientX-n.clientX);if(this.lastAngle_!==void 0){const l=r-this.lastAngle_;this.rotationDelta_+=l,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=l}this.lastAngle_=r;const a=t.map,o=a.getView();o.getConstraints().rotation!==Gc&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(lu(this.targetPointers))),this.rotating_&&(a.render(),o.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}class ub extends cr{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=sr),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const n=this.targetPointers[0],s=this.targetPointers[1],r=n.clientX-s.clientX,a=n.clientY-s.clientY,o=Math.sqrt(r*r+a*a);this.lastDistance_!==void 0&&(e=this.lastDistance_/o),this.lastDistance_=o;const l=t.map,h=l.getView();e!=1&&(this.lastScaleDelta_=e),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel(lu(this.targetPointers))),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const n=t.map.getView(),s=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,s),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}function G0(i){i=i||{};const t=new We,e=new Vx(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new sb),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new Kx({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&t.push(new nb({onFocusOnly:i.onFocusOnly,kinetic:e})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&t.push(new cb),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new ub({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new ob),t.push(new lb({delta:i.zoomDelta,duration:i.zoomDuration}))),(i.mouseWheelZoom!==void 0?i.mouseWheelZoom:!0)&&t.push(new hb({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(i.shiftDragZoom!==void 0?i.shiftDragZoom:!0)&&t.push(new N0({duration:i.zoomDuration})),t}function V0(i){if(i instanceof ar){i.setMapInternal(null);return}i instanceof hr&&i.getLayers().forEach(V0)}function z0(i,t){if(i instanceof ar){i.setMapInternal(t);return}if(i instanceof hr){const e=i.getLayers().getArray();for(let n=0,s=e.length;nthis.updateSize()),this.controls=e.controls||Yx(),this.interactions=e.interactions||G0({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new $x(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(zt.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(zt.VIEW,this.handleViewChanged_),this.addChangeListener(zt.SIZE,this.handleSizeChanged_),this.addChangeListener(zt.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof me)&&t.view.then(function(s){n.setView(new me(s))}),this.controls.addEventListener(fe.ADD,s=>{s.element.setMap(this)}),this.controls.addEventListener(fe.REMOVE,s=>{s.element.setMap(null)}),this.interactions.addEventListener(fe.ADD,s=>{s.element.setMap(this)}),this.interactions.addEventListener(fe.REMOVE,s=>{s.element.setMap(null)}),this.overlays_.addEventListener(fe.ADD,s=>{this.addOverlayInternal_(s.element)}),this.overlays_.addEventListener(fe.REMOVE,s=>{const r=s.element.getId();r!==void 0&&delete this.overlayIdIndex_[r.toString()],s.element.setMap(null)}),this.controls.forEach(s=>{s.setMap(this)}),this.interactions.forEach(s=>{s.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){z0(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,n){if(!this.frameState_||!this.renderer_)return;const s=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const r=n.hitTolerance!==void 0?n.hitTolerance:0,a=n.layerFilter!==void 0?n.layerFilter:Us,o=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(s,this.frameState_,r,o,e,null,a,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(s){n.push(s)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(s){s instanceof hr?e(s.getLayers()):t.push(s)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const s=e.layerFilter!==void 0?e.layerFilter:Us,r=e.hitTolerance!==void 0?e.hitTolerance:0,a=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,r,a,s,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const n=this.viewport_.getBoundingClientRect(),s=this.getSize(),r=n.width/s[0],a=n.height/s[1],o="changedTouches"in t?t.changedTouches[0]:t;return[(o.clientX-n.left)/r,(o.clientY-n.top)/a]}getTarget(){return this.get(zt.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return Fh(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Yt(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(zt.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof We){e.setLayers(t);return}const n=e.getLayers();n.clear(),n.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e=0;r--){const a=s[r];if(a.getMap()!==this||!a.getActive()||!this.getTargetElement())continue;if(!a.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let s=this.maxTilesLoading_,r=s;if(t){const a=t.viewHints;if(a[ie.ANIMATING]||a[ie.INTERACTING]){const o=Date.now()-t.time>8;s=o?0:8,r=o?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new en("removelayer",e)),this.set(zt.LAYERGROUP,t)}setSize(t){this.set(zt.SIZE,t)}setTarget(t){this.set(zt.TARGET,t)}setView(t){if(!t||t instanceof me){this.set(zt.VIEW,t);return}this.set(zt.VIEW,new me);const e=this;t.then(function(n){e.setView(new me(n))})}updateSize(){const t=this.getTargetElement();let e;if(t){const s=getComputedStyle(t),r=t.offsetWidth-parseFloat(s.borderLeftWidth)-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight)-parseFloat(s.borderRightWidth),a=t.offsetHeight-parseFloat(s.borderTopWidth)-parseFloat(s.paddingTop)-parseFloat(s.paddingBottom)-parseFloat(s.borderBottomWidth);!isNaN(r)&&!isNaN(a)&&(e=[r,a],!Cd(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&Rg("No map visible because the map container's width or height are 0."))}const n=this.getSize();e&&(!n||!yn(e,n))&&(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}};function db(i){let t=null;i.keyboardEventTarget!==void 0&&(t=typeof i.keyboardEventTarget=="string"?document.getElementById(i.keyboardEventTarget):i.keyboardEventTarget);const e={},n=i.layers&&typeof i.layers.getLayers=="function"?i.layers:new hr({layers:i.layers});e[zt.LAYERGROUP]=n,e[zt.TARGET]=i.target,e[zt.VIEW]=i.view instanceof me?i.view:new me;let s;i.controls!==void 0&&(Array.isArray(i.controls)?s=new We(i.controls.slice()):(ft(typeof i.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),s=i.controls));let r;i.interactions!==void 0&&(Array.isArray(i.interactions)?r=new We(i.interactions.slice()):(ft(typeof i.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),r=i.interactions));let a;return i.overlays!==void 0?Array.isArray(i.overlays)?a=new We(i.overlays.slice()):(ft(typeof i.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),a=i.overlays):a=new We,{controls:s,interactions:r,keyboardEventTarget:t,overlays:a,values:e}}const Qt={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class cu extends $e{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=t.insertFirst!==void 0?t.insertFirst:!0,this.stopEvent=t.stopEvent!==void 0?t.stopEvent:!0,this.element=document.createElement("div"),this.element.className=t.className!==void 0?t.className:"ol-overlay-container "+r1,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=t.autoPan===!0?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(Qt.ELEMENT,this.handleElementChanged),this.addChangeListener(Qt.MAP,this.handleMapChanged),this.addChangeListener(Qt.OFFSET,this.handleOffsetChanged),this.addChangeListener(Qt.POSITION,this.handlePositionChanged),this.addChangeListener(Qt.POSITIONING,this.handlePositioningChanged),t.element!==void 0&&this.setElement(t.element),this.setOffset(t.offset!==void 0?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),t.position!==void 0&&this.setPosition(t.position)}getElement(){return this.get(Qt.ELEMENT)}getId(){return this.id}getMap(){return this.get(Qt.MAP)||null}getOffset(){return this.get(Qt.OFFSET)}getPosition(){return this.get(Qt.POSITION)}getPositioning(){return this.get(Qt.POSITIONING)}handleElementChanged(){Kg(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&(Ro(this.element),St(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=ht(t,di.POSTRENDER,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(Qt.ELEMENT,t)}setMap(t){this.set(Qt.MAP,t)}setOffset(t){this.set(Qt.OFFSET,t)}setPosition(t){this.set(Qt.POSITION,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(Qt.POSITION))return;const n=this.getRect(e.getTargetElement(),e.getSize()),s=this.getElement(),r=this.getRect(s,[cy(s),uy(s)]);t=t||{};const a=t.margin===void 0?20:t.margin;if(!cn(n,r)){const o=r[0]-n[0],l=n[2]-r[2],h=r[1]-n[1],c=n[3]-r[3],u=[0,0];if(o<0?u[0]=o-a:l<0&&(u[0]=Math.abs(l)+a),h<0?u[1]=h-a:c<0&&(u[1]=Math.abs(c)+a),u[0]!==0||u[1]!==0){const d=e.getView().getCenterInternal(),f=e.getPixelFromCoordinateInternal(d);if(!f)return;const g=[f[0]+u[0],f[1]+u[1]],m=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(g),duration:m.duration,easing:m.easing})}}}getRect(t,e){const n=t.getBoundingClientRect(),s=n.left+window.pageXOffset,r=n.top+window.pageYOffset;return[s,r,s+e[0],r+e[1]]}setPositioning(t){this.set(Qt.POSITIONING,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e){this.setVisible(!1);return}const n=t.getPixelFromCoordinate(e),s=t.getSize();this.updateRenderedPosition(n,s)}updateRenderedPosition(t,e){const n=this.element.style,s=this.getOffset(),r=this.getPositioning();this.setVisible(!0);const a=Math.round(t[0]+s[0])+"px",o=Math.round(t[1]+s[1])+"px";let l="0%",h="0%";r=="bottom-right"||r=="center-right"||r=="top-right"?l="-100%":(r=="bottom-center"||r=="center-center"||r=="top-center")&&(l="-50%"),r=="bottom-left"||r=="bottom-center"||r=="bottom-right"?h="-100%":(r=="center-left"||r=="center-center"||r=="center-right")&&(h="-50%");const c=`translate(${l}, ${h}) translate(${a}, ${o})`;this.rendered.transform_!=c&&(this.rendered.transform_=c,n.transform=c)}getOptions(){return this.options}}ii("map:WMTSLayer");function fb(i){const t=Object.keys(i.defs),e=t.length;let n,s;for(n=0;n=this.text.length)return;i=this.text[this.place++]}switch(this.state){case na:return this.neutral(i);case B0:return this.keyword(i);case Go:return this.quoted(i);case U0:return this.afterquote(i);case W0:return this.number(i);case uu:return}};$i.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=Go;return}if(Tl.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)};$i.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=na;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=na,this.currentObject=this.stack.pop(),this.currentObject||(this.state=uu);return}};$i.prototype.number=function(i){if($0.test(i)){this.word+=i;return}if(Tl.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)};$i.prototype.quoted=function(i){if(i==='"'){this.state=U0;return}this.word+=i};$i.prototype.keyword=function(i){if(Cb.test(i)){this.word+=i;return}if(i==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=na;return}if(Tl.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)};$i.prototype.neutral=function(i){if(Mb.test(i)){this.word=i,this.state=B0;return}if(i==='"'){this.word="",this.state=Go;return}if($0.test(i)){this.word=i,this.state=W0;return}if(Tl.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)};$i.prototype.output=function(){for(;this.place0?90:-90),i.lat_ts=i.lat1):!i.lat_ts&&i.lat0&&i.projName==="Polar_Stereographic"&&(i.lat_ts=i.lat0,i.lat0=ui(i.lat0>0?90:-90))}function H0(i){var t=wb(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var s={};return Cs(t,s),Ib(s),s}function ae(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?ae[i]=tc(arguments[1]):ae[i]=H0(arguments[1]):ae[i]=e}else if(arguments.length===1){if(Array.isArray(i))return i.map(function(n){Array.isArray(n)?ae.apply(t,n):ae(n)});if(typeof i=="string"){if(i in ae)return ae[i]}else"EPSG"in i?ae["EPSG:"+i.EPSG]=i:"ESRI"in i?ae["ESRI:"+i.ESRI]=i:"IAU2000"in i?ae["IAU2000:"+i.IAU2000]=i:console.log(i);return}}gb(ae);function Rb(i){return typeof i=="string"}function Tb(i){return i in ae}var Pb=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Ob(i){return Pb.some(function(t){return i.indexOf(t)>-1})}var Lb=["3857","900913","3785","102113"];function Ab(i){var t=_n(i,"authority");if(t){var e=_n(t,"epsg");return e&&Lb.indexOf(e)>-1}}function Db(i){var t=_n(i,"extension");if(t)return _n(t,"proj4")}function kb(i){return i[0]==="+"}function Fb(i){if(Rb(i)){if(Tb(i))return ae[i];if(Ob(i)){var t=H0(i);if(Ab(t))return ae["EPSG:3857"];var e=Db(t);return e?tc(e):t}if(kb(i))return tc(i)}else return i}function Zd(i,t){i=i||{};var e,n;if(!t)return i;for(n in t)e=t[n],e!==void 0&&(i[n]=e);return i}function wi(i,t,e){var n=i*t;return e/Math.sqrt(1-n*n)}function Oa(i){return i<0?-1:1}function N(i){return Math.abs(i)<=Nt?i:i-Oa(i)*ia}function Je(i,t,e){var n=i*e,s=.5*i;return n=Math.pow((1-n)/(1+n),s),Math.tan(.5*(L-t))/n}function sa(i,t){for(var e=.5*i,n,s,r=L-2*Math.atan(t),a=0;a<=15;a++)if(n=i*Math.sin(r),s=L-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-r,r+=s,Math.abs(s)<=1e-10)return r;return-9999}function Nb(){var i=this.b/this.a;this.es=1-i*i,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=wi(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Gb(i){var t=i.x,e=i.y;if(e*vi>90&&e*vi<-90&&t*vi>180&&t*vi<-180)return null;var n,s;if(Math.abs(Math.abs(e)-L)<=F)return null;if(this.sphere)n=this.x0+this.a*this.k0*N(t-this.long0),s=this.y0+this.a*this.k0*Math.log(Math.tan(_t+.5*e));else{var r=Math.sin(e),a=Je(this.e,e,r);n=this.x0+this.a*this.k0*N(t-this.long0),s=this.y0-this.a*this.k0*Math.log(a)}return i.x=n,i.y=s,i}function Vb(i){var t=i.x-this.x0,e=i.y-this.y0,n,s;if(this.sphere)s=L-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var r=Math.exp(-e/(this.a*this.k0));if(s=sa(this.e,r),s===-9999)return null}return n=N(this.long0+t/(this.a*this.k0)),i.x=n,i.y=s,i}var zb=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const jb={init:Nb,forward:Gb,inverse:Vb,names:zb};function Bb(){}function Kd(i){return i}var Wb=["longlat","identity"];const Ub={init:Bb,forward:Kd,inverse:Kd,names:Wb};var $b=[jb,Ub],fo={},Vo=[];function X0(i,t){var e=Vo.length;return i.names?(Vo[e]=i,i.names.forEach(function(n){fo[n.toLowerCase()]=e}),this):(console.log(t),!0)}function Hb(i){if(!i)return!1;var t=i.toLowerCase();if(typeof fo[t]<"u"&&Vo[fo[t]])return Vo[fo[t]]}function Xb(){$b.forEach(X0)}const qb={start:Xb,add:X0,get:Hb};var it={};it.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};it.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};it.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};it.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};it.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};it.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};it.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};it.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};it.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};it.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};it.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};it.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};it.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};it.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};it.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};it.clrk80ign={a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"};it.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};it.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};it.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};it.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};it.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};it.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};it.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};it.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};it.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};it.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};it.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};it.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};it.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};it.hough={a:6378270,rf:297,ellipseName:"Hough"};it.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};it.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};it.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};it.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};it.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};it.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};it.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};it.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};it.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};it.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};it.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};it.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var Yb=it.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};it.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function Zb(i,t,e,n){var s=i*i,r=t*t,a=(s-r)/s,o=0;n?(i*=1-a*(_b+a*(vb+a*yb)),s=i*i,a=0):o=Math.sqrt(a);var l=(s-r)/r;return{es:a,e:o,ep2:l}}function Kb(i,t,e,n,s){if(!i){var r=_n(it,n);r||(r=Yb),i=r.a,t=r.b,e=r.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)3&&(o.datum_params[3]!==0||o.datum_params[4]!==0||o.datum_params[5]!==0||o.datum_params[6]!==0)&&(o.datum_type=Jn,o.datum_params[3]*=Dr,o.datum_params[4]*=Dr,o.datum_params[5]*=Dr,o.datum_params[6]=o.datum_params[6]/1e6+1)),a&&(o.datum_type=Ls,o.grids=a),o.a=e,o.b=n,o.es=s,o.ep2=r,o}var q0={};function Qb(i,t){var e=new DataView(t),n=iM(e),s=nM(e,n),r=sM(e,s,n),a={header:s,subgrids:r};return q0[i]=a,a}function tM(i){if(i===void 0)return null;var t=i.split(",");return t.map(eM)}function eM(i){if(i.length===0)return null;var t=i[0]==="@";return t&&(i=i.slice(1)),i==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:i,mandatory:!t,grid:q0[i]||null,isNull:!1}}function ws(i){return i/3600*Math.PI/180}function iM(i){var t=i.getInt32(8,!1);return t===11?!1:(t=i.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function nM(i,t){return{nFields:i.getInt32(8,t),nSubgridFields:i.getInt32(24,t),nSubgrids:i.getInt32(40,t),shiftType:ec(i,56,64).trim(),fromSemiMajorAxis:i.getFloat64(120,t),fromSemiMinorAxis:i.getFloat64(136,t),toSemiMajorAxis:i.getFloat64(152,t),toSemiMinorAxis:i.getFloat64(168,t)}}function ec(i,t,e){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(t,e)))}function sM(i,t,e){for(var n=176,s=[],r=0;r5e-11?!1:i.datum_type===Kn?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]:i.datum_type===Jn?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]&&i.datum_params[3]===t.datum_params[3]&&i.datum_params[4]===t.datum_params[4]&&i.datum_params[5]===t.datum_params[5]&&i.datum_params[6]===t.datum_params[6]:!0}function Y0(i,t,e){var n=i.x,s=i.y,r=i.z?i.z:0,a,o,l,h;if(s<-L&&s>-1.001*L)s=-L;else if(s>L&&s<1.001*L)s=L;else{if(s<-L)return{x:-1/0,y:-1/0,z:i.z};if(s>L)return{x:1/0,y:1/0,z:i.z}}return n>Math.PI&&(n-=2*Math.PI),o=Math.sin(s),h=Math.cos(s),l=o*o,a=e/Math.sqrt(1-t*l),{x:(a+r)*h*Math.cos(n),y:(a+r)*h*Math.sin(n),z:(a*(1-t)+r)*o}}function Z0(i,t,e,n){var s=1e-12,r=s*s,a=30,o,l,h,c,u,d,f,g,m,p,_,v,y,x=i.x,M=i.y,w=i.z?i.z:0,E,C,I;if(o=Math.sqrt(x*x+M*M),l=Math.sqrt(x*x+M*M+w*w),o/er&&yn.y||f>n.x||po&&Math.abs(l.y)>o);if(a<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=N(r.x+e.ll[0]),n.y=r.y+e.ll[1]}else isNaN(r.x)||(n.x=i.x+r.x,n.y=i.y+r.y);return n}function Qd(i,t){var e={x:i.x/t.del[0],y:i.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},s={x:e.x-1*n.x,y:e.y-1*n.y},r={x:Number.NaN,y:Number.NaN},a;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return r;a=n.y*t.lim[0]+n.x;var o={x:t.cvs[a][0],y:t.cvs[a][1]};a++;var l={x:t.cvs[a][0],y:t.cvs[a][1]};a+=t.lim[0];var h={x:t.cvs[a][0],y:t.cvs[a][1]};a--;var c={x:t.cvs[a][0],y:t.cvs[a][1]},u=s.x*s.y,d=s.x*(1-s.y),f=(1-s.x)*(1-s.y),g=(1-s.x)*s.y;return r.x=f*o.x+d*l.x+g*c.x+u*h.x,r.y=f*o.y+d*l.y+g*c.y+u*h.y,r}function tf(i,t,e){var n=e.x,s=e.y,r=e.z||0,a,o,l,h={};for(l=0;l<3;l++)if(!(t&&l===2&&e.z===void 0))switch(l===0?(a=n,"ew".indexOf(i.axis[l])!==-1?o="x":o="y"):l===1?(a=s,"ns".indexOf(i.axis[l])!==-1?o="y":o="x"):(a=r,o="z"),i.axis[l]){case"e":h[o]=a;break;case"w":h[o]=-a;break;case"n":h[o]=a;break;case"s":h[o]=-a;break;case"u":e[o]!==void 0&&(h.z=a);break;case"d":e[o]!==void 0&&(h.z=-a);break;default:return null}return h}function K0(i){var t={x:i[0],y:i[1]};return i.length>2&&(t.z=i[2]),i.length>3&&(t.m=i[3]),t}function fM(i){ef(i.x),ef(i.y)}function ef(i){if(typeof Number.isFinite=="function"){if(Number.isFinite(i))return;throw new TypeError("coordinates must be finite numbers")}if(typeof i!="number"||i!==i||!isFinite(i))throw new TypeError("coordinates must be finite numbers")}function gM(i,t){return(i.datum.datum_type===Kn||i.datum.datum_type===Jn||i.datum.datum_type===Ls)&&t.datumCode!=="WGS84"||(t.datum.datum_type===Kn||t.datum.datum_type===Jn||t.datum.datum_type===Ls)&&i.datumCode!=="WGS84"}function zo(i,t,e,n){var s;Array.isArray(e)?e=K0(e):e={x:e.x,y:e.y,z:e.z,m:e.m};var r=e.z!==void 0;if(fM(e),i.datum&&t.datum&&gM(i,t)&&(s=new Mi("WGS84"),e=zo(i,s,e,n),i=s),n&&i.axis!=="enu"&&(e=tf(i,!1,e)),i.projName==="longlat")e={x:e.x*qt,y:e.y*qt,z:e.z||0};else if(i.to_meter&&(e={x:e.x*i.to_meter,y:e.y*i.to_meter,z:e.z||0}),e=i.inverse(e),!e)return;if(i.from_greenwich&&(e.x+=i.from_greenwich),e=uM(i.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*vi,y:e.y*vi,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?tf(t,!0,e):(e&&!r&&delete e.z,e)}var nf=Mi("WGS84");function sh(i,t,e,n){var s,r,a;return Array.isArray(e)?(s=zo(i,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof s.z=="number"?[s.x,s.y,s.z].concat(e.slice(3)):[s.x,s.y,e[2]].concat(e.slice(3)):[s.x,s.y].concat(e.slice(2)):[s.x,s.y]):(r=zo(i,t,e,n),a=Object.keys(e),a.length===2||a.forEach(function(o){if(typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(o==="x"||o==="y"||o==="z")return}else if(o==="x"||o==="y")return;r[o]=e[o]}),r)}function sf(i){return i instanceof Mi?i:i.oProj?i.oProj:Mi(i)}function be(i,t,e){i=sf(i);var n=!1,s;return typeof t>"u"?(t=i,i=nf,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=nf,n=!0),t=sf(t),e?sh(i,t,e):(s={forward:function(r,a){return sh(i,t,r,a)},inverse:function(r,a){return sh(t,i,r,a)}},n&&(s.oProj=t),s)}var rf=6,J0="AJSAJS",Q0="AFAFAF",Es=65,de=73,Ve=79,Ir=86,Rr=90;const mM={forward:tm,inverse:pM,toPoint:em};function tm(i,t){return t=t||5,yM(_M({lat:i[1],lon:i[0]}),t)}function pM(i){var t=du(nm(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function em(i){var t=du(nm(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function rh(i){return i*(Math.PI/180)}function af(i){return 180*(i/Math.PI)}function _M(i){var t=i.lat,e=i.lon,n=6378137,s=.00669438,r=.9996,a,o,l,h,c,u,d,f=rh(t),g=rh(e),m,p;p=Math.floor((e+180)/6)+1,e===180&&(p=60),t>=56&&t<64&&e>=3&&e<12&&(p=32),t>=72&&t<84&&(e>=0&&e<9?p=31:e>=9&&e<21?p=33:e>=21&&e<33?p=35:e>=33&&e<42&&(p=37)),a=(p-1)*6-180+3,m=rh(a),o=s/(1-s),l=n/Math.sqrt(1-s*Math.sin(f)*Math.sin(f)),h=Math.tan(f)*Math.tan(f),c=o*Math.cos(f)*Math.cos(f),u=Math.cos(f)*(g-m),d=n*((1-s/4-3*s*s/64-5*s*s*s/256)*f-(3*s/8+3*s*s/32+45*s*s*s/1024)*Math.sin(2*f)+(15*s*s/256+45*s*s*s/1024)*Math.sin(4*f)-35*s*s*s/3072*Math.sin(6*f));var _=r*l*(u+(1-h+c)*u*u*u/6+(5-18*h+h*h+72*c-58*o)*u*u*u*u*u/120)+5e5,v=r*(d+l*Math.tan(f)*(u*u/2+(5-h+9*c+4*c*c)*u*u*u*u/24+(61-58*h+h*h+600*c-330*o)*u*u*u*u*u*u/720));return t<0&&(v+=1e7),{northing:Math.round(v),easting:Math.round(_),zoneNumber:p,zoneLetter:vM(t)}}function du(i){var t=i.northing,e=i.easting,n=i.zoneLetter,s=i.zoneNumber;if(s<0||s>60)return null;var r=.9996,a=6378137,o=.00669438,l,h=(1-Math.sqrt(1-o))/(1+Math.sqrt(1-o)),c,u,d,f,g,m,p,_,v,y=e-5e5,x=t;n<"N"&&(x-=1e7),p=(s-1)*6-180+3,l=o/(1-o),m=x/r,_=m/(a*(1-o/4-3*o*o/64-5*o*o*o/256)),v=_+(3*h/2-27*h*h*h/32)*Math.sin(2*_)+(21*h*h/16-55*h*h*h*h/32)*Math.sin(4*_)+151*h*h*h/96*Math.sin(6*_),c=a/Math.sqrt(1-o*Math.sin(v)*Math.sin(v)),u=Math.tan(v)*Math.tan(v),d=l*Math.cos(v)*Math.cos(v),f=a*(1-o)/Math.pow(1-o*Math.sin(v)*Math.sin(v),1.5),g=y/(c*r);var M=v-c*Math.tan(v)/f*(g*g/2-(5+3*u+10*d-4*d*d-9*l)*g*g*g*g/24+(61+90*u+298*d+45*u*u-252*l-3*d*d)*g*g*g*g*g*g/720);M=af(M);var w=(g-(1+2*u+d)*g*g*g/6+(5-2*d+28*u-3*d*d+8*l+24*u*u)*g*g*g*g*g/120)/Math.cos(v);w=p+af(w);var E;if(i.accuracy){var C=du({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});E={top:C.lat,right:C.lon,bottom:M,left:w}}else E={lat:M,lon:w};return E}function vM(i){var t="Z";return 84>=i&&i>=72?t="X":72>i&&i>=64?t="W":64>i&&i>=56?t="V":56>i&&i>=48?t="U":48>i&&i>=40?t="T":40>i&&i>=32?t="S":32>i&&i>=24?t="R":24>i&&i>=16?t="Q":16>i&&i>=8?t="P":8>i&&i>=0?t="N":0>i&&i>=-8?t="M":-8>i&&i>=-16?t="L":-16>i&&i>=-24?t="K":-24>i&&i>=-32?t="J":-32>i&&i>=-40?t="H":-40>i&&i>=-48?t="G":-48>i&&i>=-56?t="F":-56>i&&i>=-64?t="E":-64>i&&i>=-72?t="D":-72>i&&i>=-80&&(t="C"),t}function yM(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+xM(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function xM(i,t,e){var n=im(e),s=Math.floor(i/1e5),r=Math.floor(t/1e5)%20;return bM(s,r,n)}function im(i){var t=i%rf;return t===0&&(t=rf),t}function bM(i,t,e){var n=e-1,s=J0.charCodeAt(n),r=Q0.charCodeAt(n),a=s+i-1,o=r+t,l=!1;a>Rr&&(a=a-Rr+Es-1,l=!0),(a===de||sde||(a>de||sVe||(a>Ve||sRr&&(a=a-Rr+Es-1),o>Ir?(o=o-Ir+Es-1,l=!0):l=!1,(o===de||rde||(o>de||rVe||(o>Ve||rIr&&(o=o-Ir+Es-1);var h=String.fromCharCode(a)+String.fromCharCode(o);return h}function nm(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var t=i.length,e=null,n="",s,r=0;!/[A-Z]/.test(s=i.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+i;n+=s,r++}var a=parseInt(n,10);if(r===0||r+3>t)throw"MGRSPoint bad conversion from: "+i;var o=i.charAt(r++);if(o<="A"||o==="B"||o==="Y"||o>="Z"||o==="I"||o==="O")throw"MGRSPoint zone letter "+o+" not handled: "+i;e=i.substring(r,r+=2);for(var l=im(a),h=MM(e.charAt(0),l),c=CM(e.charAt(1),l);c0&&(m=1e5/Math.pow(10,d),p=i.substring(r,r+d),f=parseFloat(p)*m,_=i.substring(r+d),g=parseFloat(_)*m),v=f+h,y=g+c,{easting:v,northing:y,zoneLetter:o,zoneNumber:a,accuracy:m}}function MM(i,t){for(var e=J0.charCodeAt(t-1),n=1e5,s=!1;e!==i.charCodeAt(0);){if(e++,e===de&&e++,e===Ve&&e++,e>Rr){if(s)throw"Bad character: "+i;e=Es,s=!0}n+=1e5}return n}function CM(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=Q0.charCodeAt(t-1),n=0,s=!1;e!==i.charCodeAt(0);){if(e++,e===de&&e++,e===Ve&&e++,e>Ir){if(s)throw"Bad character: "+i;e=Es,s=!0}n+=1e5}return n}function wM(i){var t;switch(i){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+i}function tr(i,t,e){if(!(this instanceof tr))return new tr(i,t,e);if(Array.isArray(i))this.x=i[0],this.y=i[1],this.z=i[2]||0;else if(typeof i=="object")this.x=i.x,this.y=i.y,this.z=i.z||0;else if(typeof i=="string"&&typeof t>"u"){var n=i.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=i,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}tr.fromMGRS=function(i){return new tr(em(i))};tr.prototype.toMGRS=function(i){return tm([this.x,this.y],i)};var EM=1,SM=.25,of=.046875,lf=.01953125,hf=.01068115234375,IM=.75,RM=.46875,TM=.013020833333333334,PM=.007120768229166667,OM=.3645833333333333,LM=.005696614583333333,AM=.3076171875;function fu(i){var t=[];t[0]=EM-i*(SM+i*(of+i*(lf+i*hf))),t[1]=i*(IM-i*(of+i*(lf+i*hf)));var e=i*i;return t[2]=e*(RM-i*(TM+i*PM)),e*=i,t[3]=e*(OM-i*LM),t[4]=e*i*AM,t}function ur(i,t,e,n){return e*=t,t*=t,n[0]*i-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var DM=20;function gu(i,t,e){for(var n=1/(1-t),s=i,r=DM;r;--r){var a=Math.sin(s),o=1-t*a*a;if(o=(ur(s,a,Math.cos(s),e)-i)*(o*Math.sqrt(o))*n,s-=o,Math.abs(o)F?Math.tan(e):0,m=Math.pow(g,2),p=Math.pow(m,2);s=1-this.es*Math.pow(o,2),c=c/Math.sqrt(s);var _=ur(e,o,l,this.en);r=this.a*(this.k0*c*(1+u/6*(1-m+d+u/20*(5-18*m+p+14*d-58*m*d+u/42*(61+179*p-p*m-479*m)))))+this.x0,a=this.a*(this.k0*(_-this.ml0+o*n*c/2*(1+u/12*(5-m+9*d+4*f+u/30*(61+p-58*m+270*d-330*m*d+u/56*(1385+543*p-p*m-3111*m))))))+this.y0}else{var h=l*Math.sin(n);if(Math.abs(Math.abs(h)-1)=1){if(h-1>F)return 93;a=0}else a=Math.acos(a);e<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return i.x=r,i.y=a,i}function NM(i){var t,e,n,s,r=(i.x-this.x0)*(1/this.a),a=(i.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,e=gu(t,this.es,this.en),Math.abs(e)F?Math.tan(e):0,g=this.ep2*Math.pow(d,2),m=Math.pow(g,2),p=Math.pow(f,2),_=Math.pow(p,2);t=1-this.es*Math.pow(u,2);var v=r*Math.sqrt(t)/this.k0,y=Math.pow(v,2);t=t*f,n=e-t*y/(1-this.es)*.5*(1-y/12*(5+3*p-9*g*p+g-4*m-y/30*(61+90*p-252*g*p+45*_+46*g-y/56*(1385+3633*p+4095*_+1574*_*p)))),s=N(this.long0+v*(1-y/6*(1+2*p+g-y/20*(5+28*p+24*_+8*g*p+6*g-y/42*(61+662*p+1320*_+720*_*p))))/d)}else n=L*Oa(a),s=0;else{var o=Math.exp(r/this.k0),l=.5*(o-1/o),h=this.lat0+a/this.k0,c=Math.cos(h);t=Math.sqrt((1-Math.pow(c,2))/(1+Math.pow(l,2))),n=Math.asin(t),a<0&&(n=-n),l===0&&c===0?s=0:s=N(Math.atan2(l,c)+this.long0)}return i.x=s,i.y=n,i}var GM=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const go={init:kM,forward:FM,inverse:NM,names:GM};function sm(i){var t=Math.exp(i);return t=(t-1/t)/2,t}function _e(i,t){i=Math.abs(i),t=Math.abs(t);var e=Math.max(i,t),n=Math.min(i,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function VM(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function zM(i){var t=Math.abs(i);return t=VM(t*(1+t/(_e(1,t)+1))),i<0?-t:t}function mu(i,t){for(var e=2*Math.cos(2*t),n=i.length-1,s=i[n],r=0,a;--n>=0;)a=-r+e*s+i[n],r=s,s=a;return t+a*Math.sin(2*t)}function jM(i,t){for(var e=2*Math.cos(t),n=i.length-1,s=i[n],r=0,a;--n>=0;)a=-r+e*s+i[n],r=s,s=a;return Math.sin(t)*a}function BM(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function rm(i,t,e){for(var n=Math.sin(t),s=Math.cos(t),r=sm(e),a=BM(e),o=2*s*a,l=-2*n*r,h=i.length-1,c=i[h],u=0,d=0,f=0,g,m;--h>=0;)g=d,m=u,d=c,u=f,c=-g+o*d-l*u+i[h],f=-m+l*d+o*u;return o=n*a,l=s*r,[o*c-l*f,o*f+l*c]}function WM(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(go.init.apply(this),this.forward=go.forward,this.inverse=go.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var i=this.es/(1+Math.sqrt(1-this.es)),t=i/(2-i),e=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),e=e*t,this.cgb[1]=e*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=e*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),e=e*t,this.cgb[2]=e*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=e*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),e=e*t,this.cgb[3]=e*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=e*(1237/630+t*(-12/5+t*(-24832/14175))),e=e*t,this.cgb[4]=e*(4174/315+t*(-144838/6237)),this.cbg[4]=e*(-734/315+t*(109598/31185)),e=e*t,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(1/4+e*(1/64+e/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=e*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=e*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),e=e*t,this.utg[2]=e*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=e*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),e=e*t,this.utg[3]=e*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=e*(49561/161280+t*(-179/168+t*(6601661/7257600))),e=e*t,this.utg[4]=e*(-4583/161280+t*(108847/3991680)),this.gtu[4]=e*(34729/80640+t*(-3418889/1995840)),e=e*t,this.utg[5]=e*(-20648693/638668800),this.gtu[5]=e*(212378941/319334400);var n=mu(this.cbg,this.lat0);this.Zb=-this.Qn*(n+jM(this.gtu,2*n))}function UM(i){var t=N(i.x-this.long0),e=i.y;e=mu(this.cbg,e);var n=Math.sin(e),s=Math.cos(e),r=Math.sin(t),a=Math.cos(t);e=Math.atan2(n,a*s),t=Math.atan2(r*s,_e(n,s*a)),t=zM(Math.tan(t));var o=rm(this.gtu,2*e,2*t);e=e+o[0],t=t+o[1];var l,h;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,h=this.a*(this.Qn*e+this.Zb)+this.y0):(l=1/0,h=1/0),i.x=l,i.y=h,i}function $M(i){var t=(i.x-this.x0)*(1/this.a),e=(i.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,s;if(Math.abs(t)<=2.623395162778){var r=rm(this.utg,2*e,2*t);e=e+r[0],t=t+r[1],t=Math.atan(sm(t));var a=Math.sin(e),o=Math.cos(e),l=Math.sin(t),h=Math.cos(t);e=Math.atan2(a*h,_e(l,h*o)),t=Math.atan2(l,h*o),n=N(t+this.long0),s=mu(this.cgb,e)}else n=1/0,s=1/0;return i.x=n,i.y=s,i}var HM=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const mo={init:WM,forward:UM,inverse:$M,names:HM};function XM(i,t){if(i===void 0){if(i=Math.floor((N(t)+Math.PI)*30/Math.PI)+1,i<0)return 0;if(i>60)return 60}return i}var qM="etmerc";function YM(){var i=XM(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*qt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,mo.init.apply(this),this.forward=mo.forward,this.inverse=mo.inverse}var ZM=["Universal Transverse Mercator System","utm"];const KM={init:YM,names:ZM,dependsOn:qM};function pu(i,t){return Math.pow((1-i)/(1+i),t)}var JM=20;function QM(){var i=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*i*i),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(i/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+_t)/(Math.pow(Math.tan(.5*this.lat0+_t),this.C)*pu(this.e*i,this.ratexp))}function tC(i){var t=i.x,e=i.y;return i.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+_t),this.C)*pu(this.e*Math.sin(e),this.ratexp))-L,i.x=this.C*t,i}function eC(i){for(var t=1e-14,e=i.x/this.C,n=i.y,s=Math.pow(Math.tan(.5*n+_t)/this.K,1/this.C),r=JM;r>0&&(n=2*Math.atan(s*pu(this.e*Math.sin(i.y),-.5*this.e))-L,!(Math.abs(n-i.y)0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=F&&Math.abs(Math.cos(this.lat_ts))>F&&(this.k0=.5*this.cons*wi(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Je(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=wi(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-L,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function cC(i){var t=i.x,e=i.y,n=Math.sin(e),s=Math.cos(e),r,a,o,l,h,c,u=N(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=F&&Math.abs(e+this.lat0)<=F?(i.x=NaN,i.y=NaN,i):this.sphere?(r=2*this.k0/(1+this.sinlat0*n+this.coslat0*s*Math.cos(u)),i.x=this.a*r*s*Math.sin(u)+this.x0,i.y=this.a*r*(this.coslat0*n-this.sinlat0*s*Math.cos(u))+this.y0,i):(a=2*Math.atan(this.ssfn_(e,n,this.e))-L,l=Math.cos(a),o=Math.sin(a),Math.abs(this.coslat0)<=F?(h=Je(this.e,e*this.con,this.con*n),c=2*this.a*this.k0*h/this.cons,i.x=this.x0+c*Math.sin(t-this.long0),i.y=this.y0-this.con*c*Math.cos(t-this.long0),i):(Math.abs(this.sinlat0)0?t=N(this.long0+Math.atan2(i.x,-1*i.y)):t=N(this.long0+Math.atan2(i.x,i.y)):t=N(this.long0+Math.atan2(i.x*Math.sin(o),a*this.coslat0*Math.cos(o)-i.y*this.sinlat0*Math.sin(o))),i.x=t,i.y=e,i)}else if(Math.abs(this.coslat0)<=F){if(a<=F)return e=this.lat0,t=this.long0,i.x=t,i.y=e,i;i.x*=this.con,i.y*=this.con,n=a*this.cons/(2*this.a*this.k0),e=this.con*sa(this.e,n),t=this.con*N(this.con*this.long0+Math.atan2(i.x,-1*i.y))}else s=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=F?r=this.X0:(r=Math.asin(Math.cos(s)*this.sinX0+i.y*Math.sin(s)*this.cosX0/a),t=N(this.long0+Math.atan2(i.x*Math.sin(s),a*this.cosX0*Math.cos(s)-i.y*this.sinX0*Math.sin(s)))),e=-1*sa(this.e,Math.tan(.5*(L+r)));return i.x=t,i.y=e,i}var dC=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"];const fC={init:hC,forward:cC,inverse:uC,names:dC,ssfn_:lC};function gC(){var i=this.lat0;this.lambda0=this.long0;var t=Math.sin(i),e=this.a,n=this.rf,s=1/n,r=2*s-Math.pow(s,2),a=this.e=Math.sqrt(r);this.R=this.k0*e*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(i),4)),this.b0=Math.asin(t/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+i/2)),h=Math.log((1+a*t)/(1-a*t));this.K=o-this.alpha*l+this.alpha*a/2*h}function mC(i){var t=Math.log(Math.tan(Math.PI/4-i.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(i.y))/(1-this.e*Math.sin(i.y))),n=-this.alpha*(t+e)+this.K,s=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(i.x-this.lambda0),a=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(s)+Math.cos(this.b0)*Math.cos(r))),o=Math.asin(Math.cos(this.b0)*Math.sin(s)-Math.sin(this.b0)*Math.cos(s)*Math.cos(r));return i.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,i.x=this.R*a+this.x0,i}function pC(i){for(var t=i.x-this.x0,e=i.y-this.y0,n=t/this.R,s=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(s))),o=this.lambda0+a/this.alpha,l=0,h=r,c=-1e3,u=0;Math.abs(h-c)>1e-7;){if(++u>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+r/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),c=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return i.x=o,i.y=h,i}var _C=["somerc"];const vC={init:gC,forward:mC,inverse:pC,names:_C};var _s=1e-7;function yC(i){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof i.PROJECTION=="object"?Object.keys(i.PROJECTION)[0]:i.PROJECTION;return"no_uoff"in i||"no_off"in i||t.indexOf(e)!==-1}function xC(){var i,t,e,n,s,r,a,o,l,h,c=0,u,d=0,f=0,g=0,m=0,p=0,_=0;this.no_off=yC(this),this.no_rot="no_rot"in this;var v=!1;"alpha"in this&&(v=!0);var y=!1;if("rectified_grid_angle"in this&&(y=!0),v&&(_=this.alpha),y&&(c=this.rectified_grid_angle*qt),v||y)d=this.longc;else if(f=this.long1,m=this.lat1,g=this.long2,p=this.lat2,Math.abs(m-p)<=_s||(i=Math.abs(m))<=_s||Math.abs(i-L)<=_s||Math.abs(Math.abs(this.lat0)-L)<=_s||Math.abs(Math.abs(p)-L)<=_s)throw new Error;var x=1-this.es;t=Math.sqrt(x),Math.abs(this.lat0)>F?(o=Math.sin(this.lat0),e=Math.cos(this.lat0),i=1-this.es*o*o,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/x),this.A=this.B*this.k0*t/i,n=this.B*t/(e*Math.sqrt(i)),s=n*n-1,s<=0?s=0:(s=Math.sqrt(s),this.lat0<0&&(s=-s)),this.E=s+=n,this.E*=Math.pow(Je(this.e,this.lat0,o),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=s=1),v||y?(v?(u=Math.asin(Math.sin(_)/n),y||(c=_)):(u=c,_=Math.asin(n*Math.sin(u))),this.lam0=d-Math.asin(.5*(s-1/s)*Math.tan(u))/this.B):(r=Math.pow(Je(this.e,m,Math.sin(m)),this.B),a=Math.pow(Je(this.e,p,Math.sin(p)),this.B),s=this.E/r,l=(a-r)/(a+r),h=this.E*this.E,h=(h-a*r)/(h+a*r),i=f-g,i<-Math.pi?g-=ia:i>Math.pi&&(g+=ia),this.lam0=N(.5*(f+g)-Math.atan(h*Math.tan(.5*this.B*(f-g))/l)/this.B),u=Math.atan(2*Math.sin(this.B*N(f-this.lam0))/(s-1/s)),c=_=Math.asin(n*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(_))),this.lat0<0&&(this.u_0=-this.u_0)),s=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(_t-s)),this.v_pole_s=this.ArB*Math.log(Math.tan(_t+s))}function bC(i){var t={},e,n,s,r,a,o,l,h;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-L)>F){if(a=this.E/Math.pow(Je(this.e,i.y,Math.sin(i.y)),this.B),o=1/a,e=.5*(a-o),n=.5*(a+o),r=Math.sin(this.B*i.x),s=(e*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(s)-1)0?this.v_pole_n:this.v_pole_s,l=this.ArB*i.y;return this.no_rot?(t.x=l,t.y=h):(l-=this.u_0,t.x=h*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-h*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function MC(i){var t,e,n,s,r,a,o,l={};if(i.x=(i.x-this.x0)*(1/this.a),i.y=(i.y-this.y0)*(1/this.a),this.no_rot?(e=i.y,t=i.x):(e=i.x*this.cosrot-i.y*this.sinrot,t=i.y*this.cosrot+i.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),s=.5*(n-1/n),r=.5*(n+1/n),a=Math.sin(this.BrA*t),o=(a*this.cosgam+s*this.singam)/r,Math.abs(Math.abs(o)-1)F?this.ns=Math.log(n/o)/Math.log(s/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(s,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function SC(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=F&&(e=Oa(e)*(L-2*F));var n=Math.abs(Math.abs(e)-L),s,r;if(n>F)s=Je(this.e,e,Math.sin(e)),r=this.a*this.f0*Math.pow(s,this.ns);else{if(n=e*this.ns,n<=0)return null;r=0}var a=this.ns*N(t-this.long0);return i.x=this.k0*(r*Math.sin(a))+this.x0,i.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,i}function IC(i){var t,e,n,s,r,a=(i.x-this.x0)/this.k0,o=this.rh-(i.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+o*o),e=1):(t=-Math.sqrt(a*a+o*o),e=-1);var l=0;if(t!==0&&(l=Math.atan2(e*a,e*o)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),s=sa(this.e,n),s===-9999)return null}else s=-L;return r=N(l/this.ns+this.long0),i.x=r,i.y=s,i}var RC=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const TC={init:EC,forward:SC,inverse:IC,names:RC};function PC(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function OC(i){var t,e,n,s,r,a,o,l=i.x,h=i.y,c=N(l-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),r=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(s)),a=this.n*r,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n),i.y=o*Math.cos(a)/1,i.x=o*Math.sin(a)/1,this.czech||(i.y*=-1,i.x*=-1),i}function LC(i){var t,e,n,s,r,a,o,l,h=i.x;i.x=i.y,i.y=h,this.czech||(i.y*=-1,i.x*=-1),a=Math.sqrt(i.x*i.x+i.y*i.y),r=Math.atan2(i.y,i.x),s=r/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(s)),e=Math.asin(Math.cos(n)*Math.sin(s)/Math.cos(t)),i.x=this.long0-e/this.alfa,o=t,l=0;var c=0;do i.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-i.y)<1e-10&&(l=1),o=i.y,c+=1;while(l===0&&c<15);return c>=15?null:i}var AC=["Krovak","krovak"];const DC={init:PC,forward:OC,inverse:LC,names:AC};function le(i,t,e,n,s){return i*s-t*Math.sin(2*s)+e*Math.sin(4*s)-n*Math.sin(6*s)}function La(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function Aa(i){return .375*i*(1+.25*i*(1+.46875*i))}function Da(i){return .05859375*i*i*(1+.75*i)}function ka(i){return i*i*i*(35/3072)}function er(i,t,e){var n=t*e;return i/Math.sqrt(1-n*n)}function Mn(i){return Math.abs(i)1e-7?(e=i*t,(1-i*i)*(t/(1-e*e)-.5/i*Math.log((1-e)/(1+e)))):2*t}var zC=1,jC=2,BC=3,WC=4;function UC(){var i=Math.abs(this.lat0);if(Math.abs(i-L)0){var t;switch(this.qp=mn(this.e,1),this.mmf=.5/(1-this.es),this.apa=QC(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=mn(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function $C(i){var t,e,n,s,r,a,o,l,h,c,u=i.x,d=i.y;if(u=N(u-this.long0),this.sphere){if(r=Math.sin(d),c=Math.cos(d),n=Math.cos(u),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+c*n:1+this.sinph0*r+this.cosph0*c*n,e<=F)return null;e=Math.sqrt(2/e),t=e*c*Math.sin(u),e*=this.mode===this.EQUIT?r:this.cosph0*r-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.lat0)=0?(t=(h=Math.sqrt(a))*s,e=n*(this.mode===this.S_POLE?h:-h)):t=e=0;break}}return i.x=this.a*t+this.x0,i.y=this.a*e+this.y0,i}function HC(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,s,r,a,o,l,h;if(this.sphere){var c=0,u,d=0;if(u=Math.sqrt(t*t+e*e),s=u*.5,s>1)return null;switch(s=2*Math.asin(s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(d=Math.sin(s),c=Math.cos(s)),this.mode){case this.EQUIT:s=Math.abs(u)<=F?0:Math.asin(e*d/u),t*=d,e=c*u;break;case this.OBLIQ:s=Math.abs(u)<=F?this.lat0:Math.asin(c*this.sinph0+e*d*this.cosph0/u),t*=d*this.cosph0,e=(c-Math.sin(s)*this.sinph0)*u;break;case this.N_POLE:e=-e,s=L-s;break;case this.S_POLE:s-=L;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,l=Math.sqrt(t*t+e*e),l1&&(i=i>1?1:-1),Math.asin(i)}function nw(){Math.abs(this.lat1+this.lat2)F?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function sw(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=mn(this.e3,this.sin_phi),s=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*N(t-this.long0),a=s*Math.sin(r)+this.x0,o=this.rh-s*Math.cos(r)+this.y0;return i.x=a,i.y=o,i}function rw(i){var t,e,n,s,r,a;return i.x-=this.x0,i.y=this.rh-i.y+this.y0,this.ns0>=0?(t=Math.sqrt(i.x*i.x+i.y*i.y),n=1):(t=-Math.sqrt(i.x*i.x+i.y*i.y),n=-1),s=0,t!==0&&(s=Math.atan2(n*i.x,n*i.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,e)),r=N(s/this.ns0+this.long0),i.x=r,i.y=a,i}function aw(i,t){var e,n,s,r,a,o=vn(.5*t);if(i0||Math.abs(a)<=F?(o=this.x0+this.a*r*e*Math.sin(n)/a,l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*s)/a):(o=this.x0+this.infinity_dist*e*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*s)),i.x=o,i.y=l,i}function uw(i){var t,e,n,s,r,a;return i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,(t=Math.sqrt(i.x*i.x+i.y*i.y))?(s=Math.atan2(t,this.rc),e=Math.sin(s),n=Math.cos(s),a=vn(n*this.sin_p14+i.y*e*this.cos_p14/t),r=Math.atan2(i.x*e,t*this.cos_p14*n-i.y*this.sin_p14*e),r=N(this.long0+r)):(a=this.phic0,r=0),i.x=r,i.y=a,i}var dw=["gnom"];const fw={init:hw,forward:cw,inverse:uw,names:dw};function gw(i,t){var e=1-(1-i*i)/(2*i)*Math.log((1-i)/(1+i));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*L:L;for(var n=Math.asin(.5*t),s,r,a,o,l=0;l<30;l++)if(r=Math.sin(n),a=Math.cos(n),o=i*r,s=Math.pow(1-o*o,2)/(2*a)*(t/(1-i*i)-r/(1-o*o)+.5/i*Math.log((1-o)/(1+o))),n+=s,Math.abs(s)<=1e-10)return n;return NaN}function mw(){this.sphere||(this.k0=wi(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function pw(i){var t=i.x,e=i.y,n,s,r=N(t-this.long0);if(this.sphere)n=this.x0+this.a*r*Math.cos(this.lat_ts),s=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var a=mn(this.e,Math.sin(e));n=this.x0+this.a*this.k0*r,s=this.y0+this.a*a*.5/this.k0}return i.x=n,i.y=s,i}function _w(i){i.x-=this.x0,i.y-=this.y0;var t,e;return this.sphere?(t=N(this.long0+i.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(i.y/this.a*Math.cos(this.lat_ts))):(e=gw(this.e,2*i.y*this.k0/this.a),t=N(this.long0+i.x/(this.a*this.k0))),i.x=t,i.y=e,i}var vw=["cea"];const yw={init:mw,forward:pw,inverse:_w,names:vw};function xw(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function bw(i){var t=i.x,e=i.y,n=N(t-this.long0),s=Mn(e-this.lat0);return i.x=this.x0+this.a*n*this.rc,i.y=this.y0+this.a*s,i}function Mw(i){var t=i.x,e=i.y;return i.x=N(this.long0+(t-this.x0)/(this.a*this.rc)),i.y=Mn(this.lat0+(e-this.y0)/this.a),i}var Cw=["Equirectangular","Equidistant_Cylindrical","eqc"];const ww={init:xw,forward:bw,inverse:Mw,names:Cw};var cf=20;function Ew(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=La(this.es),this.e1=Aa(this.es),this.e2=Da(this.es),this.e3=ka(this.es),this.ml0=this.a*le(this.e0,this.e1,this.e2,this.e3,this.lat0)}function Sw(i){var t=i.x,e=i.y,n,s,r,a=N(t-this.long0);if(r=a*Math.sin(e),this.sphere)Math.abs(e)<=F?(n=this.a*a,s=-1*this.a*this.lat0):(n=this.a*Math.sin(r)/Math.tan(e),s=this.a*(Mn(e-this.lat0)+(1-Math.cos(r))/Math.tan(e)));else if(Math.abs(e)<=F)n=this.a*a,s=-1*this.ml0;else{var o=er(this.a,this.e,Math.sin(e))/Math.tan(e);n=o*Math.sin(r),s=this.a*le(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+o*(1-Math.cos(r))}return i.x=n+this.x0,i.y=s+this.y0,i}function Iw(i){var t,e,n,s,r,a,o,l,h;if(n=i.x-this.x0,s=i.y-this.y0,this.sphere)if(Math.abs(s+this.a*this.lat0)<=F)t=N(n/this.a+this.long0),e=0;else{a=this.lat0+s/this.a,o=n*n/this.a/this.a+a*a,l=a;var c;for(r=cf;r;--r)if(c=Math.tan(l),h=-1*(a*(l*c+1)-l-.5*(l*l+o)*c)/((l-a)/c-1),l+=h,Math.abs(h)<=F){e=l;break}t=N(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(s+this.ml0)<=F)e=0,t=N(this.long0+n/this.a);else{a=(this.ml0+s)/this.a,o=n*n/this.a/this.a+a*a,l=a;var u,d,f,g,m;for(r=cf;r;--r)if(m=this.e*Math.sin(l),u=Math.sqrt(1-m*m)*Math.tan(l),d=this.a*le(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),g=d/this.a,h=(a*(u*g+1)-g-.5*u*(g*g+o))/(this.es*Math.sin(2*l)*(g*g+o-2*a*g)/(4*u)+(a-g)*(u*f-2/Math.sin(2*l))-f),l-=h,Math.abs(h)<=F){e=l;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=N(this.long0+Math.asin(n*u/this.a)/Math.sin(e))}return i.x=t,i.y=e,i}var Rw=["Polyconic","poly"];const Tw={init:Ew,forward:Sw,inverse:Iw,names:Rw};function Pw(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function Ow(i){var t,e=i.x,n=i.y,s=n-this.lat0,r=e-this.long0,a=s/Dr*1e-5,o=r,l=1,h=0;for(t=1;t<=10;t++)l=l*a,h=h+this.A[t]*l;var c=h,u=o,d=1,f=0,g,m,p=0,_=0;for(t=1;t<=6;t++)g=d*c-f*u,m=f*c+d*u,d=g,f=m,p=p+this.B_re[t]*d-this.B_im[t]*f,_=_+this.B_im[t]*d+this.B_re[t]*f;return i.x=_*this.a+this.x0,i.y=p*this.a+this.y0,i}function Lw(i){var t,e=i.x,n=i.y,s=e-this.x0,r=n-this.y0,a=r/this.a,o=s/this.a,l=1,h=0,c,u,d=0,f=0;for(t=1;t<=6;t++)c=l*a-h*o,u=h*a+l*o,l=c,h=u,d=d+this.C_re[t]*l-this.C_im[t]*h,f=f+this.C_im[t]*l+this.C_re[t]*h;for(var g=0;g.999999999999&&(e=.999999999999),t=Math.asin(e);var n=N(this.long0+i.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var s=Math.asin(e);return i.x=n,i.y=s,i}var Yw=["Mollweide","moll"];const Zw={init:Hw,forward:Xw,inverse:qw,names:Yw};function Kw(){Math.abs(this.lat1+this.lat2)=0?(e=Math.sqrt(i.x*i.x+i.y*i.y),t=1):(e=-Math.sqrt(i.x*i.x+i.y*i.y),t=-1);var r=0;if(e!==0&&(r=Math.atan2(t*i.x,t*i.y)),this.sphere)return s=N(this.long0+r/this.ns),n=Mn(this.g-e/this.a),i.x=s,i.y=n,i;var a=this.g-e/this.a;return n=jo(a,this.e0,this.e1,this.e2,this.e3),s=N(this.long0+r/this.ns),i.x=s,i.y=n,i}var tE=["Equidistant_Conic","eqdc"];const eE={init:Kw,forward:Jw,inverse:Qw,names:tE};function iE(){this.R=this.a}function nE(i){var t=i.x,e=i.y,n=N(t-this.long0),s,r;Math.abs(e)<=F&&(s=this.x0+this.R*n,r=this.y0);var a=vn(2*Math.abs(e/Math.PI));(Math.abs(n)<=F||Math.abs(Math.abs(e)-L)<=F)&&(s=this.x0,e>=0?r=this.y0+Math.PI*this.R*Math.tan(.5*a):r=this.y0+Math.PI*this.R*-Math.tan(.5*a));var o=.5*Math.abs(Math.PI/n-n/Math.PI),l=o*o,h=Math.sin(a),c=Math.cos(a),u=c/(h+c-1),d=u*u,f=u*(2/h-1),g=f*f,m=Math.PI*this.R*(o*(u-g)+Math.sqrt(l*(u-g)*(u-g)-(g+l)*(d-g)))/(g+l);n<0&&(m=-m),s=this.x0+m;var p=l+u;return m=Math.PI*this.R*(f*p-o*Math.sqrt((g+l)*(l+1)-p*p))/(g+l),e>=0?r=this.y0+m:r=this.y0-m,i.x=s,i.y=r,i}function sE(i){var t,e,n,s,r,a,o,l,h,c,u,d,f;return i.x-=this.x0,i.y-=this.y0,u=Math.PI*this.R,n=i.x/u,s=i.y/u,r=n*n+s*s,a=-Math.abs(s)*(1+r),o=a-2*s*s+n*n,l=-2*a+1+2*s*s+r*r,f=s*s/l+(2*o*o*o/l/l/l-9*a*o/l/l)/27,h=(a-o*o/3/l)/l,c=2*Math.sqrt(-h/3),u=3*f/h/c,Math.abs(u)>1&&(u>=0?u=1:u=-1),d=Math.acos(u)/3,i.y>=0?e=(-c*Math.cos(d+Math.PI/3)-o/3/l)*Math.PI:e=-(-c*Math.cos(d+Math.PI/3)-o/3/l)*Math.PI,Math.abs(n)2*L*this.a?void 0:(e=t/this.a,n=Math.sin(e),s=Math.cos(e),r=this.long0,Math.abs(t)<=F?a=this.lat0:(a=vn(s*this.sin_p12+i.y*n*this.cos_p12/t),o=Math.abs(this.lat0)-L,Math.abs(o)<=F?this.lat0>=0?r=N(this.long0+Math.atan2(i.x,-i.y)):r=N(this.long0-Math.atan2(-i.x,i.y)):r=N(this.long0+Math.atan2(i.x*n,t*this.cos_p12*s-i.y*this.sin_p12*n))),i.x=r,i.y=a,i)):(l=La(this.es),h=Aa(this.es),c=Da(this.es),u=ka(this.es),Math.abs(this.sin_p12-1)<=F?(d=this.a*le(l,h,c,u,L),t=Math.sqrt(i.x*i.x+i.y*i.y),f=d-t,a=jo(f/this.a,l,h,c,u),r=N(this.long0+Math.atan2(i.x,-1*i.y)),i.x=r,i.y=a,i):Math.abs(this.sin_p12+1)<=F?(d=this.a*le(l,h,c,u,L),t=Math.sqrt(i.x*i.x+i.y*i.y),f=t-d,a=jo(f/this.a,l,h,c,u),r=N(this.long0+Math.atan2(i.x,i.y)),i.x=r,i.y=a,i):(t=Math.sqrt(i.x*i.x+i.y*i.y),p=Math.atan2(i.x,i.y),g=er(this.a,this.e,this.sin_p12),_=Math.cos(p),v=this.e*this.cos_p12*_,y=-v*v/(1-this.es),x=3*this.es*(1-y)*this.sin_p12*this.cos_p12*_/(1-this.es),M=t/g,w=M-y*(1+y)*Math.pow(M,3)/6-x*(1+3*y)*Math.pow(M,4)/24,E=1-y*w*w/2-M*w*w*w/6,m=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*_),r=N(this.long0+Math.asin(Math.sin(p)*Math.sin(w)/Math.cos(m))),C=Math.sin(m),a=Math.atan2((C-this.es*E*this.sin_p12)*Math.tan(m),C*(1-this.es)),i.x=r,i.y=a,i))}var cE=["Azimuthal_Equidistant","aeqd"];const uE={init:oE,forward:lE,inverse:hE,names:cE};function dE(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function fE(i){var t,e,n,s,r,a,o,l,h=i.x,c=i.y;return n=N(h-this.long0),t=Math.sin(c),e=Math.cos(c),s=Math.cos(n),a=this.sin_p14*t+this.cos_p14*e*s,r=1,(a>0||Math.abs(a)<=F)&&(o=this.a*r*e*Math.sin(n),l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*s)),i.x=o,i.y=l,i}function gE(i){var t,e,n,s,r,a,o;return i.x-=this.x0,i.y-=this.y0,t=Math.sqrt(i.x*i.x+i.y*i.y),e=vn(t/this.a),n=Math.sin(e),s=Math.cos(e),a=this.long0,Math.abs(t)<=F?(o=this.lat0,i.x=a,i.y=o,i):(o=vn(s*this.sin_p14+i.y*n*this.cos_p14/t),r=Math.abs(this.lat0)-L,Math.abs(r)<=F?(this.lat0>=0?a=N(this.long0+Math.atan2(i.x,-i.y)):a=N(this.long0-Math.atan2(-i.x,i.y)),i.x=a,i.y=o,i):(a=N(this.long0+Math.atan2(i.x*n,t*this.cos_p14*s-i.y*this.sin_p14*n)),i.x=a,i.y=o,i))}var mE=["ortho"];const pE={init:dE,forward:fE,inverse:gE,names:mE};var Pt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},vt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function _E(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=L-_t/2?this.face=Pt.TOP:this.lat0<=-(L-_t/2)?this.face=Pt.BOTTOM:Math.abs(this.long0)<=_t?this.face=Pt.FRONT:Math.abs(this.long0)<=L+_t?this.face=this.long0>0?Pt.RIGHT:Pt.LEFT:this.face=Pt.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function vE(i){var t={x:0,y:0},e,n,s,r,a,o,l={value:0};if(i.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(i.y)):e=i.y,n=i.x,this.face===Pt.TOP)r=L-e,n>=_t&&n<=L+_t?(l.value=vt.AREA_0,s=n-L):n>L+_t||n<=-(L+_t)?(l.value=vt.AREA_1,s=n>0?n-Nt:n+Nt):n>-(L+_t)&&n<=-_t?(l.value=vt.AREA_2,s=n+L):(l.value=vt.AREA_3,s=n);else if(this.face===Pt.BOTTOM)r=L+e,n>=_t&&n<=L+_t?(l.value=vt.AREA_0,s=-n+L):n<_t&&n>=-_t?(l.value=vt.AREA_1,s=-n):n<-_t&&n>=-(L+_t)?(l.value=vt.AREA_2,s=-n-L):(l.value=vt.AREA_3,s=n>0?-n+Nt:-n-Nt);else{var h,c,u,d,f,g,m;this.face===Pt.RIGHT?n=As(n,+L):this.face===Pt.BACK?n=As(n,+Nt):this.face===Pt.LEFT&&(n=As(n,-L)),d=Math.sin(e),f=Math.cos(e),g=Math.sin(n),m=Math.cos(n),h=f*m,c=f*g,u=d,this.face===Pt.FRONT?(r=Math.acos(h),s=to(r,u,c,l)):this.face===Pt.RIGHT?(r=Math.acos(c),s=to(r,u,-h,l)):this.face===Pt.BACK?(r=Math.acos(-h),s=to(r,u,-c,l)):this.face===Pt.LEFT?(r=Math.acos(-c),s=to(r,u,h,l)):(r=s=0,l.value=vt.AREA_0)}return o=Math.atan(12/Nt*(s+Math.acos(Math.sin(s)*Math.cos(_t))-L)),a=Math.sqrt((1-Math.cos(r))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(s))))),l.value===vt.AREA_1?o+=L:l.value===vt.AREA_2?o+=Nt:l.value===vt.AREA_3&&(o+=1.5*Nt),t.x=a*Math.cos(o),t.y=a*Math.sin(o),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,i.x=t.x,i.y=t.y,i}function yE(i){var t={lam:0,phi:0},e,n,s,r,a,o,l,h,c,u={value:0};if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,n=Math.atan(Math.sqrt(i.x*i.x+i.y*i.y)),e=Math.atan2(i.y,i.x),i.x>=0&&i.x>=Math.abs(i.y)?u.value=vt.AREA_0:i.y>=0&&i.y>=Math.abs(i.x)?(u.value=vt.AREA_1,e-=L):i.x<0&&-i.x>=Math.abs(i.y)?(u.value=vt.AREA_2,e=e<0?e+Nt:e-Nt):(u.value=vt.AREA_3,e+=L),c=Nt/12*Math.tan(e),a=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),o=Math.atan(a),s=Math.cos(e),r=Math.tan(n),l=1-s*s*r*r*(1-Math.cos(Math.atan(1/Math.cos(o)))),l<-1?l=-1:l>1&&(l=1),this.face===Pt.TOP)h=Math.acos(l),t.phi=L-h,u.value===vt.AREA_0?t.lam=o+L:u.value===vt.AREA_1?t.lam=o<0?o+Nt:o-Nt:u.value===vt.AREA_2?t.lam=o-L:t.lam=o;else if(this.face===Pt.BOTTOM)h=Math.acos(l),t.phi=h-L,u.value===vt.AREA_0?t.lam=-o+L:u.value===vt.AREA_1?t.lam=-o:u.value===vt.AREA_2?t.lam=-o-L:t.lam=o<0?-o-Nt:-o+Nt;else{var d,f,g;d=l,c=d*d,c>=1?g=0:g=Math.sqrt(1-c)*Math.sin(o),c+=g*g,c>=1?f=0:f=Math.sqrt(1-c),u.value===vt.AREA_1?(c=f,f=-g,g=c):u.value===vt.AREA_2?(f=-f,g=-g):u.value===vt.AREA_3&&(c=f,f=g,g=-c),this.face===Pt.RIGHT?(c=d,d=-f,f=c):this.face===Pt.BACK?(d=-d,f=-f):this.face===Pt.LEFT&&(c=d,d=f,f=-c),t.phi=Math.acos(-g)-L,t.lam=Math.atan2(f,d),this.face===Pt.RIGHT?t.lam=As(t.lam,-L):this.face===Pt.BACK?t.lam=As(t.lam,-Nt):this.face===Pt.LEFT&&(t.lam=As(t.lam,+L))}if(this.es!==0){var m,p,_;m=t.phi<0?1:0,p=Math.tan(t.phi),_=this.b/Math.sqrt(p*p+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-_*_)/(this.one_minus_f*_)),m&&(t.phi=-t.phi)}return t.lam+=this.long0,i.x=t.lam,i.y=t.phi,i}function to(i,t,e,n){var s;return i_t&&s<=L+_t?(n.value=vt.AREA_1,s-=L):s>L+_t||s<=-(L+_t)?(n.value=vt.AREA_2,s=s>=0?s-Nt:s+Nt):(n.value=vt.AREA_3,s+=L)),s}function As(i,t){var e=i+t;return e<-Nt?e+=ia:e>+Nt&&(e-=ia),e}var xE=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const bE={init:_E,forward:vE,inverse:yE,names:xE};var ic=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Tr=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],am=.8487,om=1.3523,lm=vi/5,ME=1/lm,Ss=18,Bo=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},CE=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function wE(i,t,e,n){for(var s=t;n;--n){var r=i(s);if(s-=r,Math.abs(r)=Ss&&(n=Ss-1),e=vi*(e-ME*n);var s={x:Bo(ic[n],e)*t,y:Bo(Tr[n],e)};return i.y<0&&(s.y=-s.y),s.x=s.x*this.a*am+this.x0,s.y=s.y*this.a*om+this.y0,s}function IE(i){var t={x:(i.x-this.x0)/(this.a*am),y:Math.abs(i.y-this.y0)/(this.a*om)};if(t.y>=1)t.x/=ic[Ss][0],t.y=i.y<0?-L:L;else{var e=Math.floor(t.y*Ss);for(e<0?e=0:e>=Ss&&(e=Ss-1);;)if(Tr[e][0]>t.y)--e;else if(Tr[e+1][0]<=t.y)++e;else break;var n=Tr[e],s=5*(t.y-n[0])/(Tr[e+1][0]-n[0]);s=wE(function(r){return(Bo(n,r)-t.y)/CE(n,r)},s,F,100),t.x/=Bo(ic[e],s),t.y=(5*e+s)*qt,i.y<0&&(t.y=-t.y)}return t.x=N(t.x+this.long0),t}var RE=["Robinson","robin"];const TE={init:EE,forward:SE,inverse:IE,names:RE};function PE(){this.name="geocent"}function OE(i){var t=Y0(i,this.es,this.a);return t}function LE(i){var t=Z0(i,this.es,this.a,this.b);return t}var AE=["Geocentric","geocentric","geocent","Geocent"];const DE={init:PE,forward:OE,inverse:LE,names:AE};var ne={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},br={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function kE(){if(Object.keys(br).forEach((function(e){if(typeof this[e]>"u")this[e]=br[e].def;else{if(br[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);br[e].num&&(this[e]=parseFloat(this[e]))}br[e].degrees&&(this[e]=this[e]*qt)}).bind(this)),Math.abs(Math.abs(this.lat0)-L)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var i=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(i),this.sw=Math.sin(i)}function FE(i){i.x-=this.long0;var t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),s,r;switch(this.mode){case ne.OBLIQ:r=this.sinph0*t+this.cosph0*e*n;break;case ne.EQUIT:r=e*n;break;case ne.S_POLE:r=-t;break;case ne.N_POLE:r=t;break}switch(r=this.pn1/(this.p-r),s=r*e*Math.sin(i.x),this.mode){case ne.OBLIQ:r*=this.cosph0*t-this.sinph0*e*n;break;case ne.EQUIT:r*=t;break;case ne.N_POLE:r*=-(e*n);break;case ne.S_POLE:r*=e*n;break}var a,o;return a=r*this.cg+s*this.sg,o=1/(a*this.sw*this.h1+this.cw),s=(s*this.cg-r*this.sg)*this.cw*o,r=a*o,i.x=s*this.a,i.y=r*this.a,i}function NE(i){i.x/=this.a,i.y/=this.a;var t={x:i.x,y:i.y},e,n,s;s=1/(this.pn1-i.y*this.sw),e=this.pn1*i.x*s,n=this.pn1*i.y*this.cw*s,i.x=e*this.cg+n*this.sg,i.y=n*this.cg-e*this.sg;var r=_e(i.x,i.y);if(Math.abs(r)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var i=1-this.es,t=1/i;this.radius_p=Math.sqrt(i),this.radius_p2=i,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function jE(i){var t=i.x,e=i.y,n,s,r,a;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var o=this.radius_p/_e(this.radius_p*Math.cos(e),Math.sin(e));if(s=o*Math.cos(t)*Math.cos(e),r=o*Math.sin(t)*Math.cos(e),a=o*Math.sin(e),(this.radius_g-s)*s-r*r-a*a*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;n=this.radius_g-s,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/_e(a,n)),i.y=this.radius_g_1*Math.atan(a/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(a/_e(r,n)))}else this.shape==="sphere"&&(n=Math.cos(e),s=Math.cos(t)*n,r=Math.sin(t)*n,a=Math.sin(e),n=this.radius_g-s,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/_e(a,n)),i.y=this.radius_g_1*Math.atan(a/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(a/_e(r,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function BE(i){var t=-1,e=0,n=0,s,r,a,o;if(i.x=i.x/this.a,i.y=i.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*_e(1,n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*_e(1,e));var l=n/this.radius_p;if(s=e*e+l*l+t*t,r=2*this.radius_g*t,a=r*r-4*s*this.C,a<0)return i.x=Number.NaN,i.y=Number.NaN,i;o=(-r-Math.sqrt(a))/(2*s),t=this.radius_g+o*t,e*=o,n*=o,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t),i.y=Math.atan(this.radius_p_inv2*Math.tan(i.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*Math.sqrt(1+e*e)),s=e*e+n*n+t*t,r=2*this.radius_g*t,a=r*r-4*s*this.C,a<0)return i.x=Number.NaN,i.y=Number.NaN,i;o=(-r-Math.sqrt(a))/(2*s),t=this.radius_g+o*t,e*=o,n*=o,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t)}return i.x=i.x+this.long0,i}var WE=["Geostationary Satellite View","Geostationary_Satellite","geos"];const UE={init:zE,forward:jE,inverse:BE,names:WE};var kr=1.340264,Fr=-.081106,Nr=893e-6,Gr=.003796,Wo=Math.sqrt(3)/2;function $E(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function HE(i){var t=N(i.x-this.long0),e=i.y,n=Math.asin(Wo*Math.sin(e)),s=n*n,r=s*s*s;return i.x=t*Math.cos(n)/(Wo*(kr+3*Fr*s+r*(7*Nr+9*Gr*s))),i.y=n*(kr+Fr*s+r*(Nr+Gr*s)),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function XE(i){i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a;var t=1e-9,e=12,n=i.y,s,r,a,o,l,h;for(h=0;h=L?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=t2,this.forward=QE)}function KE(i){var t=N(i.x-(this.long0||0)),e=i.y,n,s,r;return n=this.am1+this.m1-ur(e,s=Math.sin(e),r=Math.cos(e),this.en),s=r*t/(n*Math.sqrt(1-this.es*s*s)),i.x=n*Math.sin(s),i.y=this.am1-n*Math.cos(s),i.x=this.a*i.x+(this.x0||0),i.y=this.a*i.y+(this.y0||0),i}function JE(i){i.x=(i.x-(this.x0||0))/this.a,i.y=(i.y-(this.y0||0))/this.a;var t,e,n,s;if(e=_e(i.x,i.y=this.am1-i.y),s=gu(this.am1+this.m1-e,this.es,this.en),(t=Math.abs(s))ra?(i.x=s*Math.sin(n=t*Math.cos(e)/s),i.y=this.cphi1-s*Math.cos(n)):i.x=i.y=0,i.x=this.a*i.x+(this.x0||0),i.y=this.a*i.y+(this.y0||0),i}function t2(i){i.x=(i.x-(this.x0||0))/this.a,i.y=(i.y-(this.y0||0))/this.a;var t,e,n=_e(i.x,i.y=this.cphi1-i.y);if(e=this.cphi1+this.phi1-n,Math.abs(e)>L)throw new Error;return Math.abs(Math.abs(e)-L)<=ra?t=0:t=n*Math.atan2(i.x,i.y)/Math.cos(e),i.x=N(t+(this.long0||0)),i.y=Mn(e),i}var e2=["bonne","Bonne (Werner lat_1=90)"];const i2={init:ZE,names:e2};function n2(i){i.Proj.projections.add(go),i.Proj.projections.add(mo),i.Proj.projections.add(KM),i.Proj.projections.add(oC),i.Proj.projections.add(fC),i.Proj.projections.add(vC),i.Proj.projections.add(wC),i.Proj.projections.add(TC),i.Proj.projections.add(DC),i.Proj.projections.add(VC),i.Proj.projections.add(iw),i.Proj.projections.add(lw),i.Proj.projections.add(fw),i.Proj.projections.add(yw),i.Proj.projections.add(ww),i.Proj.projections.add(Tw),i.Proj.projections.add(Dw),i.Proj.projections.add(Vw),i.Proj.projections.add($w),i.Proj.projections.add(Zw),i.Proj.projections.add(eE),i.Proj.projections.add(aE),i.Proj.projections.add(uE),i.Proj.projections.add(pE),i.Proj.projections.add(bE),i.Proj.projections.add(TE),i.Proj.projections.add(DE),i.Proj.projections.add(VE),i.Proj.projections.add(UE),i.Proj.projections.add(YE),i.Proj.projections.add(i2)}be.defaultDatum="WGS84";be.Proj=Mi;be.WGS84=new be.Proj("WGS84");be.Point=tr;be.toPoint=K0;be.defs=ae;be.nadgrid=Qb;be.transform=zo;be.mgrs=mM;be.version="__VERSION__";n2(be);function s2(i){for(const[t,e]of Object.entries(i))be.defs(t,e);fb(be)}const r2=25.4/.28,a2=39.37;function vu(i){return yu(i,o2,l2)}function o2(i){return i.getView()}function l2(i,t){return i.on("change:view",t)}function hm(i){return vu(i)?.getProjection()}function h2(i){const t=vu(i);return yu(t,c2,u2)}function c2(i){return i.getResolution()}function u2(i,t){return i.on("change:resolution",t)}function d2(i){const t=vu(i);return yu(t,f2,g2)}function f2(i){return i.getCenter()}function g2(i,t){return i.on("change:center",t)}function m2(i){const t=d2(i),e=h2(i),n=hm(i);return b.useMemo(()=>{if(n==null||e==null||t==null)return;const r=Br(n,e,t);return Math.round(r*a2*r2)},[n,e,t])}function yu(i,t,e){const n=b.useCallback(()=>i?t(i):void 0,[i,t]),s=b.useCallback(r=>{if(!i)return()=>{};const a=e(i,r);return()=>Pe(a)},[i,e]);return b.useSyncExternalStore(s,n)}function Pl(i){return{definition:`--${i}`,ref:`var(--${i})`}}const nc=Pl("map-padding-left"),sc=Pl("map-padding-right"),rc=Pl("map-padding-top"),ac=Pl("map-padding-bottom");function p2(i,t,e){const n={position:"absolute",zIndex:1,transitionProperty:"left, right, top, bottom",transitionDuration:"200ms",transitionTimingFunction:"ease-out",overflow:"hidden"},r=t??0,o=e??0,l=x2(e),h=(u,d)=>`(${u} + ${d}px)`,c={};switch(i){case"top-left":c.left=h(nc.ref,r),c.top=h(rc.ref,o);break;case"top-right":c.right=h(sc.ref,r),c.top=h(rc.ref,o);break;case"bottom-left":c.left=h(nc.ref,r),c.bottom=h(ac.ref,o+l.gap);break;case"bottom-right":c.right=h(sc.ref,r),c.bottom=h(ac.ref,o+l.gap);break}for(const[u,d]of Object.entries(c))n[u]=`calc(${d})`;return n.maxH=`calc((100%) - ${eo(c.top,"0px")} - ${eo(c.bottom,l.gap+"px")} - ${o}px - ${l.space}px)`,n.maxW=`calc((100%) - ${eo(c.left,"0px")} - ${eo(c.right,"0px")} - ${r}px)`,n}function eo(i,t){return i??t}const xu=b.createContext(void 0);xu.displayName="MapContainerContext";const _2=xu.Provider;function v2(){const i=b.useContext(xu);if(!i)throw new Error("Map container context is not available. The component must be a child of the component.");return i}const y2="top-right";function ah(i){const{position:t=y2,children:e,horizontalGap:n,verticalGap:s}=i,{containerProps:r}=Ae("map-anchor",i),{mapAnchorsHost:a}=v2();return Zf.createPortal(S.jsx(Mt,{...r,...p2(t,n,s),children:e}),a)}function x2(i){return{gap:i===void 0?30:0,space:10}}const b2="@open-pioneer/map",M2=vc.bind(void 0,b2);function C2(){var i=b.useRef(!1),t=b.useCallback(function(){return i.current},[]);return b.useEffect(function(){return i.current=!0,function(){i.current=!1}},[]),t}function w2(i,t,e){t===void 0&&(t=[]),e===void 0&&(e={loading:!1});var n=b.useRef(0),s=C2(),r=b.useState(e),a=r[0],o=r[1],l=b.useCallback(function(){for(var h=[],c=0;ce.isBaseLayer)}getActiveBaseLayer(){return R(this,Se)}activateBaseLayer(e){let n;if(e!=null){if(n=R(this,ze).get(e),!(n instanceof Eo))return Qi.warn(`Cannot activate base layer '${e}: layer has an invalid type.'`),!1;if(!n)return Qi.warn(`Cannot activate base layer '${e}': layer is unknown.`),!1;if(!n.isBaseLayer)return Qi.warn(`Cannot activate base layer '${e}': layer is not a base layer.`),!1}return n!==R(this,Se)&&(ot(this,ve,po).call(this,n),this.emit("changed")),!0}getOperationalLayers(e){return this.getAllLayers(e).filter(n=>!n.isBaseLayer)}getAllLayers(e){const n=Array.from(R(this,sn).values());return e?.sortByDisplayOrder&&T2(n),n}getLayerById(e){return R(this,ze).get(e)}removeLayerById(e){const n=R(this,ze).get(e);if(!n){Qi.isDebug()&&Qi.debug(`Cannot remove layer '${e}': layer is unknown.`);return}ot(this,ve,um).call(this,n)}getLayerByRawInstance(e){return R(this,rn)?.get(e)}}Bn=new WeakMap,sn=new WeakMap,ze=new WeakMap,rn=new WeakMap,Se=new WeakMap,el=new WeakMap,ve=new WeakSet,cm=function(e){ot(this,ve,dm).call(this,e);const n=e.olLayer;e.isBaseLayer?(n.setZIndex(S2),!R(this,Se)&&e.visible?ot(this,ve,po).call(this,e):e.__setVisible(!1)):(n.setZIndex(Bu(this,el)._++),e.__setVisible(e.visible)),R(this,sn).add(e),R(this,Bn).olMap.addLayer(n),this.emit("changed")},um=function(e){if(!R(this,sn).has(e)){Qi.warn(`Cannot remove layer '${e.id}': only top level layers can be removed at this time.`);return}if(!(e instanceof Eo))throw new Error("Internal error: expected top level layer to be an instance of AbstractLayer.");if(R(this,Bn).olMap.removeLayer(e.olLayer),R(this,sn).delete(e),ot(this,ve,fm).call(this,e),R(this,Se)===e){const n=this.getBaseLayers()[0];n&&uf(n),ot(this,ve,po).call(this,n)}e.destroy(),this.emit("changed")},po=function(e){if(R(this,Se)!==e){if(Qi.isDebug()){const n=s=>s?`'${s.id}'`:void 0;Qi.debug(`Switching active base layer from ${n(R(this,Se))} to ${n(e)}`)}R(this,Se)?.__setVisible(!1),Q(this,Se,e),R(this,Se)?.__setVisible(!0)}},dm=function(e){const n=[],s=r=>{const a=r.id,o="olLayer"in r?r.olLayer:void 0;if(R(this,ze).has(a))throw new Error(`Layer id '${a}' is not unique. Either assign a unique id yourself or skip configuring 'id' for an automatically generated id.`);if(o&&R(this,rn).has(o))throw new Error("OlLayer has already been used in this or another layer.");R(this,ze).set(a,r),o&&R(this,rn).set(o,r),n.push([a,o]);for(const l of r.sublayers?.__getRawSublayers()??[])s(l)};try{s(e)}catch(r){for(const[a,o]of n)R(this,ze).delete(a),o&&R(this,rn).delete(o);throw r}},fm=function(e){const n=s=>{"olLayer"in s&&R(this,rn).delete(s.olLayer),R(this,ze).delete(s.id);for(const r of s.sublayers?.__getRawSublayers()??[])n(r)};n(e)};function T2(i){i.sort((t,e)=>{const n=t.olLayer.getZIndex()??1,s=e.olLayer.getZIndex()??1;return n!==s?n-s:t.id.localeCompare(e.id,"en")})}function uf(i){if(!(i instanceof Eo))throw new Error("Layer is not a valid layer instance. Use one of the classes provided by the map package instead.")}const df="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAAAXNSR0IArs4c6QAABFlJREFUaEPtmG2IFVUYx//PXNcllVpo75zx1uLuuQu29sVYyMJeEEwKkqAyKiwCK7+GBUtJ1IfQpZC+9gKCRUUkJWREVBQUSgpGIJT7Mtfdbuuc2WsFpS117zwxl1UutjvznJkxEJxv987/+T+/eeacZ845hEv0okuUG5fBO9/cRKXSR1Hkxf+x4wSDMzM/F/1mC6l4rVz2mGgriO4GcPtCkAx8BeaDBLyjw9DkfZBc4IFSy88SjYD5aQDLhDBniPnlJUuXvtJXr/8ljPmPLDP4RLk86DjO5wD6MyUnGisx37XKGD9LfCbwCddd7xB9AuCqLEk7Yn7nKNpcnZ391tbHGvzkypVDURQdBbDcNtki+j+51RquNhpjNn5W4Ccqld6uZvN7EF1rk0SgrZW6u4dXTU//JtC2JVbgvue9BeZHpOY2OgL2DhizTRojBp9SSreAcQCO1NxS14yiaGhwdnZCEicG9z1vD5h3SEyZ+VMQtccsEa0G852SOAJGB4x5VqiVyABfqUkAOkX9I5gf0mH4Q6euVi6vZcd5F8BQWrw2Zo2ESFTxcc+7vsR8PMXwTFQqDS32eR933WqJKH6gxG7kALrfmFoavAi8ptSDDLyXYvaSNub5JM2kUqMEjCRpmPm+ahh+WAi4r9QTAN5INCPaooNgfwr4w/FaJUlDRI8NBMG+YsBd90kQvZ5YKWBj1ZgvkzS+624C0WcpPtuqxuwtBtzz7gfzB4lmzM/oMNyTpKl53ggzjyZpHOZ7+8Pwo0LAa0rdxMDhvB3Bd92fELfHhMtxnOH+U6eOFQIem/hKcZoZgJ3amF0L6Wqu+wITvZjiMaeNuUKQR/7J95WKV3Dr00wZOEBEu2lubmzJihXOP83mIJifA3BPWiyAL7Qxdwh0cvBJ191BRIljWJIwZZ5s12GY3L3mDUR9PNZO9/ZWmqXSL7nhEgy6urqu7qvXf5XkEIPPj/N4x7NRYmytYd6vw3CLNM4O3PMeAPP7UnMrHfMmHYZxYUSXFTgDTk2pEwAGRe5y0RFtzDq53HIjERsL1y02DPHSd8NAEHxtE2RV8XPGvucdA/MNNokStAe1MZttvTKBn3TdmyOiQ7bJFtJzq7XadqMc+2QCb3cYz9sH5kdzwu/SxuzM4pEZfEIp1wHi7VnWs5UpbUy2w6Q8FW9PVNfdzkSvZakYLNvfhTkyV7xjon4D5lus4Ine1kGQa5jlBo+PlJ1WK96PXimCZ67/HUVrrms0/hDpFxHlBo99J5VK3ZKdz0+0TgfBkTzQubrKhYl9pQ4Ilq6pG2rpAxVS8fZE7enpibq7jxNwzSLJD08Zc9sGoCmFS9IVBj7f228E83cLJGx0NZtr+06fLmxZXCh4G16pxwG82QnPUXRrljPw/63i5xJNKvUqAU/Fv5l5azUME89Ssgydwit+vr8r9TEDh6rG7M4ClhZz0cBnKpVllZmZs2kAWe9fNPCsQNK4y+DSShWl+xdy+nM+UkBLWAAAAABJRU5ErkJggg==",gm=b.createContext(void 0);gm.displayName="DefaultMapContext";function P2(){return b.useContext(gm)}const O2=17,L2=20,A2={top:50,right:20,bottom:10,left:20};var ua,oc;class D2{constructor(t){H(this,ua);Rt(this,"olMap");Rt(this,"olLayer");Rt(this,"olSource");Rt(this,"activeHighlights");this.olMap=t,this.olSource=new Rl({features:void 0}),this.olLayer=new El({className:"highlight-layer",source:this.olSource,style:function(e,n){return N2(e,n)}}),this.activeHighlights=new Set,this.olLayer.setZIndex(bu),this.olMap.addLayer(this.olLayer)}getLayer(){return this.olLayer}destroy(){this.clearHighlight()}addHighlight(t,e){const n=ot(this,ua,oc).call(this,t);if(n.length===0)return{get isActive(){return!1},destroy(){}};const s=n.map(l=>{const h=l.getType(),c=new Ye({type:h,geometry:l});return c.setStyle(G2(h,e?.highlightStyle)),c}),r=this.olSource,a=this.activeHighlights,o={get isActive(){return a.has(o)},destroy(){if(this.isActive){for(const l of s)r.removeFeature(l);a.delete(o)}}};return r.addFeatures(s),this.activeHighlights.add(o),o}zoomToHighlight(t,e){const n=ot(this,ua,oc).call(this,t);if(n.length===0)return;let s=Le();for(const f of n)s=Pc(s,f.getExtent());const r=ti(s),o=bo(s)===0?e?.pointZoom??O2:e?.maxZoom??L2;k2(this.olMap,r);const{top:l=0,right:h=0,bottom:c=0,left:u=0}=e?.viewPadding??A2,d=[l,h,c,u];F2(this.olMap,s,o,d)}addHighlightAndZoom(t,e){const n=this.addHighlight(t,e);return this.zoomToHighlight(t,e),n}clearHighlight(){for(const t of this.activeHighlights)t.destroy()}}ua=new WeakSet,oc=function(t){const e=[];return t.forEach(n=>{"getType"in n&&e.push(n),"geometry"in n&&n.geometry&&e.push(n.geometry)}),e};function k2(i,t){t&&t.length&&i.getView().setCenter(t)}function F2(i,t,e,n){t?i.getView().fit(t,{maxZoom:e,padding:n}):e&&i.getView().setZoom(e)}function N2(i,t){const e=i.get("type");return su(lc(e))(i,t)}function G2(i,t){if(t&&i in t){const n=t[i];return n||lc(i)}else return lc(i)}function lc(i){return i in oh?oh[i]:oh.Polygon}const oh={Point:new Et({image:new Qs({anchor:[.5,1],src:df})}),MultiPoint:new Et({image:new Qs({anchor:[.5,1],src:df})}),LineString:[new Et({stroke:new kt({color:"#fff",width:5})}),new Et({stroke:new kt({color:"#00ffff",width:3})})],MultiLineString:[new Et({stroke:new kt({color:"#fff",width:5})}),new Et({stroke:new kt({color:"#00ffff",width:3})})],Polygon:[new Et({stroke:new kt({color:"#fff",width:5})}),new Et({stroke:new kt({color:"#00ffff",width:3}),fill:new xe({color:"rgba(224,255,255,0.35)"})})],MultiPolygon:[new Et({stroke:new kt({color:"#fff",width:5})}),new Et({stroke:new kt({color:"#00ffff",width:3}),fill:new xe({color:"rgba(224,255,255,0.35)"})})]},cs=ii("map:MapModel");var da,fi,fa,ki,ga,Vs,zs,an,Wn,ma,on,Fi,ir,pm,_m;class mm extends xc{constructor(e){super();H(this,ir);H(this,da);H(this,fi);H(this,fa,new R2(this));H(this,ki);H(this,ga);H(this,Vs,!1);H(this,zs);H(this,an);H(this,Wn);H(this,ma,new AbortController);H(this,on);H(this,Fi);Q(this,da,e.id),Q(this,fi,e.olMap),Q(this,an,e.initialExtent),Q(this,ga,{httpService:e.httpService}),Q(this,ki,new D2(R(this,fi))),Q(this,on,"waiting"),ot(this,ir,pm).call(this).then(()=>{Q(this,on,"ready"),R(this,Fi)?.resolve(),Q(this,Fi,void 0)},n=>{Uu(n)||cs.error("Failed to initialize map",n),Q(this,on,"error"),R(this,Fi)?.reject(new Error("Failed to initialize map.")),Q(this,Fi,void 0)}),Q(this,Wn,R(this,fi).on("change:target",()=>{ot(this,ir,_m).call(this)}))}destroy(){if(!R(this,Vs)){Q(this,Vs,!0);try{this.emit("destroy")}catch(e){cs.warn("Unexpected error from event listener during map model destruction:",e)}R(this,Wn)&&Pe(R(this,Wn)),Q(this,Wn,void 0),R(this,ma).abort(),R(this,Fi)?.reject(new Error("Map model was destroyed.")),R(this,fa).destroy(),R(this,ki).destroy(),R(this,fi).dispose()}}get id(){return R(this,da)}get olMap(){return R(this,fi)}get layers(){return R(this,fa)}get container(){return R(this,zs)}get initialExtent(){return R(this,an)}get __sharedDependencies(){return R(this,ga)}highlight(e,n){return R(this,ki).addHighlight(e,n)}zoom(e,n){R(this,ki).zoomToHighlight(e,n)}highlightAndZoom(e,n){return R(this,ki).addHighlightAndZoom(e,n??{})}removeHighlights(){R(this,ki).clearHighlight()}whenDisplayed(){return R(this,Vs)?Promise.reject(new Error("Map model was destroyed.")):R(this,on)==="error"?Promise.reject(new Error("Failed to initialize map.")):R(this,on)==="ready"?Promise.resolve():(R(this,Fi)??Q(this,Fi,Hp())).promise}}da=new WeakMap,fi=new WeakMap,fa=new WeakMap,ki=new WeakMap,ga=new WeakMap,Vs=new WeakMap,zs=new WeakMap,an=new WeakMap,Wn=new WeakMap,ma=new WeakMap,on=new WeakMap,Fi=new WeakMap,ir=new WeakSet,pm=async function(){try{await V2(this.olMap,R(this,ma).signal)}catch(e){throw Uu(e)?e:new Error("Failed to wait for the map to be displayed.",{cause:e})}try{const n=R(this,fi).getView();if(R(this,an)){const s=R(this,an),r=[s.xMin,s.yMin,s.xMax,s.yMax],a=ti(r),o=n.getResolutionForExtent(r);cs.debug("Applying initial extent",s),cs.debug(" Computed center:",a),cs.debug(" Computed resolution:",o),n.setCenter(a),n.setResolution(o)}else{const s=n.calculateExtent(),[r=0,a=0,o=0,l=0]=s,h={xMin:r,yMin:a,xMax:o,yMax:l};cs.debug("Detected initial extent",h),Q(this,an,h),this.emit("changed:initialExtent"),this.emit("changed")}}catch(e){throw new Error("Failed to apply the initial extent.",{cause:e})}},_m=function(){const e=R(this,fi).getTargetElement()??void 0;R(this,zs)!==e&&(Q(this,zs,e),this.emit("changed:container"),this.emit("changed"))};function V2(i,t){return new Promise((n,s)=>{let r;function a(){const h=i.getSize()??[],[c=0,u=0]=h;h&&c>0&&u>0&&l()}function o(){l($u())}function l(h){r&&(Pe(r),r=void 0),t.removeEventListener("abort",o),h?s(h):n(z2(25))}if(t.aborted){l($u());return}t.addEventListener("abort",o),r=i.on("change:size",a)})}function z2(i){return new Promise(t=>setTimeout(t,i))}function si(i){const t=j2(i),e=M2("map.MapRegistry"),n=E2(async()=>typeof t=="string"?await e.expectMapModel(t):Promise.resolve(t),[e,t]);return b.useMemo(()=>n.loading?{kind:"loading"}:n.error?{kind:"rejected",error:n.error}:{kind:"resolved",map:n.value},[n])}function j2(i){if(typeof i=="object"&&i.mapId!=null&&i.map!=null)throw new Error("Cannot specify both 'mapId' and 'map' in useMapModel at the same time.");if(i instanceof mm)throw new Error("Map model instances cannot be passed directly to 'useMapModel' (see TypeScript signature).");const t=b.useMemo(()=>i==null?{}:typeof i=="string"?{mapId:i}:{mapId:i.mapId,map:i.map},[...typeof i=="string"||i==null?[i]:[i.mapId,i.map]]),e=P2(),n=ff(t)??ff(e);if(n==null)throw new Error("No map specified. You must either specify the map (or its id) via a DefaultMapProvider parent or configure it explicitly.");return n}function ff(i){return i?.map??i?.mapId}const An=ii("map:MapContainer");function B2(i){const{viewPadding:t,viewPaddingChangeBehavior:e,children:n,role:s,"aria-label":r,"aria-labelledby":a}=i,{containerProps:o}=Ae("map-container",i),l=b.useRef(null),h=b.useRef(null),c=si(i),u=c.map,[d,f]=b.useState(!1);b.useEffect(()=>{if(c.kind!=="loading"){if(c.kind==="rejected"){An.error("Cannot display the map. Caused by ",c.error);return}if(!u){An.error("No configuration available for the configured map.");return}if(l.current){const m=U2(u,l.current);return()=>m?.destroy()}}},[c,u]),b.useEffect(()=>{f(!0)},[]);const g=b.useMemo(()=>({height:"100%",position:"relative",[rc.definition]:t?.top!=null?t.top+"px":"0px",[ac.definition]:t?.bottom!=null?t.bottom+"px":"0px",[nc.definition]:t?.left!=null?t.left+"px":"0px",[sc.definition]:t?.right!=null?t.right+"px":"0px"}),[t]);return S.jsxs(Oe.div,{...o,role:s,"aria-label":r,"aria-labelledby":a,ref:l,style:g,tabIndex:0,children:[d&&u&&S.jsx(W2,{olMap:u.olMap,mapAnchorsHost:h.current,viewPadding:t,viewPaddingChangeBehavior:e,children:n}),S.jsx(Oe.div,{ref:h,className:"map-anchors"})]})}function W2(i){const{olMap:t,mapAnchorsHost:e,viewPadding:n,viewPaddingChangeBehavior:s="preserve-center",children:r}=i,a=b.useMemo(()=>({left:n?.left??0,right:n?.right??0,top:n?.top??0,bottom:n?.bottom??0}),[n]);b.useEffect(()=>{const l=t?.getView();if(!t||!l)return;const h=l.getCenter(),c=H2(l.padding),u=$2(t,c);switch(l.padding=X2(a),s){case"preserve-center":l.animate({center:h,duration:300});break;case"preserve-extent":{u&&l.animate({center:h,resolution:l.getResolutionForExtent(u),duration:300});break}}},[a,t,s]);const o=b.useMemo(()=>({mapAnchorsHost:e}),[e]);return S.jsx(_2,{value:o,children:r})}function U2(i,t){const e=i.id,n=i.olMap;if(n.getTarget()){An.error("Failed to display the map: the map already has a target. There may be more than one .");return}An.isDebug()&&An.debug(`Setting target of map '${e}':`,t),n.setTarget(t);let s=!1;return{destroy(){s||(An.isDebug()&&An.debug(`Removing target of map '${e}':`,t),n.setTarget(void 0),s=!0)}}}function $2(i,t){const e=i.getSize();if(!e||e.length<2)return;const[n,s]=e,r=i.getCoordinateFromPixel([t.left,t.bottom]),a=i.getCoordinateFromPixel([Math.max(0,n-t.right),Math.max(0,s-t.top)]);if(!r||!a)return;const[o,l]=r,[h,c]=a;return[o,l,h,c]}function H2(i){return{top:i?.[0]??0,right:i?.[1]??0,bottom:i?.[2]??0,left:i?.[3]??0}}function X2(i){const{top:t,right:e,bottom:n,left:s}=i;return[t,e,n,s]}const q2=1.2;function Y2(i,t=q2){Z2(i);const e=Zt(i),n=dt(i),s=e*t,r=n*t;return[i[0]-(s-e)/2,i[1]-(r-n)/2,i[2]+(s-e)/2,i[3]+(r-n)/2]}function Z2(i){if(i.length!==4)throw new Error(`Invalid extent (expected length 4, but got length ${i.length}).`)}class K2 extends Yy{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:jy({extent:eu(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const J2='© OpenStreetMap contributors.';class Mu extends K2{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[J2];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",s=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:s,wrapX:t.wrapX,zDirection:t.zDirection})}}const Ge="main";class Q2{mapId=Ge;async getMapConfig(){return{initialView:{kind:"position",center:{x:847541,y:6793584},zoom:14},projection:"EPSG:3857",layers:[new ry({title:"OpenStreetMap",olLayer:new tu({source:new Mu,properties:{title:"OSM"}}),isBaseLayer:!0})]}}}const io={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class no extends ni{constructor(t,e){super(t),this.feature=e}}function tS(i,t){const e=[];for(let n=0;n=e?i[t-e]:i[t]}function ro(i,t,e){let n,s;ta){const l=Rs(i,n),h=Rs(i,s);return so(l,h)}let o=0;if(nd.startIndex?md.startIndex&&(m-=f.length)),l=m,o=u)}const h=t.targets[o];let c=h.ring;if(t.targetIndex===o&&c){const u=Rs(h.coordinates,l),d=e.getPixelFromCoordinate(u);Cg(d,t.startPx)>n&&(c=!1)}if(c){const u=h.coordinates,d=u.length,f=h.startIndex,g=l;if(f=e?n-=e:n<0&&(n+=e);let r=n+1;r>=e&&(r-=e);const a=i[n],o=a[0],l=a[1],h=i[r],c=h[0]-o,u=h[1]-l;return[o+c*s,l+u*s]}class iS extends cr{constructor(t){const e=t;e.stopDown||(e.stopDown=sr),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=sS(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:Us,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let n=t.geometryFunction;if(!n){const s=this.mode_;if(s==="Circle")n=function(r,a,o){const l=a||new Sl([NaN,NaN]),h=qe(r[0]),c=Mg(h,qe(r[r.length-1]));return l.setCenterAndRadius(h,Math.sqrt(c),this.geometryLayout_),l};else{let r;s==="Point"?r=qn:s==="LineString"?r=Ue:s==="Polygon"&&(r=ye),n=function(a,o,l){return o?s==="Polygon"?a[0].length?o.setCoordinates([a[0].concat([a[0][0]])],this.geometryLayout_):o.setCoordinates([],this.geometryLayout_):o.setCoordinates(a,this.geometryLayout_):o=new r(a,this.geometryLayout_),o}}}this.geometryFunction_=n,this.dragVertexDelay_=t.dragVertexDelay!==void 0?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new El({source:new Rl({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:nS(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:hu,this.freehandCondition_,t.freehand?this.freehandCondition_=Jh:this.freehandCondition_=t.freehandCondition?t.freehandCondition:k0,this.traceCondition_,this.setTrace(t.trace||!1),this.traceState_={active:!1},this.traceSource_=t.traceSource||t.source||null,this.addChangeListener(Zh.ACTIVE,this.updateState_)}setTrace(t){let e;t?t===!0?e=Jh:e=t:e=tb,this.traceCondition_=e}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===et.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(t);let e=t.type===pt.POINTERMOVE,n=!0;return!this.freehand_&&this.lastDragTime_&&t.type===pt.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===pt.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),n=!1):this.freehand_&&t.type===pt.POINTERDOWN?n=!1:e&&this.getPointerCount()<2?(n=t.type===pt.POINTERMOVE,n&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===pt.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===pt.DBLCLICK&&(n=!1),super.handleEvent(t)&&n}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(()=>{this.handlePointerMove_(new Li(pt.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))},this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(t){if(!this.traceSource_||!this.traceCondition_(t))return;if(this.traceState_.active){this.deactivateTrace_();return}const e=this.getMap(),n=e.getCoordinateFromPixel([t.pixel[0]-this.snapTolerance_,t.pixel[1]+this.snapTolerance_]),s=e.getCoordinateFromPixel([t.pixel[0]+this.snapTolerance_,t.pixel[1]-this.snapTolerance_]),r=Th([n,s]),a=this.traceSource_.getFeaturesInExtent(r);if(a.length===0)return;const o=tS(t.coordinate,a);o.length&&(this.traceState_={active:!0,startPx:t.pixel.slice(),targets:o,targetIndex:-1})}addOrRemoveTracedCoordinates_(t,e){const n=t.startIndex<=t.endIndex,s=t.startIndex<=e;n===s?n&&e>t.endIndex||!n&&et.endIndex)&&this.removeTracedCoordinates_(e,t.endIndex):(this.removeTracedCoordinates_(t.startIndex,t.endIndex),this.addTracedCoordinates_(t,t.startIndex,e))}removeTracedCoordinates_(t,e){if(t===e)return;let n=0;if(t0&&this.removeLastPoints_(n)}addTracedCoordinates_(t,e,n){if(e===n)return;const s=[];if(e=a;--o)s.push(Is(t.coordinates,o))}s.length&&this.appendCoordinates(s)}updateTrace_(t){const e=this.traceState_;if(!e.active||e.targetIndex===-1&&Cg(e.startPx,t.pixel)this.squaredClickTolerance_:a<=this.squaredClickTolerance_,!this.shouldHandle_)return}if(!this.finishCoordinate_){this.createOrUpdateSketchPoint_(t.coordinate.slice());return}this.updateTrace_(t),this.modifyDrawing_(t.coordinate)}atFinish_(t,e){let n=!1;if(this.sketchFeature_){let s=!1,r=[this.finishCoordinate_];const a=this.mode_;if(a==="Point")n=!0;else if(a==="Circle")n=this.sketchCoords_.length===2;else if(a==="LineString")s=!e&&this.sketchCoords_.length>this.minPoints_;else if(a==="Polygon"){const o=this.sketchCoords_;s=o[0].length>this.minPoints_,r=[o[0][0],o[0][o[0].length-2]],e?r=[o[0][0]]:r=[o[0][0],o[0][o[0].length-2]]}if(s){const o=this.getMap();for(let l=0,h=r.length;l=this.maxPoints_&&(this.freehand_?r.pop():s=!0),r.push(t.slice()),this.geometryFunction_(r,e,n)):a==="Polygon"&&(r=this.sketchCoords_[0],r.length>=this.maxPoints_&&(this.freehand_?r.pop():s=!0),r.push(t.slice()),s&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,e,n)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),s?this.finishDrawing():this.sketchFeature_}removeLastPoints_(t){if(!this.sketchFeature_)return;const e=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection(),s=this.mode_;for(let r=0;r=2){this.finishCoordinate_=a[a.length-2].slice();const o=this.finishCoordinate_.slice();a[a.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(a,e,n),e.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if(s==="Polygon"){a=this.sketchCoords_[0],a.splice(-2,1);const o=this.sketchLine_.getGeometry();if(a.length>=2){const l=a[a.length-2].slice();a[a.length-1]=l,this.createOrUpdateSketchPoint_(l)}o.setCoordinates(a),this.geometryFunction_(this.sketchCoords_,e,n)}if(a.length===1){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const t=this.abortDrawing_();if(!t)return null;let e=this.sketchCoords_;const n=t.getGeometry(),s=this.getMap().getView().getProjection();return this.mode_==="LineString"?(e.pop(),this.geometryFunction_(e,n,s)):this.mode_==="Polygon"&&(e[0].pop(),this.geometryFunction_(e,n,s),e=n.getCoordinates()),this.type_==="MultiPoint"?t.setGeometry(new Il([e])):this.type_==="MultiLineString"?t.setGeometry(new ta([e])):this.type_==="MultiPolygon"&&t.setGeometry(new ea([e])),this.dispatchEvent(new no(io.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t),t}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new no(io.DRAWABORT,t))}appendCoordinates(t){const e=this.mode_,n=!this.sketchFeature_;n&&this.startDrawing_(t[0]);let s;if(e==="LineString"||e==="Circle")s=this.sketchCoords_;else if(e==="Polygon")s=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;n&&s.shift(),s.pop();for(let a=0;a{const f=d.originalEvent;return(f.metaKey||f.ctrlKey)&&f.shiftKey};r.interactions=G0({dragPan:!0,altShiftDragRotate:!1,pinchRotate:!1,mouseWheelZoom:!0}).extend([new N0({out:!0,condition:u})])}const a=await n??{};this.initializeViewOptions(a),r.view=a instanceof me?a:new me(a),!r.layers&&!e.layers&&(r.layers=[new tu({source:new Mu})]);const o=e.initialView,l=o?.kind==="extent"?o.extent:void 0;ch.debug("Constructing OpenLayers map with options",r);const h=new j0(r),c=new mm({id:t,olMap:h,initialExtent:l,httpService:this.httpService});try{if(e.layers)for(const u of e.layers)c.layers.addLayer(u);return c}catch(u){throw c.destroy(),u}}initializeViewOptions(t){const e=this.mapId,n=this.mapConfig;if(t instanceof me){const a=o=>{ch.warn(`The advanced configuration for map id '${e}' has provided a fully constructed view instance: ${o} cannot be applied. -Use ViewOptions instead of a View instance.`)};n.projection!=null&&a("projection"),n.initialView!=null&&a("initialView");return}const s=t.projection=this.initializeProjection(n.projection),r=n.initialView;if(r)switch(r.kind){case"position":t.zoom=r.zoom,t.center=[r.center.x,r.center.y];break;case"extent":{const a=r.extent;t.zoom=0,t.center=[a.xMin+(a.xMax-a.xMin)/2,a.yMin+(a.yMax-a.yMin)/2];break}}else this.setViewDefaults(t,s)}setViewDefaults(t,e){if(t.center==null){const n=e.getExtent();n?t.center=ti(n):ch.warn(`Cannot set default center coordinate because the current projection has no associated extent. -Try to configure 'initialView' explicity.`)}(t.zoom==null||t.resolution==null)&&(t.zoom=0)}initializeProjection(t){if(t==null)return Gt("EPSG:3857");const e=Gt(t);if(!e)throw new Error(`Failed to retrieve projection for code '${t}'.`);return e}}const uh=ii("map:MapRegistry");var pa,_a,ln,hn,va,Un,il,xm;class oS{constructor({references:t}){H(this,il);H(this,pa);H(this,_a,new Map);H(this,ln,new Map);H(this,hn,new Map);H(this,va,new WeakMap);H(this,Un,!1);Q(this,pa,t.httpService);const e=t.providers;for(const n of e)R(this,_a).set(n.mapId,n)}destroy(){R(this,Un)||(uh.info("Destroy map registry and all maps"),Q(this,Un,!0),R(this,ln).forEach(t=>{t.kind==="model"&&t.model.destroy()}),R(this,ln).clear(),R(this,hn).clear())}async getMapModel(t){if(R(this,Un))throw new Error("MapRegistry has already been destroyed.");const e=R(this,hn).get(t);if(e)return dh(await e);const n=R(this,ln).get(t);if(n)return dh(n);const s=R(this,_a).get(t);if(!s){uh.debug(`Failed to find a config provider for map id '${t}'.`);return}const r=ot(this,il,xm).call(this,t,s).catch(a=>{const l={kind:"error",error:new Error(`Failed to construct map '${t}'`,{cause:a})};return R(this,hn).delete(t),R(this,ln).set(t,l),l});return R(this,hn).set(t,r),dh(await r)}async expectMapModel(t){const e=await this.getMapModel(t);if(!e)throw new Error(`No configuration available for map with id '${t}'.`);return e}getMapModelByRawInstance(t){return R(this,va).get(t)}}pa=new WeakMap,_a=new WeakMap,ln=new WeakMap,hn=new WeakMap,va=new WeakMap,Un=new WeakMap,il=new WeakSet,xm=async function(t,e){uh.info(`Creating map with id '${t}'`);const n=await e.getMapConfig(),s=await rS(t,n,R(this,pa));if(R(this,Un))throw s.destroy(),new Error("MapRegistry has been destroyed.");const r={kind:"model",model:s};return R(this,ln).set(t,r),R(this,hn).delete(t),R(this,va).set(s.olMap,s),r};function dh(i){if(i.kind==="error")throw i.error;return i.model}const fh=ii("notifier:NotificationService");var gi,js,ya,nr,hc,hS;class lS{constructor(){H(this,nr);H(this,gi);H(this,js);H(this,ya)}destroy(){clearTimeout(R(this,ya)),Q(this,ya,void 0)}notify(t){ot(this,nr,hc).call(this,"showNotification",{title:t.title??void 0,message:t.message??void 0,level:t.level??"info",displayDuration:t.displayDuration})}closeAll(){ot(this,nr,hc).call(this,"closeAll")}registerHandler(t){if(R(this,gi))return fh.warn(`A notification handler has already been registered; this new handler will be ignored. -The component has likely been used twice in your application.`),{destroy(){}};Q(this,gi,t);const e=R(this,js);if(Q(this,js,void 0),e)for(const[s,...r]of e)t[s](...r);let n=!1;return{destroy:()=>{n||(n=!0,R(this,gi)===t&&Q(this,gi,void 0))}}}}gi=new WeakMap,js=new WeakMap,ya=new WeakMap,nr=new WeakSet,hc=function(t,...e){if(R(this,gi))R(this,gi)[t](...e);else{const n=R(this,js)??Q(this,js,[]);if(n.length>=1024){fh.error(`Internal notification buffer overflow: this event will be dropped to prevent a memory leak. -Make sure that the UI is configured to display notifications (use ).`,{method:t,args:e});return}n.push([t,...e])}},hS=function(){R(this,gi)||fh.warn(`No notification handler has been registered: notifications will not be visible. -Make sure that your app contains the component.`)};var xa,nl,bm;class cS{constructor(t){H(this,nl);H(this,xa);Q(this,xa,t.references.interceptors.map((e,n)=>[t.referencesMeta.interceptors[n].serviceId,e]))}async fetch(t,e){const n=e?.signal??void 0,s=Object.assign({},e?.context),r=dS(e);gh(n);let a=uS(t);{const l={target:a,signal:n??new AbortController().signal,context:s,options:r};gh(n),await ot(this,nl,bm).call(this,l),a=l.target}const o=new Request(a,{...r,signal:n});return await window.fetch(o)}}xa=new WeakMap,nl=new WeakSet,bm=async function(t){const{signal:e}=t;for(const[n,s]of R(this,xa))if(gh(e),s.beforeRequest)try{await s.beforeRequest(t)}catch(r){throw Xp(r),new Error(`Interceptor '${n}' failed with an error`,{cause:r})}};function uS(i){return typeof i=="string"?new URL(i,window.location.href):i}function dS(i){const t=i?.method??"GET",e=new Headers(i?.headers??{}),n={...i,method:t,headers:e};for(const s in n)fS[s]&&delete n[s];return n}const fS={context:1,signal:1};function gh(i){i?.aborted&&qp()}const gS={"ol-app":{name:"ol-app",services:{MainMapProvider:{name:"MainMapProvider",clazz:Q2,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:oS,provides:[{name:"map.MapRegistry",qualifier:"map.MapRegistry"}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:lS,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/overview-map":{name:"@open-pioneer/overview-map",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-viewer":{name:"@open-pioneer/scale-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-bar":{name:"@open-pioneer/scale-bar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/geolocation":{name:"@open-pioneer/geolocation",services:{},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:cS,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}}},mS='.sidebar{height:100%;position:absolute;top:0;background-color:#ffffffb3;transition:width .3s ease-out 0s}.right-bottom{position:absolute;right:0;bottom:0;background:#fff}.zoom-controls{position:absolute;z-index:1000;bottom:2rem;right:1rem}.ol-control.ol-zoom{left:unset;right:.5em}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.overview-map .ol-overviewmap{position:relative;height:100%;width:100%}.overview-map .ol-overviewmap:not(.ol-collapsed){border:1px solid black}.overview-map .ol-overviewmap .ol-overviewmap-map{border:none;width:100%;height:100%}.overview-map .ol-overviewmap .ol-overviewmap-box{border:2px solid red}.scale-bar .ol-scale-bar{margin-bottom:8px;margin-right:8px}.scale-bar .ol-scale-bar,.scale-bar .ol-scale-line{position:relative;bottom:0;left:0;background:none}.scale-bar .ol-scale-bar .ol-scale-bar-inner,.scale-bar .ol-scale-bar .ol-scale-line-inner,.scale-bar .ol-scale-line .ol-scale-bar-inner,.scale-bar .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)}.measurement-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.measurement-active-tooltip{background:#000000e6;border-radius:4px;border-color:#000000e6;opacity:.9;color:#fff}.measurement-finished-tooltip{background-color:#4cb3ffe6;color:#000;border:1px solid white}.measurement-active-tooltip:before,.measurement-finished-tooltip:before{border-top:6px solid rgba(0,0,0,.9);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measurement-finished-tooltip:before{border-top-color:#4cb3ff}',pS=["en","de"];function _S(i){switch(i){case"en":return Hu(()=>import("./CGbLuQbJLnhG.js"),[],import.meta.url).then(t=>t.default);case"de":return Hu(()=>import("./BMJspEKb-95r.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${i}'`)}const vS=Yp(mS),yS=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:_S,locales:pS,packages:gS,styles:vS},Symbol.toStringTag,{value:"Module"})),mh=.75,oo=.1;let xS=class extends Ta{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=t.collapsed!==void 0?t.collapsed:!0,this.collapsible_=t.collapsible!==void 0?t.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=t.rotateWithView!==void 0?t.rotateWithView:!1,this.viewExtent_=void 0;const e=t.className!==void 0?t.className:"ol-overviewmap",n=t.tipLabel!==void 0?t.tipLabel:"Overview map",s=t.collapseLabel!==void 0?t.collapseLabel:"‹";typeof s=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s):this.collapseLabel_=s;const r=t.label!==void 0?t.label:"›";typeof r=="string"?(this.label_=document.createElement("span"),this.label_.textContent=r):this.label_=r;const a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,o=document.createElement("button");o.setAttribute("type","button"),o.title=n,o.appendChild(a),o.addEventListener(et.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=t.view;const l=new j0({view:t.view,controls:new We,interactions:new We});this.ovmap_=l,t.layers&&t.layers.forEach(function(v){l.addLayer(v)});const h=document.createElement("div");h.className="ol-overviewmap-box",h.style.boxSizing="border-box",this.boxOverlay_=new cu({position:[0,0],positioning:"center-center",element:h}),this.ovmap_.addOverlay(this.boxOverlay_);const c=e+" "+or+" "+xl+(this.collapsed_&&this.collapsible_?" "+Po:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=c,u.appendChild(this.ovmapDiv_),u.appendChild(o);const d=this,f=this.boxOverlay_,g=this.boxOverlay_.getElement(),m=function(v){return{clientX:v.clientX,clientY:v.clientY}},p=function(v){const y=m(v),x=l.getEventCoordinateInternal(y);f.setPosition(x)},_=function(v){const y=l.getEventCoordinateInternal(v);d.getMap().getView().setCenterInternal(y),window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",_)};g.addEventListener("mousedown",function(){window.addEventListener("mousemove",p),window.addEventListener("mouseup",_)})}setMap(t){const e=this.getMap();if(t!==e){if(e){const n=e.getView();n&&this.unbindView_(n),this.ovmap_.setTarget(null)}if(super.setMap(t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(ht(t,Zn.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const n=t.getView();n&&(this.bindView_(n),n.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(t){if(t.key===zt.VIEW){const e=t.oldValue;e&&this.unbindView_(e);const n=this.getMap().getView();this.bindView_(n)}else!this.ovmap_.isRendered()&&(t.key===zt.TARGET||t.key===zt.SIZE)&&this.ovmap_.updateSize()}bindView_(t){if(!this.view_){const e=new me({projection:t.getProjection()});this.ovmap_.setView(e)}t.addChangeListener(Ee.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(t){t.removeChangeListener(Ee.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const n=t.getSize(),r=t.getView().calculateExtentInternal(n);if(this.viewExtent_&&Zs(r,this.viewExtent_))return;this.viewExtent_=r;const a=e.getSize(),l=e.getView().calculateExtentInternal(a),h=e.getPixelFromCoordinateInternal(xn(r)),c=e.getPixelFromCoordinateInternal(Sa(r)),u=Math.abs(h[0]-c[0]),d=Math.abs(h[1]-c[1]),f=a[0],g=a[1];uf*mh||d>g*mh?this.resetExtent_():cn(l,r)||this.recenter_()}resetExtent_(){const t=this.getMap(),e=this.ovmap_,n=t.getSize(),r=t.getView().calculateExtentInternal(n),a=e.getView(),o=Math.log(mh/oo)/Math.LN2,l=1/(Math.pow(2,o/2)*oo);ov(r,l),a.fitInternal(Vh(r))}recenter_(){const t=this.getMap(),e=this.ovmap_,n=t.getView();e.getView().setCenterInternal(n.getCenterInternal())}updateBox_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const n=t.getSize(),s=t.getView(),r=e.getView(),a=this.rotateWithView_?0:-s.getRotation(),o=this.boxOverlay_,l=this.boxOverlay_.getElement(),h=s.getCenterInternal(),c=s.getResolution(),u=r.getResolution(),d=n[0]*c/u,f=n[1]*c/u;if(o.setPosition(h),l){l.style.width=d+"px",l.style.height=f+"px";const g="rotate("+a+"rad)";l.style.transform=g}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=jr(this.ovmap_,di.POSTRENDER,function(t){delete this.ovmapPostrenderKey_,this.updateBox_()},this))}handleClick_(t){t.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(Po),this.collapsed_?Io(this.collapseLabel_,this.label_):Io(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const t=this.ovmap_;if(!this.collapsed_){if(t.isRendered()){this.viewExtent_=void 0,t.render();return}t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())}setCollapsed(t){!this.collapsible_||this.collapsed_===t||this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,this.getMap().getView().getRotation()!==0&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(t){this.validateExtent_(),this.updateBox_()}};const ph="units",bS=[1,2,5],Mr=25.4/.28;class MS extends Ta{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const n=t.className!==void 0?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=n+"-inner",this.element.className=n+" "+or,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=t.minWidth!==void 0?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(ph,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(ph)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(ph,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=t.center,n=t.projection,s=this.getUnits(),r=s=="degrees"?"degrees":"m";let a=Br(n,t.resolution,e,r);const o=this.minWidth_*(this.dpi_||Mr)/Mr,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||Mr)/Mr:void 0;let h=o*a,c="";if(s=="degrees"){const y=Xs.degrees;h*=y,h=l){d=m,f=p,g=_;break}else if(f>=o)break;m=d,p=f,_=g,++u}const v=this.scaleBar_?this.createScaleBar(f,d,c):d.toFixed(g<0?-g:0)+" "+c;this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,n){const s=this.getScaleForResolution(),r=s<1?Math.round(1/s).toLocaleString()+" : 1":"1 : "+Math.round(s).toLocaleString(),a=this.scaleBarSteps_,o=t/a,l=[this.createMarker("absolute")];for(let c=0;c
`+this.createMarker("relative")+(c%2===0||a===2?this.createStepText(c,t,!1,e,n):"")+"")}return l.push(this.createStepText(a,t,!0,e,n)),(this.scaleBarText_?`
`+r+"
":"")+l.join("")}createMarker(t){return`
`}createStepText(t,e,n,s,r){const o=(t===0?0:Math.round(s/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+r),l=t===0?-3:e/this.scaleBarSteps_*-1,h=t===0?0:e/this.scaleBarSteps_*2;return`
`+o+"
"}getScaleForResolution(){const t=Br(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||Mr,n=1e3/25.4;return t*n*e}render(t){const e=t.frameState;e?this.viewState_=e.viewState:this.viewState_=null,this.updateElement_()}}const CS=i=>{const{displayMode:t="line"}=i,{containerProps:e}=Ae("scale-bar",i),{map:n}=si(i),s=b.useRef(null);return b.useEffect(()=>{if(s.current&&n){const r=n.olMap,a=new MS({units:"metric",target:s.current,bar:t==="bar"});return r.addControl(a),()=>{r.removeControl(a)}}},[t,n]),S.jsx(Mt,{...e,ref:s})},Fa=b.forwardRef(function(t,e){const{label:n,icon:s,onClick:r,isLoading:a,isDisabled:o,isActive:l,tooltipProps:h,buttonProps:c}=t,{containerProps:{className:u,...d}}=Ae("tool-button",t),f=yc(u,{"tool-button--active":l,"tool-button--loading":a,"tool-button--disabled":o}),g=typeof l=="boolean"?l?"true":"false":void 0,[m,p]=b.useState(!1),_=v=>{p(!1),r?.(v)};return S.jsx(Kf,{label:n,placement:"auto",openDelay:500,...h,isOpen:m,onOpen:()=>p(!0),onClose:()=>p(!1),children:S.jsx(wS,{className:f,ref:e,"aria-label":n,leftIcon:s,iconSpacing:0,padding:0,isDisabled:o,isLoading:a,isActive:l,"aria-pressed":g,...d,...c,onClick:_})})}),wS=b.forwardRef(function(t,e){const{"aria-labelledby":n,"aria-describedby":s,...r}=t;return S.jsx(eg,{ref:e,...r})}),ES="@open-pioneer/map-navigation",Cu=ts.bind(void 0,ES);var Mm={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},gf=Xn.createContext&&Xn.createContext(Mm),SS=["attr","size","title"];function IS(i,t){if(i==null)return{};var e=RS(i,t),n,s;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(e[n]=i[n])}return e}function RS(i,t){if(i==null)return{};var e={};for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){if(t.indexOf(n)>=0)continue;e[n]=i[n]}return e}function Uo(){return Uo=Object.assign?Object.assign.bind():function(i){for(var t=1;tXn.createElement(t.tag,$o({key:e},t.attr),Cm(t.child)))}function Cn(i){return t=>Xn.createElement(LS,Uo({attr:$o({},i.attr)},t),Cm(i.child))}function LS(i){var t=e=>{var{attr:n,size:s,title:r}=i,a=IS(i,SS),o=s||e.size||"1em",l;return e.className&&(l=e.className),i.className&&(l=(l?l+" ":"")+i.className),Xn.createElement("svg",Uo({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,n,a,{className:l,style:$o($o({color:i.color||e.color},e.style),i.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),r&&Xn.createElement("title",null,r),i.children)};return gf!==void 0?Xn.createElement(gf.Consumer,null,e=>t(e)):t(Mm)}function AS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"},child:[]},{tag:"line",attr:{x1:"12",y1:"9",x2:"12",y2:"13"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(i)}function DS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 14 4 9 9 4"},child:[]},{tag:"path",attr:{d:"M20 20v-7a4 4 0 0 0-4-4H4"},child:[]}]})(i)}function kS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 14 20 9 15 4"},child:[]},{tag:"path",attr:{d:"M4 20v-7a4 4 0 0 1 4-4h12"},child:[]}]})(i)}function FS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},child:[]},{tag:"polyline",attr:{points:"9 22 9 12 15 12 15 22"},child:[]}]})(i)}function NS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(i)}function GS(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(i)}const VS=b.forwardRef(function(t,e){const{containerProps:n}=Ae("initial-extent",t),{map:s}=si(t),r=Cu();function a(){const o=s?.initialExtent,l=s?.olMap;if(o&&l){const h=[o.xMin,o.yMin,o.xMax,o.yMax];l.getView().fit(h,{duration:200})}}return S.jsx(Fa,{ref:e,label:r.formatMessage({id:"initial-extent.title"}),icon:S.jsx(FS,{}),onClick:a,...n})}),zS=b.forwardRef(function(t,e){return S.jsx(wm,{zoomDirection:"in",ref:e,...t})}),jS=b.forwardRef(function(t,e){return S.jsx(wm,{zoomDirection:"out",ref:e,...t})}),wm=b.forwardRef(function(t,e){const{zoomDirection:n}=t,{map:s}=si(t),r=Cu(),[a,o]=b.useState(!1),{defaultClassName:l,buttonLabel:h,buttonIcon:c}=BS(r,n),{containerProps:u}=Ae(yc("zoom",l),t);function d(){if(a)return;o(!0);const f=s?.olMap.getView();let g=f?.getZoom();const m=f?.getMaxZoom()||Number.MAX_SAFE_INTEGER,p=f?.getMinZoom()||0;f&&g!==void 0&&(n==="in"&&gp&&--g,f.animate({zoom:g,duration:200},()=>o(!1)))}return S.jsx(Fa,{ref:e,label:h,icon:c,onClick:d,...u})});function BS(i,t){switch(t){case"in":return{defaultClassName:"zoom-in",buttonLabel:i.formatMessage({id:"zoom-in.title"}),buttonIcon:S.jsx(GS,{})};case"out":return{defaultClassName:"zoom-out",buttonLabel:i.formatMessage({id:"zoom-out.title"}),buttonIcon:S.jsx(NS,{})}}}var WS=Symbol.for("preact-signals");function wu(){if(Ds>1)Ds--;else{for(var i,t=!1;Vr!==void 0;){var e=Vr;for(Vr=void 0,cc++;e!==void 0;){var n=e.o;if(e.o=void 0,e.f&=-3,!(8&e.f)&&Sm(e))try{e.c()}catch(s){t||(i=s,t=!0)}e=n}}if(cc=0,Ds--,t)throw i}}var yt=void 0;function Eu(i){var t=yt;yt=void 0;try{return i()}finally{yt=t}}var Vr=void 0,Ds=0,cc=0,Ho=0;function Em(i){if(yt!==void 0){var t=i.n;if(t===void 0||t.t!==yt)return t={i:0,S:i,p:yt.s,n:void 0,t:yt,e:void 0,x:void 0,r:t},yt.s!==void 0&&(yt.s.n=t),yt.s=t,i.n=t,32&yt.f&&i.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=yt.s,t.n=void 0,yt.s.n=t,yt.s=t),t}}function he(i){this.v=i,this.i=0,this.n=void 0,this.t=void 0}he.prototype.brand=WS;he.prototype.h=function(){return!0};he.prototype.S=function(i){this.t!==i&&i.e===void 0&&(i.x=this.t,this.t!==void 0&&(this.t.e=i),this.t=i)};he.prototype.U=function(i){if(this.t!==void 0){var t=i.e,e=i.x;t!==void 0&&(t.x=e,i.e=void 0),e!==void 0&&(e.e=t,i.x=void 0),i===this.t&&(this.t=e)}};he.prototype.subscribe=function(i){var t=this;return Om(function(){var e=t.value,n=yt;yt=void 0;try{i(e)}finally{yt=n}})};he.prototype.valueOf=function(){return this.value};he.prototype.toString=function(){return this.value+""};he.prototype.toJSON=function(){return this.value};he.prototype.peek=function(){var i=yt;yt=void 0;try{return this.value}finally{yt=i}};Object.defineProperty(he.prototype,"value",{get:function(){var i=Em(this);return i!==void 0&&(i.i=this.i),this.v},set:function(i){if(i!==this.v){if(cc>100)throw new Error("Cycle detected");this.v=i,this.i++,Ho++,Ds++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{wu()}}}});function US(i){return new he(i)}function Sm(i){for(var t=i.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Im(i){for(var t=i.s;t!==void 0;t=t.n){var e=t.S.n;if(e!==void 0&&(t.r=e),t.S.n=t,t.i=-1,t.n===void 0){i.s=t;break}}}function Rm(i){for(var t=i.s,e=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):e=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}i.s=e}function dr(i){he.call(this,void 0),this.x=i,this.s=void 0,this.g=Ho-1,this.f=4}(dr.prototype=new he).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ho))return!0;if(this.g=Ho,this.f|=1,this.i>0&&!Sm(this))return this.f&=-2,!0;var i=yt;try{Im(this),yt=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return yt=i,Rm(this),this.f&=-2,!0};dr.prototype.S=function(i){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}he.prototype.S.call(this,i)};dr.prototype.U=function(i){if(this.t!==void 0&&(he.prototype.U.call(this,i),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};dr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;i!==void 0;i=i.x)i.t.N()}};Object.defineProperty(dr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var i=Em(this);if(this.h(),i!==void 0&&(i.i=this.i),16&this.f)throw this.v;return this.v}});function Tm(i){return new dr(i)}function Pm(i){var t=i.u;if(i.u=void 0,typeof t=="function"){Ds++;var e=yt;yt=void 0;try{t()}catch(n){throw i.f&=-2,i.f|=8,Su(i),n}finally{yt=e,wu()}}}function Su(i){for(var t=i.s;t!==void 0;t=t.n)t.S.U(t);i.x=void 0,i.s=void 0,Pm(i)}function $S(i){if(yt!==this)throw new Error("Out-of-order effect");Rm(this),yt=i,this.f&=-2,8&this.f&&Su(this),wu()}function Na(i){this.x=i,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Na.prototype.c=function(){var i=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{i()}};Na.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Pm(this),Im(this),Ds++;var i=yt;return yt=this,$S.bind(this,i)};Na.prototype.N=function(){2&this.f||(this.f|=2,this.o=Vr,Vr=this)};Na.prototype.d=function(){this.f|=8,1&this.f||Su(this)};function Om(i){var t=new Na(i);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}function HS(i){let t;return{destroy:Om(function(){this[XS]=i.bind(void 0),t=this[qS].bind(this)}),start:t}}var XS="N",qS="S";function ks(i,t){return new KS(i,t?.equal)}function YS(i,t){return new ZS(i,t?.equal)}function Lm(i){return Eu(i)}var vs=Symbol("signal"),zr=Symbol("equals"),Am=class{[vs];constructor(i){this[vs]=i}get value(){return this[vs].value}set value(i){throw new Error("Cannot update a readonly reactive object.")}trigger(){throw new Error("Cannot trigger this reactive object.")}peek(){return this[vs].peek()}toJSON(){return this.value}toString(){return`Reactive[value=${QS(this[vs].value)}]`}},ZS=class extends Am{[zr];constructor(i,t){const e=Tm(t?JS(i,t):i);super(e),this[zr]=t}},KS=class extends Am{[zr];constructor(i,t){super(US(i)),this[zr]=t}get value(){return super.value}set value(i){Eu(()=>this[zr]?.(this.value,i))||(this[vs].value=i)}};function JS(i,t){let e=!0,n;return function(){const r=i();return Eu(()=>((e||!t(n,r))&&(n=r,e=!1),n))}}function QS(i){return typeof i=="string"?JSON.stringify(i):String(i)}function tI(i,t){return i===t?!0:i.length===t.length&&i.every((e,n)=>e===t[n])}function eI(i,t,e,n){const s=Tm(t),r=n?.immediate??!1,a=n?.equal??iI;let o=!0,l,h;function c(){const f=h;h=void 0;try{f?.()}catch(g){throw d.destroy(),g}}const u=i(()=>{const f=s.value;Lm(()=>{const g=l,m=o&&r||!o&&!a(g,f);(m||o)&&(l=f,o=!1),m&&(c(),h=e(f,g))})}),d={destroy(){try{c()}finally{u.destroy()}}};return d}function iI(i,t){return i===t}function Dm(i){Promise.reject(new Error("Error in effect or watch callback",{cause:i}))}var nI=class{queue=[];channel=new MessageChannel;constructor(){this.channel.port2.start()}enqueue(i){const t={fn:i,destroyed:!1};return this.queue.push(t),this.queue.length===1&&this.scheduleIteration(),{destroy(){t.destroyed||(t.destroyed=!0)}}}messageHandler=()=>this.runIteration();scheduleIteration(){const i=this.channel;i.port2.addEventListener("message",this.messageHandler),i.port1.postMessage("")}runIteration(){this.channel.port2.removeEventListener("message",this.messageHandler);const i=this.queue;this.queue=[];for(const t of i)if(!t.destroyed)try{t.fn()}catch(e){Dm(e)}}};function sI(i){const t=new rI(i);return{destroy:t.destroy.bind(t)}}var rI=class{callback;cleanup;watcher;scheduledExecution;isDestroyed=!1;initialExecution=!0;isExecuting=!1;constructor(i){this.callback=i,this.watcher=HS(this.scheduleExecution),this.execute(),this.initialExecution=!1}destroy(){if(!this.isDestroyed){this.isDestroyed=!0;try{this.triggerCleanup()}finally{this.watcher?.destroy(),this.watcher=void 0,this.scheduledExecution?.destroy(),this.scheduledExecution=void 0}}}execute(){const i=this.watcher;if(!i)return;this.isExecuting=!0;const t=i.start();try{if(this.initialExecution)try{this.triggerCallback()}catch(e){throw this.destroy(),e}else try{this.triggerCallback()}catch(e){Dm(e)}}finally{t(),this.isExecuting=!1}this.isDestroyed&&this.triggerCleanup()}triggerCallback(){if(!this.isDestroyed){this.triggerCleanup();const i=this.callback();typeof i=="function"&&(this.cleanup=i)}}triggerCleanup(){const i=this.cleanup;this.cleanup=void 0;try{i&&Lm(i)}catch(t){throw this.destroy(),t}}scheduleExecution=()=>{if(!this.isDestroyed){if(this.isExecuting)throw new Error("Cycle detected");this.scheduledExecution||(this.scheduledExecution=lI(()=>{try{this.execute()}finally{this.scheduledExecution=void 0}}))}}};function aI(i,t,e){return eI(sI,i,t,{equal:tI,...e})}var oI=new nI;function lI(i){return oI.enqueue(i)}function hI(i){return new cI(i)}var ee,Bs,$t,tn,_o,km,Fm,Hf,cI=(Hf=class{constructor(i){H(this,$t);H(this,ee,new Map);H(this,Bs,ks(!1));if(i)for(const[t,e]of i)R(this,ee).set(t,ks(e))}get size(){return ot(this,$t,tn).call(this),R(this,ee).size}forEach(i){ot(this,$t,tn).call(this);const t=R(this,ee).entries();for(const[e,n]of t)i(n.value,e)}entries(){return ot(this,$t,tn).call(this),ot(this,$t,km).call(this)}keys(){return ot(this,$t,tn).call(this),R(this,ee).keys()}values(){return ot(this,$t,tn).call(this),ot(this,$t,Fm).call(this)}[Symbol.iterator](){return this.entries()}clear(){const i=!!R(this,ee).size;R(this,ee).clear(),i&&ot(this,$t,_o).call(this)}delete(i){const t=R(this,ee).delete(i);return t&&ot(this,$t,_o).call(this),t}get(i){return ot(this,$t,tn).call(this),R(this,ee).get(i)?.value}has(i){return ot(this,$t,tn).call(this),R(this,ee).has(i)}set(i,t){const e=R(this,ee).get(i);return e?e.value=t:(R(this,ee).set(i,ks(t)),ot(this,$t,_o).call(this)),this}},ee=new WeakMap,Bs=new WeakMap,$t=new WeakSet,tn=function(){R(this,Bs).value},_o=function(){R(this,Bs).value=!R(this,Bs).peek()},km=function*(){const i=R(this,ee).entries();for(const[t,e]of i)yield[t,e.value]},Fm=function*(){const i=R(this,ee).values();for(const t of i)yield t.value},Hf);function uI(i,t){const e=b.useRef(i);e.current=i;const n=fI(t);return b.useMemo(()=>YS(()=>e.current()),[n])}function dI(i){const t=b.useCallback(()=>i.peek(),[i]),e=b.useCallback(s=>{const r=aI(()=>[i.value],s);return()=>r.destroy()},[i]),n=b.useSyncExternalStore(e,t);return b.useDebugValue(n),n}function Nm(i,t){const e=uI(i,t),n=dI(e);return b.useDebugValue(n),n}function fI(i){const t=b.useRef();return(t.current==null||!gI(t.current,i))&&(t.current=i??[]),t.current}function gI(i,t){return i===t?!0:i.length===(t?.length??0)&&i.every((e,n)=>e===t[n])}const mI=200;var Qe,uc,vo,Gm;class pI{constructor(t){H(this,Qe);Rt(this,"olMap");Rt(this,"handle");Rt(this,"_mapViews",hI());Rt(this,"_activeViewId",ks(0));Rt(this,"backward",()=>{if(this.canBackward)ot(this,Qe,vo).call(this,this.activeViewId-1),ot(this,Qe,uc).call(this,this.activeViewId);else throw new Error("Backward is not possible at the moment")});Rt(this,"forward",()=>{if(this.canForward)ot(this,Qe,vo).call(this,this.activeViewId+1),ot(this,Qe,uc).call(this,this.activeViewId);else throw new Error("Forward is not possible at the moment")});this.olMap=t.olMap,this.handle=ot(this,Qe,Gm).call(this)}destroy(){this.handle&&Pe(this.handle),this.handle=void 0}get activeViewId(){return this._activeViewId.value}get mapViews(){return this._mapViews}get canBackward(){return this.mapViews.get(this.activeViewId-1)!=null}get canForward(){return this.mapViews.get(this.activeViewId+1)!=null}}Qe=new WeakSet,uc=function(t){const e=this.olMap.getView();this.olMap.setView(new me({center:this.mapViews.get(t).center,resolution:this.mapViews.get(t).resolution,projection:e.getProjection()}))},vo=function(t){this._activeViewId.value=t},Gm=function(){const t=this.olMap.on("moveend",()=>{e()}),e=()=>{const n=this.olMap,s=this.mapViews,r=n.getView(),a=r.getResolution(),o=r.getCenter();if(a!=null&&o!=null&&(o!==s.get(this.activeViewId)?.center||a!==s.get(this.activeViewId)?.resolution)){const l={resolution:a,center:o},h=this.activeViewId+1;for(const c of s.keys())c>h&&s.delete(c);for(const c of s.keys()){if(s.size{if(!i)return;let n=_h.get(i);return n==null?(n={vm:new pI(i),useCount:1},_h.set(i,n)):n.useCount++,e(n.vm),()=>{e(void 0),n.useCount--,n.useCount===0&&(n.vm.destroy(),_h.delete(i))}},[i]),t}b.forwardRef(function(t,e){return S.jsx(Vm,{viewDirection:"forward",ref:e,...t})});b.forwardRef(function(t,e){return S.jsx(Vm,{viewDirection:"backward",ref:e,...t})});const Vm=b.forwardRef(function(t,e){const n=Cu(),{viewDirection:s}=t,{map:r}=si(t),a=_I(r),{defaultClassName:o,buttonLabel:l,buttonIcon:h}=vI(n,s),{containerProps:c}=Ae(yc("view",o),t),u=Nm(()=>a?s==="forward"?a.canForward:a.canBackward:!1,[a,s]),d=()=>{a&&(s==="forward"?a.forward():a.backward())};return a&&S.jsx(Fa,{ref:e,...c,label:l,icon:h,onClick:d,isDisabled:!u})});function vI(i,t){switch(t){case"forward":return{defaultClassName:"view-forward",buttonLabel:i.formatMessage({id:"view-forward.title"}),buttonIcon:S.jsx(kS,{})};case"backward":return{defaultClassName:"view-backward",buttonLabel:i.formatMessage({id:"view-backward.title"}),buttonIcon:S.jsx(DS,{})}}}const yI="ol-app",xI=ts.bind(void 0,yI),bI="@open-pioneer/coordinate-viewer",MI=ts.bind(void 0,bI),CI=4,wI="decimal",EI=i=>{const{precision:t,displayProjectionCode:e,format:n}=i,{containerProps:s}=Ae("coordinate-viewer",i),{map:r}=si(i),a=r?.olMap,o=hm(a)?.getCode()??"";let{coordinates:l}=II(a);l=l&&e?TI(l,o,e):l;const h=SI(l,t,n),c=e||o,u=h?h+" "+c:"";return S.jsx(Mt,{...s,children:S.jsx(al,{className:"coordinate-viewer-text",children:u})})};function SI(i,t,e){const n=MI();return i?RI(i,t,n,e):""}function II(i){const[t,e]=b.useState();return b.useEffect(()=>{if(!i)return;const n=i.on("pointermove",s=>{e(s.coordinate)});return()=>Pe(n)},[i]),{coordinates:t}}function RI(i,t,e,n){if(i[0]==null||i[1]==null)return"";const s=t??CI,r=n??wI,[a,o]=i;let l;if(r==="degree"&&isFinite(a)&&isFinite(o)){const[h,c,u]=pf(a,e,s),[d,f,g]=pf(o,e,s),m=`${Math.abs(h)}°${c}'${u}"${0<=h?"(E)":"(W)"}`,p=`${Math.abs(d)}°${f}'${g}"${0<=d?"(N)":"(S)"}`;l=m+" "+p}else{const h=e.formatNumber(a,{maximumFractionDigits:s,minimumFractionDigits:s}),c=e.formatNumber(o,{maximumFractionDigits:s,minimumFractionDigits:s});l=h+" "+c}return l}function pf(i,t,e){const n=Math.floor(i),s=i-n,r=Math.floor(60*s),o=60*(60*s-r),l=t.formatNumber(o,{maximumFractionDigits:e,minimumFractionDigits:e});return[n,r,l]}function TI(i,t,e){return Pg(i,t,e)}const PI="@open-pioneer/scale-viewer",OI=ts.bind(void 0,PI),LI=i=>{const{containerProps:t}=Ae("scale-viewer",i),{map:e}=si(i),n=OI(),s=m2(e?.olMap),r=s?n.formatNumber(s):void 0;return S.jsx(Mt,{...t,children:r&&S.jsxs(al,{children:["1:",r]})})},zm="@open-pioneer/geolocation",AI=vc.bind(void 0,zm),jm=ts.bind(void 0,zm);function DI(i){return Cn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"},child:[]}]})(i)}const _f=ii("geolocation:GeolocationController"),vf=17;var $n,Hn;class kI{constructor(t,e,n){Rt(this,"supported",!!navigator.geolocation);Rt(this,"olMap");Rt(this,"positionHighlightLayer");Rt(this,"geolocation");Rt(this,"onError");Rt(this,"maxZoom",vf);Rt(this,"accuracyFeature");Rt(this,"positionFeature");Rt(this,"changeHandlers",[]);Rt(this,"setMapToPosition",!0);Rt(this,"trackingOptions",{});Rt(this,"isInitialZoom",!0);H(this,$n,ks(!1));H(this,Hn,ks(!1));this.olMap=t,this.onError=e,this.isInitialZoom=!0,this.accuracyFeature=new Ye,this.accuracyFeature.setStyle(xf()),this.positionFeature=new Ye,this.positionFeature.setStyle(yf()),this.positionHighlightLayer=new El({source:new Rl({features:[this.accuracyFeature,this.positionFeature]})}),this.positionHighlightLayer.setZIndex(bu);const s=n||FI();this.geolocation=new t1({tracking:!1,trackingOptions:s,projection:t.getView()?.getProjection()}),this.trackingOptions=s,this.geolocation.on("error",r=>this.handleGeolocationError(r))}destroy(){this.stopGeolocation(),this.geolocation?.setTracking(!1),this.geolocation.dispose(),this.accuracyFeature=void 0,this.positionFeature=void 0,this.positionHighlightLayer.dispose()}startGeolocation(){if(R(this,Hn).value)return;const t=this.olMap;new Promise(n=>{R(this,Hn).value=!0,R(this,$n).value=!0,this.geolocation?.setProjection(t.getView()?.getProjection()),this.geolocation?.setTracking(!0);const s=this.geolocation.on("change:accuracyGeometry",()=>{const l=this.geolocation.getAccuracyGeometry()||void 0;if(this.accuracyFeature?.setGeometry(l),this.accuracyFeature?.getGeometry()!==void 0&&n(),this.isInitialZoom){const h=this?.accuracyFeature?.getGeometry()?.getExtent();if(h){const c=Y2(h);if(!c)return;t.getView().fit(c,{maxZoom:this.maxZoom}),this.isInitialZoom=!1}}}),r=this.geolocation.on("change:position",()=>{const l=this.geolocation.getPosition();l&&(l[0]||l[1])!==void 0&&(this.positionFeature?.setGeometry(new qn(l)),this.setMapToPosition&&t.getView().setCenter(l),this.positionFeature?.getGeometry()!==void 0&&n())}),a=t.getView().on("change:resolution",()=>{this.setMapToPosition=this.isInitialZoom}),o=t.on("pointermove",l=>{l.dragging&&(this.setMapToPosition=!1)});this.changeHandlers.push(s,r,a,o),t.addLayer(this.positionHighlightLayer)}).then(()=>{R(this,$n).value=!1}).catch(n=>{_f.error("Failed to determine location",n)})}stopGeolocation(){this.geolocation?.setTracking(!1),R(this,Hn).value=!1,R(this,$n).value=!1,this.trackingOptions={},this.setMapToPosition=!0,this.isInitialZoom=!0,this.changeHandlers.forEach(t=>{Pe(t)}),this.changeHandlers=[],this.accuracyFeature?.setGeometry(void 0),this.positionFeature?.setGeometry(void 0),this.olMap.removeLayer(this.positionHighlightLayer)}get active(){return R(this,Hn).value}get loading(){return R(this,$n).value}setPositionFeatureStyle(t){this.positionFeature?.setStyle(t??yf())}setAccuracyFeatureStyle(t){this.accuracyFeature?.setStyle(t??xf())}setMaxZoom(t){this.maxZoom=t??vf}getMaxZoom(){return this.maxZoom}getPositionFeature(){return this.positionFeature}getAccuracyFeature(){return this.accuracyFeature}getTrackingOptions(){return this.trackingOptions}getGeolocation(){return this.geolocation}handleGeolocationError(t){_f.error("Error from geolocation API:",t.message),this.stopGeolocation();const e=(()=>{switch(t.code){case 1:return"permission-denied";case 2:return"position-unavailable";case 3:return"timeout";default:return"unknown"}})();this.onError(e)}}$n=new WeakMap,Hn=new WeakMap;const yf=()=>new Et({image:new is({radius:6,fill:new xe({color:"#3399CC"}),stroke:new kt({color:"#fff",width:2})})}),xf=()=>new Et({stroke:new kt({color:"#3399CC",width:3}),fill:new xe({color:"rgba(0, 0, 255, 0.05)"})}),FI=()=>({enableHighAccuracy:!0,timeout:6e4,maximumAge:6e5}),NI=b.forwardRef(function(t,e){const{maxZoom:n,positionFeatureStyle:s,accuracyFeatureStyle:r,trackingOptions:a}=t,{map:o}=si(t),l=VI(o,n,a,s,r);return l&&S.jsx(GI,{...t,controller:l,ref:e})}),GI=b.forwardRef(function(t,e){const{controller:n}=t,{containerProps:s}=Ae("geolocation",t),{isLoading:r,isActive:a}=Nm(()=>({isLoading:n.loading,isActive:n.active}),[n]),o=jm(),l=n.supported?a?o.formatMessage({id:"locateMeEnd"}):o.formatMessage({id:"locateMeStart"}):o.formatMessage({id:"locateNotSupported"}),h=()=>{n.active?n.stopGeolocation():n.startGeolocation()};return S.jsx(Fa,{ref:e,label:l,icon:S.jsx(DI,{}),onClick:()=>h(),isActive:a,isLoading:r,isDisabled:!n.supported,...s})});function VI(i,t,e,n,s){const r=jm(),a=AI("notifier.NotificationService"),[o,l]=b.useState();return b.useEffect(()=>{if(!i)return;const h=u=>{const d=r.formatMessage({id:"error"}),f=(()=>{switch(u){case"permission-denied":return r.formatMessage({id:"permissionDenied"});case"position-unavailable":return r.formatMessage({id:"positionUnavailable"});case"timeout":return r.formatMessage({id:"timeout"});case"unknown":return r.formatMessage({id:"unknownError"})}})();a.notify({level:"error",title:d,message:f})},c=new kI(i.olMap,h,e);return l(c),()=>{c.destroy(),l(void 0)}},[i,e,r,a]),b.useEffect(()=>{o?.setPositionFeatureStyle(n)},[o,n]),b.useEffect(()=>{o?.setAccuracyFeatureStyle(s)},[o,s]),b.useEffect(()=>{o?.setMaxZoom(t)},[o,t]),o}const zI="@open-pioneer/notifier",jI=vc.bind(void 0,zI),BI=r_({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"}),WI=!1;function UI(i){const{position:t="top-right"}=i,e=a_(),n=jI("notifier.NotificationService"),[s,r]=b.useState(!WI),a=Ih(l=>{const h=l.level==="error"?S.jsx(BI,{h:"100%",w:"100%"}):void 0;e({position:t,title:l.title,description:l.message||null,status:l.level,isClosable:!0,duration:l.displayDuration??null,icon:h})}),o=Ih(()=>{e.closeAll()});return b.useEffect(()=>{const l=n.registerHandler({showNotification:a,closeAll:o});return()=>l.destroy()},[s,n,a,o]),S.jsx(S.Fragment,{})}const $I="200px",HI="300px",XI=i=>{const{olLayer:t,height:e=$I,width:n=HI}=i,{containerProps:s}=Ae("overview-map",i),r=b.useRef(null),{map:a}=si(i);return b.useEffect(()=>{if(r.current&&a&&t){const o=a.olMap,l=new xS({className:"ol-overviewmap",layers:[t],collapsible:!1,collapsed:!1,target:r.current});return o.addControl(l),()=>{o.removeControl(l)}}},[a,t]),S.jsx(Mt,{height:e,width:n,ref:r,...s})},qI="@open-pioneer/measurement",YI=ts.bind(void 0,qI);class ZI{olMap;messages;activeFeatureStyle;layer;source;draw=void 0;activeMeasurement;predefinedMeasurements=new Map;finishedMeasurements=new Set;helpTooltip;resources=[];measurementChangedHandler;constructor(t,e){this.olMap=t,this.messages=e;const n=this.source=new Rl;this.layer=new El({source:n,zIndex:bu,properties:{name:"measurement-layer"}}),t.addLayer(this.layer);const s=t.on("pointermove",this.handlePointerMove.bind(this));this.resources.push({destroy(){Pe(s)}});const r=()=>{this.helpTooltip.element.classList.add("hidden")};t.getViewport().addEventListener("mouseout",r),this.resources.push({destroy(){t.getViewport().removeEventListener("mouseout",r)}}),this.helpTooltip=JI(this.olMap)}destroy(){this.stopMeasurement();for(const t of this.resources)t.destroy();this.resources=[],this.activeMeasurement=Xu(this.activeMeasurement);for(const t of this.finishedMeasurements)t.destroy();this.finishedMeasurements.clear(),this.helpTooltip.destroy(),this.olMap.removeLayer(this.layer),this.layer.dispose(),this.source.dispose(),this.measurementChangedHandler=void 0,this.predefinedMeasurements.clear()}getVectorLayer(){return this.layer}setFinishedFeatureStyle(t){this.layer.setStyle(t)}setMeasurementSourceChangedHandler(t){this.measurementChangedHandler=t}setPredefinedMeasurements(t){this.updatePredefinedMeasurements(t)}setActiveFeatureStyle(t){const e=su(t);this.activeFeatureStyle=(n,...s)=>{const r=n?.getGeometry()?.getType();if(r==="Polygon"||r==="LineString"||r==="Point")return e(n,...s)},this.draw?.getOverlay().setStyle(this.activeFeatureStyle)}clearMeasurements(){const t=this.source.getFeatures();this.source.clear(),t.forEach(e=>{this.raiseMeasurementsChangeEvent("remove-measurement",e)}),this.predefinedMeasurements.clear();for(const e of this.finishedMeasurements)e.destroy();this.finishedMeasurements.clear()}startMeasurement(t){if(this.draw)throw new Error("Internal error: another measurement interaction is still active.");const e=t==="area"?"Polygon":"LineString",n=this.draw=new iS({source:this.source,type:e,style:this.activeFeatureStyle});this.olMap.addInteraction(n);let s,r;n.on("drawstart",a=>{const o=a.feature;o&&(s=this.activeMeasurement=new bf("active",o,this),r=o.getGeometry()?.on("change",()=>{s?.updateTooltipContent(),s?.updateTooltipPosition()}))}),n.on("drawend",()=>{if(s&&s===this.activeMeasurement){const a=s;a.updateState("finished"),this.finishedMeasurements.add(a),this.raiseMeasurementsChangeEvent("add-measurement",a.feature),this.activeMeasurement=s=void 0}s=void 0,r&&Pe(r)}),n.on("drawabort",()=>{s&&(s.destroy(),s===this.activeMeasurement&&(this.activeMeasurement=void 0),s=void 0),r&&Pe(r)})}stopMeasurement(){this.draw&&(this.olMap.removeInteraction(this.draw),this.draw.abortDrawing(),this.draw.dispose(),this.draw=void 0),this.activeMeasurement=Xu(this.activeMeasurement)}handlePointerMove(t){if(t.dragging)return;const e=this.helpTooltip,n=tR(this.messages,this.activeMeasurement);e.setText(n),e.overlay.setPosition(t.coordinate),e.element.classList.remove("hidden")}updatePredefinedMeasurements(t){const e=t.filter(s=>!this.predefinedMeasurements.has(s)),n=[];for(const s of this.predefinedMeasurements.keys())t.includes(s)||n.push(s);e.forEach(s=>{const r=new Ye(s);this.source.addFeature(r);const a=new bf("finished",r,this);this.finishedMeasurements.add(a),this.predefinedMeasurements.set(s,a),this.raiseMeasurementsChangeEvent("add-measurement",r)}),n.forEach(s=>{const r=this.predefinedMeasurements.get(s);r&&(this.source.removeFeature(r.feature),this.finishedMeasurements.delete(r),r.destroy(),this.raiseMeasurementsChangeEvent("remove-measurement",r.feature)),this.predefinedMeasurements.delete(s)})}raiseMeasurementsChangeEvent(t,e){const n=e.getGeometry();this.measurementChangedHandler&&n&&this.measurementChangedHandler({kind:t,geometry:(n instanceof ye,n)})}}class bf{controller;feature;_state;tooltip;constructor(t,e,n){this.controller=n,this._state=t,this.feature=e,this.tooltip=QI(this.olMap),this.updateTooltipContent(),this.updateTooltipPosition(),this.tooltip.setActive(t==="active")}destroy(){this.tooltip.destroy()}get state(){return this._state}updateState(t){this._state!==t&&(this._state=t,this.tooltip.setActive(t==="active"))}updateTooltipContent(){const t=this.feature.getGeometry();if(!t)return;const e=this.olMap.getView().getProjection();let n;t instanceof ye?n=eR(t,e,this.messages):t instanceof Ue&&(n=iR(t,e,this.messages)),n&&this.tooltip.setHtml(n)}updateTooltipPosition(){const t=this.feature.getGeometry();if(!t)return;let e;if(t instanceof ye)e=t.getInteriorPoint().getCoordinates()||null;else if(t instanceof Ue)e=t.getLastCoordinate()||null;else return;this.tooltip.overlay.setPosition(e)}get olMap(){return this.controller.olMap}get messages(){return this.controller.messages}}const Mf=[0,-15],KI=[0,-7];function JI(i){const t=document.createElement("div");t.className="measurement-tooltip printing-hide hidden",t.role="tooltip";const e=document.createElement("span");t.appendChild(e);const n=new cu({element:t,offset:[15,0],positioning:"center-left"});return i.addOverlay(n),{overlay:n,element:t,destroy(){i.removeOverlay(n)},setText(s){e.textContent=s},setHtml(s){e.innerHTML=s}}}function QI(i){const t=document.createElement("div");t.role="tooltip",t.className="measurement-tooltip measurement-active-tooltip printing-hide";const e=document.createElement("span");t.appendChild(e);const n=new cu({element:t,offset:Mf,positioning:"bottom-center",stopEvent:!1,insertFirst:!1});return i.addOverlay(n),{overlay:n,element:t,destroy(){i.removeOverlay(n)},setActive(s){s?(t.className="measurement-tooltip measurement-active-tooltip printing-hide",n.setOffset(Mf)):(t.className="measurement-tooltip measurement-finished-tooltip",n.setOffset(KI))},setText(s){e.textContent=s},setHtml(s){e.innerHTML=s}}}function tR(i,t){if(t){const e=t.feature.getGeometry();if(e instanceof ye||e instanceof Ue)return i.getContinueMessage()}return i.getHelpMessage()}function eR(i,t,e){const n=Ig(i,{projection:t});let s;return n>=1e6?s=`${e.formatNumber(n/1e6)} km2`:s=`${e.formatNumber(n)} m2`,s}function iR(i,t,e){const n=Sg(i,{projection:t});let s;return n>=1e3?s=`${e.formatNumber(n/1e3)} km`:s=`${e.formatNumber(n)} m`,s}const nR=i=>{const t=YI(),{containerProps:e}=Ae("measurement",i),[n,s]=b.useState("distance"),r=c=>t.formatMessage({id:c}),a=si(i),o=sR(a.map,i,t);b.useEffect(()=>{if(o)return o.startMeasurement(n),()=>{o.stopMeasurement()}},[o,n]);function l(c){if(c==="distance"||c==="area")s(c);else throw new Error(`Unexpected measurement type: '${c}'.`)}function h(){o?.clearMeasurements()}return S.jsxs(Mt,{...e,children:[S.jsx(al,{mb:3,children:t.formatMessage({id:"measurementInfoText"})}),S.jsx(ig,{mb:4,alignItems:"center",children:S.jsxs(n_,{mb:2,children:[S.jsx(bc,{mb:1,children:r("measurementLabel")}),S.jsxs(dg,{value:n,onChange:c=>l(c.target.value),className:"measurement-select",children:[S.jsx("option",{value:"distance",children:r("distance")}),S.jsx("option",{value:"area",children:r("area")})]})]})}),S.jsx(eg,{padding:2,className:"measurement-delete-button",onClick:h,width:"100%",children:r("deleteMeasurementLabel")})]})};function sR(i,t,e){const{activeFeatureStyle:n,finishedFeatureStyle:s,onMeasurementsChange:r,predefinedMeasurements:a}=t,[o,l]=b.useState(void 0);return b.useEffect(()=>{if(!i)return;const h=new ZI(i.olMap,{getContinueMessage(){return e.formatMessage({id:"tooltips.continue"})},getHelpMessage(){return e.formatMessage({id:"tooltips.help"})},formatNumber(c){return e.formatNumber(c,{maximumFractionDigits:2})}});return l(h),()=>{h.destroy(),l(void 0)}},[i,e]),b.useEffect(()=>{o?.setActiveFeatureStyle(n??rR())},[o,n]),b.useEffect(()=>{o?.setFinishedFeatureStyle(s??aR())},[o,s]),b.useEffect(()=>{o?.setMeasurementSourceChangedHandler(r)},[o,r]),b.useEffect(()=>{o?.setPredefinedMeasurements(a??[])},[o,a]),o}function rR(){return[new Et({stroke:new kt({color:"#fff",lineDash:[10,10],width:5})}),new Et({fill:new xe({color:"rgba(0,0,0,0.15)"}),stroke:new kt({color:"rgba(0, 0, 0, 0.7)",lineDash:[10,10],width:3}),image:new is({radius:5,stroke:new kt({color:"rgba(0, 0, 0, 0.7)",width:2}),fill:new xe({color:"rgba(255, 255, 255, 0.2)"})})})]}function aR(){return[new Et({stroke:new kt({color:"#fff",width:5})}),new Et({stroke:new kt({color:"#0b96fc",width:3}),fill:new xe({color:"rgba(11,150,252,0.15)"})})]}function oR(i){return Cn({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M233.91,74.79,181.22,22.1a14,14,0,0,0-19.8,0L22.09,161.41a14,14,0,0,0,0,19.8L74.78,233.9a14,14,0,0,0,19.8,0L233.91,94.59A14,14,0,0,0,233.91,74.79ZM225.42,86.1,86.1,225.41h0a2,2,0,0,1-2.83,0L30.58,172.73a2,2,0,0,1,0-2.83L64,136.48l27.76,27.76a6,6,0,1,0,8.48-8.48L72.48,128,96,104.48l27.76,27.76a6,6,0,0,0,8.48-8.48L104.48,96,128,72.49l27.76,27.75a6,6,0,0,0,8.48-8.48L136.49,64,169.9,30.59a2,2,0,0,1,2.83,0l52.69,52.68A2,2,0,0,1,225.42,86.1Z"},child:[]}]})(i)}const lR="@open-pioneer/basemap-switcher",Iu=ts.bind(void 0,lR);function Cf(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),e.push.apply(e,n)}return e}function W(i){for(var t=1;ti.length)&&(t=i.length);for(var e=0,n=Array(t);e({x:i,y:i});function ER(i){const{x:t,y:e,width:n,height:s}=i;return{width:n,height:s,top:e,left:t,right:t+n,bottom:e+s,x:t,y:e}}function Um(i){return Hm(i)?(i.nodeName||"").toLowerCase():"#document"}function Wi(i){var t;return(i==null||(t=i.ownerDocument)==null?void 0:t.defaultView)||window}function $m(i){var t;return(t=(Hm(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function Hm(i){return i instanceof Node||i instanceof Wi(i).Node}function SR(i){return i instanceof Element||i instanceof Wi(i).Element}function Ru(i){return i instanceof HTMLElement||i instanceof Wi(i).HTMLElement}function Ef(i){return typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof Wi(i).ShadowRoot}function Xm(i){const{overflow:t,overflowX:e,overflowY:n,display:s}=Tu(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&!["inline","contents"].includes(s)}function IR(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function RR(i){return["html","body","#document"].includes(Um(i))}function Tu(i){return Wi(i).getComputedStyle(i)}function TR(i){if(Um(i)==="html")return i;const t=i.assignedSlot||i.parentNode||Ef(i)&&i.host||$m(i);return Ef(t)?t.host:t}function qm(i){const t=TR(i);return RR(t)?i.ownerDocument?i.ownerDocument.body:i.body:Ru(t)&&Xm(t)?t:qm(t)}function Zo(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);const s=qm(i),r=s===((n=i.ownerDocument)==null?void 0:n.body),a=Wi(s);if(r){const o=fc(a);return t.concat(a,a.visualViewport||[],Xm(s)?s:[],o&&e?Zo(o):[])}return t.concat(s,Zo(s,[],e))}function fc(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function PR(i){const t=Tu(i);let e=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Ru(i),r=s?i.offsetWidth:e,a=s?i.offsetHeight:n,o=qo(e)!==r||qo(n)!==a;return o&&(e=r,n=a),{width:e,height:n,$:o}}function Pu(i){return SR(i)?i:i.contextElement}function Sf(i){const t=Pu(i);if(!Ru(t))return Yo(1);const e=t.getBoundingClientRect(),{width:n,height:s,$:r}=PR(t);let a=(r?qo(e.width):e.width)/n,o=(r?qo(e.height):e.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const OR=Yo(0);function LR(i){const t=Wi(i);return!IR()||!t.visualViewport?OR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AR(i,t,e){return!1}function If(i,t,e,n){t===void 0&&(t=!1);const s=i.getBoundingClientRect(),r=Pu(i);let a=Yo(1);t&&(a=Sf(i));const o=AR()?LR(r):Yo(0);let l=(s.left+o.x)/a.x,h=(s.top+o.y)/a.y,c=s.width/a.x,u=s.height/a.y;if(r){const d=Wi(r),f=n;let g=d,m=fc(g);for(;m&&n&&f!==g;){const p=Sf(m),_=m.getBoundingClientRect(),v=Tu(m),y=_.left+(m.clientLeft+parseFloat(v.paddingLeft))*p.x,x=_.top+(m.clientTop+parseFloat(v.paddingTop))*p.y;l*=p.x,h*=p.y,c*=p.x,u*=p.y,l+=y,h+=x,g=Wi(m),m=fc(g)}}return ER({width:c,height:u,x:l,y:h})}function DR(i,t){let e=null,n;const s=$m(i);function r(){var o;clearTimeout(n),(o=e)==null||o.disconnect(),e=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),r();const{left:h,top:c,width:u,height:d}=i.getBoundingClientRect();if(o||t(),!u||!d)return;const f=lo(c),g=lo(s.clientWidth-(h+u)),m=lo(s.clientHeight-(c+d)),p=lo(h),v={rootMargin:-f+"px "+-g+"px "+-m+"px "+-p+"px",threshold:wR(0,CR(1,l))||1};let y=!0;function x(M){const w=M[0].intersectionRatio;if(w!==l){if(!y)return a();w?a(!1,w):n=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{e=new IntersectionObserver(x,{...v,root:s.ownerDocument})}catch{e=new IntersectionObserver(x,v)}e.observe(i)}return a(!0),r}function kR(i,t,e,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,h=Pu(i),c=s||r?[...h?Zo(h):[],...Zo(t)]:[];c.forEach(_=>{s&&_.addEventListener("scroll",e,{passive:!0}),r&&_.addEventListener("resize",e)});const u=h&&o?DR(h,e):null;let d=-1,f=null;a&&(f=new ResizeObserver(_=>{let[v]=_;v&&v.target===h&&f&&(f.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(t)})),e()}),h&&!l&&f.observe(h),f.observe(t));let g,m=l?If(i):null;l&&p();function p(){const _=If(i);m&&(_.x!==m.x||_.y!==m.y||_.width!==m.width||_.height!==m.height)&&e(),m=_,g=requestAnimationFrame(p)}return e(),()=>{var _;c.forEach(v=>{s&&v.removeEventListener("scroll",e),r&&v.removeEventListener("resize",e)}),u?.(),(_=f)==null||_.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var gc=b.useLayoutEffect,FR=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ko=function(){};function NR(i,t){return t?t[0]==="-"?i+t:i+"__"+t:i}function GR(i,t){for(var e=arguments.length,n=new Array(e>2?e-2:0),s=2;s-1}function zR(i){return Ll(i)?window.innerHeight:i.clientHeight}function Zm(i){return Ll(i)?window.pageYOffset:i.scrollTop}function Qo(i,t){if(Ll(i)){window.scrollTo(0,t);return}i.scrollTop=t}function jR(i){var t=getComputedStyle(i),e=t.position==="absolute",n=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var s=i;s=s.parentElement;)if(t=getComputedStyle(s),!(e&&t.position==="static")&&n.test(t.overflow+t.overflowY+t.overflowX))return s;return document.documentElement}function BR(i,t,e,n){return e*((i=i/n-1)*i*i+1)+t}function ho(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ko,s=Zm(i),r=t-s,a=10,o=0;function l(){o+=a;var h=BR(o,s,r,e);Qo(i,h),oe.bottom?Qo(i,Math.min(t.offsetTop+t.clientHeight-i.offsetHeight+s,i.scrollHeight)):n.top-s1?e-1:0),s=1;s=g)return{placement:"bottom",maxHeight:t};if(I>=g&&!a)return r&&ho(l,D,A),{placement:"bottom",maxHeight:t};if(!a&&I>=n||a&&E>=n){r&&ho(l,D,A);var G=a?E-x:I-x;return{placement:"bottom",maxHeight:G}}if(s==="auto"||a){var z=t,V=a?w:C;return V>=n&&(z=Math.min(V-x-o,t)),{placement:"top",maxHeight:z}}if(s==="bottom")return r&&Qo(l,D),{placement:"bottom",maxHeight:t};break;case"top":if(w>=g)return{placement:"top",maxHeight:t};if(C>=g&&!a)return r&&ho(l,k,A),{placement:"top",maxHeight:t};if(!a&&C>=n||a&&w>=n){var O=t;return(!a&&C>=n||a&&w>=n)&&(O=a?w-M:C-M),r&&ho(l,k,A),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(s,'".'))}return h}function QR(i){var t={bottom:"top",top:"bottom"};return i?t[i]:"bottom"}var Jm=function(t){return t==="auto"?"bottom":t},tT=function(t,e){var n,s=t.placement,r=t.theme,a=r.borderRadius,o=r.spacing,l=r.colors;return W((n={label:"menu"},ys(n,QR(s),"100%"),ys(n,"position","absolute"),ys(n,"width","100%"),ys(n,"zIndex",1),n),e?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:o.menuGutter,marginTop:o.menuGutter})},Qm=b.createContext(null),eT=function(t){var e=t.children,n=t.minMenuHeight,s=t.maxMenuHeight,r=t.menuPlacement,a=t.menuPosition,o=t.menuShouldScrollIntoView,l=t.theme,h=b.useContext(Qm)||{},c=h.setPortalPlacement,u=b.useRef(null),d=b.useState(s),f=Wt(d,2),g=f[0],m=f[1],p=b.useState(null),_=Wt(p,2),v=_[0],y=_[1],x=l.spacing.controlHeight;return gc(function(){var M=u.current;if(M){var w=a==="fixed",E=o&&!w,C=JR({maxHeight:s,menuEl:M,minHeight:n,placement:r,shouldScroll:E,isFixedPosition:w,controlHeight:x});m(C.maxHeight),y(C.placement),c?.(C.placement)}},[s,r,a,o,n,c,x]),e({ref:u,placerProps:W(W({},t),{},{placement:v||Jm(r),maxHeight:g})})},iT=function(t){var e=t.children,n=t.innerRef,s=t.innerProps;return Y("div",K({},Ft(t,"menu",{menu:!0}),{ref:n},s),e)},nT=iT,sT=function(t,e){var n=t.maxHeight,s=t.theme.spacing.baseUnit;return W({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},e?{}:{paddingBottom:s,paddingTop:s})},rT=function(t){var e=t.children,n=t.innerProps,s=t.innerRef,r=t.isMulti;return Y("div",K({},Ft(t,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:s},n),e)},tp=function(t,e){var n=t.theme,s=n.spacing.baseUnit,r=n.colors;return W({textAlign:"center"},e?{}:{color:r.neutral40,padding:"".concat(s*2,"px ").concat(s*3,"px")})},aT=tp,oT=tp,lT=function(t){var e=t.children,n=e===void 0?"No options":e,s=t.innerProps,r=ri(t,ZR);return Y("div",K({},Ft(W(W({},r),{},{children:n,innerProps:s}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),s),n)},hT=function(t){var e=t.children,n=e===void 0?"Loading...":e,s=t.innerProps,r=ri(t,KR);return Y("div",K({},Ft(W(W({},r),{},{children:n,innerProps:s}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),s),n)},cT=function(t){var e=t.rect,n=t.offset,s=t.position;return{left:e.left,position:s,top:n,width:e.width,zIndex:1}},uT=function(t){var e=t.appendTo,n=t.children,s=t.controlElement,r=t.innerProps,a=t.menuPlacement,o=t.menuPosition,l=b.useRef(null),h=b.useRef(null),c=b.useState(Jm(a)),u=Wt(c,2),d=u[0],f=u[1],g=b.useMemo(function(){return{setPortalPlacement:f}},[]),m=b.useState(null),p=Wt(m,2),_=p[0],v=p[1],y=b.useCallback(function(){if(s){var E=WR(s),C=o==="fixed"?0:window.pageYOffset,I=E[d]+C;(I!==_?.offset||E.left!==_?.rect.left||E.width!==_?.rect.width)&&v({offset:I,rect:E})}},[s,o,d,_?.offset,_?.rect.left,_?.rect.width]);gc(function(){y()},[y]);var x=b.useCallback(function(){typeof h.current=="function"&&(h.current(),h.current=null),s&&l.current&&(h.current=kR(s,l.current,y,{elementResize:"ResizeObserver"in window}))},[s,y]);gc(function(){x()},[x]);var M=b.useCallback(function(E){l.current=E,x()},[x]);if(!e&&o!=="fixed"||!_)return null;var w=Y("div",K({ref:M},Ft(W(W({},t),{},{offset:_.offset,position:o,rect:_.rect}),"menuPortal",{"menu-portal":!0}),r),n);return Y(Qm.Provider,{value:g},e?Zf.createPortal(w,e):w)},dT=function(t){var e=t.isDisabled,n=t.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:e?"none":void 0,position:"relative"}},fT=function(t){var e=t.children,n=t.innerProps,s=t.isDisabled,r=t.isRtl;return Y("div",K({},Ft(t,"container",{"--is-disabled":s,"--is-rtl":r}),n),e)},gT=function(t,e){var n=t.theme.spacing,s=t.isMulti,r=t.hasValue,a=t.selectProps.controlShouldRenderValue;return W({alignItems:"center",display:s&&r&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},e?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px")})},mT=function(t){var e=t.children,n=t.innerProps,s=t.isMulti,r=t.hasValue;return Y("div",K({},Ft(t,"valueContainer",{"value-container":!0,"value-container--is-multi":s,"value-container--has-value":r}),n),e)},pT=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},_T=function(t){var e=t.children,n=t.innerProps;return Y("div",K({},Ft(t,"indicatorsContainer",{indicators:!0}),n),e)},Pf,vT=["size"],yT=["innerProps","isRtl","size"],xT={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},ep=function(t){var e=t.size,n=ri(t,vT);return Y("svg",K({height:e,width:e,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:xT},n))},Ou=function(t){return Y(ep,K({size:20},t),Y("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},ip=function(t){return Y(ep,K({size:20},t),Y("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},np=function(t,e){var n=t.isFocused,s=t.theme,r=s.spacing.baseUnit,a=s.colors;return W({label:"indicatorContainer",display:"flex",transition:"color 150ms"},e?{}:{color:n?a.neutral60:a.neutral20,padding:r*2,":hover":{color:n?a.neutral80:a.neutral40}})},bT=np,MT=function(t){var e=t.children,n=t.innerProps;return Y("div",K({},Ft(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),e||Y(ip,null))},CT=np,wT=function(t){var e=t.children,n=t.innerProps;return Y("div",K({},Ft(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),e||Y(Ou,null))},ET=function(t,e){var n=t.isDisabled,s=t.theme,r=s.spacing.baseUnit,a=s.colors;return W({label:"indicatorSeparator",alignSelf:"stretch",width:1},e?{}:{backgroundColor:n?a.neutral10:a.neutral20,marginBottom:r*2,marginTop:r*2})},ST=function(t){var e=t.innerProps;return Y("span",K({},e,Ft(t,"indicatorSeparator",{"indicator-separator":!0})))},IT=Zp(Pf||(Pf=MR([` - 0%, 80%, 100% { opacity: 0; } - 40% { opacity: 1; } -`]))),RT=function(t,e){var n=t.isFocused,s=t.size,r=t.theme,a=r.colors,o=r.spacing.baseUnit;return W({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:s,lineHeight:1,marginRight:s,textAlign:"center",verticalAlign:"middle"},e?{}:{color:n?a.neutral60:a.neutral20,padding:o*2})},vh=function(t){var e=t.delay,n=t.offset;return Y("span",{css:Jf({animation:"".concat(IT," 1s ease-in-out ").concat(e,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},TT=function(t){var e=t.innerProps,n=t.isRtl,s=t.size,r=s===void 0?4:s,a=ri(t,yT);return Y("div",K({},Ft(W(W({},a),{},{innerProps:e,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),e),Y(vh,{delay:0,offset:n}),Y(vh,{delay:160,offset:!0}),Y(vh,{delay:320,offset:!n}))},PT=function(t,e){var n=t.isDisabled,s=t.isFocused,r=t.theme,a=r.colors,o=r.borderRadius,l=r.spacing;return W({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},e?{}:{backgroundColor:n?a.neutral5:a.neutral0,borderColor:n?a.neutral10:s?a.primary:a.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:s?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:s?a.primary:a.neutral30}})},OT=function(t){var e=t.children,n=t.isDisabled,s=t.isFocused,r=t.innerRef,a=t.innerProps,o=t.menuIsOpen;return Y("div",K({ref:r},Ft(t,"control",{control:!0,"control--is-disabled":n,"control--is-focused":s,"control--menu-is-open":o}),a,{"aria-disabled":n||void 0}),e)},LT=OT,AT=["data"],DT=function(t,e){var n=t.theme.spacing;return e?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},kT=function(t){var e=t.children,n=t.cx,s=t.getStyles,r=t.getClassNames,a=t.Heading,o=t.headingProps,l=t.innerProps,h=t.label,c=t.theme,u=t.selectProps;return Y("div",K({},Ft(t,"group",{group:!0}),l),Y(a,K({},o,{selectProps:u,theme:c,getStyles:s,getClassNames:r,cx:n}),h),Y("div",null,e))},FT=function(t,e){var n=t.theme,s=n.colors,r=n.spacing;return W({label:"group",cursor:"default",display:"block"},e?{}:{color:s.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:r.baseUnit*3,paddingRight:r.baseUnit*3,textTransform:"uppercase"})},NT=function(t){var e=Ym(t);e.data;var n=ri(e,AT);return Y("div",K({},Ft(t,"groupHeading",{"group-heading":!0}),n))},GT=kT,VT=["innerRef","isDisabled","isHidden","inputClassName"],zT=function(t,e){var n=t.isDisabled,s=t.value,r=t.theme,a=r.spacing,o=r.colors;return W(W({visibility:n?"hidden":"visible",transform:s?"translateZ(0)":""},jT),e?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:o.neutral80})},sp={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},jT={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":W({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},sp)},BT=function(t){return W({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},sp)},WT=function(t){var e=t.cx,n=t.value,s=Ym(t),r=s.innerRef,a=s.isDisabled,o=s.isHidden,l=s.inputClassName,h=ri(s,VT);return Y("div",K({},Ft(t,"input",{"input-container":!0}),{"data-value":n||""}),Y("input",K({className:e({input:!0},l),ref:r,style:BT(o),disabled:a},h)))},UT=WT,$T=function(t,e){var n=t.theme,s=n.spacing,r=n.borderRadius,a=n.colors;return W({label:"multiValue",display:"flex",minWidth:0},e?{}:{backgroundColor:a.neutral10,borderRadius:r/2,margin:s.baseUnit/2})},HT=function(t,e){var n=t.theme,s=n.borderRadius,r=n.colors,a=t.cropWithEllipsis;return W({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},e?{}:{borderRadius:s/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},XT=function(t,e){var n=t.theme,s=n.spacing,r=n.borderRadius,a=n.colors,o=t.isFocused;return W({alignItems:"center",display:"flex"},e?{}:{borderRadius:r/2,backgroundColor:o?a.dangerLight:void 0,paddingLeft:s.baseUnit,paddingRight:s.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},rp=function(t){var e=t.children,n=t.innerProps;return Y("div",n,e)},qT=rp,YT=rp;function ZT(i){var t=i.children,e=i.innerProps;return Y("div",K({role:"button"},e),t||Y(Ou,{size:14}))}var KT=function(t){var e=t.children,n=t.components,s=t.data,r=t.innerProps,a=t.isDisabled,o=t.removeProps,l=t.selectProps,h=n.Container,c=n.Label,u=n.Remove;return Y(h,{data:s,innerProps:W(W({},Ft(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),r),selectProps:l},Y(c,{data:s,innerProps:W({},Ft(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},e),Y(u,{data:s,innerProps:W(W({},Ft(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(e||"option")},o),selectProps:l}))},JT=KT,QT=function(t,e){var n=t.isDisabled,s=t.isFocused,r=t.isSelected,a=t.theme,o=a.spacing,l=a.colors;return W({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},e?{}:{backgroundColor:r?l.primary:s?l.primary25:"transparent",color:n?l.neutral20:r?l.neutral0:"inherit",padding:"".concat(o.baseUnit*2,"px ").concat(o.baseUnit*3,"px"),":active":{backgroundColor:n?void 0:r?l.primary:l.primary50}})},tP=function(t){var e=t.children,n=t.isDisabled,s=t.isFocused,r=t.isSelected,a=t.innerRef,o=t.innerProps;return Y("div",K({},Ft(t,"option",{option:!0,"option--is-disabled":n,"option--is-focused":s,"option--is-selected":r}),{ref:a,"aria-disabled":n},o),e)},eP=tP,iP=function(t,e){var n=t.theme,s=n.spacing,r=n.colors;return W({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},e?{}:{color:r.neutral50,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},nP=function(t){var e=t.children,n=t.innerProps;return Y("div",K({},Ft(t,"placeholder",{placeholder:!0}),n),e)},sP=nP,rP=function(t,e){var n=t.isDisabled,s=t.theme,r=s.spacing,a=s.colors;return W({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e?{}:{color:n?a.neutral40:a.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},aP=function(t){var e=t.children,n=t.isDisabled,s=t.innerProps;return Y("div",K({},Ft(t,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),s),e)},oP=aP,lP={ClearIndicator:wT,Control:LT,DropdownIndicator:MT,DownChevron:ip,CrossIcon:Ou,Group:GT,GroupHeading:NT,IndicatorsContainer:_T,IndicatorSeparator:ST,Input:UT,LoadingIndicator:TT,Menu:nT,MenuList:rT,MenuPortal:uT,LoadingMessage:hT,NoOptionsMessage:lT,MultiValue:JT,MultiValueContainer:qT,MultiValueLabel:YT,MultiValueRemove:ZT,Option:eP,Placeholder:sP,SelectContainer:fT,SingleValue:oP,ValueContainer:mT},hP=function(t){return W(W({},lP),t.components)},Of=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function cP(i,t){return!!(i===t||Of(i)&&Of(t))}function uP(i,t){if(i.length!==t.length)return!1;for(var e=0;e1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return a?"option ".concat(s," is disabled. Select another option."):"option ".concat(s,", selected.");default:return""}},onFocus:function(t){var e=t.context,n=t.focused,s=t.options,r=t.label,a=r===void 0?"":r,o=t.selectValue,l=t.isDisabled,h=t.isSelected,c=t.isAppleDevice,u=function(m,p){return m&&m.length?"".concat(m.indexOf(p)+1," of ").concat(m.length):""};if(e==="value"&&o)return"value ".concat(a," focused, ").concat(u(o,n),".");if(e==="menu"&&c){var d=l?" disabled":"",f="".concat(h?" selected":"").concat(d);return"".concat(a).concat(f,", ").concat(u(s,n),".")}return""},onFilter:function(t){var e=t.inputValue,n=t.resultsMessage;return"".concat(n).concat(e?" for search term "+e:"",".")}},pP=function(t){var e=t.ariaSelection,n=t.focusedOption,s=t.focusedValue,r=t.focusableOptions,a=t.isFocused,o=t.selectValue,l=t.selectProps,h=t.id,c=t.isAppleDevice,u=l.ariaLiveMessages,d=l.getOptionLabel,f=l.inputValue,g=l.isMulti,m=l.isOptionDisabled,p=l.isSearchable,_=l.menuIsOpen,v=l.options,y=l.screenReaderStatus,x=l.tabSelectsValue,M=l.isLoading,w=l["aria-label"],E=l["aria-live"],C=b.useMemo(function(){return W(W({},mP),u||{})},[u]),I=b.useMemo(function(){var V="";if(e&&C.onChange){var O=e.option,J=e.options,B=e.removedValue,at=e.removedValues,X=e.value,nt=function(wt){return Array.isArray(wt)?null:wt},j=B||O||nt(X),U=j?d(j):"",P=J||at||void 0,lt=P?P.map(d):[],ct=W({isDisabled:j&&m(j,o),label:U,labels:lt},e);V=C.onChange(ct)}return V},[e,C,m,o,d]),D=b.useMemo(function(){var V="",O=n||s,J=!!(n&&o&&o.includes(n));if(O&&C.onFocus){var B={focused:O,label:d(O),isDisabled:m(O,o),isSelected:J,options:r,context:O===n?"menu":"value",selectValue:o,isAppleDevice:c};V=C.onFocus(B)}return V},[n,s,d,m,C,r,o,c]),k=b.useMemo(function(){var V="";if(_&&v.length&&!M&&C.onFilter){var O=y({count:r.length});V=C.onFilter({inputValue:f,resultsMessage:O})}return V},[r,f,_,C,v,y,M]),A=e?.action==="initial-input-focus",G=b.useMemo(function(){var V="";if(C.guidance){var O=s?"value":_?"menu":"input";V=C.guidance({"aria-label":w,context:O,isDisabled:n&&m(n,o),isMulti:g,isSearchable:p,tabSelectsValue:x,isInitialFocus:A})}return V},[w,n,s,g,m,p,_,C,o,x,A]),z=Y(b.Fragment,null,Y("span",{id:"aria-selection"},I),Y("span",{id:"aria-focused"},D),Y("span",{id:"aria-results"},k),Y("span",{id:"aria-guidance"},G));return Y(b.Fragment,null,Y(Lf,{id:h},A&&z),Y(Lf,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!A&&z))},_P=pP,mc=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],vP=new RegExp("["+mc.map(function(i){return i.letters}).join("")+"]","g"),ap={};for(var yh=0;yh-1}},MP=["innerRef"];function CP(i){var t=i.innerRef,e=ri(i,MP),n=YR(e,"onExited","in","enter","exit","appear");return Y("input",K({ref:t},n,{css:Jf({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var wP=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function EP(i){var t=i.isEnabled,e=i.onBottomArrive,n=i.onBottomLeave,s=i.onTopArrive,r=i.onTopLeave,a=b.useRef(!1),o=b.useRef(!1),l=b.useRef(0),h=b.useRef(null),c=b.useCallback(function(p,_){if(h.current!==null){var v=h.current,y=v.scrollTop,x=v.scrollHeight,M=v.clientHeight,w=h.current,E=_>0,C=x-M-y,I=!1;C>_&&a.current&&(n&&n(p),a.current=!1),E&&o.current&&(r&&r(p),o.current=!1),E&&_>C?(e&&!a.current&&e(p),w.scrollTop=x,I=!0,a.current=!0):!E&&-_>y&&(s&&!o.current&&s(p),w.scrollTop=0,I=!0,o.current=!0),I&&wP(p)}},[e,n,s,r]),u=b.useCallback(function(p){c(p,p.deltaY)},[c]),d=b.useCallback(function(p){l.current=p.changedTouches[0].clientY},[]),f=b.useCallback(function(p){var _=l.current-p.changedTouches[0].clientY;c(p,_)},[c]),g=b.useCallback(function(p){if(p){var _=HR?{passive:!1}:!1;p.addEventListener("wheel",u,_),p.addEventListener("touchstart",d,_),p.addEventListener("touchmove",f,_)}},[f,d,u]),m=b.useCallback(function(p){p&&(p.removeEventListener("wheel",u,!1),p.removeEventListener("touchstart",d,!1),p.removeEventListener("touchmove",f,!1))},[f,d,u]);return b.useEffect(function(){if(t){var p=h.current;return g(p),function(){m(p)}}},[t,g,m]),function(p){h.current=p}}var Df=["boxSizing","height","overflow","paddingRight","position"],kf={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ff(i){i.preventDefault()}function Nf(i){i.stopPropagation()}function Gf(){var i=this.scrollTop,t=this.scrollHeight,e=i+this.offsetHeight;i===0?this.scrollTop=1:e===t&&(this.scrollTop=i-1)}function Vf(){return"ontouchstart"in window||navigator.maxTouchPoints}var zf=!!(typeof window<"u"&&window.document&&window.document.createElement),Cr=0,us={capture:!1,passive:!1};function SP(i){var t=i.isEnabled,e=i.accountForScrollbars,n=e===void 0?!0:e,s=b.useRef({}),r=b.useRef(null),a=b.useCallback(function(l){if(zf){var h=document.body,c=h&&h.style;if(n&&Df.forEach(function(g){var m=c&&c[g];s.current[g]=m}),n&&Cr<1){var u=parseInt(s.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,f=window.innerWidth-d+u||0;Object.keys(kf).forEach(function(g){var m=kf[g];c&&(c[g]=m)}),c&&(c.paddingRight="".concat(f,"px"))}h&&Vf()&&(h.addEventListener("touchmove",Ff,us),l&&(l.addEventListener("touchstart",Gf,us),l.addEventListener("touchmove",Nf,us))),Cr+=1}},[n]),o=b.useCallback(function(l){if(zf){var h=document.body,c=h&&h.style;Cr=Math.max(Cr-1,0),n&&Cr<1&&Df.forEach(function(u){var d=s.current[u];c&&(c[u]=d)}),h&&Vf()&&(h.removeEventListener("touchmove",Ff,us),l&&(l.removeEventListener("touchstart",Gf,us),l.removeEventListener("touchmove",Nf,us)))}},[n]);return b.useEffect(function(){if(t){var l=r.current;return a(l),function(){o(l)}}},[t,a,o]),function(l){r.current=l}}var IP=function(t){var e=t.target;return e.ownerDocument.activeElement&&e.ownerDocument.activeElement.blur()},RP={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function TP(i){var t=i.children,e=i.lockEnabled,n=i.captureEnabled,s=n===void 0?!0:n,r=i.onBottomArrive,a=i.onBottomLeave,o=i.onTopArrive,l=i.onTopLeave,h=EP({isEnabled:s,onBottomArrive:r,onBottomLeave:a,onTopArrive:o,onTopLeave:l}),c=SP({isEnabled:e}),u=function(f){h(f),c(f)};return Y(b.Fragment,null,e&&Y("div",{onClick:IP,css:RP}),t(u))}var PP={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},OP=function(t){var e=t.name,n=t.onFocus;return Y("input",{required:!0,name:e,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:PP,value:"",onChange:function(){}})},LP=OP;function Lu(i){var t;return typeof window<"u"&&window.navigator!=null?i.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function AP(){return Lu(/^iPhone/i)}function lp(){return Lu(/^Mac/i)}function DP(){return Lu(/^iPad/i)||lp()&&navigator.maxTouchPoints>1}function kP(){return AP()||DP()}function FP(){return lp()||kP()}var NP=function(t){return t.label},hp=function(t){return t.label},cp=function(t){return t.value},GP=function(t){return!!t.isDisabled},VP={clearIndicator:CT,container:dT,control:PT,dropdownIndicator:bT,group:DT,groupHeading:FT,indicatorsContainer:pT,indicatorSeparator:ET,input:zT,loadingIndicator:RT,loadingMessage:oT,menu:tT,menuList:sT,menuPortal:cT,multiValue:$T,multiValueLabel:HT,multiValueRemove:XT,noOptionsMessage:aT,option:QT,placeholder:iP,singleValue:rP,valueContainer:gT},zP={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},jP=4,up=4,BP=38,WP=up*2,UP={baseUnit:up,controlHeight:BP,menuGutter:WP},Mh={borderRadius:jP,colors:zP,spacing:UP},$P={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Tf(),captureMenuScroll:!Tf(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:bP(),formatGroupLabel:NP,getOptionLabel:hp,getOptionValue:cp,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:GP,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!UR(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var e=t.count;return"".concat(e," result").concat(e!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function jf(i,t,e,n){var s=gp(i,t,e),r=mp(i,t,e),a=fp(i,t),o=tl(i,t);return{type:"option",data:t,isDisabled:s,isSelected:r,label:a,value:o,index:n}}function yo(i,t){return i.options.map(function(e,n){if("options"in e){var s=e.options.map(function(a,o){return jf(i,a,t,o)}).filter(function(a){return Wf(i,a)});return s.length>0?{type:"group",data:e,options:s,index:n}:void 0}var r=jf(i,e,t,n);return Wf(i,r)?r:void 0}).filter(XR)}function dp(i){return i.reduce(function(t,e){return e.type==="group"?t.push.apply(t,Fs(e.options.map(function(n){return n.data}))):t.push(e.data),t},[])}function Bf(i,t){return i.reduce(function(e,n){return n.type==="group"?e.push.apply(e,Fs(n.options.map(function(s){return{data:s.data,id:"".concat(t,"-").concat(n.index,"-").concat(s.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function HP(i,t){return dp(yo(i,t))}function Wf(i,t){var e=i.inputValue,n=e===void 0?"":e,s=t.data,r=t.isSelected,a=t.label,o=t.value;return(!_p(i)||!r)&&pp(i,{label:a,value:o,data:s},n)}function XP(i,t){var e=i.focusedValue,n=i.selectValue,s=n.indexOf(e);if(s>-1){var r=t.indexOf(e);if(r>-1)return e;if(s-1?e:t[0]}var Ch=function(t,e){var n,s=(n=t.find(function(r){return r.data===e}))===null||n===void 0?void 0:n.id;return s||null},fp=function(t,e){return t.getOptionLabel(e)},tl=function(t,e){return t.getOptionValue(e)};function gp(i,t,e){return typeof i.isOptionDisabled=="function"?i.isOptionDisabled(t,e):!1}function mp(i,t,e){if(e.indexOf(t)>-1)return!0;if(typeof i.isOptionSelected=="function")return i.isOptionSelected(t,e);var n=tl(i,t);return e.some(function(s){return tl(i,s)===n})}function pp(i,t,e){return i.filterOption?i.filterOption(t,e):!0}var _p=function(t){var e=t.hideSelectedOptions,n=t.isMulti;return e===void 0?n:e},YP=1,Ga=function(i){mR(e,i);var t=vR(e);function e(n){var s;if(fR(this,e),s=t.call(this,n),s.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},s.blockOptionHover=!1,s.isComposing=!1,s.commonProps=void 0,s.initialTouchX=0,s.initialTouchY=0,s.openAfterFocus=!1,s.scrollToFocusedOptionOnUpdate=!1,s.userIsDragging=void 0,s.isAppleDevice=FP(),s.controlRef=null,s.getControlRef=function(l){s.controlRef=l},s.focusedOptionRef=null,s.getFocusedOptionRef=function(l){s.focusedOptionRef=l},s.menuListRef=null,s.getMenuListRef=function(l){s.menuListRef=l},s.inputRef=null,s.getInputRef=function(l){s.inputRef=l},s.focus=s.focusInput,s.blur=s.blurInput,s.onChange=function(l,h){var c=s.props,u=c.onChange,d=c.name;h.name=d,s.ariaOnChange(l,h),u(l,h)},s.setValue=function(l,h,c){var u=s.props,d=u.closeMenuOnSelect,f=u.isMulti,g=u.inputValue;s.onInputChange("",{action:"set-value",prevInputValue:g}),d&&(s.setState({inputIsHiddenAfterUpdate:!f}),s.onMenuClose()),s.setState({clearFocusValueOnUpdate:!0}),s.onChange(l,{action:h,option:c})},s.selectOption=function(l){var h=s.props,c=h.blurInputOnSelect,u=h.isMulti,d=h.name,f=s.state.selectValue,g=u&&s.isOptionSelected(l,f),m=s.isOptionDisabled(l,f);if(g){var p=s.getOptionValue(l);s.setValue(f.filter(function(_){return s.getOptionValue(_)!==p}),"deselect-option",l)}else if(!m)u?s.setValue([].concat(Fs(f),[l]),"select-option",l):s.setValue(l,"select-option");else{s.ariaOnChange(l,{action:"select-option",option:l,name:d});return}c&&s.blurInput()},s.removeValue=function(l){var h=s.props.isMulti,c=s.state.selectValue,u=s.getOptionValue(l),d=c.filter(function(g){return s.getOptionValue(g)!==u}),f=Pr(h,d,d[0]||null);s.onChange(f,{action:"remove-value",removedValue:l}),s.focusInput()},s.clearValue=function(){var l=s.state.selectValue;s.onChange(Pr(s.props.isMulti,[],null),{action:"clear",removedValues:l})},s.popValue=function(){var l=s.props.isMulti,h=s.state.selectValue,c=h[h.length-1],u=h.slice(0,h.length-1),d=Pr(l,u,u[0]||null);s.onChange(d,{action:"pop-value",removedValue:c})},s.getFocusedOptionId=function(l){return Ch(s.state.focusableOptionsWithIds,l)},s.getFocusableOptionsWithIds=function(){return Bf(yo(s.props,s.state.selectValue),s.getElementId("option"))},s.getValue=function(){return s.state.selectValue},s.cx=function(){for(var l=arguments.length,h=new Array(l),c=0;cf||d>f}},s.onTouchEnd=function(l){s.userIsDragging||(s.controlRef&&!l.composedPath().includes(s.controlRef)&&s.menuListRef&&!l.composedPath().includes(s.menuListRef)&&s.blurInput(),s.initialTouchX=0,s.initialTouchY=0)},s.onControlTouchEnd=function(l){s.userIsDragging||s.onControlMouseDown(l)},s.onClearIndicatorTouchEnd=function(l){s.userIsDragging||s.onClearIndicatorMouseDown(l)},s.onDropdownIndicatorTouchEnd=function(l){s.userIsDragging||s.onDropdownIndicatorMouseDown(l)},s.handleInputChange=function(l){var h=s.props.inputValue,c=l.currentTarget.value;s.setState({inputIsHiddenAfterUpdate:!1}),s.onInputChange(c,{action:"input-change",prevInputValue:h}),s.props.menuIsOpen||s.onMenuOpen()},s.onInputFocus=function(l){s.props.onFocus&&s.props.onFocus(l),s.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(s.openAfterFocus||s.props.openMenuOnFocus)&&s.openMenu("first"),s.openAfterFocus=!1},s.onInputBlur=function(l){var h=s.props.inputValue;if(s.menuListRef&&s.menuListRef.contains(document.activeElement)){s.inputRef.focus();return}s.props.onBlur&&s.props.onBlur(l),s.onInputChange("",{action:"input-blur",prevInputValue:h}),s.onMenuClose(),s.setState({focusedValue:null,isFocused:!1})},s.onOptionHover=function(l){if(!(s.blockOptionHover||s.state.focusedOption===l)){var h=s.getFocusableOptions(),c=h.indexOf(l);s.setState({focusedOption:l,focusedOptionId:c>-1?s.getFocusedOptionId(l):null})}},s.shouldHideSelectedOptions=function(){return _p(s.props)},s.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),s.focus()},s.onKeyDown=function(l){var h=s.props,c=h.isMulti,u=h.backspaceRemovesValue,d=h.escapeClearsValue,f=h.inputValue,g=h.isClearable,m=h.isDisabled,p=h.menuIsOpen,_=h.onKeyDown,v=h.tabSelectsValue,y=h.openMenuOnFocus,x=s.state,M=x.focusedOption,w=x.focusedValue,E=x.selectValue;if(!m&&!(typeof _=="function"&&(_(l),l.defaultPrevented))){switch(s.blockOptionHover=!0,l.key){case"ArrowLeft":if(!c||f)return;s.focusValue("previous");break;case"ArrowRight":if(!c||f)return;s.focusValue("next");break;case"Delete":case"Backspace":if(f)return;if(w)s.removeValue(w);else{if(!u)return;c?s.popValue():g&&s.clearValue()}break;case"Tab":if(s.isComposing||l.shiftKey||!p||!v||!M||y&&s.isOptionSelected(M,E))return;s.selectOption(M);break;case"Enter":if(l.keyCode===229)break;if(p){if(!M||s.isComposing)return;s.selectOption(M);break}return;case"Escape":p?(s.setState({inputIsHiddenAfterUpdate:!1}),s.onInputChange("",{action:"menu-close",prevInputValue:f}),s.onMenuClose()):g&&d&&s.clearValue();break;case" ":if(f)return;if(!p){s.openMenu("first");break}if(!M)return;s.selectOption(M);break;case"ArrowUp":p?s.focusOption("up"):s.openMenu("last");break;case"ArrowDown":p?s.focusOption("down"):s.openMenu("first");break;case"PageUp":if(!p)return;s.focusOption("pageup");break;case"PageDown":if(!p)return;s.focusOption("pagedown");break;case"Home":if(!p)return;s.focusOption("first");break;case"End":if(!p)return;s.focusOption("last");break;default:return}l.preventDefault()}},s.state.instancePrefix="react-select-"+(s.props.instanceId||++YP),s.state.selectValue=Jo(n.value),n.menuIsOpen&&s.state.selectValue.length){var r=s.getFocusableOptionsWithIds(),a=s.buildFocusableOptions(),o=a.indexOf(s.state.selectValue[0]);s.state.focusableOptionsWithIds=r,s.state.focusedOption=a[o],s.state.focusedOptionId=Ch(r,a[o])}return s}return gR(e,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Rf(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(s){var r=this.props,a=r.isDisabled,o=r.menuIsOpen,l=this.state.isFocused;(l&&!a&&s.isDisabled||l&&o&&!s.menuIsOpen)&&this.focusInput(),l&&a&&!s.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&s.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Rf(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(s,r){this.props.onInputChange(s,r)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(s){var r=this,a=this.state,o=a.selectValue,l=a.isFocused,h=this.buildFocusableOptions(),c=s==="first"?0:h.length-1;if(!this.props.isMulti){var u=h.indexOf(o[0]);u>-1&&(c=u)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:h[c],focusedOptionId:this.getFocusedOptionId(h[c])},function(){return r.onMenuOpen()})}},{key:"focusValue",value:function(s){var r=this.state,a=r.selectValue,o=r.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(o);o||(l=-1);var h=a.length-1,c=-1;if(a.length){switch(s){case"previous":l===0?c=0:l===-1?c=h:c=l-1;break;case"next":l>-1&&l0&&arguments[0]!==void 0?arguments[0]:"first",r=this.props.pageSize,a=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var l=0,h=o.indexOf(a);a||(h=-1),s==="up"?l=h>0?h-1:o.length-1:s==="down"?l=(h+1)%o.length:s==="pageup"?(l=h-r,l<0&&(l=0)):s==="pagedown"?(l=h+r,l>o.length-1&&(l=o.length-1)):s==="last"&&(l=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Mh):W(W({},Mh),this.props.theme):Mh}},{key:"getCommonProps",value:function(){var s=this.clearValue,r=this.cx,a=this.getStyles,o=this.getClassNames,l=this.getValue,h=this.selectOption,c=this.setValue,u=this.props,d=u.isMulti,f=u.isRtl,g=u.options,m=this.hasValue();return{clearValue:s,cx:r,getStyles:a,getClassNames:o,getValue:l,hasValue:m,isMulti:d,isRtl:f,options:g,selectOption:h,selectProps:u,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var s=this.state.selectValue;return s.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var s=this.props,r=s.isClearable,a=s.isMulti;return r===void 0?a:r}},{key:"isOptionDisabled",value:function(s,r){return gp(this.props,s,r)}},{key:"isOptionSelected",value:function(s,r){return mp(this.props,s,r)}},{key:"filterOption",value:function(s,r){return pp(this.props,s,r)}},{key:"formatOptionLabel",value:function(s,r){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(s,{context:r,inputValue:a,selectValue:o})}else return this.getOptionLabel(s)}},{key:"formatGroupLabel",value:function(s){return this.props.formatGroupLabel(s)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var s=this.props,r=s.isDisabled,a=s.isSearchable,o=s.inputId,l=s.inputValue,h=s.tabIndex,c=s.form,u=s.menuIsOpen,d=s.required,f=this.getComponents(),g=f.Input,m=this.state,p=m.inputIsHidden,_=m.ariaSelection,v=this.commonProps,y=o||this.getElementId("input"),x=W(W(W({"aria-autocomplete":"list","aria-expanded":u,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||void 0},u&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?_?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?b.createElement(g,K({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:r,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:h,form:c,type:"text",value:l},x)):b.createElement(CP,K({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ko,onFocus:this.onInputFocus,disabled:r,tabIndex:h,inputMode:"none",form:c,value:""},x))}},{key:"renderPlaceholderOrValue",value:function(){var s=this,r=this.getComponents(),a=r.MultiValue,o=r.MultiValueContainer,l=r.MultiValueLabel,h=r.MultiValueRemove,c=r.SingleValue,u=r.Placeholder,d=this.commonProps,f=this.props,g=f.controlShouldRenderValue,m=f.isDisabled,p=f.isMulti,_=f.inputValue,v=f.placeholder,y=this.state,x=y.selectValue,M=y.focusedValue,w=y.isFocused;if(!this.hasValue()||!g)return _?null:b.createElement(u,K({},d,{key:"placeholder",isDisabled:m,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),v);if(p)return x.map(function(C,I){var D=C===M,k="".concat(s.getOptionLabel(C),"-").concat(s.getOptionValue(C));return b.createElement(a,K({},d,{components:{Container:o,Label:l,Remove:h},isFocused:D,isDisabled:m,key:k,index:I,removeProps:{onClick:function(){return s.removeValue(C)},onTouchEnd:function(){return s.removeValue(C)},onMouseDown:function(G){G.preventDefault()}},data:C}),s.formatOptionLabel(C,"value"))});if(_)return null;var E=x[0];return b.createElement(c,K({},d,{data:E,isDisabled:m}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var s=this.getComponents(),r=s.ClearIndicator,a=this.commonProps,o=this.props,l=o.isDisabled,h=o.isLoading,c=this.state.isFocused;if(!this.isClearable()||!r||l||!this.hasValue()||h)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return b.createElement(r,K({},a,{innerProps:u,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var s=this.getComponents(),r=s.LoadingIndicator,a=this.commonProps,o=this.props,l=o.isDisabled,h=o.isLoading,c=this.state.isFocused;if(!r||!h)return null;var u={"aria-hidden":"true"};return b.createElement(r,K({},a,{innerProps:u,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var s=this.getComponents(),r=s.DropdownIndicator,a=s.IndicatorSeparator;if(!r||!a)return null;var o=this.commonProps,l=this.props.isDisabled,h=this.state.isFocused;return b.createElement(a,K({},o,{isDisabled:l,isFocused:h}))}},{key:"renderDropdownIndicator",value:function(){var s=this.getComponents(),r=s.DropdownIndicator;if(!r)return null;var a=this.commonProps,o=this.props.isDisabled,l=this.state.isFocused,h={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return b.createElement(r,K({},a,{innerProps:h,isDisabled:o,isFocused:l}))}},{key:"renderMenu",value:function(){var s=this,r=this.getComponents(),a=r.Group,o=r.GroupHeading,l=r.Menu,h=r.MenuList,c=r.MenuPortal,u=r.LoadingMessage,d=r.NoOptionsMessage,f=r.Option,g=this.commonProps,m=this.state.focusedOption,p=this.props,_=p.captureMenuScroll,v=p.inputValue,y=p.isLoading,x=p.loadingMessage,M=p.minMenuHeight,w=p.maxMenuHeight,E=p.menuIsOpen,C=p.menuPlacement,I=p.menuPosition,D=p.menuPortalTarget,k=p.menuShouldBlockScroll,A=p.menuShouldScrollIntoView,G=p.noOptionsMessage,z=p.onMenuScrollToTop,V=p.onMenuScrollToBottom;if(!E)return null;var O=function(U,P){var lt=U.type,ct=U.data,gt=U.isDisabled,wt=U.isSelected,ce=U.label,Vt=U.value,Ei=m===ct,He=gt?void 0:function(){return s.onOptionHover(ct)},wn=gt?void 0:function(){return s.selectOption(ct)},Ce="".concat(s.getElementId("option"),"-").concat(P),Xe={id:Ce,onClick:wn,onMouseMove:He,onMouseOver:He,tabIndex:-1,role:"option","aria-selected":s.isAppleDevice?void 0:wt};return b.createElement(f,K({},g,{innerProps:Xe,data:ct,isDisabled:gt,isSelected:wt,key:Ce,label:ce,type:lt,value:Vt,isFocused:Ei,innerRef:Ei?s.getFocusedOptionRef:void 0}),s.formatOptionLabel(U.data,"menu"))},J;if(this.hasOptions())J=this.getCategorizedOptions().map(function(j){if(j.type==="group"){var U=j.data,P=j.options,lt=j.index,ct="".concat(s.getElementId("group"),"-").concat(lt),gt="".concat(ct,"-heading");return b.createElement(a,K({},g,{key:ct,data:U,options:P,Heading:o,headingProps:{id:gt,data:j.data},label:s.formatGroupLabel(j.data)}),j.options.map(function(wt){return O(wt,"".concat(lt,"-").concat(wt.index))}))}else if(j.type==="option")return O(j,"".concat(j.index))});else if(y){var B=x({inputValue:v});if(B===null)return null;J=b.createElement(u,g,B)}else{var at=G({inputValue:v});if(at===null)return null;J=b.createElement(d,g,at)}var X={minMenuHeight:M,maxMenuHeight:w,menuPlacement:C,menuPosition:I,menuShouldScrollIntoView:A},nt=b.createElement(eT,K({},g,X),function(j){var U=j.ref,P=j.placerProps,lt=P.placement,ct=P.maxHeight;return b.createElement(l,K({},g,X,{innerRef:U,innerProps:{onMouseDown:s.onMenuMouseDown,onMouseMove:s.onMenuMouseMove},isLoading:y,placement:lt}),b.createElement(TP,{captureEnabled:_,onTopArrive:z,onBottomArrive:V,lockEnabled:k},function(gt){return b.createElement(h,K({},g,{innerRef:function(ce){s.getMenuListRef(ce),gt(ce)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:s.getElementId("listbox")},isLoading:y,maxHeight:ct,focusedOption:m}),J)}))});return D||I==="fixed"?b.createElement(c,K({},g,{appendTo:D,controlElement:this.controlRef,menuPlacement:C,menuPosition:I}),nt):nt}},{key:"renderFormField",value:function(){var s=this,r=this.props,a=r.delimiter,o=r.isDisabled,l=r.isMulti,h=r.name,c=r.required,u=this.state.selectValue;if(c&&!this.hasValue()&&!o)return b.createElement(LP,{name:h,onFocus:this.onValueInputFocus});if(!(!h||o))if(l)if(a){var d=u.map(function(m){return s.getOptionValue(m)}).join(a);return b.createElement("input",{name:h,type:"hidden",value:d})}else{var f=u.length>0?u.map(function(m,p){return b.createElement("input",{key:"i-".concat(p),name:h,type:"hidden",value:s.getOptionValue(m)})}):b.createElement("input",{name:h,type:"hidden",value:""});return b.createElement("div",null,f)}else{var g=u[0]?this.getOptionValue(u[0]):"";return b.createElement("input",{name:h,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var s=this.commonProps,r=this.state,a=r.ariaSelection,o=r.focusedOption,l=r.focusedValue,h=r.isFocused,c=r.selectValue,u=this.getFocusableOptions();return b.createElement(_P,K({},s,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:o,focusedValue:l,isFocused:h,selectValue:c,focusableOptions:u,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var s=this.getComponents(),r=s.Control,a=s.IndicatorsContainer,o=s.SelectContainer,l=s.ValueContainer,h=this.props,c=h.className,u=h.id,d=h.isDisabled,f=h.menuIsOpen,g=this.state.isFocused,m=this.commonProps=this.getCommonProps();return b.createElement(o,K({},m,{className:c,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:g}),this.renderLiveRegion(),b.createElement(r,K({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:g,menuIsOpen:f}),b.createElement(l,K({},m,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),b.createElement(a,K({},m,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(s,r){var a=r.prevProps,o=r.clearFocusValueOnUpdate,l=r.inputIsHiddenAfterUpdate,h=r.ariaSelection,c=r.isFocused,u=r.prevWasFocused,d=r.instancePrefix,f=s.options,g=s.value,m=s.menuIsOpen,p=s.inputValue,_=s.isMulti,v=Jo(g),y={};if(a&&(g!==a.value||f!==a.options||m!==a.menuIsOpen||p!==a.inputValue)){var x=m?HP(s,v):[],M=m?Bf(yo(s,v),"".concat(d,"-option")):[],w=o?XP(r,v):null,E=qP(r,x),C=Ch(M,E);y={selectValue:v,focusedOption:E,focusedOptionId:C,focusableOptionsWithIds:M,focusedValue:w,clearFocusValueOnUpdate:!1}}var I=l!=null&&s!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},D=h,k=c&&u;return c&&!k&&(D={value:Pr(_,v,v[0]||null),options:v,action:"initial-input-focus"},k=!u),h?.action==="initial-input-focus"&&(D=null),W(W(W({},y),I),{},{prevProps:s,ariaSelection:D,prevWasFocused:k})}}]),e}(b.Component);Ga.defaultProps=$P;var ZP=b.forwardRef(function(i,t){var e=Ol(i);return b.createElement(Ga,K({ref:t},e))}),KP=ZP,JP=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],Uf=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,s=String(t).toLowerCase(),r=String(n.getOptionValue(e)).toLowerCase(),a=String(n.getOptionLabel(e)).toLowerCase();return r===s||a===s},wh={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,e,n,s){return!(!t||e.some(function(r){return Uf(t,r,s)})||n.some(function(r){return Uf(t,r,s)}))},getNewOptionData:function(t,e){return{label:e,value:t,__isNew__:!0}}};function vp(i){var t=i.allowCreateWhileLoading,e=t===void 0?!1:t,n=i.createOptionPosition,s=n===void 0?"last":n,r=i.formatCreateLabel,a=r===void 0?wh.formatCreateLabel:r,o=i.isValidNewOption,l=o===void 0?wh.isValidNewOption:o,h=i.getNewOptionData,c=h===void 0?wh.getNewOptionData:h,u=i.onCreateOption,d=i.options,f=d===void 0?[]:d,g=i.onChange,m=ri(i,JP),p=m.getOptionValue,_=p===void 0?cp:p,v=m.getOptionLabel,y=v===void 0?hp:v,x=m.inputValue,M=m.isLoading,w=m.isMulti,E=m.value,C=m.name,I=b.useMemo(function(){return l(x,Jo(E),f,{getOptionValue:_,getOptionLabel:y})?c(x,a(x)):void 0},[a,c,y,_,x,l,f,E]),D=b.useMemo(function(){return(e||!M)&&I?s==="first"?[I].concat(Fs(f)):[].concat(Fs(f),[I]):f},[e,s,M,I,f]),k=b.useCallback(function(A,G){if(G.action!=="select-option")return g(A,G);var z=Array.isArray(A)?A:[A];if(z[z.length-1]===I){if(u)u(x);else{var V=c(x,x),O={action:"create-option",name:C,option:V};g(Pr(w,[].concat(Fs(Jo(E)),[V]),V),O)}return}g(A,G)},[c,x,w,C,I,u,g,E]);return W(W({},m),{},{options:D,onChange:k})}var QP=b.forwardRef(function(i,t){var e=Ol(i),n=vp(e);return b.createElement(Ga,K({ref:t},n))}),tO=QP,eO=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function yp(i){var t=i.defaultOptions,e=t===void 0?!1:t,n=i.cacheOptions,s=n===void 0?!1:n,r=i.loadOptions;i.options;var a=i.isLoading,o=a===void 0?!1:a,l=i.onInputChange,h=i.filterOption,c=h===void 0?null:h,u=ri(i,eO),d=u.inputValue,f=b.useRef(void 0),g=b.useRef(!1),m=b.useState(Array.isArray(e)?e:void 0),p=Wt(m,2),_=p[0],v=p[1],y=b.useState(typeof d<"u"?d:""),x=Wt(y,2),M=x[0],w=x[1],E=b.useState(e===!0),C=Wt(E,2),I=C[0],D=C[1],k=b.useState(void 0),A=Wt(k,2),G=A[0],z=A[1],V=b.useState([]),O=Wt(V,2),J=O[0],B=O[1],at=b.useState(!1),X=Wt(at,2),nt=X[0],j=X[1],U=b.useState({}),P=Wt(U,2),lt=P[0],ct=P[1],gt=b.useState(void 0),wt=Wt(gt,2),ce=wt[0],Vt=wt[1],Ei=b.useState(void 0),He=Wt(Ei,2),wn=He[0],Ce=He[1];s!==wn&&(ct({}),Ce(s)),e!==ce&&(v(Array.isArray(e)?e:void 0),Vt(e)),b.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]);var Xe=b.useCallback(function(li,hi){if(!r)return hi();var It=r(li,hi);It&&typeof It.then=="function"&&It.then(hi,function(){return hi()})},[r]);b.useEffect(function(){e===!0&&Xe(M,function(li){g.current&&(v(li||[]),D(!!f.current))})},[]);var oi=b.useCallback(function(li,hi){var It=VR(li,hi,l);if(!It){f.current=void 0,w(""),z(""),B([]),D(!1),j(!1);return}if(s&<[It])w(It),z(It),B(lt[It]),D(!1),j(!1);else{var ue=f.current={};w(It),D(!0),j(!G),Xe(It,function(we){g&&ue===f.current&&(f.current=void 0,D(!1),z(It),B(we||[]),j(!1),ct(we?W(W({},lt),{},ys({},It,we)):lt))})}},[s,Xe,G,lt,l]),En=nt?[]:M&&G?J:_||[];return W(W({},u),{},{options:En,isLoading:I||o,onInputChange:oi,filterOption:c})}var iO=b.forwardRef(function(i,t){var e=yp(i),n=Ol(e);return b.createElement(Ga,K({ref:t},n))}),nO=iO,sO=b.forwardRef(function(i,t){var e=yp(i),n=Ol(e),s=vp(n);return b.createElement(Ga,K({ref:t},s))}),rO=sO,xp=i=>{let{className:t,clearValue:e,cx:n,getStyles:s,getClassNames:r,getValue:a,hasValue:o,isMulti:l,isRtl:h,options:c,selectOption:u,selectProps:d,setValue:f,theme:g,...m}=i;return{...m}},aO=i=>typeof i=="string"&&["sm","md","lg"].includes(i),oO=i=>aO(i)?i:i==="xs"?"sm":i==="xl"?"lg":"md",ai=i=>{let t=ba(),e=oO(t.components.Input.defaultProps.size),n=i??e;return E_(typeof n=="string"?[n]:n,{fallback:"md"})||e},lO=i=>{let{children:t,className:e,cx:n,innerProps:s,isDisabled:r,isRtl:a,hasValue:o,selectProps:{chakraStyles:l}}=i,h={position:"relative",direction:a?"rtl":void 0,...r?{cursor:"not-allowed"}:{}},c=l!=null&&l.container?l.container(h,i):h;return S.jsx(Mt,{...s,className:n({"--is-disabled":r,"--is-rtl":a,"--has-value":o},e),sx:c,children:t})},hO=i=>{let{children:t,className:e,cx:n,isMulti:s,hasValue:r,innerProps:a,selectProps:{chakraStyles:o,size:l,variant:h,focusBorderColor:c,errorBorderColor:u,controlShouldRenderValue:d}}=i,f=ai(l),g=Ci("Input",{size:f,variant:h,focusBorderColor:c,errorBorderColor:u}),m={display:s&&r&&d?"flex":"grid",alignItems:"center",flex:1,paddingY:"2px",paddingX:g.field.px,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},p=o!=null&&o.valueContainer?o.valueContainer(m,i):m;return S.jsx(Mt,{...a,className:n({"value-container":!0,"value-container--is-multi":s,"value-container--has-value":r},e),sx:p,children:t})},cO=i=>{let{children:t,className:e,cx:n,innerProps:s,selectProps:{chakraStyles:r}}=i,a={display:"flex",alignItems:"center",alignSelf:"stretch",flexShrink:0},o=r!=null&&r.indicatorsContainer?r.indicatorsContainer(a,i):a;return S.jsx(Mt,{...s,className:n({indicators:!0},e),sx:o,children:t})},uO=i=>{let{className:t,cx:e,children:n,innerRef:s,innerProps:r,isDisabled:a,isFocused:o,menuIsOpen:l,selectProps:{chakraStyles:h,size:c,variant:u,focusBorderColor:d,errorBorderColor:f,isInvalid:g,isReadOnly:m}}=i,p=ai(c),{field:{height:_,h:v,...y}}=Ci("Input",{size:p,variant:u,focusBorderColor:d,errorBorderColor:f}),x={...y,position:"relative",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",padding:0,overflow:"hidden",height:"auto",minH:_||v,...a?{pointerEvents:"none"}:{}},M=h!=null&&h.control?h.control(x,i):x;return S.jsx(Mt,{ref:s,className:e({control:!0,"control--is-disabled":a,"control--is-focused":o,"control--menu-is-open":l},t),sx:M,...r,"data-focus":o?!0:void 0,"data-focus-visible":o?!0:void 0,"data-invalid":g?!0:void 0,"data-disabled":a?!0:void 0,"data-readonly":m?!0:void 0,children:n})},dO=i=>{let{className:t,cx:e,selectProps:{chakraStyles:n,useBasicStyles:s,variant:r}}=i,a={opacity:1,...s||r!=="outline"?{display:"none"}:{}},o=n!=null&&n.indicatorSeparator?n.indicatorSeparator(a,i):a;return S.jsx(Mc,{className:e({"indicator-separator":!0},t),sx:o,orientation:"vertical"})},fO=i=>S.jsx(sl,{role:"presentation",focusable:"false","aria-hidden":"true",...i,children:S.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),gO=i=>{let{children:t,className:e,cx:n,innerProps:s,selectProps:{chakraStyles:r,useBasicStyles:a,size:o,focusBorderColor:l,errorBorderColor:h,variant:c}}=i,u=ai(o),d=Ci("Input",{size:u,variant:c,focusBorderColor:l,errorBorderColor:h}),f={sm:"16px",md:"20px",lg:"24px"}[u],g={...d.addon,display:"flex",alignItems:"center",justifyContent:"center",height:"100%",borderRadius:0,borderWidth:0,fontSize:f,...a&&{background:"transparent",padding:0,width:6,marginRight:2,marginLeft:1,cursor:"inherit"}},m=r!=null&&r.dropdownIndicator?r.dropdownIndicator(g,i):g,p={height:"1em",width:"1em"},_=r!=null&&r.downChevron?r.downChevron(p,i):p;return S.jsx(Mt,{...s,className:n({indicator:!0,"dropdown-indicator":!0},e),sx:m,children:t||S.jsx(fO,{sx:_})})},mO=i=>S.jsx(sl,{focusable:"false","aria-hidden":!0,...i,children:S.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})}),pO=i=>{let{children:t,className:e,cx:n,innerProps:s,selectProps:{chakraStyles:r,size:a}}=i,o=ai(a),l={..._c("CloseButton",{size:o}),marginX:1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:"pointer"},h=r!=null&&r.clearIndicator?r.clearIndicator(l,i):l,c={width:"1em",height:"1em"},u=r!=null&&r.crossIcon?r.crossIcon(c,i):c;return S.jsx(Mt,{role:"button",className:n({indicator:!0,"clear-indicator":!0},e),sx:h,"aria-label":"Clear selected options",...s,children:t||S.jsx(mO,{sx:u})})},_O=i=>{let{className:t,cx:e,innerProps:n,selectProps:{chakraStyles:s,size:r},color:a,emptyColor:o,speed:l,thickness:h,spinnerSize:c}=i,u=ai(r),d={sm:"xs",md:"sm",lg:"md"}[u],f={marginRight:3},g=s!=null&&s.loadingIndicator?s.loadingIndicator(f,i):f;return S.jsx(Kp,{className:e({indicator:!0,"loading-indicator":!0},t),sx:g,...n,size:c||d,color:a,emptyColor:o,speed:l,thickness:h})},vO=uO,yO=i=>{let{className:t,cx:e,value:n,selectProps:{chakraStyles:s,isReadOnly:r}}=i,{innerRef:a,isDisabled:o,isHidden:l,inputClassName:h,...c}=xp(i),u={gridArea:"1 / 2",minW:"2px",border:0,margin:0,outline:0,padding:0},d={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content",color:"inherit",marginX:"0.125rem",paddingY:"0.125rem",visibility:o?"hidden":"visible",transform:n?"translateZ(0)":"",_after:{content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre",padding:0,...u}},f=s!=null&&s.inputContainer?s.inputContainer(d,i):d,g={background:0,opacity:l?0:1,width:"100%",...u},m=s!=null&&s.input?s.input(g,i):g;return S.jsx(Mt,{className:e({"input-container":!0},t),"data-value":n||"",sx:f,children:S.jsx(Oe.input,{className:e({input:!0},h),ref:a,sx:m,disabled:o,readOnly:r?!0:void 0,...c})})},xO=yO,bO=i=>i?{bottom:"top",top:"bottom"}[i]:"top",MO=i=>{let{className:t,cx:e,children:n,innerProps:s,innerRef:r,placement:a,selectProps:{chakraStyles:o}}=i,l={position:"absolute",[bO(a)]:"100%",marginY:"8px",width:"100%",zIndex:1},h=o!=null&&o.menu?o.menu(l,i):l;return S.jsx(hg,{children:S.jsx(Mt,{...s,ref:r,className:e({menu:!0},t),sx:h,children:n})})},CO=MO,wO=i=>{var t;let{className:e,cx:n,innerRef:s,children:r,maxHeight:a,isMulti:o,innerProps:l,selectProps:{chakraStyles:h,size:c,variant:u,focusBorderColor:d,errorBorderColor:f}}=i,g=Ci("Menu"),m=ai(c),p=Ci("Input",{size:m,variant:u,focusBorderColor:d,errorBorderColor:f}).field,_={...g.list,minW:"100%",maxHeight:`${a}px`,overflowY:"auto","--input-border-radius":p?.["--input-border-radius"],borderRadius:p?.borderRadius||((t=g.list)==null?void 0:t.borderRadius),position:"relative",WebkitOverflowScrolling:"touch"},v=h!=null&&h.menuList?h.menuList(_,i):_;return S.jsx(Mt,{...l,className:n({"menu-list":!0,"menu-list--is-multi":o},e),sx:v,ref:s,children:r})},EO=i=>{let{children:t,className:e,cx:n,innerProps:s,selectProps:{chakraStyles:r,size:a}}=i,o=ai(a),l={color:"chakra-subtle-text",textAlign:"center",paddingY:{sm:"6px",md:"8px",lg:"10px"}[o],fontSize:o},h=r!=null&&r.loadingMessage?r.loadingMessage(l,i):l;return S.jsx(Mt,{...s,className:n({"menu-notice":!0,"menu-notice--loading":!0},e),sx:h,children:t})},SO=i=>{let{children:t,className:e,cx:n,innerProps:s,selectProps:{chakraStyles:r,size:a}}=i,o=ai(a),l={color:"chakra-subtle-text",textAlign:"center",paddingY:{sm:"6px",md:"8px",lg:"10px"}[o],fontSize:o},h=r!=null&&r.noOptionsMessage?r.noOptionsMessage(l,i):l;return S.jsx(Mt,{...s,className:n({"menu-notice":!0,"menu-notice--no-options":!0},e),sx:h,children:t})},IO=i=>{let{children:t,className:e,cx:n,theme:s,getStyles:r,Heading:a,headingProps:o,label:l,selectProps:h,innerProps:c,getClassNames:u}=i,{chakraStyles:d}=h,f={},g=d!=null&&d.group?d.group(f,i):f;return S.jsxs(Mt,{...c,className:n({group:!0},e),sx:g,children:[S.jsx(a,{...o,selectProps:h,cx:n,theme:s,getStyles:r,getClassNames:u,children:l}),S.jsx(Mt,{children:t})]})},RO=i=>{let{cx:t,className:e,selectProps:{chakraStyles:n,size:s,hasStickyGroupHeaders:r}}=i,{data:a,...o}=xp(i),l=Ci("Menu"),h=ai(s),c={sm:"xs",md:"sm",lg:"md"},u={sm:"0.4rem 0.8rem",md:"0.5rem 1rem",lg:"0.6rem 1.2rem"},d={...l.groupTitle,fontSize:c[h],padding:u[h],margin:0,borderBottomWidth:r?"1px":0,position:r?"sticky":"static",top:-2,bg:l.list.bg,zIndex:1},f=n!=null&&n.groupHeading?n.groupHeading(d,i):d;return S.jsx(Mt,{...o,className:t({"group-heading":!0},e),sx:f})},TO=i=>S.jsx("svg",{viewBox:"0 0 14 14",width:"1em",height:"1em",...i,children:S.jsx("polygon",{fill:"currentColor",points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})}),PO=i=>{let{className:t,cx:e,innerRef:n,innerProps:s,children:r,isFocused:a,isDisabled:o,isSelected:l,selectProps:{chakraStyles:h,size:c,isMulti:u,hideSelectedOptions:d,selectedOptionStyle:f,selectedOptionColorScheme:g}}=i,m=Ci("Menu").item,p=ai(c),_={sm:"0.6rem",md:"0.8rem",lg:"1rem"},v={sm:"0.3rem",md:"0.4rem",lg:"0.5rem"},y=qu(`${g}.500`,`${g}.300`),x=qu("white","black"),M=f==="check"&&(!u||d===!1),w=f==="color",E={...m,cursor:"pointer",display:"flex",alignItems:"center",width:"100%",textAlign:"start",fontSize:p,paddingX:_[p],paddingY:v[p],...w&&{_selected:{bg:y,color:x,_active:{bg:y}}}},C=h!=null&&h.option?h.option(E,i):E;return S.jsxs(Mt,{...s,className:e({option:!0,"option--is-disabled":o,"option--is-focused":a,"option--is-selected":l},t),sx:C,ref:n,"data-focus":a?!0:void 0,"aria-disabled":o?!0:void 0,"aria-selected":l,children:[M&&S.jsx(cg,{fontSize:"0.8em",marginEnd:"0.75rem",opacity:l?1:0,children:S.jsx(TO,{})}),r]})},OO=i=>typeof i=="object"&&i!==null&&"colorScheme"in i&&typeof i.colorScheme=="string",LO=i=>typeof i=="object"&&i!==null&&"variant"in i&&typeof i.variant=="string",bp=i=>typeof i=="object"&&i!==null&&"isFixed"in i&&typeof i.isFixed=="boolean",AO=i=>{let{children:t,className:e,components:n,cx:s,data:r,innerProps:a,isDisabled:o,isFocused:l,removeProps:h,selectProps:c,cropWithEllipsis:u}=i,{Container:d,Label:f,Remove:g}=n,{chakraStyles:m,colorScheme:p,tagVariant:_,size:v}=c,y=ai(v),x="",M="",w=!1;OO(r)&&(x=r.colorScheme),LO(r)&&(M=r.variant),bp(r)&&(w=r.isFixed);let E=Ci("Tag",{size:y,colorScheme:x||p,variant:M||_||(w?"solid":"subtle")}),C={...E.container,display:"flex",alignItems:"center",minWidth:0,margin:"0.125rem"},I=m!=null&&m.multiValue?m.multiValue(C,i):C,D={...E.label,overflow:"hidden",textOverflow:u||u===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},k=m!=null&&m.multiValueLabel?m.multiValueLabel(D,i):D,A={...E.closeButton,display:"flex",alignItems:"center",justifyContent:"center"},G=m!=null&&m.multiValueRemove?m.multiValueRemove(A,i):A;return S.jsxs(d,{data:r,innerProps:{className:s({"multi-value":!0,"multi-value--is-disabled":o},e),...a},sx:I,selectProps:c,children:[S.jsx(f,{data:r,innerProps:{className:s({"multi-value__label":!0},e)},sx:k,selectProps:c,children:t}),S.jsx(g,{data:r,innerProps:{className:s({"multi-value__remove":!0},e),"aria-label":`Remove ${t||"option"}`,...h},sx:G,selectProps:c,isFocused:l})]})},DO=i=>{let{children:t,innerProps:e,sx:n}=i;return S.jsx(Oe.span,{...e,sx:n,children:t})},kO=i=>{let{children:t,innerProps:e,sx:n}=i;return S.jsx(Oe.span,{...e,sx:n,children:t})},FO=i=>S.jsx(sl,{verticalAlign:"inherit",viewBox:"0 0 512 512",...i,children:S.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})}),NO=i=>{let{children:t,innerProps:e,isFocused:n,data:s,sx:r}=i;return bp(s)&&s.isFixed?null:S.jsx(Mt,{...e,role:"button",sx:r,"data-focus":n?!0:void 0,"data-focus-visible":n?!0:void 0,children:t||S.jsx(FO,{})})},GO=AO,VO=i=>{let{children:t,className:e,cx:n,innerProps:s,selectProps:{chakraStyles:r}}=i,a={gridArea:"1 / 1 / 2 / 3",color:"chakra-placeholder-color",mx:"0.125rem",userSelect:"none"},o=r!=null&&r.placeholder?r.placeholder(a,i):a;return S.jsx(Mt,{...s,className:n({placeholder:!0},e),sx:o,children:t})},zO=VO,jO=i=>{let{children:t,className:e,cx:n,isDisabled:s,innerProps:r,selectProps:{chakraStyles:a}}=i,o={gridArea:"1 / 1 / 2 / 3",mx:"0.125rem",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},l=a!=null&&a.singleValue?a.singleValue(o,i):o;return S.jsx(Mt,{className:n({"single-value":!0,"single-value--is-disabled":s},e),sx:l,...r,children:t})},BO=jO,WO={ClearIndicator:pO,Control:vO,DropdownIndicator:gO,Group:IO,GroupHeading:RO,IndicatorSeparator:dO,IndicatorsContainer:cO,Input:xO,LoadingIndicator:_O,LoadingMessage:EO,Menu:CO,MenuList:wO,MultiValue:GO,MultiValueContainer:DO,MultiValueLabel:kO,MultiValueRemove:NO,NoOptionsMessage:SO,Option:PO,Placeholder:zO,SelectContainer:lO,SingleValue:BO,ValueContainer:hO},Au=WO,UO=({components:i={},theme:t,size:e,colorScheme:n="gray",isDisabled:s,isInvalid:r,isReadOnly:a,required:o,isRequired:l,inputId:h,tagVariant:c,selectedOptionStyle:u="color",selectedOptionColorScheme:d,selectedOptionColor:f,variant:g,focusBorderColor:m,errorBorderColor:p,chakraStyles:_={},onFocus:v,onBlur:y,menuIsOpen:x,...M})=>{var w;let E=ba(),{variant:C}=E.components.Input.defaultProps,I=tg({id:h,isDisabled:s,isInvalid:r,isRequired:l,isReadOnly:a,onFocus:v,onBlur:y}),D=x??(I.readOnly?!1:void 0),k=u;["color","check"].includes(u)||(k="color");let A=d||f||"blue";return typeof A!="string"&&(A="blue"),{components:{...Au,...i},colorScheme:n,size:e,tagVariant:c,selectedOptionStyle:k,selectedOptionColorScheme:A,variant:g??C,chakraStyles:_,focusBorderColor:m,errorBorderColor:p,onFocus:I.onFocus,onBlur:I.onBlur,isDisabled:I.disabled,isInvalid:!!I["aria-invalid"],inputId:I.id,isReadOnly:I.readOnly,required:o??I.required,menuIsOpen:D,...M,"aria-invalid":(w=M["aria-invalid"])!=null?w:I["aria-invalid"]}},Al=UO,$O=b.forwardRef((i,t)=>{let e=Al(i);return S.jsx(KP,{ref:t,...e})}),HO=$O;b.forwardRef((i,t)=>{let e=Al(i);return S.jsx(tO,{ref:t,...e})});b.forwardRef((i,t)=>{let e=Al(i);return S.jsx(nO,{ref:t,...e})});b.forwardRef((i,t)=>{let e=Al(i);return S.jsx(rO,{ref:t,...e})});const $f="___NO_BASEMAP___",XO=i=>{const t=Iu(),{allowSelectingEmptyBasemap:e=!1,"aria-label":n,"aria-labelledby":s}=i,{containerProps:r}=Ae("basemap-switcher",i),a=t.formatMessage({id:"emptyBasemapLabel"}),{map:o}=si(i),l=qO(o),h=QO(),[c,u]=b.useState(!1),d=_=>{o?.layers.activateBaseLayer(_===$f?void 0:_)},{options:f,selectedLayer:g}=b.useMemo(()=>{const _=l.map(x=>({value:x.id,layer:x})),v=o?.layers.getActiveBaseLayer();if(e||v==null){const x={value:$f,layer:void 0};_.push(x)}const y=_.find(x=>x.layer===v);return{options:_,selectedLayer:y}},[e,l,o?.layers]),m=b.useMemo(()=>({Option:YO,SingleValue:ZO}),[]),p=Ih(_=>{!c&&_.key==="Enter"&&u(!0)});return S.jsx(Mt,{...r,children:o?S.jsx(HO,{"aria-label":n,"aria-labelledby":s,className:"basemap-switcher-select",classNamePrefix:"react-select",options:f,value:g,onChange:_=>_&&d(_.value),isClearable:!1,isSearchable:!1,menuPosition:"fixed",getOptionLabel:_=>_.layer!==void 0?_.layer.title+(_.layer.loadState==="error"?" "+t.formatMessage({id:"layerNotAvailable"}):""):a,isOptionDisabled:_=>_?.layer?.loadState==="error",components:m,ariaLiveMessages:{guidance:()=>"",onChange:_=>_.action=="select-option"||_.action=="initial-input-focus"?_.label+" "+t.formatMessage({id:"selected"}):"",onFilter:()=>"",onFocus:()=>""},chakraStyles:h,onKeyDown:p,menuIsOpen:c,onMenuOpen:()=>u(!0),onMenuClose:()=>u(!1)}):null})};function qO(i){const t=b.useRef(),e=b.useCallback(s=>{if(t.current=void 0,!i)return()=>{};const r=i.layers.on("changed",()=>{t.current=void 0,s()});return()=>r.destroy()},[i]),n=b.useCallback(()=>t.current?t.current:t.current=i?.layers.getBaseLayers()??[],[i]);return b.useSyncExternalStore(e,n)}function YO(i){const{layer:t}=i.data,{isAvailable:e,content:n}=Mp(t);return S.jsx(Au.Option,{...i,isDisabled:!e,className:"basemap-switcher-option",children:n})}function ZO(i){const{layer:t}=i.data,{isAvailable:e,content:n}=Mp(t);return S.jsx(Au.SingleValue,{...i,isDisabled:!e,className:"basemap-switcher-value",children:n})}function Mp(i){const e=Iu().formatMessage({id:"layerNotAvailable"}),n=KO(i),s=JO(i)!=="error";return{isAvailable:s,content:S.jsxs(xs,{direction:"row",alignItems:"center",children:[n,!s&&S.jsx(Mt,{ml:2,children:S.jsx(Kf,{label:e,placement:"right",openDelay:500,children:S.jsx("span",{children:S.jsx(AS,{color:"red","aria-label":e})})})})]})}}function KO(i){const e=Iu().formatMessage({id:"emptyBasemapLabel"}),n=b.useCallback(()=>i===void 0?e:i.title,[i,e]),s=b.useCallback(r=>{if(i!==void 0){const a=i.on("changed:title",r);return()=>a.destroy()}return()=>{}},[i]);return b.useSyncExternalStore(s,n)}function JO(i){const t=b.useCallback(()=>i===void 0?"loaded":i.loadState,[i]),e=b.useCallback(n=>{if(i!==void 0){const s=i.on("changed:loadState",n);return()=>s.destroy()}return()=>{}},[i]);return b.useSyncExternalStore(e,t)}function QO(){const[i,t]=Jp("colors",["background_body","border"],["#ffffff","#ffffff"]);return b.useMemo(()=>({control:n=>({...n,cursor:"pointer"}),indicatorSeparator:n=>({...n,borderColor:t}),dropdownIndicator:n=>({...n,backgroundColor:i})}),[i,t])}function tL(){const i=xI(),t=b.useId(),[e,n]=b.useState(!1);function s(){n(!e)}const r=b.useMemo(()=>new tu({source:new Mu}),[]);return S.jsxs(xs,{height:"100%",direction:"column",overflow:"hidden",children:[S.jsx(UI,{position:"bottom"}),S.jsxs(Yu,{title:S.jsx(Mt,{role:"region","aria-label":i.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:S.jsx(Zu,{size:"md",children:"Open Pioneer Trails - Map Sample"})}),children:[S.jsx(xs,{flex:"1",direction:"column",position:"relative",children:S.jsxs(B2,{mapId:Ge,role:"main","aria-label":i.formatMessage({id:"ariaLabel.map"}),children:[S.jsx(ah,{position:"top-left",horizontalGap:5,verticalGap:5,children:e&&S.jsx(Mt,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",role:"top-left","aria-label":i.formatMessage({id:"ariaLabel.topLeft"}),children:S.jsx(Mt,{role:"dialog","aria-labelledby":t,children:S.jsx(Yu,{title:S.jsx(Zu,{id:t,size:"md",mb:2,children:i.formatMessage({id:"measurementTitle"})}),children:S.jsx(nR,{mapId:Ge})})})})}),S.jsx(ah,{position:"top-right",horizontalGap:5,verticalGap:5,children:S.jsxs(Mt,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",role:"top-right","aria-label":i.formatMessage({id:"ariaLabel.topRight"}),children:[S.jsx(XI,{mapId:Ge,olLayer:r}),S.jsx(Mc,{mt:4}),S.jsxs(ig,{children:[S.jsx(bc,{mt:2,children:S.jsx(al,{as:"b",children:i.formatMessage({id:"basemapLabel"})})}),S.jsx(XO,{mapId:Ge,allowSelectingEmptyBasemap:!0})]})]})}),S.jsx(ah,{position:"bottom-right",horizontalGap:10,verticalGap:30,children:S.jsxs(xs,{role:"bottom-right","aria-label":i.formatMessage({id:"ariaLabel.bottomRight"}),direction:"column",gap:1,padding:1,children:[S.jsx(Fa,{label:i.formatMessage({id:"measurementTitle"}),icon:S.jsx(oR,{}),isActive:e,onClick:s}),S.jsx(NI,{mapId:Ge}),S.jsx(VS,{mapId:Ge}),S.jsx(zS,{mapId:Ge}),S.jsx(jS,{mapId:Ge})]})})]})}),S.jsxs(xs,{role:"region","aria-label":i.formatMessage({id:"ariaLabel.footer"}),gap:3,alignItems:"center",justifyContent:"center",children:[S.jsx(EI,{mapId:Ge,precision:2}),S.jsx(CS,{mapId:Ge}),S.jsx(LI,{mapId:Ge})]})]})]})}const eL=Qp({component:tL,theme:j_,appMetadata:yS});customElements.define("ol-map-app",eL); diff --git a/starter/assets/CZJiGrdGqn8U.js b/starter/assets/CZJiGrdGqn8U.js deleted file mode 100644 index 12a0c3290..000000000 --- a/starter/assets/CZJiGrdGqn8U.js +++ /dev/null @@ -1,382 +0,0 @@ -var Cg=e=>{throw TypeError(e)};var df=(e,t,r)=>t.has(e)||Cg("Cannot "+r);var Le=(e,t,r)=>(df(e,t,"read from private field"),r?r.call(e):t.get(e)),Vt=(e,t,r)=>t.has(e)?Cg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),At=(e,t,r,n)=>(df(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),el=(e,t,r)=>(df(e,t,"access private method"),r);function xC(e,t){for(var r=0;rn[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"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();const Lb=globalThis.Error;let j=class extends Lb{id;text;constructor(t,r,n){super(`${t}: ${r}`,n),this.id=t,this.text=r}};function wC(e){const t=[];do{t.push(e);const r=e.cause;if(!(r instanceof Lb))break;e=r}while(!0);return t}function Mb(e){return!!(e&&typeof e=="object"&&"name"in e&&e.name==="AbortError")}function EC(){throw Ob()}function NV(e){if(Mb(e))throw e}function Ob(){const e=new globalThis.Error("Aborted");return e.name="AbortError",e}function hf(e){e?.destroy()}const kC=PC("WARN");function nc(e){return new TC(e,kC)}const CC={DEBUG:0,INFO:1,WARN:2,ERROR:3};class TC{prefix;enabledLogLevelNumber;constructor(t,r){this.prefix=t,this.enabledLogLevelNumber=Tg(r)}isDebug(){return this._isLogLevelEnabled("DEBUG")}debug(t,...r){this._doLog("DEBUG",t,r)}info(t,...r){this._doLog("INFO",t,r)}warn(t,...r){this._doLog("WARN",t,r)}error(t,...r){this._doLog("ERROR",t,r)}_doLog(t,r,n){if(this._isLogLevelEnabled(t)){let i=`[${t}] ${this.prefix}:`;AC(r)?n.unshift(r):i+=" "+String(r);const o=_C(t);console[o](i,...n)}}_isLogLevelEnabled(t){return Tg(t)>=this.enabledLogLevelNumber}}function _C(e){switch(e){case"DEBUG":return"debug";case"INFO":return"info";case"WARN":return"warn";case"ERROR":return"error"}}function Tg(e){return CC[e]}function PC(e){switch(e){case"DEBUG":case"INFO":case"WARN":case"ERROR":return e;default:throw new Error(`invalid log level '${e}'; allowed levels are: DEBUG, INFO, WARN, ERROR`)}}function AC(e){return e instanceof Error?!0:!!(e&&typeof e=="object"&&typeof e.name=="string"&&typeof e.message=="string")}function RC(){let e,t;return{promise:new Promise((n,i)=>{e=n,t=i}),resolve:e,reject:t}}var V=(e=>(e.INVALID_METADATA="runtime:invalid-metadata",e.INVALID_PROPERTY_NAME="runtime:invalid-property-name",e.REQUIRED_PROPERTY="runtime:required-property",e.NOT_MOUNTED="runtime:element-not-mounted",e.UNSUPPORTED_LOCALE="runtime:unsupported-locale",e.CONFIG_RESOLUTION_FAILED="runtime:config-resolution-failed",e.INTERFACE_NOT_FOUND="runtime:interface-not-found",e.AMBIGUOUS_DEPENDENCY="runtime:ambiguous-dependency",e.UNDECLARED_DEPENDENCY="runtime:undeclared-dependency",e.MISSING_PACKAGE="runtime:missing-package",e.SERVICE_CONSTRUCTION_FAILED="runtime:service-construction-failed",e.SERVICE_DESTRUCTION_FAILED="runtime:service-destruction-failed",e.DUPLICATE_INTERFACE="runtime:duplicate-interface",e.DEPENDENCY_CYCLE="runtime:dependency-cycle",e.DUPLICATE_API_METHODS="runtime:duplicate-api-methods",e.INTERNAL="runtime:internal-error",e))(V||{});function ic({interfaceName:e,qualifier:t}){return`'${e}'`+(t?` (qualifier: '${t}')`:"")}function Nb(e){if(!e)throw new j(V.INVALID_METADATA,"Missing reference metadata.");if(e.all&&e.qualifier)throw new j(V.INVALID_METADATA,"References can't use 'qualifier' and 'all' properties at the same time.");return e.all?{all:!0,interfaceName:e.name}:{interfaceName:e.name,qualifier:e.qualifier}}function tp(e){return!e.all}function $C(e){return e.all===!0}class oo{static create(t,r,n,i){const o=r.clazz,a=r.name,s=Object.entries(r.references??{}).map(([c,f])=>({referenceName:c,...Nb(f)})),l=r.provides?.map(c=>({interfaceName:c.name,qualifier:c.qualifier})),u={type:"class",clazz:o};return new oo({name:a,packageName:t,factory:u,intl:n,dependencies:s,interfaces:l,properties:i})}id;name;packageName;intl;properties;dependencies;interfaces;_useCount=0;factory;_state="not-constructed";_instance=void 0;constructor(t){const{name:r,packageName:n,factory:i,intl:o,dependencies:a=[],interfaces:s=[],properties:l={}}=t;if(!MC(r))throw new j(V.INTERNAL,`Invalid service name: '${r}'.`);this.id=`${n}::${r}`,this.name=r,this.packageName=n,this.factory=i,this.intl=o,this.dependencies=a,this.interfaces=s,this.properties=l}get instance(){return this._instance}get state(){return this._state}get useCount(){return this._useCount}getInstanceOrThrow(){const t=this._instance;if(!t)throw new j(V.INTERNAL,"Expected service instance to be present.");return t}beforeCreate(){if(this._state==="not-constructed")this._state="constructing";else throw new j(V.INTERNAL,"Inconsistent state: service is already under construction.")}create(t){if(this._state!=="constructing"||this.instance!==void 0)throw new j(V.INTERNAL,"Inconsistent state: service is not being constructed.");try{return this._instance=OC(this.factory,{...t,properties:this.properties,intl:this.intl}),this._state="constructed",this._useCount=1,this._instance}catch(r){throw new j(V.SERVICE_CONSTRUCTION_FAILED,`Failed to create service instance '${this.id}'.`,{cause:r})}}destroy(){if(this._instance)try{this._instance.destroy?.()}catch(t){throw new j(V.SERVICE_DESTRUCTION_FAILED,`Failed to destroy service instance '${this.id}'.`,{cause:t})}this._instance=void 0,this._state="destroyed"}addRef(){return this._useCount+=1}removeRef(){return this._useCount-=1}}function _g(e){return{type:"class",clazz:e}}function IC(e){return{type:"function",create:e}}const LC=/^[a-z0-9_-]+$/i;function MC(e){return LC.test(e)}function OC(e,t){switch(e.type){case"class":return new e.clazz(t);case"function":return e.create(t)}}class oc{static create(t,r,n){const i=t.name,o=t.properties??{},a=DC(i,o,n),s=Object.entries(t.services??{}).map(([u,c])=>{if(u!==c.name)throw new j(V.INVALID_METADATA,"Invalid metadata: service name mismatch.");return oo.create(t.name,c,r,a)}),l=t.ui?.references?.map(u=>Nb(u))??[];return new oc({name:i,services:s,uiReferences:l,properties:a,intl:r})}name;services;uiReferences;properties;intl;constructor(t){const r=t.name;if(!jC(r))throw new j(V.INTERNAL,`Invalid package name: '${r}'.`);this.name=r,this.services=t.services??[],this.uiReferences=t.uiReferences??[],this.properties=t.properties??{},this.intl=t.intl}}function NC(e,t,r){return Object.entries(e).map(([n,i])=>{if(n!==i.name)throw new j(V.INVALID_METADATA,"Invalid metadata: package name mismatch.");const o=t.createPackageI18n(n);return oc.create(i,o,r?.[n])})}function DC(e,t,r={}){const n={},i=[];for(const[o,a]of Object.entries(t))n[o]=a.value,a.required&&i.push(o);for(const[o,a]of Object.entries(r)){if(!zC(n,o))throw new j(V.INVALID_PROPERTY_NAME,`Unexpected property name '${o}' for package '${e}': the property does not exist.`);n[o]=a}for(const o of i)if(n[o]==null)throw new j(V.REQUIRED_PROPERTY,`Package '${e}' requires the property '${o}' to be initialized to a non-null value.`);return n}const BC=Object.prototype.hasOwnProperty;function zC(e,t){return BC.call(e,t)}const FC=/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;function jC(e){return FC.test(e)}class VC{services=new Map;_count=0;get serviceCount(){return this._count}register(t,{interfaceName:r,qualifier:n}){if(!r)throw new j(V.INVALID_METADATA,`Service '${t.id}' provides invalid interface '${r}'.`);if(n!=null&&!n)throw new j(V.INVALID_METADATA,`Service '${t.id}' uses an invalid qualifier for interface '${r}': '${n}'.`);const i=this.ensureInterfaceEntry(r);if(!n){i.unqualified.push(t),++this._count;return}const o=i.byQualifier.get(n);if(o)throw new j(V.DUPLICATE_INTERFACE,`Cannot register '${t.id}' as interface '${r}' with qualifier '${n}'. The interface is already provided by service '${o.id}'. You can choose a different qualifier or remove the service to resolve the collision.`);i.byQualifier.set(n,t),++this._count}lookup(t){return tp(t)?this.lookupOne(t):this.lookupAll(t.interfaceName)}lookupOne({interfaceName:t,qualifier:r}){if(!t)throw new j(V.INVALID_METADATA,`Invalid interface name during service lookup: '${t}'.`);if(r!=null&&!r)throw new j(V.INVALID_METADATA,`Invalid qualifier during service lookup of interface '${t}': '${r}'.`);const n=this.services.get(t);if(!n)return{type:"unimplemented"};if(!r){if(n.unqualified.length+n.byQualifier.size>1){const s=[];return s.push(...Array.from(n.byQualifier.entries()).map(([l,u])=>[u.id,l])),s.push(...n.unqualified.map(l=>[l.id,void 0])),{type:"ambiguous",choices:s}}const a=n.unqualified[0]??HC(n.byQualifier);return a?{type:"found",value:a}:{type:"unimplemented"}}const i=n.byQualifier.get(r);return i?{type:"found",value:i}:{type:"unimplemented"}}lookupAll(t){if(!t)throw new j(V.INVALID_METADATA,`Invalid interface name during service lookup: '${t}'.`);const r=this.services.get(t);if(!r)return{type:"found",value:[]};const n=new Set([...r.unqualified,...r.byQualifier.values()]);return{type:"found",value:Array.from(n)}}ensureInterfaceEntry(t){const r=this.services;let n=r.get(t);return n||(n={unqualified:[],byQualifier:new Map},r.set(t,n)),n}}function Db(e,t=3){let r="",n=0;for(const[o,a]of e)if(n&&(r+=", "),r+=`'${o}'`,a&&(r+=` (with qualifier '${a}')`),++n>=t)break;const i=e.length-n;return i>0&&(r+=` and ${i} more`),r}function HC(e){return e.values().next().value}function UC(e){const t=new WC(e);return t.verify(),{serviceLookup:t.getServiceLookup(),serviceDependencies:t.getComputedDependencies()}}class WC{requiredReferences;items;serviceLookup=new VC;serviceToGraphItem=new Map;stack=[];constructor(t){this.requiredReferences=t.requiredReferences??[];const r=t.services??[],n=this.items=r.map(i=>({service:i,state:"not-visited",dependencies:{}}));for(const i of n)for(const o of i.service.interfaces)this.registerService(i,o)}verify(){for(const t of this.requiredReferences){let r;switch(t.type){case"framework":r={type:"framework-reference",value:t};break;case"ui":r={type:"ui-reference",packageName:t.packageName,value:t};break}this.visitReference(r)}for(const t of this.items)this.visitItem(t,"root")}getServiceLookup(){return this.serviceLookup}getComputedDependencies(){return new Map(this.items.map(t=>[t.service.id,t.dependencies]))}visitItem(t,r){const n=this.stack,i=t.state;if(i!=="done"){i==="pending"&&this.throwCycleError(t,r),n.push([t,r]),t.state="pending";for(const o of t.service.dependencies)t.dependencies[o.referenceName]=this.visitReference({type:"service-reference",service:t.service,referenceName:o.referenceName,value:o});t.state="done",n.pop()}}visitReference(t){const r=this.findServices(t);if(Array.isArray(r)){for(const n of r)this.visitItem(n,t);return r.map(n=>n.service)}else return this.visitItem(r,t),r.service}registerService(t,r){this.serviceLookup.register(t.service,r),this.serviceToGraphItem.set(t.service,t)}findServices(t){const r=t.value,n=this.serviceLookup.lookup(r);switch(n.type){case"unimplemented":{const o=GC(t);throw new j(V.INTERFACE_NOT_FOUND,o)}case"ambiguous":{const o=XC(t,n.choices);throw new j(V.AMBIGUOUS_DEPENDENCY,o)}}const i=n.value;return Array.isArray(i)?i.map(o=>this.getGraphItem(o)):this.getGraphItem(i)}getGraphItem(t){const r=this.serviceToGraphItem.get(t);if(!r||r.service!==t)throw new j(V.INTERNAL,`Failed to find matching graph item for service '${t.id}'.`);return r}throwCycleError(t,r){const n=this.stack,i=n.findIndex(a=>a[0]===t);if(i===-1)throw new j(V.INTERNAL,"Failed to find cycle participant on the stack.");const o=n.slice(i).concat([[t,r]]).map((a,s)=>{const l=a[0],u=s===0?"root":a[1];let c=`'${l.service.id}'`;return typeof u=="object"&&(c+=` (${qC(u)})`),c});throw new j(V.DEPENDENCY_CYCLE,`Detected dependency cycle: ${o.join(" => ")}.`)}}function GC(e){const t=ic(e.value);switch(e.type){case"service-reference":return`Service '${e.service.id}' requires an unimplemented interface ${t} as dependency '${e.referenceName}'.`;case"ui-reference":return`The UI of package '${e.packageName}' requires an unimplemented interface ${t}.`;case"framework-reference":return`The framework requires an unimplemented interface ${t}.`}}function XC(e,t){const r=ic(e.value),n=Db(t);let i="";switch(e.type){case"service-reference":i=`Service '${e.service.id}' requires the ambiguous interface ${r} as dependency '${e.referenceName}'.`;break;case"ui-reference":i=`The UI of package '${e.packageName}' requires the ambiguous interface ${r}.`;break;case"framework-reference":i=`The framework requires the ambiguous interface ${r}.`;break}return i+=` Possible choices are ${n}.`,i}function qC(e){switch(e.type){case"service-reference":return`'${e.referenceName}' providing '${e.value.interfaceName}'`;case"ui-reference":return`UI of package '${e.packageName}' requiring '${e.value.interfaceName}'`;case"framework-reference":return`framework requiring '${e.value.interfaceName}'`}}var Ed=function(e,t){return Ed=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ed(e,t)};function gr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ed(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var z=function(){return z=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0}),r=[],n=0,i=t;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(nT,function(l,u,c,f,d,m){if(u)t.minimumIntegerDigits=c.length;else{if(f&&d)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Xb.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Ag.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ag,function(l,u,c,f,d,m){return c==="*"?t.minimumFractionDigits=u.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:d&&m?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+m.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var o=i.options[0];o==="w"?t=z(z({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=z(z({},t),Rg(o)));continue}if(Gb.test(i.stem)){t=z(z({},t),Rg(i.stem));continue}var a=qb(i.stem);a&&(t=z(z({},t),a));var s=iT(i.stem);s&&(t=z(z({},t),s))}return t}var tl={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function aT(e,t){for(var r="",n=0;n>1),l="a",u=sT(t);for((u=="H"||u=="k")&&(s=0);s-- >0;)r+=l;for(;a-- >0;)r=u+r}else i==="J"?r+="H":r+=i}return r}function sT(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=tl[n||""]||tl[r||""]||tl["".concat(r,"-001")]||tl["001"];return i[0]}var pf,lT=new RegExp("^".concat(Wb.source,"*")),uT=new RegExp("".concat(Wb.source,"*$"));function Z(e,t){return{start:e,end:t}}var cT=!!String.prototype.startsWith&&"_a".startsWith("a",1),fT=!!String.fromCodePoint,dT=!!Object.fromEntries,hT=!!String.prototype.codePointAt,pT=!!String.prototype.trimStart,mT=!!String.prototype.trimEnd,gT=!!Number.isSafeInteger,vT=gT?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Cd=!0;try{var yT=Kb("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Cd=((pf=yT.exec("a"))===null||pf===void 0?void 0:pf[0])==="a"}catch{Cd=!1}var Ig=cT?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Td=fT?String.fromCodePoint:function(){for(var t=[],r=0;ro;){if(a=t[o++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Lg=dT?Object.fromEntries:function(t){for(var r={},n=0,i=t;n=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},bT=pT?function(t){return t.trimStart()}:function(t){return t.replace(lT,"")},ST=mT?function(t){return t.trimEnd()}:function(t){return t.replace(uT,"")};function Kb(e,t){return new RegExp(e,t)}var _d;if(Cd){var Mg=Kb("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");_d=function(t,r){var n;Mg.lastIndex=r;var i=Mg.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else _d=function(t,r){for(var n=[];;){var i=Yb(t,r);if(i===void 0||Qb(i)||kT(i))break;n.push(i),r+=i>=65536?2:1}return Td.apply(void 0,n)};var xT=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(t,n);if(a.err)return a;i.push(a.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:we.pound,location:Z(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(Y.UNMATCHED_CLOSING_TAG,Z(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Pd(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:we.literal,value:"<".concat(i,"/>"),location:Z(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:we.tag,value:i,children:a,location:Z(n,this.clonePosition())},err:null}:this.error(Y.INVALID_TAG,Z(s,this.clonePosition())))}else return this.error(Y.UNCLOSED_TAG,Z(n,this.clonePosition()))}else return this.error(Y.INVALID_TAG,Z(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ET(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var a=this.tryParseUnquoted(t,r);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var l=Z(n,this.clonePosition());return{val:{type:we.literal,value:i,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!wT(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Td.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Td(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Y.EXPECT_ARGUMENT_CLOSING_BRACE,Z(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Y.EMPTY_ARGUMENT,Z(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Y.MALFORMED_ARGUMENT,Z(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Y.EXPECT_ARGUMENT_CLOSING_BRACE,Z(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:we.argument,value:i,location:Z(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Y.EXPECT_ARGUMENT_CLOSING_BRACE,Z(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(Y.MALFORMED_ARGUMENT,Z(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=_d(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),a=Z(t,o);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(s){case"":return this.error(Y.EXPECT_ARGUMENT_TYPE,Z(a,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var d=ST(f.val);if(d.length===0)return this.error(Y.EXPECT_ARGUMENT_STYLE,Z(this.clonePosition(),this.clonePosition()));var m=Z(c,this.clonePosition());u={style:d,styleLocation:m}}var v=this.tryParseArgumentClose(i);if(v.err)return v;var y=Z(i,this.clonePosition());if(u&&Ig(u?.style,"::",0)){var S=bT(u.style.slice(2));if(s==="number"){var f=this.parseNumberSkeletonFromString(S,u.styleLocation);return f.err?f:{val:{type:we.number,value:n,location:y,style:f.val},err:null}}else{if(S.length===0)return this.error(Y.EXPECT_DATE_TIME_SKELETON,y);var p=S;this.locale&&(p=aT(S,this.locale));var d={type:yo.dateTime,pattern:p,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?JC(p):{}},h=s==="date"?we.date:we.time;return{val:{type:h,value:n,location:y,style:d},err:null}}}return{val:{type:s==="number"?we.number:s==="date"?we.date:we.time,value:n,location:y,style:(o=u?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var g=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Y.EXPECT_SELECT_ARGUMENT_OPTIONS,Z(g,z({},g)));this.bumpSpace();var x=this.parseIdentifierIfPossible(),C=0;if(s!=="select"&&x.value==="offset"){if(!this.bumpIf(":"))return this.error(Y.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Z(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(Y.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Y.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),x=this.parseIdentifierIfPossible(),C=f.val}var _=this.tryParsePluralOrSelectOptions(t,s,r,x);if(_.err)return _;var v=this.tryParseArgumentClose(i);if(v.err)return v;var T=Z(i,this.clonePosition());return s==="select"?{val:{type:we.select,value:n,options:Lg(_.val),location:T},err:null}:{val:{type:we.plural,value:n,options:Lg(_.val),offset:C,pluralType:s==="plural"?"cardinal":"ordinal",location:T},err:null}}default:return this.error(Y.INVALID_ARGUMENT_TYPE,Z(a,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Y.EXPECT_ARGUMENT_CLOSING_BRACE,Z(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Y.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Z(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=tT(t)}catch{return this.error(Y.INVALID_NUMBER_SKELETON,r)}return{val:{type:yo.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?oT(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,a=!1,s=[],l=new Set,u=i.value,c=i.location;;){if(u.length===0){var f=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(Y.EXPECT_PLURAL_ARGUMENT_SELECTOR,Y.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;c=Z(f,this.clonePosition()),u=this.message.slice(f.offset,this.offset())}else break}if(l.has(u))return this.error(r==="select"?Y.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Y.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);u==="other"&&(a=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?Y.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Y.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Z(this.clonePosition(),this.clonePosition()));var v=this.parseMessage(t+1,r,n);if(v.err)return v;var y=this.tryParseArgumentClose(m);if(y.err)return y;s.push([u,{value:v.val,location:Z(m,this.clonePosition())}]),l.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,c=o.location}return s.length===0?this.error(r==="select"?Y.EXPECT_SELECT_ARGUMENT_SELECTOR:Y.EXPECT_PLURAL_ARGUMENT_SELECTOR,Z(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(Y.MISSING_OTHER_CLAUSE,Z(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var l=Z(i,this.clonePosition());return o?(a*=n,vT(a)?{val:a,err:null}:this.error(r,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Yb(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Ig(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Qb(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Pd(e){return e>=97&&e<=122||e>=65&&e<=90}function wT(e){return Pd(e)||e===47}function ET(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Qb(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function kT(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Ad(e){e.forEach(function(t){if(delete t.location,jb(t)||Vb(t))for(var r in t.options)delete t.options[r].location,Ad(t.options[r].value);else Bb(t)&&Ub(t.style)||(zb(t)||Fb(t))&&kd(t.style)?delete t.style.location:Hb(t)&&Ad(t.children)})}function CT(e,t){t===void 0&&(t={}),t=z({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new xT(e,t).parse();if(r.err){var n=SyntaxError(Y[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||Ad(r.val),r.val}function xr(e,t){var r=t&&t.cache?t.cache:$T,n=t&&t.serializer?t.serializer:RT,i=t&&t.strategy?t.strategy:_T;return i(e,{cache:r,serializer:n})}function TT(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Zb(e,t,r,n){var i=TT(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function Jb(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,n),t.set(i,o)),o}function rp(e,t,r,n,i){return r.bind(t,e,n,i)}function _T(e,t){var r=e.length===1?Zb:Jb;return rp(e,this,r,t.cache.create(),t.serializer)}function PT(e,t){return rp(e,this,Jb,t.cache.create(),t.serializer)}function AT(e,t){return rp(e,this,Zb,t.cache.create(),t.serializer)}var RT=function(){return JSON.stringify(arguments)};function np(){this.cache=Object.create(null)}np.prototype.get=function(e){return this.cache[e]};np.prototype.set=function(e,t){this.cache[e]=t};var $T={create:function(){return new np}},wr={variadic:PT,monadic:AT},Or;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Or||(Or={}));var Bn=function(e){gr(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Og=function(e){gr(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Or.INVALID_VALUE,o)||this}return t}(Bn),IT=function(e){gr(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Or.INVALID_VALUE,i)||this}return t}(Bn),LT=function(e){gr(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Or.MISSING_VALUE,n)||this}return t}(Bn),ft;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ft||(ft={}));function MT(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==ft.literal||r.type!==ft.literal?t.push(r):n.value+=r.value,t},[])}function OT(e){return typeof e=="function"}function Nl(e,t,r,n,i,o,a){if(e.length===1&&Pg(e[0]))return[{type:ft.literal,value:e[0].value}];for(var s=[],l=0,u=e;l"u")){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=CT,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),bi;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(bi||(bi={}));var _s=function(e){gr(t,e);function t(r,n,i){var o=this,a=i?i instanceof Error?i:new Error(String(i)):void 0;return o=e.call(this,"[@formatjs/intl Error ".concat(r,"] ").concat(n,` -`).concat(a?` -`.concat(a.message,` -`).concat(a.stack):""))||this,o.code=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(o,t),o}return t}(Error),zT=function(e){gr(t,e);function t(r,n){return e.call(this,bi.UNSUPPORTED_FORMATTER,r,n)||this}return t}(_s),FT=function(e){gr(t,e);function t(r,n){return e.call(this,bi.INVALID_CONFIG,r,n)||this}return t}(_s),Ng=function(e){gr(t,e);function t(r,n){return e.call(this,bi.MISSING_DATA,r,n)||this}return t}(_s),ir=function(e){gr(t,e);function t(r,n,i){var o=e.call(this,bi.FORMAT_ERROR,"".concat(r,` -Locale: `).concat(n,` -`),i)||this;return o.locale=n,o}return t}(_s),gf=function(e){gr(t,e);function t(r,n,i,o){var a=e.call(this,"".concat(r,` -MessageID: `).concat(i?.id,` -Default Message: `).concat(i?.defaultMessage,` -Description: `).concat(i?.description,` -`),n,o)||this;return a.descriptor=i,a.locale=n,a}return t}(ir),jT=function(e){gr(t,e);function t(r,n){var i=e.call(this,bi.MISSING_TRANSLATION,'Missing message: "'.concat(r.id,'" for locale "').concat(n,'", using ').concat(r.defaultMessage?"default message (".concat(typeof r.defaultMessage=="string"?r.defaultMessage:r.defaultMessage.map(function(o){var a;return(a=o.value)!==null&&a!==void 0?a:JSON.stringify(o)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=r,i}return t}(_s);function Ti(e,t,r){return r===void 0&&(r={}),t.reduce(function(n,i){return i in e?n[i]=e[i]:i in r&&(n[i]=r[i]),n},{})}var VT=function(e){},HT=function(e){},UT={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:VT,onWarn:HT};function t1(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Zn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function WT(e){e===void 0&&(e=t1());var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,i=xr(function(){for(var s,l=[],u=0;u[n[o].serviceId,i])}async getApi(){const t=this.providers.map(async([o,a])=>{const s=await a.getApiMethods();return{serviceId:o,methods:s}}),r=await Promise.all(t),n=new Map;for(const{serviceId:o,methods:a}of r)for(const[s,l]of Object.entries(a)){const u=n.get(s);if(u)throw new j(V.DUPLICATE_API_METHODS,`Cannot define API method '${s}' from '${o}' (method is also defined by '${u.serviceId}').`);n.set(s,{serviceId:o,method:l})}const i={};for(const[o,a]of n.entries())i[o]=a.method;return i}}var Ss,xs,ws,Es,ks,Cs;class b_{constructor(t,r){Vt(this,Ss);Vt(this,xs);Vt(this,ws);Vt(this,Es);Vt(this,ks);Vt(this,Cs);At(this,Ss,r.host),At(this,xs,r.shadowRoot),At(this,ws,r.container),At(this,Es,r.locale),At(this,ks,Object.freeze(Array.from(r.supportedLocales))),At(this,Cs,r.changeLocale)}getHostElement(){return Le(this,Ss)}getShadowRoot(){return Le(this,xs)}getApplicationContainer(){return Le(this,ws)}getLocale(){return Le(this,Es)}setLocale(t){Le(this,Cs).call(this,t)}getSupportedLocales(){return Le(this,ks)}}Ss=new WeakMap,xs=new WeakMap,ws=new WeakMap,Es=new WeakMap,ks=new WeakMap,Cs=new WeakMap;const S_=nc("runtime:ApplicationLifecycleEventService");var Ts;class x_{constructor(t){Vt(this,Ts);const r=t.references.listeners,n=t.referencesMeta.listeners;At(this,Ts,r.map((i,o)=>[n[o].serviceId,i]))}emitLifecycleEvent(t){const r=(()=>{switch(t){case"after-start":return"afterApplicationStart";case"before-stop":return"beforeApplicationStop";default:throw new j(V.INTERNAL,`Invalid event '${t}'`)}})();for(const[n,i]of Le(this,Ts))try{i[r]?.()}catch(o){S_.error(`Unexpected error from application lifecycle listener ${n}`,o)}}}Ts=new WeakMap;const nl="@open-pioneer/runtime",w_="integration.ApiExtension",op="runtime.ApiService",E_="runtime.ApplicationContext",ap="runtime.ApplicationLifecycleEventService",k_="runtime.AutoStart";function C_(e){const t=m_(),r=new oo({name:"ApiServiceImpl",packageName:nl,factory:_g(y_),intl:t,interfaces:[{interfaceName:op,qualifier:"builtin"}],dependencies:[{referenceName:"providers",interfaceName:w_,all:!0}]}),n=new oo({name:"ApplicationContextImpl",packageName:nl,factory:IC(o=>new b_(o,e)),intl:t,interfaces:[{interfaceName:E_,qualifier:"builtin"}]}),i=new oo({name:"ApplicationLifecycleEventServiceImpl",packageName:nl,factory:_g(x_),intl:t,interfaces:[{interfaceName:ap,qualifier:"builtin"}],dependencies:[{referenceName:"listeners",interfaceName:"runtime.ApplicationLifecycleListener",all:!0}]});return new oc({name:nl,services:[r,n,i],intl:t})}const jg=nc("runtime:ServiceLayer"),il={type:"undeclared"},T_={type:"unknown-package"};class __{allServices;requiredServices;serviceLookup;serviceDependencies;declaredDependencies;state="not-started";constructor(t,r=[]){const n=t.map(l=>l.services).flat(),i=t.map(l=>l.uiReferences.map(u=>({type:"ui",packageName:l.name,...u}))).flat(),o=[...r.map(l=>({type:"framework",...l})),...i],{serviceLookup:a,serviceDependencies:s}=UC({services:n,requiredReferences:o});this.allServices=n,this.requiredServices=P_(o,a),this.serviceLookup=a,this.serviceDependencies=s,this.declaredDependencies=A_(t)}destroy(){for(const t of this.requiredServices)this.destroyService(t);this.state="destroyed"}start(){if(this.state!=="not-started")throw new j(V.INTERNAL,"Service layer was already started.");for(const t of this.requiredServices)this.createService(t);this.state="started"}getService(t,r,n){if(this.state!=="started")throw new j(V.INTERNAL,"Service layer is not started.");if(!n?.ignoreDeclarationCheck){const i=this.checkDependency(t,r);if(i)return i}return this.serviceLookup.lookupOne(r)}getServices(t,r){if(this.state!=="started")throw new j(V.INTERNAL,"Service layer is not started.");const n=this.checkDependency(t,{interfaceName:r,all:!0});return n||this.serviceLookup.lookupAll(r)}createService(t){if(t.state==="constructed"){const i=t.getInstanceOrThrow();return t.addRef(),i}if(t.state==="constructing")throw new j(V.INTERNAL,"Cycle during service construction.");if(t.state!=="not-constructed")throw new j(V.INTERNAL,"Invalid service state.");const r={},n={};t.beforeCreate();for(const[i,o]of Object.entries(this.getServiceDeps(t))){const[a,s]=this.getReference(o);r[i]=a,n[i]=s}return jg.debug(`Creating service '${t.id}'.`),t.create({references:r,referencesMeta:n})}destroyService(t){if(t.state!=="destroyed"){t.removeRef()<=0&&(jg.debug(`Destroying service '${t.id}'`),t.destroy());for(const r of Object.values(this.getServiceDeps(t)))if(Array.isArray(r))for(const n of r)this.destroyService(n);else this.destroyService(r)}}checkDependency(t,r){const n=this.declaredDependencies.get(t);if(!n)return T_;const i=n.get(r.interfaceName);return i?tp(r)?r.qualifier==null?i.unqualified?void 0:il:i.qualifiers.has(r.qualifier)?void 0:il:i.all?void 0:il:il}getReference(t){if(Array.isArray(t)){const i=[],o=[];for(const a of t){const[s,l]=this.getReference(a);i.push(s),o.push(l)}return[i,o]}const r=this.createService(t),n={serviceId:t.id};return[r,n]}getServiceDeps(t){const r=this.serviceDependencies.get(t.id);if(!r)throw new j(V.INTERNAL,`Failed to find precomputed service dependencies for '${t.id}'.`);return r}}function P_(e,t){const r=new Set;for(const n of e){const i=t.lookup(n);if(i.type!=="found")throw new j(V.INTERNAL,`Failed to find required reference to ${ic(n)}.`);if(Array.isArray(i.value))for(const o of i.value)r.add(o);else r.add(i.value)}return r}function A_(e){const t=new Map;for(const r of e){const n=r.name,i=new Map;for(const o of r.uiReferences){let a=i.get(o.interfaceName);if(a||(a={all:!1,unqualified:!1,qualifiers:new Set},i.set(o.interfaceName,a)),$C(o))a.all=!0;else if(tp(o))o.qualifier==null?a.unqualified=!0:a.qualifiers.add(o.qualifier);else throw new j(V.INTERNAL,"Unexpected implementation spec.")}t.set(n,i)}return t}var ol=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a1={exports:{}},sc={},s1={exports:{}},X={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Ps=Symbol.for("react.element"),R_=Symbol.for("react.portal"),$_=Symbol.for("react.fragment"),I_=Symbol.for("react.strict_mode"),L_=Symbol.for("react.profiler"),M_=Symbol.for("react.provider"),O_=Symbol.for("react.context"),N_=Symbol.for("react.forward_ref"),D_=Symbol.for("react.suspense"),B_=Symbol.for("react.memo"),z_=Symbol.for("react.lazy"),Vg=Symbol.iterator;function F_(e){return e===null||typeof e!="object"?null:(e=Vg&&e[Vg]||e["@@iterator"],typeof e=="function"?e:null)}var l1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},u1=Object.assign,c1={};function No(e,t,r){this.props=e,this.context=t,this.refs=c1,this.updater=r||l1}No.prototype.isReactComponent={};No.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};No.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f1(){}f1.prototype=No.prototype;function lp(e,t,r){this.props=e,this.context=t,this.refs=c1,this.updater=r||l1}var up=lp.prototype=new f1;up.constructor=lp;u1(up,No.prototype);up.isPureReactComponent=!0;var Hg=Array.isArray,d1=Object.prototype.hasOwnProperty,cp={current:null},h1={key:!0,ref:!0,__self:!0,__source:!0};function p1(e,t,r){var n,i={},o=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)d1.call(t,n)&&!h1.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,te=L[ee];if(0>>1;eei(be,U))Iei(ut,be)?(L[ee]=ut,L[Ie]=U,ee=Ie):(L[ee]=be,L[$e]=U,ee=$e);else if(Iei(ut,U))L[ee]=ut,L[Ie]=U,ee=Ie;else break e}}return D}function i(L,D){var U=L.sortIndex-D.sortIndex;return U!==0?U:L.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,f=null,d=3,m=!1,v=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(L){for(var D=r(u);D!==null;){if(D.callback===null)n(u);else if(D.startTime<=L)n(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=r(u)}}function x(L){if(y=!1,g(L),!v)if(r(l)!==null)v=!0,q(C);else{var D=r(u);D!==null&&le(x,D.startTime-L)}}function C(L,D){v=!1,y&&(y=!1,p(A),A=-1),m=!0;var U=d;try{for(g(D),f=r(l);f!==null&&(!(f.expirationTime>D)||L&&!B());){var ee=f.callback;if(typeof ee=="function"){f.callback=null,d=f.priorityLevel;var te=ee(f.expirationTime<=D);D=e.unstable_now(),typeof te=="function"?f.callback=te:f===r(l)&&n(l),g(D)}else n(l);f=r(l)}if(f!==null)var G=!0;else{var $e=r(u);$e!==null&&le(x,$e.startTime-D),G=!1}return G}finally{f=null,d=U,m=!1}}var _=!1,T=null,A=-1,M=5,R=-1;function B(){return!(e.unstable_now()-RL||125ee?(L.sortIndex=U,t(u,L),r(l)===null&&L===r(u)&&(y?(p(A),A=-1):y=!0,le(x,U-ee))):(L.sortIndex=te,t(l,L),v||m||(v=!0,q(C))),L},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(L){var D=d;return function(){var U=d;d=D;try{return L.apply(this,arguments)}finally{d=U}}}})(b1);y1.exports=b1;var Q_=y1.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Z_=k,Ot=Q_;function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$d=Object.prototype.hasOwnProperty,J_=/^[: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]*$/,Gg={},Xg={};function e2(e){return $d.call(Xg,e)?!0:$d.call(Gg,e)?!1:J_.test(e)?Xg[e]=!0:(Gg[e]=!0,!1)}function t2(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function r2(e,t,r,n){if(t===null||typeof t>"u"||t2(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function vt(e,t,r,n,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){et[e]=new vt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];et[t]=new vt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){et[e]=new vt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){et[e]=new vt(e,2,!1,e,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(e){et[e]=new vt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){et[e]=new vt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){et[e]=new vt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){et[e]=new vt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){et[e]=new vt(e,5,!1,e.toLowerCase(),null,!1,!1)});var dp=/[\-:]([a-z])/g;function hp(e){return e[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(e){var t=e.replace(dp,hp);et[t]=new vt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(dp,hp);et[t]=new vt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(dp,hp);et[t]=new vt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){et[e]=new vt(e,1,!1,e.toLowerCase(),null,!1,!1)});et.xlinkHref=new vt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){et[e]=new vt(e,1,!1,e.toLowerCase(),null,!0,!0)});function pp(e,t,r,n){var i=et.hasOwnProperty(t)?et[t]:null;(i!==null?i.type!==0:n||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{bf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ca(e):""}function n2(e){switch(e.tag){case 5:return ca(e.type);case 16:return ca("Lazy");case 13:return ca("Suspense");case 19:return ca("SuspenseList");case 0:case 2:case 15:return e=Sf(e.type,!1),e;case 11:return e=Sf(e.type.render,!1),e;case 1:return e=Sf(e.type,!0),e;default:return""}}function Od(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Di:return"Fragment";case Ni:return"Portal";case Id:return"Profiler";case mp:return"StrictMode";case Ld:return"Suspense";case Md:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case w1:return(e.displayName||"Context")+".Consumer";case x1:return(e._context.displayName||"Context")+".Provider";case gp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vp:return t=e.displayName||null,t!==null?t:Od(e.type)||"Memo";case bn:t=e._payload,e=e._init;try{return Od(e(t))}catch{}}return null}function i2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Od(t);case 8:return t===mp?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Mn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function k1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function o2(e){var t=k1(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ll(e){e._valueTracker||(e._valueTracker=o2(e))}function C1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=k1(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function hu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Nd(e,t){var r=t.checked;return Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Yg(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Mn(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function T1(e,t){t=t.checked,t!=null&&pp(e,"checked",t,!1)}function Dd(e,t){T1(e,t);var r=Mn(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Bd(e,t.type,r):t.hasOwnProperty("defaultValue")&&Bd(e,t.type,Mn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Kg(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Bd(e,t,r){(t!=="number"||hu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var fa=Array.isArray;function ao(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ul.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ua(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var wa={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},a2=["Webkit","ms","Moz","O"];Object.keys(wa).forEach(function(e){a2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wa[t]=wa[e]})});function R1(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||wa.hasOwnProperty(e)&&wa[e]?(""+t).trim():t+"px"}function $1(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=R1(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var s2=Re({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 jd(e,t){if(t){if(s2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function Vd(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Hd=null;function yp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ud=null,so=null,lo=null;function Jg(e){if(e=$s(e)){if(typeof Ud!="function")throw Error(I(280));var t=e.stateNode;t&&(t=dc(t),Ud(e.stateNode,e.type,t))}}function I1(e){so?lo?lo.push(e):lo=[e]:so=e}function L1(){if(so){var e=so,t=lo;if(lo=so=null,Jg(e),t)for(e=0;e>>=0,e===0?32:31-(y2(e)/b2|0)|0}var cl=64,fl=4194304;function da(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~i;s!==0?n=da(s):(o&=a,o!==0&&(n=da(o)))}else a=r&~i,a!==0?n=da(a):o!==0&&(n=da(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function As(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hr(t),e[t]=r}function E2(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=ka),lv=" ",uv=!1;function J1(e,t){switch(e){case"keyup":return Q2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bi=!1;function J2(e,t){switch(e){case"compositionend":return eS(t);case"keypress":return t.which!==32?null:(uv=!0,lv);case"textInput":return e=t.data,e===lv&&uv?null:e;default:return null}}function eP(e,t){if(Bi)return e==="compositionend"||!Tp&&J1(e,t)?(e=Q1(),Fl=Ep=kn=null,Bi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=hv(r)}}function iS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?iS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function oS(){for(var e=window,t=hu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=hu(e.document)}return t}function _p(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function uP(e){var t=oS(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&iS(r.ownerDocument.documentElement,r)){if(n!==null&&_p(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!e.extend&&o>n&&(i=n,n=o,o=i),i=pv(r,o);var a=pv(r,n);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,zi=null,Kd=null,Ta=null,Qd=!1;function mv(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Qd||zi==null||zi!==hu(n)||(n=zi,"selectionStart"in n&&_p(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ta&&Ka(Ta,n)||(Ta=n,n=Su(Kd,"onSelect"),0Vi||(e.current=nh[Vi],nh[Vi]=null,Vi--)}function ge(e,t){Vi++,nh[Vi]=e.current,e.current=t}var On={},lt=Fn(On),xt=Fn(!1),Si=On;function So(e,t){var r=e.type.contextTypes;if(!r)return On;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function wt(e){return e=e.childContextTypes,e!=null}function wu(){Ee(xt),Ee(lt)}function wv(e,t,r){if(lt.current!==On)throw Error(I(168));ge(lt,t),ge(xt,r)}function pS(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(I(108,i2(e)||"Unknown",i));return Re({},r,n)}function Eu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||On,Si=lt.current,ge(lt,e),ge(xt,xt.current),!0}function Ev(e,t,r){var n=e.stateNode;if(!n)throw Error(I(169));r?(e=pS(e,t,Si),n.__reactInternalMemoizedMergedChildContext=e,Ee(xt),Ee(lt),ge(lt,e)):Ee(xt),ge(xt,r)}var jr=null,hc=!1,Mf=!1;function mS(e){jr===null?jr=[e]:jr.push(e)}function xP(e){hc=!0,mS(e)}function jn(){if(!Mf&&jr!==null){Mf=!0;var e=0,t=fe;try{var r=jr;for(fe=1;e>=a,i-=a,Wr=1<<32-hr(t)+i|r<A?(M=T,T=null):M=T.sibling;var R=d(p,T,g[A],x);if(R===null){T===null&&(T=M);break}e&&T&&R.alternate===null&&t(p,T),h=o(R,h,A),_===null?C=R:_.sibling=R,_=R,T=M}if(A===g.length)return r(p,T),Te&&ti(p,A),C;if(T===null){for(;AA?(M=T,T=null):M=T.sibling;var B=d(p,T,R.value,x);if(B===null){T===null&&(T=M);break}e&&T&&B.alternate===null&&t(p,T),h=o(B,h,A),_===null?C=B:_.sibling=B,_=B,T=M}if(R.done)return r(p,T),Te&&ti(p,A),C;if(T===null){for(;!R.done;A++,R=g.next())R=f(p,R.value,x),R!==null&&(h=o(R,h,A),_===null?C=R:_.sibling=R,_=R);return Te&&ti(p,A),C}for(T=n(p,T);!R.done;A++,R=g.next())R=m(T,p,A,R.value,x),R!==null&&(e&&R.alternate!==null&&T.delete(R.key===null?A:R.key),h=o(R,h,A),_===null?C=R:_.sibling=R,_=R);return e&&T.forEach(function(ye){return t(p,ye)}),Te&&ti(p,A),C}function S(p,h,g,x){if(typeof g=="object"&&g!==null&&g.type===Di&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case sl:e:{for(var C=g.key,_=h;_!==null;){if(_.key===C){if(C=g.type,C===Di){if(_.tag===7){r(p,_.sibling),h=i(_,g.props.children),h.return=p,p=h;break e}}else if(_.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===bn&&Tv(C)===_.type){r(p,_.sibling),h=i(_,g.props),h.ref=Jo(p,_,g),h.return=p,p=h;break e}r(p,_);break}else t(p,_);_=_.sibling}g.type===Di?(h=hi(g.props.children,p.mode,x,g.key),h.return=p,p=h):(x=ql(g.type,g.key,g.props,null,p.mode,x),x.ref=Jo(p,h,g),x.return=p,p=x)}return a(p);case Ni:e:{for(_=g.key;h!==null;){if(h.key===_)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){r(p,h.sibling),h=i(h,g.children||[]),h.return=p,p=h;break e}else{r(p,h);break}else t(p,h);h=h.sibling}h=Vf(g,p.mode,x),h.return=p,p=h}return a(p);case bn:return _=g._init,S(p,h,_(g._payload),x)}if(fa(g))return v(p,h,g,x);if(qo(g))return y(p,h,g,x);yl(p,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,h!==null&&h.tag===6?(r(p,h.sibling),h=i(h,g),h.return=p,p=h):(r(p,h),h=jf(g,p.mode,x),h.return=p,p=h),a(p)):r(p,h)}return S}var wo=bS(!0),SS=bS(!1),Tu=Fn(null),_u=null,Wi=null,$p=null;function Ip(){$p=Wi=_u=null}function Lp(e){var t=Tu.current;Ee(Tu),e._currentValue=t}function ah(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function co(e,t){_u=e,$p=Wi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(St=!0),e.firstContext=null)}function er(e){var t=e._currentValue;if($p!==e)if(e={context:e,memoizedValue:t,next:null},Wi===null){if(_u===null)throw Error(I(308));Wi=e,_u.dependencies={lanes:0,firstContext:e}}else Wi=Wi.next=e;return t}var li=null;function Mp(e){li===null?li=[e]:li.push(e)}function xS(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Mp(t)):(r.next=i.next,i.next=r),t.interleaved=r,on(e,n)}function on(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Sn=!1;function Op(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Yr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Rn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,J&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,on(e,r)}return i=n.interleaved,i===null?(t.next=t,Mp(n)):(t.next=i.next,i.next=t),n.interleaved=t,on(e,r)}function Vl(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Sp(e,r)}}function _v(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?i=o=a:o=o.next=a,r=r.next}while(r!==null);o===null?i=o=t:o=o.next=t}else i=o=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Pu(e,t,r,n){var i=e.updateQueue;Sn=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?o=u:a.next=u,a=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;a=0,c=u=l=null,s=o;do{var d=s.lane,m=s.eventTime;if((n&d)===d){c!==null&&(c=c.next={eventTime:m,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,y=s;switch(d=t,m=r,y.tag){case 1:if(v=y.payload,typeof v=="function"){f=v.call(m,f,d);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,d=typeof v=="function"?v.call(m,f,d):v,d==null)break e;f=Re({},f,d);break e;case 2:Sn=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[s]:d.push(s))}else m={eventTime:m,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=m,l=f):c=c.next=m,a|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;d=s,s=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ei|=a,e.lanes=a,e.memoizedState=f}}function Pv(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Nf.transition;Nf.transition={};try{e(!1),t()}finally{fe=r,Nf.transition=n}}function zS(){return tr().memoizedState}function CP(e,t,r){var n=In(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},FS(e))jS(t,r);else if(r=xS(e,t,r,n),r!==null){var i=pt();pr(r,e,n,i),VS(r,t,n)}}function TP(e,t,r){var n=In(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(FS(e))jS(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,r);if(i.hasEagerState=!0,i.eagerState=s,mr(s,a)){var l=t.interleaved;l===null?(i.next=i,Mp(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=xS(e,t,i,n),r!==null&&(i=pt(),pr(r,e,n,i),VS(r,t,n))}}function FS(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function jS(e,t){_a=Ru=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function VS(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Sp(e,r)}}var $u={readContext:er,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useInsertionEffect:tt,useLayoutEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useMutableSource:tt,useSyncExternalStore:tt,useId:tt,unstable_isNewReconciler:!1},_P={readContext:er,useCallback:function(e,t){return Sr().memoizedState=[e,t===void 0?null:t],e},useContext:er,useEffect:Rv,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ul(4194308,4,MS.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ul(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ul(4,2,e,t)},useMemo:function(e,t){var r=Sr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Sr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=CP.bind(null,Ae,e),[n.memoizedState,e]},useRef:function(e){var t=Sr();return e={current:e},t.memoizedState=e},useState:Av,useDebugValue:Hp,useDeferredValue:function(e){return Sr().memoizedState=e},useTransition:function(){var e=Av(!1),t=e[0];return e=kP.bind(null,e[1]),Sr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ae,i=Sr();if(Te){if(r===void 0)throw Error(I(407));r=r()}else{if(r=t(),Ge===null)throw Error(I(349));wi&30||TS(n,t,r)}i.memoizedState=r;var o={value:r,getSnapshot:t};return i.queue=o,Rv(PS.bind(null,n,o,e),[e]),n.flags|=2048,is(9,_S.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Sr(),t=Ge.identifierPrefix;if(Te){var r=Gr,n=Wr;r=(n&~(1<<32-hr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=rs++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Tr]=t,e[Ja]=n,ZS(e,t,!1,!1),t.stateNode=e;e:{switch(a=Vd(r,n),r){case"dialog":Se("cancel",e),Se("close",e),i=n;break;case"iframe":case"object":case"embed":Se("load",e),i=n;break;case"video":case"audio":for(i=0;iCo&&(t.flags|=128,n=!0,ea(o,!1),t.lanes=4194304)}else{if(!n)if(e=Au(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ea(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Te)return rt(t),null}else 2*Ne()-o.renderingStartTime>Co&&r!==1073741824&&(t.flags|=128,n=!0,ea(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(r=o.last,r!==null?r.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ne(),t.sibling=null,r=_e.current,ge(_e,n?r&1|2:r&1),t):(rt(t),null);case 22:case 23:return Yp(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Rt&1073741824&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function OP(e,t){switch(Ap(t),t.tag){case 1:return wt(t.type)&&wu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Eo(),Ee(xt),Ee(lt),Bp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Dp(t),null;case 13:if(Ee(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));xo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(_e),null;case 4:return Eo(),null;case 10:return Lp(t.type._context),null;case 22:case 23:return Yp(),null;case 24:return null;default:return null}}var Sl=!1,ot=!1,NP=typeof WeakSet=="function"?WeakSet:Set,O=null;function Gi(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Me(e,t,n)}else r.current=null}function mh(e,t,r){try{r()}catch(n){Me(e,t,n)}}var jv=!1;function DP(e,t){if(Zd=yu,e=oS(),_p(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var m;f!==r||i!==0&&f.nodeType!==3||(s=a+i),f!==o||n!==0&&f.nodeType!==3||(l=a+n),f.nodeType===3&&(a+=f.nodeValue.length),(m=f.firstChild)!==null;)d=f,f=m;for(;;){if(f===e)break t;if(d===r&&++u===i&&(s=a),d===o&&++c===n&&(l=a),(m=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=m}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Jd={focusedElem:e,selectionRange:r},yu=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,S=v.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:ur(t.type,y),S);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(x){Me(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return v=jv,jv=!1,v}function Pa(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&mh(t,r,o)}i=i.next}while(i!==n)}}function gc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function gh(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function tx(e){var t=e.alternate;t!==null&&(e.alternate=null,tx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Tr],delete t[Ja],delete t[rh],delete t[bP],delete t[SP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rx(e){return e.tag===5||e.tag===3||e.tag===4}function Vv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vh(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=xu));else if(n!==4&&(e=e.child,e!==null))for(vh(e,t,r),e=e.sibling;e!==null;)vh(e,t,r),e=e.sibling}function yh(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(yh(e,t,r),e=e.sibling;e!==null;)yh(e,t,r),e=e.sibling}var Ye=null,cr=!1;function pn(e,t,r){for(r=r.child;r!==null;)nx(e,t,r),r=r.sibling}function nx(e,t,r){if(Ar&&typeof Ar.onCommitFiberUnmount=="function")try{Ar.onCommitFiberUnmount(lc,r)}catch{}switch(r.tag){case 5:ot||Gi(r,t);case 6:var n=Ye,i=cr;Ye=null,pn(e,t,r),Ye=n,cr=i,Ye!==null&&(cr?(e=Ye,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ye.removeChild(r.stateNode));break;case 18:Ye!==null&&(cr?(e=Ye,r=r.stateNode,e.nodeType===8?Lf(e.parentNode,r):e.nodeType===1&&Lf(e,r),qa(e)):Lf(Ye,r.stateNode));break;case 4:n=Ye,i=cr,Ye=r.stateNode.containerInfo,cr=!0,pn(e,t,r),Ye=n,cr=i;break;case 0:case 11:case 14:case 15:if(!ot&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&mh(r,t,a),i=i.next}while(i!==n)}pn(e,t,r);break;case 1:if(!ot&&(Gi(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Me(r,t,s)}pn(e,t,r);break;case 21:pn(e,t,r);break;case 22:r.mode&1?(ot=(n=ot)||r.memoizedState!==null,pn(e,t,r),ot=n):pn(e,t,r);break;default:pn(e,t,r)}}function Hv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new NP),t.forEach(function(n){var i=GP.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function sr(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=a),n&=~o}if(n=i,n=Ne()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*zP(n/1960))-n,10e?16:e,Cn===null)var n=!1;else{if(e=Cn,Cn=null,Mu=0,J&6)throw Error(I(331));var i=J;for(J|=4,O=e.current;O!==null;){var o=O,a=o.child;if(O.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lNe()-Xp?di(e,0):Gp|=r),Et(e,t)}function fx(e,t){t===0&&(e.mode&1?(t=fl,fl<<=1,!(fl&130023424)&&(fl=4194304)):t=1);var r=pt();e=on(e,t),e!==null&&(As(e,t,r),Et(e,r))}function WP(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),fx(e,r)}function GP(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(I(314))}n!==null&&n.delete(t),fx(e,r)}var dx;dx=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||xt.current)St=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return St=!1,LP(e,t,r);St=!!(e.flags&131072)}else St=!1,Te&&t.flags&1048576&&gS(t,Cu,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Wl(e,t),e=t.pendingProps;var i=So(t,lt.current);co(t,r),i=Fp(null,t,n,e,i,r);var o=jp();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,wt(n)?(o=!0,Eu(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Op(t),i.updater=mc,t.stateNode=i,i._reactInternals=t,lh(t,n,e,r),t=fh(null,t,n,!0,o,r)):(t.tag=0,Te&&o&&Pp(t),dt(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Wl(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=qP(n),e=ur(n,e),i){case 0:t=ch(null,t,n,e,r);break e;case 1:t=Bv(null,t,n,e,r);break e;case 11:t=Nv(null,t,n,e,r);break e;case 14:t=Dv(null,t,n,ur(n.type,e),r);break e}throw Error(I(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ur(n,i),ch(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ur(n,i),Bv(e,t,n,i,r);case 3:e:{if(YS(t),e===null)throw Error(I(387));n=t.pendingProps,o=t.memoizedState,i=o.element,wS(e,t),Pu(t,n,null,r);var a=t.memoizedState;if(n=a.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=ko(Error(I(423)),t),t=zv(e,t,n,r,i);break e}else if(n!==i){i=ko(Error(I(424)),t),t=zv(e,t,n,r,i);break e}else for($t=An(t.stateNode.containerInfo.firstChild),It=t,Te=!0,fr=null,r=SS(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(xo(),n===i){t=an(e,t,r);break e}dt(e,t,n,r)}t=t.child}return t;case 5:return ES(t),e===null&&oh(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,eh(n,i)?a=null:o!==null&&eh(n,o)&&(t.flags|=32),qS(e,t),dt(e,t,a,r),t.child;case 6:return e===null&&oh(t),null;case 13:return KS(e,t,r);case 4:return Np(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=wo(t,null,n,r):dt(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ur(n,i),Nv(e,t,n,i,r);case 7:return dt(e,t,t.pendingProps,r),t.child;case 8:return dt(e,t,t.pendingProps.children,r),t.child;case 12:return dt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,ge(Tu,n._currentValue),n._currentValue=a,o!==null)if(mr(o.value,a)){if(o.children===i.children&&!xt.current){t=an(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=Yr(-1,r&-r),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),ah(o.return,r,t),s.lanes|=r;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(I(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),ah(a,r,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}dt(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,co(t,r),i=er(i),n=n(i),t.flags|=1,dt(e,t,n,r),t.child;case 14:return n=t.type,i=ur(n,t.pendingProps),i=ur(n.type,i),Dv(e,t,n,i,r);case 15:return GS(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ur(n,i),Wl(e,t),t.tag=1,wt(n)?(e=!0,Eu(t)):e=!1,co(t,r),HS(t,n,i),lh(t,n,i,r),fh(null,t,n,!0,e,r);case 19:return QS(e,t,r);case 22:return XS(e,t,r)}throw Error(I(156,t.tag))};function hx(e,t){return F1(e,t)}function XP(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,t,r,n){return new XP(e,t,r,n)}function Qp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qP(e){if(typeof e=="function")return Qp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===gp)return 11;if(e===vp)return 14}return 2}function Ln(e,t){var r=e.alternate;return r===null?(r=Yt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function ql(e,t,r,n,i,o){var a=2;if(n=e,typeof e=="function")Qp(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Di:return hi(r.children,i,o,t);case mp:a=8,i|=8;break;case Id:return e=Yt(12,r,t,i|2),e.elementType=Id,e.lanes=o,e;case Ld:return e=Yt(13,r,t,i),e.elementType=Ld,e.lanes=o,e;case Md:return e=Yt(19,r,t,i),e.elementType=Md,e.lanes=o,e;case E1:return yc(r,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case x1:a=10;break e;case w1:a=9;break e;case gp:a=11;break e;case vp:a=14;break e;case bn:a=16,n=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=Yt(a,r,t,i),t.elementType=e,t.type=n,t.lanes=o,t}function hi(e,t,r,n){return e=Yt(7,e,n,t),e.lanes=r,e}function yc(e,t,r,n){return e=Yt(22,e,n,t),e.elementType=E1,e.lanes=r,e.stateNode={isHidden:!1},e}function jf(e,t,r){return e=Yt(6,e,null,t),e.lanes=r,e}function Vf(e,t,r){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function YP(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wf(0),this.expirationTimes=wf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wf(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Zp(e,t,r,n,i,o,a,s,l){return e=new YP(e,t,r,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Yt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Op(o),e}function KP(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vx)}catch(e){console.error(e)}}vx(),v1.exports=Bt;var rm=v1.exports,yx,Qv=rm;yx=Qv.createRoot,Qv.hydrateRoot;const nm=k.createContext(null);var tA=!1;function rA(e){if(e.sheet)return e.sheet;for(var t=0;t0?Qe(zo,--Tt):0,To--,Be===10&&(To=1,kc--),Be}function Lt(){return Be=Tt2||ss(Be)>3?"":" "}function mA(e,t){for(;--t&&Lt()&&!(Be<48||Be>102||Be>57&&Be<65||Be>70&&Be<97););return Ls(e,Yl()+(t<6&&$r()==32&&Lt()==32))}function kh(e){for(;Lt();)switch(Be){case e:return Tt;case 34:case 39:e!==34&&e!==39&&kh(Be);break;case 40:e===41&&kh(e);break;case 92:Lt();break}return Tt}function gA(e,t){for(;Lt()&&e+Be!==57;)if(e+Be===84&&$r()===47)break;return"/*"+Ls(t,Tt-1)+"*"+Ec(e===47?e:Lt())}function vA(e){for(;!ss($r());)Lt();return Ls(e,Tt)}function yA(e){return kx(Ql("",null,null,null,[""],e=Ex(e),0,[0],e))}function Ql(e,t,r,n,i,o,a,s,l){for(var u=0,c=0,f=a,d=0,m=0,v=0,y=1,S=1,p=1,h=0,g="",x=i,C=o,_=n,T=g;S;)switch(v=h,h=Lt()){case 40:if(v!=108&&Qe(T,f-1)==58){Eh(T+=oe(Kl(h),"&","&\f"),"&\f")!=-1&&(p=-1);break}case 34:case 39:case 91:T+=Kl(h);break;case 9:case 10:case 13:case 32:T+=pA(v);break;case 92:T+=mA(Yl()-1,7);continue;case 47:switch($r()){case 42:case 47:El(bA(gA(Lt(),Yl()),t,r),l);break;default:T+="/"}break;case 123*y:s[u++]=kr(T)*p;case 125*y:case 59:case 0:switch(h){case 0:case 125:S=0;case 59+c:p==-1&&(T=oe(T,/\f/g,"")),m>0&&kr(T)-f&&El(m>32?Jv(T+";",n,r,f-1):Jv(oe(T," ","")+";",n,r,f-2),l);break;case 59:T+=";";default:if(El(_=Zv(T,t,r,u,c,i,s,g,x=[],C=[],f),o),h===123)if(c===0)Ql(T,t,_,_,x,o,f,s,C);else switch(d===99&&Qe(T,3)===110?100:d){case 100:case 108:case 109:case 115:Ql(e,_,_,n&&El(Zv(e,_,_,0,0,i,s,g,i,x=[],f),C),i,C,f,s,n?x:C);break;default:Ql(T,_,_,_,[""],C,0,s,C)}}u=c=m=0,y=p=1,g=T="",f=a;break;case 58:f=1+kr(T),m=v;default:if(y<1){if(h==123)--y;else if(h==125&&y++==0&&hA()==125)continue}switch(T+=Ec(h),h*y){case 38:p=c>0?1:(T+="\f",-1);break;case 44:s[u++]=(kr(T)-1)*p,p=1;break;case 64:$r()===45&&(T+=Kl(Lt())),d=$r(),c=f=kr(g=T+=vA(Yl())),h++;break;case 45:v===45&&kr(T)==2&&(y=0)}}return o}function Zv(e,t,r,n,i,o,a,s,l,u,c){for(var f=i-1,d=i===0?o:[""],m=am(d),v=0,y=0,S=0;v0?d[p]+" "+h:oe(h,/&\f/g,d[p])))&&(l[S++]=g);return Cc(e,t,r,i===0?im:s,l,u,c)}function bA(e,t,r){return Cc(e,t,r,bx,Ec(dA()),as(e,2,-2),0)}function Jv(e,t,r,n){return Cc(e,t,r,om,as(e,0,n),as(e,n+1,-1),n)}function ho(e,t){for(var r="",n=am(e),i=0;i6)switch(Qe(e,t+1)){case 109:if(Qe(e,t+4)!==45)break;case 102:return oe(e,/(.+:)(.+)-([^]+)/,"$1"+ie+"$2-$3$1"+Du+(Qe(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Eh(e,"stretch")?Tx(oe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Qe(e,t+1)!==115)break;case 6444:switch(Qe(e,kr(e)-3-(~Eh(e,"!important")&&10))){case 107:return oe(e,":",":"+ie)+e;case 101:return oe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ie+(Qe(e,14)===45?"inline-":"")+"box$3$1"+ie+"$2$3$1"+nt+"$2box$3")+e}break;case 5936:switch(Qe(e,t+11)){case 114:return ie+e+nt+oe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ie+e+nt+oe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ie+e+nt+oe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ie+e+nt+e+e}return e}var PA=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case om:t.return=Tx(t.value,t.length);break;case Sx:return ho([ra(t,{value:oe(t.value,"@","@"+ie)})],i);case im:if(t.length)return fA(t.props,function(o){switch(cA(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ho([ra(t,{props:[oe(o,/:(read-\w+)/,":"+Du+"$1")]})],i);case"::placeholder":return ho([ra(t,{props:[oe(o,/:(plac\w+)/,":"+ie+"input-$1")]}),ra(t,{props:[oe(o,/:(plac\w+)/,":"+Du+"$1")]}),ra(t,{props:[oe(o,/:(plac\w+)/,nt+"input-$1")]})],i)}return""})}},AA=[PA],_x=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var S=y.getAttribute("data-emotion");S.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||AA,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var S=y.getAttribute("data-emotion").split(" "),p=1;p=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var FA={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},jA=!1,VA=/[A-Z]|^ms/g,HA=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Lx=function(t){return t.charCodeAt(1)===45},r0=function(t){return t!=null&&typeof t!="boolean"},Hf=Cx(function(e){return Lx(e)?e:e.replace(VA,"-$&").toLowerCase()}),n0=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(HA,function(n,i,o){return Cr={name:i,styles:o,next:Cr},i})}return FA[t]!==1&&!Lx(t)&&typeof r=="number"&&r!==0?r+"px":r},UA="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ls(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return Cr={name:i.name,styles:i.styles,next:Cr},i.name;var o=r;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Cr={name:a.name,styles:a.styles,next:Cr},a=a.next;var s=o.styles+";";return s}return WA(e,t,r)}case"function":{if(e!==void 0){var l=Cr,u=r(e);return Cr=l,ls(e,t,u)}break}}var c=r;if(t==null)return c;var f=t[c];return f!==void 0?f:c}function WA(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i$.jsx(Dc,{styles:Dx` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - margin: 0; - font-feature-settings: "kern"; - } - - ${e} :where(*, *::before, *::after) { - border-width: 0; - border-style: solid; - box-sizing: border-box; - word-wrap: break-word; - } - - main { - display: block; - } - - ${e} hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - ${e} :where(pre, code, kbd,samp) { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - ${e} a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - ${e} abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - ${e} :where(b, strong) { - font-weight: bold; - } - - ${e} small { - font-size: 80%; - } - - ${e} :where(sub,sup) { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - ${e} sub { - bottom: -0.25em; - } - - ${e} sup { - top: -0.5em; - } - - ${e} img { - border-style: none; - } - - ${e} :where(button, input, optgroup, select, textarea) { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - ${e} :where(button, input) { - overflow: visible; - } - - ${e} :where(button, select) { - text-transform: none; - } - - ${e} :where( - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner - ) { - border-style: none; - padding: 0; - } - - ${e} fieldset { - padding: 0.35em 0.75em 0.625em; - } - - ${e} legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - ${e} progress { - vertical-align: baseline; - } - - ${e} textarea { - overflow: auto; - } - - ${e} :where([type="checkbox"], [type="radio"]) { - box-sizing: border-box; - padding: 0; - } - - ${e} input[type="number"]::-webkit-inner-spin-button, - ${e} input[type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - ${e} input[type="number"] { - -moz-appearance: textfield; - } - - ${e} input[type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - ${e} input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ${e} ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - ${e} details { - display: block; - } - - ${e} summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - ${e} :where( - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre - ) { - margin: 0; - } - - ${e} button { - background: transparent; - padding: 0; - } - - ${e} fieldset { - margin: 0; - padding: 0; - } - - ${e} :where(ol, ul) { - margin: 0; - padding: 0; - } - - ${e} textarea { - resize: vertical; - } - - ${e} :where(button, [role="button"]) { - cursor: pointer; - } - - ${e} button::-moz-focus-inner { - border: 0 !important; - } - - ${e} table { - border-collapse: collapse; - } - - ${e} :where(h1, h2, h3, h4, h5, h6) { - font-size: inherit; - font-weight: inherit; - } - - ${e} :where(button, input, optgroup, select, textarea) { - padding: 0; - line-height: inherit; - color: inherit; - } - - ${e} :where(img, svg, video, canvas, audio, iframe, embed, object) { - display: block; - } - - ${e} :where(img, video) { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] - :focus:not([data-focus-visible-added]):not( - [data-focus-visible-disabled] - ) { - outline: none; - box-shadow: none; - } - - ${e} select::-ms-expand { - display: none; - } - - ${iR} - `});function aR(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ms(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:i="Provider",errorMessage:o,defaultValue:a}=e,s=k.createContext(a);s.displayName=t;function l(){var u;const c=k.useContext(s);if(!c&&r){const f=new Error(o??aR(n,i));throw f.name="ContextError",(u=Error.captureStackTrace)==null||u.call(Error,f,l),f}return c}return[s.Provider,l,s]}var[BV,sR]=Ms({strict:!1,name:"PortalManagerContext"}),zu=globalThis?.document?k.useLayoutEffect:k.useEffect,[Bx,lR]=Ms({strict:!1,name:"PortalContext"}),pm="chakra-portal",uR=".chakra-portal",cR=e=>$.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),fR=e=>{const{appendToParentPortal:t,children:r}=e,[n,i]=k.useState(null),o=k.useRef(null),[,a]=k.useState({});k.useEffect(()=>a({}),[]);const s=lR(),l=sR();zu(()=>{if(!n)return;const c=n.ownerDocument,f=t?s??c.body:c.body;if(!f)return;o.current=c.createElement("div"),o.current.className=pm,f.appendChild(o.current),a({});const d=o.current;return()=>{f.contains(d)&&f.removeChild(d)}},[n]);const u=l?.zIndex?$.jsx(cR,{zIndex:l?.zIndex,children:r}):r;return o.current?rm.createPortal($.jsx(Bx,{value:o.current,children:u}),o.current):$.jsx("span",{ref:c=>{c&&i(c)}})},dR=e=>{const{children:t,containerRef:r,appendToParentPortal:n}=e,i=r.current,o=i??(typeof window<"u"?document.body:void 0),a=k.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=pm),l},[i]),[,s]=k.useState({});return zu(()=>s({}),[]),zu(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?rm.createPortal($.jsx(Bx,{value:n?a:null,children:t}),a):null};function Os(e){const t={appendToParentPortal:!0,...e},{containerRef:r,...n}=t;return r?$.jsx(dR,{containerRef:r,...n}):$.jsx(fR,{...n})}Os.className=pm;Os.selector=uR;Os.displayName="Portal";function mm(){const e=k.useContext(_o);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}var Bc=k.createContext({});Bc.displayName="ColorModeContext";function zc(){const e=k.useContext(Bc);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}function zV(e,t){const{colorMode:r}=zc();return r==="dark"?t:e}var Fu=()=>{};function zx(e){const t=k.useMemo(()=>({colorMode:"dark",toggleColorMode:Fu,setColorMode:Fu,forced:!0}),[]);return $.jsx(Bc.Provider,{value:t,...e})}zx.displayName="DarkMode";function Fx(e){const t=k.useMemo(()=>({colorMode:"light",toggleColorMode:Fu,setColorMode:Fu,forced:!0}),[]);return $.jsx(Bc.Provider,{value:t,...e})}Fx.displayName="LightMode";function hR(){const e=zc(),t=mm();return{...e,theme:t}}function pR(e,t,r){var n,i;if(t==null)return t;const o=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.value};return(i=(n=o(t))!=null?n:o(r))!=null?i:r}function FV(e,t,r){const n=mm();return mR(e,t,r)(n)}function mR(e,t,r){const n=Array.isArray(t)?t:[t],i=Array.isArray(r)?r:[r];return o=>{const a=i.filter(Boolean),s=n.map((l,u)=>{var c;const f=`${e}.${l}`;return pR(o,f,(c=a[u])!=null?c:l)});return Array.isArray(t)?s:s[0]}}var Vn=(...e)=>e.filter(Boolean).join(" ");function Zt(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Pr(e,...t){return gR(e)?e(...t):e}var gR=e=>typeof e=="function",jV=e=>e?"":void 0,VV=e=>e?!0:void 0;function na(...e){return function(r){e.some(n=>(n?.(r),r?.defaultPrevented))}}function HV(...e){return function(r){e.forEach(n=>{n?.(r)})}}var ju={exports:{}};ju.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",f="[object Date]",d="[object Error]",m="[object Function]",v="[object GeneratorFunction]",y="[object Map]",S="[object Number]",p="[object Null]",h="[object Object]",g="[object Proxy]",x="[object RegExp]",C="[object Set]",_="[object String]",T="[object Undefined]",A="[object WeakMap]",M="[object ArrayBuffer]",R="[object DataView]",B="[object Float32Array]",ye="[object Float64Array]",he="[object Int8Array]",Ue="[object Int16Array]",ue="[object Int32Array]",q="[object Uint8Array]",le="[object Uint8ClampedArray]",L="[object Uint16Array]",D="[object Uint32Array]",U=/[\\^$.*+?()[\]{}|]/g,ee=/^\[object .+?Constructor\]$/,te=/^(?:0|[1-9]\d*)$/,G={};G[B]=G[ye]=G[he]=G[Ue]=G[ue]=G[q]=G[le]=G[L]=G[D]=!0,G[s]=G[l]=G[M]=G[c]=G[R]=G[f]=G[d]=G[m]=G[y]=G[S]=G[h]=G[x]=G[C]=G[_]=G[A]=!1;var $e=typeof ol=="object"&&ol&&ol.Object===Object&&ol,be=typeof self=="object"&&self&&self.Object===Object&&self,Ie=$e||be||Function("return this")(),ut=t&&!t.nodeType&&t,ct=ut&&!0&&e&&!e.nodeType&&e,fn=ct&&ct.exports===ut,Gn=fn&&$e.process,dn=function(){try{var b=ct&&ct.require&&ct.require("util").types;return b||Gn&&Gn.binding&&Gn.binding("util")}catch{}}(),me=dn&&dn.isTypedArray;function _t(b,E,P){switch(P.length){case 0:return b.call(E);case 1:return b.call(E,P[0]);case 2:return b.call(E,P[0],P[1]);case 3:return b.call(E,P[0],P[1],P[2])}return b.apply(E,P)}function Ai(b,E){for(var P=-1,N=Array(b);++P-1}function $k(b,E){var P=this.__data__,N=Ks(P,b);return N<0?(++this.size,P.push([b,E])):P[N][1]=E,this}Dr.prototype.clear=_k,Dr.prototype.delete=Pk,Dr.prototype.get=Ak,Dr.prototype.has=Rk,Dr.prototype.set=$k;function $i(b){var E=-1,P=b==null?0:b.length;for(this.clear();++E1?P[Q-1]:void 0,ke=Q>2?P[2]:void 0;for(pe=b.length>3&&typeof pe=="function"?(Q--,pe):void 0,ke&&aC(P[0],P[1],ke)&&(pe=Q<3?void 0:pe,Q=1),E=Object(E);++N-1&&b%1==0&&b0){if(++E>=i)return arguments[0]}else E=0;return b.apply(void 0,arguments)}}function pC(b){if(b!=null){try{return Xn.call(b)}catch{}try{return b+""}catch{}}return""}function Js(b,E){return b===E||b!==b&&E!==E}var af=mg(function(){return arguments}())?mg:function(b){return Go(b)&&or.call(b,"callee")&&!vk.call(b,"callee")},sf=Array.isArray;function lf(b){return b!=null&&Sg(b.length)&&!uf(b)}function mC(b){return Go(b)&&lf(b)}var bg=bk||SC;function uf(b){if(!Qn(b))return!1;var E=Qs(b);return E==m||E==v||E==u||E==g}function Sg(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=a}function Qn(b){var E=typeof b;return b!=null&&(E=="object"||E=="function")}function Go(b){return b!=null&&typeof b=="object"}function gC(b){if(!Go(b)||Qs(b)!=h)return!1;var E=fg(b);if(E===null)return!0;var P=or.call(E,"constructor")&&E.constructor;return typeof P=="function"&&P instanceof P&&Xn.call(P)==Xs}var xg=me?Ho(me):Gk;function vC(b){return tC(b,wg(b))}function wg(b){return lf(b)?Vk(b):Xk(b)}var yC=rC(function(b,E,P,N){gg(b,E,P,N)});function bC(b){return function(){return b}}function Eg(b){return b}function SC(){return!1}e.exports=yC})(ju,ju.exports);var vR=ju.exports;const Kt=sp(vR);var yR=e=>/!(important)?$/.test(e),a0=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,bR=(e,t)=>r=>{const n=String(t),i=yR(n),o=a0(n),a=e?`${e}.${o}`:o;let s=Zt(r.__cssMap)&&a in r.__cssMap?r.__cssMap[a].varRef:t;return s=a0(s),i?`${s} !important`:s};function gm(e){const{scale:t,transform:r,compose:n}=e;return(o,a)=>{var s;const l=bR(t,o)(a);let u=(s=r?.(l,a))!=null?s:l;return n&&(u=n(u,a)),u}}var kl=(...e)=>t=>e.reduce((r,n)=>n(r),t);function Ht(e,t){return r=>{const n={property:r,scale:e};return n.transform=gm({scale:e,transform:t}),n}}var SR=({rtl:e,ltr:t})=>r=>r.direction==="rtl"?e:t;function xR(e){const{property:t,scale:r,transform:n}=e;return{scale:r,property:SR(t),transform:r?gm({scale:r,compose:n}):n}}var jx=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function wR(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...jx].join(" ")}function ER(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...jx].join(" ")}var kR={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},CR={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function TR(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var _R={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Th={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},PR=new Set(Object.values(Th)),_h=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),AR=e=>e.trim();function RR(e,t){if(e==null||_h.has(e))return e;if(!(Ph(e)||_h.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i?.[1],a=i?.[2];if(!o||!a)return e;const s=o.includes("-gradient")?o:`${o}-gradient`,[l,...u]=a.split(",").map(AR).filter(Boolean);if(u?.length===0)return e;const c=l in Th?Th[l]:l;u.unshift(c);const f=u.map(d=>{if(PR.has(d))return d;const m=d.indexOf(" "),[v,y]=m!==-1?[d.substr(0,m),d.substr(m+1)]:[d],S=Ph(y)?y:y&&y.split(" "),p=`colors.${v}`,h=p in t.__cssMap?t.__cssMap[p].varRef:v;return S?[h,...Array.isArray(S)?S:[S]].join(" "):h});return`${s}(${f.join(", ")})`}var Ph=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),$R=(e,t)=>RR(e,t??{});function IR(e){return/^var\(--.+\)$/.test(e)}var LR=e=>{const t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}},br=e=>t=>`${e}(${t})`,K={filter(e){return e!=="auto"?e:kR},backdropFilter(e){return e!=="auto"?e:CR},ring(e){return TR(K.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?wR():e==="auto-gpu"?ER():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=LR(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const r={left:"right",right:"left"};return t.direction==="rtl"?r[e]:e},degree(e){if(IR(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:$R,blur:br("blur"),opacity:br("opacity"),brightness:br("brightness"),contrast:br("contrast"),dropShadow:br("drop-shadow"),grayscale:br("grayscale"),hueRotate:e=>br("hue-rotate")(K.degree(e)),invert:br("invert"),saturate:br("saturate"),sepia:br("sepia"),bgImage(e){return e==null||Ph(e)||_h.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:r,divide:n}=(t=_R[e])!=null?t:{},i={flexDirection:e};return r&&(i[r]=1),n&&(i[n]=1),i}},w={borderWidths:Ht("borderWidths"),borderStyles:Ht("borderStyles"),colors:Ht("colors"),borders:Ht("borders"),gradients:Ht("gradients",K.gradient),radii:Ht("radii",K.px),space:Ht("space",kl(K.vh,K.px)),spaceT:Ht("space",kl(K.vh,K.px)),degreeT(e){return{property:e,transform:K.degree}},prop(e,t,r){return{property:e,scale:t,...t&&{transform:gm({scale:t,transform:r})}}},propT(e,t){return{property:e,transform:t}},sizes:Ht("sizes",kl(K.vh,K.px)),sizesT:Ht("sizes",kl(K.vh,K.fraction)),shadows:Ht("shadows"),logical:xR,blur:Ht("blur",K.blur)},Zl={background:w.colors("background"),backgroundColor:w.colors("backgroundColor"),backgroundImage:w.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:K.bgClip},bgSize:w.prop("backgroundSize"),bgPosition:w.prop("backgroundPosition"),bg:w.colors("background"),bgColor:w.colors("backgroundColor"),bgPos:w.prop("backgroundPosition"),bgRepeat:w.prop("backgroundRepeat"),bgAttachment:w.prop("backgroundAttachment"),bgGradient:w.gradients("backgroundImage"),bgClip:{transform:K.bgClip}};Object.assign(Zl,{bgImage:Zl.backgroundImage,bgImg:Zl.backgroundImage});var ne={border:w.borders("border"),borderWidth:w.borderWidths("borderWidth"),borderStyle:w.borderStyles("borderStyle"),borderColor:w.colors("borderColor"),borderRadius:w.radii("borderRadius"),borderTop:w.borders("borderTop"),borderBlockStart:w.borders("borderBlockStart"),borderTopLeftRadius:w.radii("borderTopLeftRadius"),borderStartStartRadius:w.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:w.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:w.radii("borderTopRightRadius"),borderStartEndRadius:w.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:w.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:w.borders("borderRight"),borderInlineEnd:w.borders("borderInlineEnd"),borderBottom:w.borders("borderBottom"),borderBlockEnd:w.borders("borderBlockEnd"),borderBottomLeftRadius:w.radii("borderBottomLeftRadius"),borderBottomRightRadius:w.radii("borderBottomRightRadius"),borderLeft:w.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:w.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:w.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:w.borders(["borderLeft","borderRight"]),borderInline:w.borders("borderInline"),borderY:w.borders(["borderTop","borderBottom"]),borderBlock:w.borders("borderBlock"),borderTopWidth:w.borderWidths("borderTopWidth"),borderBlockStartWidth:w.borderWidths("borderBlockStartWidth"),borderTopColor:w.colors("borderTopColor"),borderBlockStartColor:w.colors("borderBlockStartColor"),borderTopStyle:w.borderStyles("borderTopStyle"),borderBlockStartStyle:w.borderStyles("borderBlockStartStyle"),borderBottomWidth:w.borderWidths("borderBottomWidth"),borderBlockEndWidth:w.borderWidths("borderBlockEndWidth"),borderBottomColor:w.colors("borderBottomColor"),borderBlockEndColor:w.colors("borderBlockEndColor"),borderBottomStyle:w.borderStyles("borderBottomStyle"),borderBlockEndStyle:w.borderStyles("borderBlockEndStyle"),borderLeftWidth:w.borderWidths("borderLeftWidth"),borderInlineStartWidth:w.borderWidths("borderInlineStartWidth"),borderLeftColor:w.colors("borderLeftColor"),borderInlineStartColor:w.colors("borderInlineStartColor"),borderLeftStyle:w.borderStyles("borderLeftStyle"),borderInlineStartStyle:w.borderStyles("borderInlineStartStyle"),borderRightWidth:w.borderWidths("borderRightWidth"),borderInlineEndWidth:w.borderWidths("borderInlineEndWidth"),borderRightColor:w.colors("borderRightColor"),borderInlineEndColor:w.colors("borderInlineEndColor"),borderRightStyle:w.borderStyles("borderRightStyle"),borderInlineEndStyle:w.borderStyles("borderInlineEndStyle"),borderTopRadius:w.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:w.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:w.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:w.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(ne,{rounded:ne.borderRadius,roundedTop:ne.borderTopRadius,roundedTopLeft:ne.borderTopLeftRadius,roundedTopRight:ne.borderTopRightRadius,roundedTopStart:ne.borderStartStartRadius,roundedTopEnd:ne.borderStartEndRadius,roundedBottom:ne.borderBottomRadius,roundedBottomLeft:ne.borderBottomLeftRadius,roundedBottomRight:ne.borderBottomRightRadius,roundedBottomStart:ne.borderEndStartRadius,roundedBottomEnd:ne.borderEndEndRadius,roundedLeft:ne.borderLeftRadius,roundedRight:ne.borderRightRadius,roundedStart:ne.borderInlineStartRadius,roundedEnd:ne.borderInlineEndRadius,borderStart:ne.borderInlineStart,borderEnd:ne.borderInlineEnd,borderTopStartRadius:ne.borderStartStartRadius,borderTopEndRadius:ne.borderStartEndRadius,borderBottomStartRadius:ne.borderEndStartRadius,borderBottomEndRadius:ne.borderEndEndRadius,borderStartRadius:ne.borderInlineStartRadius,borderEndRadius:ne.borderInlineEndRadius,borderStartWidth:ne.borderInlineStartWidth,borderEndWidth:ne.borderInlineEndWidth,borderStartColor:ne.borderInlineStartColor,borderEndColor:ne.borderInlineEndColor,borderStartStyle:ne.borderInlineStartStyle,borderEndStyle:ne.borderInlineEndStyle});var MR={color:w.colors("color"),textColor:w.colors("color"),fill:w.colors("fill"),stroke:w.colors("stroke")},Ah={boxShadow:w.shadows("boxShadow"),mixBlendMode:!0,blendMode:w.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:w.prop("backgroundBlendMode"),opacity:!0};Object.assign(Ah,{shadow:Ah.boxShadow});var OR={filter:{transform:K.filter},blur:w.blur("--chakra-blur"),brightness:w.propT("--chakra-brightness",K.brightness),contrast:w.propT("--chakra-contrast",K.contrast),hueRotate:w.propT("--chakra-hue-rotate",K.hueRotate),invert:w.propT("--chakra-invert",K.invert),saturate:w.propT("--chakra-saturate",K.saturate),dropShadow:w.propT("--chakra-drop-shadow",K.dropShadow),backdropFilter:{transform:K.backdropFilter},backdropBlur:w.blur("--chakra-backdrop-blur"),backdropBrightness:w.propT("--chakra-backdrop-brightness",K.brightness),backdropContrast:w.propT("--chakra-backdrop-contrast",K.contrast),backdropHueRotate:w.propT("--chakra-backdrop-hue-rotate",K.hueRotate),backdropInvert:w.propT("--chakra-backdrop-invert",K.invert),backdropSaturate:w.propT("--chakra-backdrop-saturate",K.saturate)},Vu={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:K.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:w.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:w.space("gap"),rowGap:w.space("rowGap"),columnGap:w.space("columnGap")};Object.assign(Vu,{flexDir:Vu.flexDirection});var Vx={gridGap:w.space("gridGap"),gridColumnGap:w.space("gridColumnGap"),gridRowGap:w.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},NR={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:K.outline},outlineOffset:!0,outlineColor:w.colors("outlineColor")},Wt={width:w.sizesT("width"),inlineSize:w.sizesT("inlineSize"),height:w.sizes("height"),blockSize:w.sizes("blockSize"),boxSize:w.sizes(["width","height"]),minWidth:w.sizes("minWidth"),minInlineSize:w.sizes("minInlineSize"),minHeight:w.sizes("minHeight"),minBlockSize:w.sizes("minBlockSize"),maxWidth:w.sizes("maxWidth"),maxInlineSize:w.sizes("maxInlineSize"),maxHeight:w.sizes("maxHeight"),maxBlockSize:w.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var r,n,i;return{[`@media screen and (min-width: ${(i=(n=(r=t.__breakpoints)==null?void 0:r.get(e))==null?void 0:n.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var r,n,i;return{[`@media screen and (max-width: ${(i=(n=(r=t.__breakpoints)==null?void 0:r.get(e))==null?void 0:n._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:w.propT("float",K.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Wt,{w:Wt.width,h:Wt.height,minW:Wt.minWidth,maxW:Wt.maxWidth,minH:Wt.minHeight,maxH:Wt.maxHeight,overscroll:Wt.overscrollBehavior,overscrollX:Wt.overscrollBehaviorX,overscrollY:Wt.overscrollBehaviorY});var DR={listStyleType:!0,listStylePosition:!0,listStylePos:w.prop("listStylePosition"),listStyleImage:!0,listStyleImg:w.prop("listStyleImage")};function BR(e,t,r,n){const i=typeof t=="string"?t.split("."):[t];for(n=0;n{const t=new WeakMap;return(n,i,o,a)=>{if(typeof n>"u")return e(n,i,o);t.has(n)||t.set(n,new Map);const s=t.get(n);if(s.has(i))return s.get(i);const l=e(n,i,o,a);return s.set(i,l),l}},FR=zR(BR),jR={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},VR={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Uf=(e,t,r)=>{const n={},i=FR(e,t,{});for(const o in i)o in r&&r[o]!=null||(n[o]=i[o]);return n},HR={srOnly:{transform(e){return e===!0?jR:e==="focusable"?VR:{}}},layerStyle:{processResult:!0,transform:(e,t,r)=>Uf(t,`layerStyles.${e}`,r)},textStyle:{processResult:!0,transform:(e,t,r)=>Uf(t,`textStyles.${e}`,r)},apply:{processResult:!0,transform:(e,t,r)=>Uf(t,e,r)}},$a={position:!0,pos:w.prop("position"),zIndex:w.prop("zIndex","zIndices"),inset:w.spaceT("inset"),insetX:w.spaceT(["left","right"]),insetInline:w.spaceT("insetInline"),insetY:w.spaceT(["top","bottom"]),insetBlock:w.spaceT("insetBlock"),top:w.spaceT("top"),insetBlockStart:w.spaceT("insetBlockStart"),bottom:w.spaceT("bottom"),insetBlockEnd:w.spaceT("insetBlockEnd"),left:w.spaceT("left"),insetInlineStart:w.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:w.spaceT("right"),insetInlineEnd:w.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign($a,{insetStart:$a.insetInlineStart,insetEnd:$a.insetInlineEnd});var UR={ring:{transform:K.ring},ringColor:w.colors("--chakra-ring-color"),ringOffset:w.prop("--chakra-ring-offset-width"),ringOffsetColor:w.colors("--chakra-ring-offset-color"),ringInset:w.prop("--chakra-ring-inset")},xe={margin:w.spaceT("margin"),marginTop:w.spaceT("marginTop"),marginBlockStart:w.spaceT("marginBlockStart"),marginRight:w.spaceT("marginRight"),marginInlineEnd:w.spaceT("marginInlineEnd"),marginBottom:w.spaceT("marginBottom"),marginBlockEnd:w.spaceT("marginBlockEnd"),marginLeft:w.spaceT("marginLeft"),marginInlineStart:w.spaceT("marginInlineStart"),marginX:w.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:w.spaceT("marginInline"),marginY:w.spaceT(["marginTop","marginBottom"]),marginBlock:w.spaceT("marginBlock"),padding:w.space("padding"),paddingTop:w.space("paddingTop"),paddingBlockStart:w.space("paddingBlockStart"),paddingRight:w.space("paddingRight"),paddingBottom:w.space("paddingBottom"),paddingBlockEnd:w.space("paddingBlockEnd"),paddingLeft:w.space("paddingLeft"),paddingInlineStart:w.space("paddingInlineStart"),paddingInlineEnd:w.space("paddingInlineEnd"),paddingX:w.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:w.space("paddingInline"),paddingY:w.space(["paddingTop","paddingBottom"]),paddingBlock:w.space("paddingBlock")};Object.assign(xe,{m:xe.margin,mt:xe.marginTop,mr:xe.marginRight,me:xe.marginInlineEnd,marginEnd:xe.marginInlineEnd,mb:xe.marginBottom,ml:xe.marginLeft,ms:xe.marginInlineStart,marginStart:xe.marginInlineStart,mx:xe.marginX,my:xe.marginY,p:xe.padding,pt:xe.paddingTop,py:xe.paddingY,px:xe.paddingX,pb:xe.paddingBottom,pl:xe.paddingLeft,ps:xe.paddingInlineStart,paddingStart:xe.paddingInlineStart,pr:xe.paddingRight,pe:xe.paddingInlineEnd,paddingEnd:xe.paddingInlineEnd});var WR={textDecorationColor:w.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:w.shadows("textShadow")},GR={clipPath:!0,transform:w.propT("transform",K.transform),transformOrigin:!0,translateX:w.spaceT("--chakra-translate-x"),translateY:w.spaceT("--chakra-translate-y"),skewX:w.degreeT("--chakra-skew-x"),skewY:w.degreeT("--chakra-skew-y"),scaleX:w.prop("--chakra-scale-x"),scaleY:w.prop("--chakra-scale-y"),scale:w.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:w.degreeT("--chakra-rotate")},XR={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:w.prop("transitionDuration","transition.duration"),transitionProperty:w.prop("transitionProperty","transition.property"),transitionTimingFunction:w.prop("transitionTimingFunction","transition.easing")},qR={fontFamily:w.prop("fontFamily","fonts"),fontSize:w.prop("fontSize","fontSizes",K.px),fontWeight:w.prop("fontWeight","fontWeights"),lineHeight:w.prop("lineHeight","lineHeights"),letterSpacing:w.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},YR={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:w.spaceT("scrollMargin"),scrollMarginTop:w.spaceT("scrollMarginTop"),scrollMarginBottom:w.spaceT("scrollMarginBottom"),scrollMarginLeft:w.spaceT("scrollMarginLeft"),scrollMarginRight:w.spaceT("scrollMarginRight"),scrollMarginX:w.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:w.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:w.spaceT("scrollPadding"),scrollPaddingTop:w.spaceT("scrollPaddingTop"),scrollPaddingBottom:w.spaceT("scrollPaddingBottom"),scrollPaddingLeft:w.spaceT("scrollPaddingLeft"),scrollPaddingRight:w.spaceT("scrollPaddingRight"),scrollPaddingX:w.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:w.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function Hx(e){return Zt(e)&&e.reference?e.reference:String(e)}var Fc=(e,...t)=>t.map(Hx).join(` ${e} `).replace(/calc/g,""),s0=(...e)=>`calc(${Fc("+",...e)})`,l0=(...e)=>`calc(${Fc("-",...e)})`,Rh=(...e)=>`calc(${Fc("*",...e)})`,u0=(...e)=>`calc(${Fc("/",...e)})`,c0=e=>{const t=Hx(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Rh(t,-1)},oi=Object.assign(e=>({add:(...t)=>oi(s0(e,...t)),subtract:(...t)=>oi(l0(e,...t)),multiply:(...t)=>oi(Rh(e,...t)),divide:(...t)=>oi(u0(e,...t)),negate:()=>oi(c0(e)),toString:()=>e.toString()}),{add:s0,subtract:l0,multiply:Rh,divide:u0,negate:c0});function KR(e,t="-"){return e.replace(/\s+/g,t)}function QR(e){const t=KR(e.toString());return JR(ZR(t))}function ZR(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function JR(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function e$(e,t=""){return[t,e].filter(Boolean).join("-")}function t$(e,t){return`var(${e}${t?`, ${t}`:""})`}function r$(e,t=""){return QR(`--${e$(e,t)}`)}function H(e,t,r){const n=r$(e,r);return{variable:n,reference:t$(n,t)}}function n$(e,t){const r={};for(const n of t){if(Array.isArray(n)){const[i,o]=n;r[i]=H(`${e}-${i}`,o);continue}r[n]=H(`${e}-${n}`)}return r}function i$(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function o$(e){const t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}}function $h(e){if(e==null)return e;const{unitless:t}=o$(e);return t||typeof e=="number"?`${e}px`:e}var Ux=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,vm=e=>Object.fromEntries(Object.entries(e).sort(Ux));function f0(e){const t=vm(e);return Object.assign(Object.values(t),t)}function a$(e){const t=Object.keys(vm(e));return new Set(t)}function d0(e){var t;if(!e)return e;e=(t=$h(e))!=null?t:e;const r=-.02;return typeof e=="number"?`${e+r}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+r}`)}function pa(e,t){const r=["@media screen"];return e&&r.push("and",`(min-width: ${$h(e)})`),t&&r.push("and",`(max-width: ${$h(t)})`),r.join(" ")}function s$(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const r=f0(e),n=Object.entries(e).sort(Ux).map(([a,s],l,u)=>{var c;let[,f]=(c=u[l+1])!=null?c:[];return f=parseFloat(f)>0?d0(f):void 0,{_minW:d0(s),breakpoint:a,minW:s,maxW:f,maxWQuery:pa(null,f),minWQuery:pa(s),minMaxQuery:pa(s,f)}}),i=a$(e),o=Array.from(i.values());return{keys:i,normalized:r,isResponsive(a){const s=Object.keys(a);return s.length>0&&s.every(l=>i.has(l))},asObject:vm(e),asArray:f0(e),details:n,get(a){return n.find(s=>s.breakpoint===a)},media:[null,...r.map(a=>pa(a)).slice(1)],toArrayValue(a){if(!Zt(a))throw new Error("toArrayValue: value must be an object");const s=o.map(l=>{var u;return(u=a[l])!=null?u:null});for(;i$(s)===null;)s.pop();return s},toObjectValue(a){if(!Array.isArray(a))throw new Error("toObjectValue: value must be an array");return a.reduce((s,l,u)=>{const c=o[u];return c!=null&&l!=null&&(s[c]=l),s},{})}}}var qe={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},mn=e=>Wx(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Br=e=>Wx(t=>e(t,"~ &"),"[data-peer]",".peer"),Wx=(e,...t)=>t.map(e).join(", "),jc={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:mn(qe.hover),_peerHover:Br(qe.hover),_groupFocus:mn(qe.focus),_peerFocus:Br(qe.focus),_groupFocusVisible:mn(qe.focusVisible),_peerFocusVisible:Br(qe.focusVisible),_groupActive:mn(qe.active),_peerActive:Br(qe.active),_groupDisabled:mn(qe.disabled),_peerDisabled:Br(qe.disabled),_groupInvalid:mn(qe.invalid),_peerInvalid:Br(qe.invalid),_groupChecked:mn(qe.checked),_peerChecked:Br(qe.checked),_groupFocusWithin:mn(qe.focusWithin),_peerFocusWithin:Br(qe.focusWithin),_peerPlaceholderShown:Br(qe.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},Gx=Object.keys(jc);function h0(e,t){return H(String(e).replace(/\./g,"-"),void 0,t)}function l$(e,t){let r={};const n={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=h0(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const d=i.split("."),[m,...v]=d,y=`${m}.-${v.join(".")}`,S=oi.negate(s),p=oi.negate(u);n[y]={value:S,var:l,varRef:p}}r[l]=s,n[i]={value:s,var:l,varRef:u};continue}const c=d=>{const v=[String(i).split(".")[0],d].join(".");if(!e[v])return d;const{reference:S}=h0(v,t?.cssVarPrefix);return S},f=Zt(s)?s:{default:s};r=Kt(r,Object.entries(f).reduce((d,[m,v])=>{var y,S;if(!v)return d;const p=c(`${v}`);if(m==="default")return d[l]=p,d;const h=(S=(y=jc)==null?void 0:y[m])!=null?S:m;return d[h]={[l]:p},d},{})),n[i]={value:u,var:l,varRef:u}}return{cssVars:r,cssMap:n}}function u$(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}function c$(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}function f$(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function p0(e,t,r={}){const{stop:n,getKey:i}=r;function o(a,s=[]){var l;if(f$(a)||Array.isArray(a)){const u={};for(const[c,f]of Object.entries(a)){const d=(l=i?.(c))!=null?l:c,m=[...s,d];if(n?.(a,m))return t(a,s);u[d]=o(f,m)}return u}return t(a,s)}return o(e)}var d$=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function h$(e){return c$(e,d$)}function p$(e){return e.semanticTokens}function m$(e){const{__cssMap:t,__cssVars:r,__breakpoints:n,...i}=e;return i}var g$=e=>Gx.includes(e)||e==="default";function v$({tokens:e,semanticTokens:t}){const r={};return p0(e,(n,i)=>{n!=null&&(r[i.join(".")]={isSemantic:!1,value:n})}),p0(t,(n,i)=>{n!=null&&(r[i.join(".")]={isSemantic:!0,value:n})},{stop:n=>Object.keys(n).every(g$)}),r}function y$(e){var t;const r=m$(e),n=h$(r),i=p$(r),o=v$({tokens:n,semanticTokens:i}),a=(t=r.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=l$(o,{cssVarPrefix:a});return Object.assign(r,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:s$(r.breakpoints)}),r}var ym=Kt({},Zl,ne,MR,Vu,Wt,OR,UR,NR,Vx,HR,$a,Ah,xe,YR,qR,WR,GR,DR,XR),b$=Object.assign({},xe,Wt,Vu,Vx,$a),UV=Object.keys(b$),S$=[...Object.keys(ym),...Gx],x$={...ym,...jc},w$=e=>e in x$,E$=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:r,toArrayValue:n,media:i}=t.__breakpoints,o={};for(const a in e){let s=Pr(e[a],t);if(s==null)continue;if(s=Zt(s)&&r(s)?n(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!C$(t),_$=(e,t)=>{var r,n;if(t==null)return t;const i=l=>{var u,c;return(c=(u=e.__cssMap)==null?void 0:u[l])==null?void 0:c.varRef},o=l=>{var u;return(u=i(l))!=null?u:l},[a,s]=k$(t);return t=(n=(r=i(a))!=null?r:o(s))!=null?n:o(t),t};function P$(e){const{configs:t={},pseudos:r={},theme:n}=e,i=(o,a=!1)=>{var s,l,u;const c=Pr(o,n),f=E$(c)(n);let d={};for(let m in f){const v=f[m];let y=Pr(v,n);m in r&&(m=r[m]),T$(m,y)&&(y=_$(n,y));let S=t[m];if(S===!0&&(S={property:m}),Zt(y)){d[m]=(s=d[m])!=null?s:{},d[m]=Kt({},d[m],i(y,!0));continue}let p=(u=(l=S?.transform)==null?void 0:l.call(S,y,n,c))!=null?u:y;p=S?.processResult?i(p,!0):p;const h=Pr(S?.property,n);if(!a&&S?.static){const g=Pr(S.static,n);d=Kt({},d,g)}if(h&&Array.isArray(h)){for(const g of h)d[g]=p;continue}if(h){h==="&"&&Zt(p)?d=Kt({},d,p):d[h]=p;continue}if(Zt(p)){d=Kt({},d,p);continue}d[m]=p}return d};return i}var Xx=e=>t=>P$({theme:t,pseudos:jc,configs:ym})(e);function ve(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function A$(e,t){if(Array.isArray(e))return e;if(Zt(e))return t(e);if(e!=null)return[e]}function R$(e,t){for(let r=t+1;r{Kt(u,{[g]:d?h[g]:{[p]:h[g]}})});continue}if(!m){d?Kt(u,h):u[p]=h;continue}u[p]=h}}return u}}function I$(e){return t=>{var r;const{variant:n,size:i,theme:o}=t,a=$$(o);return Kt({},Pr((r=e.baseStyle)!=null?r:{},t),a(e,"sizes",i,t),a(e,"variants",n,t))}}function L$(e,t,r){var n,i,o;return(o=(i=(n=e.__cssMap)==null?void 0:n[`${t}.${r}`])==null?void 0:i.varRef)!=null?o:r}function Fo(e){return u$(e,["styleConfig","size","variant","colorScheme"])}var M$=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function O$(e){return Zt(e)?M$.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}var N$={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},D$={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},B$={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},z$={property:N$,easing:D$,duration:B$},F$=z$,j$={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},V$=j$,H$={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},U$=H$,W$={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},G$=W$,X$={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},q$=X$,Y$={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},K$=Y$,Q$={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Z$=Q$,J$={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},eI=J$,tI={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},qx=tI,Yx={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},rI={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},nI={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},iI={...Yx,...rI,container:nI},Kx=iI,oI={breakpoints:G$,zIndices:V$,radii:K$,blur:eI,colors:q$,...qx,sizes:Kx,shadows:Z$,space:Yx,borders:U$,transition:F$},{defineMultiStyleConfig:aI,definePartsStyle:ma}=ve(["stepper","step","title","description","indicator","separator","icon","number"]),Vr=H("stepper-indicator-size"),qi=H("stepper-icon-size"),Yi=H("stepper-title-font-size"),ga=H("stepper-description-font-size"),ia=H("stepper-accent-color"),sI=ma(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[ia.variable]:`colors.${e}.500`,_dark:{[ia.variable]:`colors.${e}.200`}},title:{fontSize:Yi.reference,fontWeight:"medium"},description:{fontSize:ga.reference,color:"chakra-subtle-text"},number:{fontSize:Yi.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:qi.reference,height:qi.reference},indicator:{flexShrink:0,borderRadius:"full",width:Vr.reference,height:Vr.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:ia.reference},"&[data-status=complete]":{bg:ia.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:ia.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${Vr.reference} - 8px)`,top:`calc(${Vr.reference} + 4px)`,insetStart:`calc(${Vr.reference} / 2 - 1px)`}}})),lI=aI({baseStyle:sI,sizes:{xs:ma({stepper:{[Vr.variable]:"sizes.4",[qi.variable]:"sizes.3",[Yi.variable]:"fontSizes.xs",[ga.variable]:"fontSizes.xs"}}),sm:ma({stepper:{[Vr.variable]:"sizes.6",[qi.variable]:"sizes.4",[Yi.variable]:"fontSizes.sm",[ga.variable]:"fontSizes.xs"}}),md:ma({stepper:{[Vr.variable]:"sizes.8",[qi.variable]:"sizes.5",[Yi.variable]:"fontSizes.md",[ga.variable]:"fontSizes.sm"}}),lg:ma({stepper:{[Vr.variable]:"sizes.10",[qi.variable]:"sizes.6",[Yi.variable]:"fontSizes.lg",[ga.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function se(e,t={}){let r=!1;function n(){if(!r){r=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...c){n();for(const f of c)t[f]=l(f);return se(e,t)}function o(...c){for(const f of c)f in t||(t[f]=l(f));return se(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([f,d])=>[f,d.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([f,d])=>[f,d.className]))}function l(c){const m=`chakra-${(["container","root"].includes(c??"")?[e]:[e,c]).filter(Boolean).join("__")}`;return{className:m,selector:`.${m}`,toString:()=>c}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var uI=se("accordion").parts("root","container","button","panel").extend("icon"),cI=se("alert").parts("title","description","container").extend("icon","spinner"),fI=se("avatar").parts("label","badge","container").extend("excessLabel","group"),dI=se("breadcrumb").parts("link","item","container").extend("separator");se("button").parts();var hI=se("checkbox").parts("control","icon","container").extend("label");se("progress").parts("track","filledTrack").extend("label");var pI=se("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),mI=se("editable").parts("preview","input","textarea"),gI=se("form").parts("container","requiredIndicator","helperText"),vI=se("formError").parts("text","icon"),yI=se("input").parts("addon","field","element","group"),bI=se("list").parts("container","item","icon"),SI=se("menu").parts("button","list","item").extend("groupTitle","icon","command","divider"),xI=se("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),wI=se("numberinput").parts("root","field","stepperGroup","stepper");se("pininput").parts("field");var EI=se("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),kI=se("progress").parts("label","filledTrack","track"),CI=se("radio").parts("container","control","label"),TI=se("select").parts("field","icon"),_I=se("slider").parts("container","track","thumb","filledTrack","mark"),PI=se("stat").parts("container","label","helpText","number","icon"),AI=se("switch").parts("container","track","thumb","label"),RI=se("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),$I=se("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),II=se("tag").parts("container","label","closeButton"),LI=se("card").parts("container","header","body","footer");se("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");function ci(e,t,r){return Math.min(Math.max(e,r),t)}class MI extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var va=MI;function bm(e){if(typeof e!="string")throw new va(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=VI.test(e)?DI(e):e;const r=BI.exec(t);if(r){const a=Array.from(r).slice(1);return[...a.slice(0,3).map(s=>parseInt(us(s,2),16)),parseInt(us(a[3]||"f",2),16)/255]}const n=zI.exec(t);if(n){const a=Array.from(n).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,16)),parseInt(a[3]||"ff",16)/255]}const i=FI.exec(t);if(i){const a=Array.from(i).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,10)),parseFloat(a[3]||"1")]}const o=jI.exec(t);if(o){const[a,s,l,u]=Array.from(o).slice(1).map(parseFloat);if(ci(0,100,s)!==s)throw new va(e);if(ci(0,100,l)!==l)throw new va(e);return[...HI(a,s,l),Number.isNaN(u)?1:u]}throw new va(e)}function OI(e){let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return(t>>>0)%2341}const m0=e=>parseInt(e.replace(/_/g,""),36),NI="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const r=m0(t.substring(0,3)),n=m0(t.substring(3)).toString(16);let i="";for(let o=0;o<6-n.length;o++)i+="0";return e[r]=`${i}${n}`,e},{});function DI(e){const t=e.toLowerCase().trim(),r=NI[OI(t)];if(!r)throw new va(e);return`#${r}`}const us=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),BI=new RegExp(`^#${us("([a-f0-9])",3)}([a-f0-9])?$`,"i"),zI=new RegExp(`^#${us("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),FI=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${us(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),jI=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,VI=/^[a-z]+$/i,g0=e=>Math.round(e*255),HI=(e,t,r)=>{let n=r/100;if(t===0)return[n,n,n].map(g0);const i=(e%360+360)%360/60,o=(1-Math.abs(2*n-1))*(t/100),a=o*(1-Math.abs(i%2-1));let s=0,l=0,u=0;i>=0&&i<1?(s=o,l=a):i>=1&&i<2?(s=a,l=o):i>=2&&i<3?(l=o,u=a):i>=3&&i<4?(l=a,u=o):i>=4&&i<5?(s=a,u=o):i>=5&&i<6&&(s=o,u=a);const c=n-o/2,f=s+c,d=l+c,m=u+c;return[f,d,m].map(g0)};function UI(e,t,r,n){return`rgba(${ci(0,255,e).toFixed()}, ${ci(0,255,t).toFixed()}, ${ci(0,255,r).toFixed()}, ${parseFloat(ci(0,1,n).toFixed(3))})`}function WI(e,t){const[r,n,i,o]=bm(e);return UI(r,n,i,o-t)}function GI(e){const[t,r,n,i]=bm(e);let o=a=>{const s=ci(0,255,a).toString(16);return s.length===1?`0${s}`:s};return`#${o(t)}${o(r)}${o(n)}${i<1?o(Math.round(i*255)):""}`}function XI(e,t,r,n,i){for(t=t.split?t.split("."):t,n=0;nObject.keys(e).length===0,ht=(e,t,r)=>{const n=XI(e,`colors.${t}`,t);try{return GI(n),n}catch{return r??"#000000"}},YI=e=>{const[t,r,n]=bm(e);return(t*299+r*587+n*114)/1e3},KI=e=>t=>{const r=ht(t,e);return YI(r)<128?"dark":"light"},QI=e=>t=>KI(e)(t)==="dark",Po=(e,t)=>r=>{const n=ht(r,e);return WI(n,1-t)};function v0(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}var ZI=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function JI(e){const t=ZI();return!e||qI(e)?t:e.string&&e.colors?tL(e.string,e.colors):e.string&&!e.colors?eL(e.string):e.colors&&!e.string?rL(e.colors):t}function eL(e){let t=0;if(e.length===0)return t.toString();for(let n=0;n>n*8&255;r+=`00${i.toString(16)}`.substr(-2)}return r}function tL(e,t){let r=0;if(e.length===0)return t[0];for(let n=0;nr.colorMode==="dark"?t:e}function Sm(e){const{orientation:t,vertical:r,horizontal:n}=e;return t?t==="vertical"?r:n:{}}function Qx(e){return Zt(e)&&e.reference?e.reference:String(e)}var Vc=(e,...t)=>t.map(Qx).join(` ${e} `).replace(/calc/g,""),y0=(...e)=>`calc(${Vc("+",...e)})`,b0=(...e)=>`calc(${Vc("-",...e)})`,Ih=(...e)=>`calc(${Vc("*",...e)})`,S0=(...e)=>`calc(${Vc("/",...e)})`,x0=e=>{const t=Qx(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:Ih(t,-1)},Hr=Object.assign(e=>({add:(...t)=>Hr(y0(e,...t)),subtract:(...t)=>Hr(b0(e,...t)),multiply:(...t)=>Hr(Ih(e,...t)),divide:(...t)=>Hr(S0(e,...t)),negate:()=>Hr(x0(e)),toString:()=>e.toString()}),{add:y0,subtract:b0,multiply:Ih,divide:S0,negate:x0});function nL(e){return!Number.isInteger(parseFloat(e.toString()))}function iL(e,t="-"){return e.replace(/\s+/g,t)}function Zx(e){const t=iL(e.toString());return t.includes("\\.")?e:nL(e)?t.replace(".","\\."):e}function oL(e,t=""){return[t,Zx(e)].filter(Boolean).join("-")}function aL(e,t){return`var(${Zx(e)}${t?`, ${t}`:""})`}function sL(e,t=""){return`--${oL(e,t)}`}function He(e,t){const r=sL(e,void 0);return{variable:r,reference:aL(r,lL(void 0))}}function lL(e){return typeof e=="string"?e:e?.reference}var{defineMultiStyleConfig:uL,definePartsStyle:Jl}=ve(AI.keys),Ia=He("switch-track-width"),pi=He("switch-track-height"),Wf=He("switch-track-diff"),cL=Hr.subtract(Ia,pi),Lh=He("switch-thumb-x"),oa=He("switch-bg"),fL=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Ia.reference],height:[pi.reference],transitionProperty:"common",transitionDuration:"fast",[oa.variable]:"colors.gray.300",_dark:{[oa.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[oa.variable]:`colors.${t}.500`,_dark:{[oa.variable]:`colors.${t}.200`}},bg:oa.reference}},dL={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[pi.reference],height:[pi.reference],_checked:{transform:`translateX(${Lh.reference})`}},hL=Jl(e=>({container:{[Wf.variable]:cL,[Lh.variable]:Wf.reference,_rtl:{[Lh.variable]:Hr(Wf).negate().toString()}},track:fL(e),thumb:dL})),pL={sm:Jl({container:{[Ia.variable]:"1.375rem",[pi.variable]:"sizes.3"}}),md:Jl({container:{[Ia.variable]:"1.875rem",[pi.variable]:"sizes.4"}}),lg:Jl({container:{[Ia.variable]:"2.875rem",[pi.variable]:"sizes.6"}})},mL=uL({baseStyle:hL,sizes:pL,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:gL,definePartsStyle:po}=ve(RI.keys),vL=po({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),Hu={"&[data-is-numeric=true]":{textAlign:"end"}},yL=po(e=>{const{colorScheme:t}=e;return{th:{color:F("gray.600","gray.400")(e),borderBottom:"1px",borderColor:F(`${t}.100`,`${t}.700`)(e),...Hu},td:{borderBottom:"1px",borderColor:F(`${t}.100`,`${t}.700`)(e),...Hu},caption:{color:F("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),bL=po(e=>{const{colorScheme:t}=e;return{th:{color:F("gray.600","gray.400")(e),borderBottom:"1px",borderColor:F(`${t}.100`,`${t}.700`)(e),...Hu},td:{borderBottom:"1px",borderColor:F(`${t}.100`,`${t}.700`)(e),...Hu},caption:{color:F("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:F(`${t}.100`,`${t}.700`)(e)},td:{background:F(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),SL={simple:yL,striped:bL,unstyled:{}},xL={sm:po({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:po({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:po({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},wL=gL({baseStyle:vL,variants:SL,sizes:xL,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),bt=H("tabs-color"),dr=H("tabs-bg"),Cl=H("tabs-border-color"),{defineMultiStyleConfig:EL,definePartsStyle:Ir}=ve($I.keys),kL=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},CL=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},TL=e=>{const{align:t="start",orientation:r}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:r==="vertical"?"column":"row"}},_L={p:4},PL=Ir(e=>({root:kL(e),tab:CL(e),tablist:TL(e),tabpanel:_L})),AL={sm:Ir({tab:{py:1,px:4,fontSize:"sm"}}),md:Ir({tab:{fontSize:"md",py:2,px:4}}),lg:Ir({tab:{fontSize:"lg",py:3,px:4}})},RL=Ir(e=>{const{colorScheme:t,orientation:r}=e,n=r==="vertical",i=n?"borderStart":"borderBottom",o=n?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[bt.variable]:`colors.${t}.600`,_dark:{[bt.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[dr.variable]:"colors.gray.200",_dark:{[dr.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:bt.reference,bg:dr.reference}}}),$L=Ir(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Cl.variable]:"transparent",_selected:{[bt.variable]:`colors.${t}.600`,[Cl.variable]:"colors.white",_dark:{[bt.variable]:`colors.${t}.300`,[Cl.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Cl.reference},color:bt.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),IL=Ir(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[dr.variable]:"colors.gray.50",_dark:{[dr.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[dr.variable]:"colors.white",[bt.variable]:`colors.${t}.600`,_dark:{[dr.variable]:"colors.gray.800",[bt.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:bt.reference,bg:dr.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),LL=Ir(e=>{const{colorScheme:t,theme:r}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:ht(r,`${t}.700`),bg:ht(r,`${t}.100`)}}}}),ML=Ir(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[bt.variable]:"colors.gray.600",_dark:{[bt.variable]:"inherit"},_selected:{[bt.variable]:"colors.white",[dr.variable]:`colors.${t}.600`,_dark:{[bt.variable]:"colors.gray.800",[dr.variable]:`colors.${t}.300`}},color:bt.reference,bg:dr.reference}}}),OL=Ir({}),NL={line:RL,enclosed:$L,"enclosed-colored":IL,"soft-rounded":LL,"solid-rounded":ML,unstyled:OL},DL=EL({baseStyle:PL,sizes:AL,variants:NL,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),De=n$("badge",["bg","color","shadow"]),BL={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:De.bg.reference,color:De.color.reference,boxShadow:De.shadow.reference},zL=e=>{const{colorScheme:t,theme:r}=e,n=Po(`${t}.500`,.6)(r);return{[De.bg.variable]:`colors.${t}.500`,[De.color.variable]:"colors.white",_dark:{[De.bg.variable]:n,[De.color.variable]:"colors.whiteAlpha.800"}}},FL=e=>{const{colorScheme:t,theme:r}=e,n=Po(`${t}.200`,.16)(r);return{[De.bg.variable]:`colors.${t}.100`,[De.color.variable]:`colors.${t}.800`,_dark:{[De.bg.variable]:n,[De.color.variable]:`colors.${t}.200`}}},jL=e=>{const{colorScheme:t,theme:r}=e,n=Po(`${t}.200`,.8)(r);return{[De.color.variable]:`colors.${t}.500`,_dark:{[De.color.variable]:n},[De.shadow.variable]:`inset 0 0 0px 1px ${De.color.reference}`}},VL={solid:zL,subtle:FL,outline:jL},La={baseStyle:BL,variants:VL,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:HL,definePartsStyle:mi}=ve(II.keys),w0=H("tag-bg"),E0=H("tag-color"),Gf=H("tag-shadow"),eu=H("tag-min-height"),tu=H("tag-min-width"),ru=H("tag-font-size"),nu=H("tag-padding-inline"),UL={fontWeight:"medium",lineHeight:1.2,outline:0,[E0.variable]:De.color.reference,[w0.variable]:De.bg.reference,[Gf.variable]:De.shadow.reference,color:E0.reference,bg:w0.reference,boxShadow:Gf.reference,borderRadius:"md",minH:eu.reference,minW:tu.reference,fontSize:ru.reference,px:nu.reference,_focusVisible:{[Gf.variable]:"shadows.outline"}},WL={lineHeight:1.2,overflow:"visible"},GL={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},XL=mi({container:UL,label:WL,closeButton:GL}),qL={sm:mi({container:{[eu.variable]:"sizes.5",[tu.variable]:"sizes.5",[ru.variable]:"fontSizes.xs",[nu.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:mi({container:{[eu.variable]:"sizes.6",[tu.variable]:"sizes.6",[ru.variable]:"fontSizes.sm",[nu.variable]:"space.2"}}),lg:mi({container:{[eu.variable]:"sizes.8",[tu.variable]:"sizes.8",[ru.variable]:"fontSizes.md",[nu.variable]:"space.3"}})},YL={subtle:mi(e=>{var t;return{container:(t=La.variants)==null?void 0:t.subtle(e)}}),solid:mi(e=>{var t;return{container:(t=La.variants)==null?void 0:t.solid(e)}}),outline:mi(e=>{var t;return{container:(t=La.variants)==null?void 0:t.outline(e)}})},KL=HL({variants:YL,baseStyle:XL,sizes:qL,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:Xr,defineMultiStyleConfig:QL}=ve(yI.keys),Ki=H("input-height"),Qi=H("input-font-size"),Zi=H("input-padding"),Ji=H("input-border-radius"),ZL=Xr({addon:{height:Ki.reference,fontSize:Qi.reference,px:Zi.reference,borderRadius:Ji.reference},field:{width:"100%",height:Ki.reference,fontSize:Qi.reference,px:Zi.reference,borderRadius:Ji.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),gn={lg:{[Qi.variable]:"fontSizes.lg",[Zi.variable]:"space.4",[Ji.variable]:"radii.md",[Ki.variable]:"sizes.12"},md:{[Qi.variable]:"fontSizes.md",[Zi.variable]:"space.4",[Ji.variable]:"radii.md",[Ki.variable]:"sizes.10"},sm:{[Qi.variable]:"fontSizes.sm",[Zi.variable]:"space.3",[Ji.variable]:"radii.sm",[Ki.variable]:"sizes.8"},xs:{[Qi.variable]:"fontSizes.xs",[Zi.variable]:"space.2",[Ji.variable]:"radii.sm",[Ki.variable]:"sizes.6"}},JL={lg:Xr({field:gn.lg,group:gn.lg}),md:Xr({field:gn.md,group:gn.md}),sm:Xr({field:gn.sm,group:gn.sm}),xs:Xr({field:gn.xs,group:gn.xs})};function xm(e){const{focusBorderColor:t,errorBorderColor:r}=e;return{focusBorderColor:t||F("blue.500","blue.300")(e),errorBorderColor:r||F("red.500","red.300")(e)}}var eM=Xr(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=xm(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:F("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ht(t,n),boxShadow:`0 0 0 1px ${ht(t,n)}`},_focusVisible:{zIndex:1,borderColor:ht(t,r),boxShadow:`0 0 0 1px ${ht(t,r)}`}},addon:{border:"1px solid",borderColor:F("inherit","whiteAlpha.50")(e),bg:F("gray.100","whiteAlpha.300")(e)}}}),tM=Xr(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=xm(e);return{field:{border:"2px solid",borderColor:"transparent",bg:F("gray.100","whiteAlpha.50")(e),_hover:{bg:F("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ht(t,n)},_focusVisible:{bg:"transparent",borderColor:ht(t,r)}},addon:{border:"2px solid",borderColor:"transparent",bg:F("gray.100","whiteAlpha.50")(e)}}}),rM=Xr(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=xm(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ht(t,n),boxShadow:`0px 1px 0px 0px ${ht(t,n)}`},_focusVisible:{borderColor:ht(t,r),boxShadow:`0px 1px 0px 0px ${ht(t,r)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),nM=Xr({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),iM={outline:eM,filled:tM,flushed:rM,unstyled:nM},ae=QL({baseStyle:ZL,sizes:JL,variants:iM,defaultProps:{size:"md",variant:"outline"}}),k0,oM={...(k0=ae.baseStyle)==null?void 0:k0.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},C0,T0,aM={outline:e=>{var t,r;return(r=(t=ae.variants)==null?void 0:t.outline(e).field)!=null?r:{}},flushed:e=>{var t,r;return(r=(t=ae.variants)==null?void 0:t.flushed(e).field)!=null?r:{}},filled:e=>{var t,r;return(r=(t=ae.variants)==null?void 0:t.filled(e).field)!=null?r:{}},unstyled:(T0=(C0=ae.variants)==null?void 0:C0.unstyled.field)!=null?T0:{}},_0,P0,A0,R0,$0,I0,L0,M0,sM={xs:(P0=(_0=ae.sizes)==null?void 0:_0.xs.field)!=null?P0:{},sm:(R0=(A0=ae.sizes)==null?void 0:A0.sm.field)!=null?R0:{},md:(I0=($0=ae.sizes)==null?void 0:$0.md.field)!=null?I0:{},lg:(M0=(L0=ae.sizes)==null?void 0:L0.lg.field)!=null?M0:{}},lM={baseStyle:oM,sizes:sM,variants:aM,defaultProps:{size:"md",variant:"outline"}},Tl=He("tooltip-bg"),Xf=He("tooltip-fg"),uM=He("popper-arrow-bg"),cM={bg:Tl.reference,color:Xf.reference,[Tl.variable]:"colors.gray.700",[Xf.variable]:"colors.whiteAlpha.900",_dark:{[Tl.variable]:"colors.gray.300",[Xf.variable]:"colors.gray.900"},[uM.variable]:Tl.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},fM={baseStyle:cM},{defineMultiStyleConfig:dM,definePartsStyle:ya}=ve(kI.keys),hM=e=>{const{colorScheme:t,theme:r,isIndeterminate:n,hasStripe:i}=e,o=F(v0(),v0("1rem","rgba(0,0,0,0.1)"))(e),a=F(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${ht(r,a)} 50%, - transparent 100% - )`;return{...!n&&i&&o,...n?{bgImage:s}:{bgColor:a}}},pM={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},mM=e=>({bg:F("gray.100","whiteAlpha.300")(e)}),gM=e=>({transitionProperty:"common",transitionDuration:"slow",...hM(e)}),vM=ya(e=>({label:pM,filledTrack:gM(e),track:mM(e)})),yM={xs:ya({track:{h:"1"}}),sm:ya({track:{h:"2"}}),md:ya({track:{h:"3"}}),lg:ya({track:{h:"4"}})},bM=dM({sizes:yM,baseStyle:vM,defaultProps:{size:"md",colorScheme:"blue"}}),SM=e=>typeof e=="function";function mt(e,...t){return SM(e)?e(...t):e}var{definePartsStyle:iu,defineMultiStyleConfig:xM}=ve(hI.keys),Ma=H("checkbox-size"),wM=e=>{const{colorScheme:t}=e;return{w:Ma.reference,h:Ma.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:F(`${t}.500`,`${t}.200`)(e),borderColor:F(`${t}.500`,`${t}.200`)(e),color:F("white","gray.900")(e),_hover:{bg:F(`${t}.600`,`${t}.300`)(e),borderColor:F(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:F("gray.200","transparent")(e),bg:F("gray.200","whiteAlpha.300")(e),color:F("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:F(`${t}.500`,`${t}.200`)(e),borderColor:F(`${t}.500`,`${t}.200`)(e),color:F("white","gray.900")(e)},_disabled:{bg:F("gray.100","whiteAlpha.100")(e),borderColor:F("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:F("red.500","red.300")(e)}}},EM={_disabled:{cursor:"not-allowed"}},kM={userSelect:"none",_disabled:{opacity:.4}},CM={transitionProperty:"transform",transitionDuration:"normal"},TM=iu(e=>({icon:CM,container:EM,control:mt(wM,e),label:kM})),_M={sm:iu({control:{[Ma.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:iu({control:{[Ma.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:iu({control:{[Ma.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},Uu=xM({baseStyle:TM,sizes:_M,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:PM,definePartsStyle:ou}=ve(CI.keys),AM=e=>{var t;const r=(t=mt(Uu.baseStyle,e))==null?void 0:t.control;return{...r,borderRadius:"full",_checked:{...r?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},RM=ou(e=>{var t,r,n,i;return{label:(r=(t=Uu).baseStyle)==null?void 0:r.call(t,e).label,container:(i=(n=Uu).baseStyle)==null?void 0:i.call(n,e).container,control:AM(e)}}),$M={md:ou({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:ou({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:ou({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},IM=PM({baseStyle:RM,sizes:$M,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:LM,definePartsStyle:MM}=ve(TI.keys),_l=H("select-bg"),O0,OM={...(O0=ae.baseStyle)==null?void 0:O0.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:_l.reference,[_l.variable]:"colors.white",_dark:{[_l.variable]:"colors.gray.700"},"> option, > optgroup":{bg:_l.reference}},NM={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},DM=MM({field:OM,icon:NM}),Pl={paddingInlineEnd:"8"},N0,D0,B0,z0,F0,j0,V0,H0,BM={lg:{...(N0=ae.sizes)==null?void 0:N0.lg,field:{...(D0=ae.sizes)==null?void 0:D0.lg.field,...Pl}},md:{...(B0=ae.sizes)==null?void 0:B0.md,field:{...(z0=ae.sizes)==null?void 0:z0.md.field,...Pl}},sm:{...(F0=ae.sizes)==null?void 0:F0.sm,field:{...(j0=ae.sizes)==null?void 0:j0.sm.field,...Pl}},xs:{...(V0=ae.sizes)==null?void 0:V0.xs,field:{...(H0=ae.sizes)==null?void 0:H0.xs.field,...Pl},icon:{insetEnd:"1"}}},zM=LM({baseStyle:DM,sizes:BM,variants:ae.variants,defaultProps:ae.defaultProps}),qf=H("skeleton-start-color"),Yf=H("skeleton-end-color"),FM={[qf.variable]:"colors.gray.100",[Yf.variable]:"colors.gray.400",_dark:{[qf.variable]:"colors.gray.800",[Yf.variable]:"colors.gray.600"},background:qf.reference,borderColor:Yf.reference,opacity:.7,borderRadius:"sm"},jM={baseStyle:FM},Kf=H("skip-link-bg"),VM={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Kf.variable]:"colors.white",_dark:{[Kf.variable]:"colors.gray.700"},bg:Kf.reference}},HM={baseStyle:VM},{defineMultiStyleConfig:UM,definePartsStyle:Hc}=ve(_I.keys),cs=H("slider-thumb-size"),fs=H("slider-track-size"),En=H("slider-bg"),WM=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...Sm({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},GM=e=>({...Sm({orientation:e.orientation,horizontal:{h:fs.reference},vertical:{w:fs.reference}}),overflow:"hidden",borderRadius:"sm",[En.variable]:"colors.gray.200",_dark:{[En.variable]:"colors.whiteAlpha.200"},_disabled:{[En.variable]:"colors.gray.300",_dark:{[En.variable]:"colors.whiteAlpha.300"}},bg:En.reference}),XM=e=>{const{orientation:t}=e;return{...Sm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:cs.reference,h:cs.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},qM=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[En.variable]:`colors.${t}.500`,_dark:{[En.variable]:`colors.${t}.200`},bg:En.reference}},YM=Hc(e=>({container:WM(e),track:GM(e),thumb:XM(e),filledTrack:qM(e)})),KM=Hc({container:{[cs.variable]:"sizes.4",[fs.variable]:"sizes.1"}}),QM=Hc({container:{[cs.variable]:"sizes.3.5",[fs.variable]:"sizes.1"}}),ZM=Hc({container:{[cs.variable]:"sizes.2.5",[fs.variable]:"sizes.0.5"}}),JM={lg:KM,md:QM,sm:ZM},eO=UM({baseStyle:YM,sizes:JM,defaultProps:{size:"md",colorScheme:"blue"}}),ai=He("spinner-size"),tO={width:[ai.reference],height:[ai.reference]},rO={xs:{[ai.variable]:"sizes.3"},sm:{[ai.variable]:"sizes.4"},md:{[ai.variable]:"sizes.6"},lg:{[ai.variable]:"sizes.8"},xl:{[ai.variable]:"sizes.12"}},nO={baseStyle:tO,sizes:rO,defaultProps:{size:"md"}},{defineMultiStyleConfig:iO,definePartsStyle:Jx}=ve(PI.keys),oO={fontWeight:"medium"},aO={opacity:.8,marginBottom:"2"},sO={verticalAlign:"baseline",fontWeight:"semibold"},lO={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},uO=Jx({container:{},label:oO,helpText:aO,number:sO,icon:lO}),cO={md:Jx({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},fO=iO({baseStyle:uO,sizes:cO,defaultProps:{size:"md"}}),Qf=H("kbd-bg"),dO={[Qf.variable]:"colors.gray.100",_dark:{[Qf.variable]:"colors.whiteAlpha.100"},bg:Qf.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},hO={baseStyle:dO},pO={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},mO={baseStyle:pO},{defineMultiStyleConfig:gO,definePartsStyle:vO}=ve(bI.keys),yO={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},bO=vO({icon:yO}),SO=gO({baseStyle:bO}),{defineMultiStyleConfig:xO,definePartsStyle:wO}=ve(SI.keys),Er=H("menu-bg"),Zf=H("menu-shadow"),EO={[Er.variable]:"#fff",[Zf.variable]:"shadows.sm",_dark:{[Er.variable]:"colors.gray.700",[Zf.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Er.reference,boxShadow:Zf.reference},kO={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Er.variable]:"colors.gray.100",_dark:{[Er.variable]:"colors.whiteAlpha.100"}},_active:{[Er.variable]:"colors.gray.200",_dark:{[Er.variable]:"colors.whiteAlpha.200"}},_expanded:{[Er.variable]:"colors.gray.100",_dark:{[Er.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Er.reference},CO={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},TO={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},_O={opacity:.6},PO={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},AO={transitionProperty:"common",transitionDuration:"normal"},RO=wO({button:AO,list:EO,item:kO,groupTitle:CO,icon:TO,command:_O,divider:PO}),$O=xO({baseStyle:RO}),{defineMultiStyleConfig:IO,definePartsStyle:Mh}=ve(xI.keys),Jf=H("modal-bg"),ed=H("modal-shadow"),LO={bg:"blackAlpha.600",zIndex:"modal"},MO=e=>{const{isCentered:t,scrollBehavior:r}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:r==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},OO=e=>{const{isCentered:t,scrollBehavior:r}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:r==="inside"?"calc(100% - 7.5rem)":void 0,[Jf.variable]:"colors.white",[ed.variable]:"shadows.lg",_dark:{[Jf.variable]:"colors.gray.700",[ed.variable]:"shadows.dark-lg"},bg:Jf.reference,boxShadow:ed.reference}},NO={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},DO={position:"absolute",top:"2",insetEnd:"3"},BO=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},zO={px:"6",py:"4"},FO=Mh(e=>({overlay:LO,dialogContainer:mt(MO,e),dialog:mt(OO,e),header:NO,closeButton:DO,body:mt(BO,e),footer:zO}));function lr(e){return Mh(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var jO={xs:lr("xs"),sm:lr("sm"),md:lr("md"),lg:lr("lg"),xl:lr("xl"),"2xl":lr("2xl"),"3xl":lr("3xl"),"4xl":lr("4xl"),"5xl":lr("5xl"),"6xl":lr("6xl"),full:lr("full")},VO=IO({baseStyle:FO,sizes:jO,defaultProps:{size:"md"}}),{defineMultiStyleConfig:HO,definePartsStyle:ew}=ve(wI.keys),wm=He("number-input-stepper-width"),tw=He("number-input-input-padding"),UO=Hr(wm).add("0.5rem").toString(),td=He("number-input-bg"),rd=He("number-input-color"),nd=He("number-input-border-color"),WO={[wm.variable]:"sizes.6",[tw.variable]:UO},GO=e=>{var t,r;return(r=(t=mt(ae.baseStyle,e))==null?void 0:t.field)!=null?r:{}},XO={width:wm.reference},qO={borderStart:"1px solid",borderStartColor:nd.reference,color:rd.reference,bg:td.reference,[rd.variable]:"colors.chakra-body-text",[nd.variable]:"colors.chakra-border-color",_dark:{[rd.variable]:"colors.whiteAlpha.800",[nd.variable]:"colors.whiteAlpha.300"},_active:{[td.variable]:"colors.gray.200",_dark:{[td.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},YO=ew(e=>{var t;return{root:WO,field:(t=mt(GO,e))!=null?t:{},stepperGroup:XO,stepper:qO}});function Al(e){var t,r,n;const i=(t=ae.sizes)==null?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},a=(n=(r=i.field)==null?void 0:r.fontSize)!=null?n:"md",s=qx.fontSizes[a];return ew({field:{...i.field,paddingInlineEnd:tw.reference,verticalAlign:"top"},stepper:{fontSize:Hr(s).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var KO={xs:Al("xs"),sm:Al("sm"),md:Al("md"),lg:Al("lg")},QO=HO({baseStyle:YO,sizes:KO,variants:ae.variants,defaultProps:ae.defaultProps}),U0,ZO={...(U0=ae.baseStyle)==null?void 0:U0.field,textAlign:"center"},JO={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},W0,G0,eN={outline:e=>{var t,r,n;return(n=(r=mt((t=ae.variants)==null?void 0:t.outline,e))==null?void 0:r.field)!=null?n:{}},flushed:e=>{var t,r,n;return(n=(r=mt((t=ae.variants)==null?void 0:t.flushed,e))==null?void 0:r.field)!=null?n:{}},filled:e=>{var t,r,n;return(n=(r=mt((t=ae.variants)==null?void 0:t.filled,e))==null?void 0:r.field)!=null?n:{}},unstyled:(G0=(W0=ae.variants)==null?void 0:W0.unstyled.field)!=null?G0:{}},tN={baseStyle:ZO,sizes:JO,variants:eN,defaultProps:ae.defaultProps},{defineMultiStyleConfig:rN,definePartsStyle:nN}=ve(EI.keys),Rl=He("popper-bg"),iN=He("popper-arrow-bg"),X0=He("popper-arrow-shadow-color"),oN={zIndex:10},aN={[Rl.variable]:"colors.white",bg:Rl.reference,[iN.variable]:Rl.reference,[X0.variable]:"colors.gray.200",_dark:{[Rl.variable]:"colors.gray.700",[X0.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},sN={px:3,py:2,borderBottomWidth:"1px"},lN={px:3,py:2},uN={px:3,py:2,borderTopWidth:"1px"},cN={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},fN=nN({popper:oN,content:aN,header:sN,body:lN,footer:uN,closeButton:cN}),dN=rN({baseStyle:fN}),{definePartsStyle:Oh,defineMultiStyleConfig:hN}=ve(pI.keys),id=H("drawer-bg"),od=H("drawer-box-shadow");function Mi(e){return Oh(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var pN={bg:"blackAlpha.600",zIndex:"modal"},mN={display:"flex",zIndex:"modal",justifyContent:"center"},gN=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[id.variable]:"colors.white",[od.variable]:"shadows.lg",_dark:{[id.variable]:"colors.gray.700",[od.variable]:"shadows.dark-lg"},bg:id.reference,boxShadow:od.reference}},vN={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},yN={position:"absolute",top:"2",insetEnd:"3"},bN={px:"6",py:"2",flex:"1",overflow:"auto"},SN={px:"6",py:"4"},xN=Oh(e=>({overlay:pN,dialogContainer:mN,dialog:mt(gN,e),header:vN,closeButton:yN,body:bN,footer:SN})),wN={xs:Mi("xs"),sm:Mi("md"),md:Mi("lg"),lg:Mi("2xl"),xl:Mi("4xl"),full:Mi("full")},EN=hN({baseStyle:xN,sizes:wN,defaultProps:{size:"xs"}}),{definePartsStyle:kN,defineMultiStyleConfig:CN}=ve(mI.keys),TN={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},_N={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},PN={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},AN=kN({preview:TN,input:_N,textarea:PN}),RN=CN({baseStyle:AN}),{definePartsStyle:$N,defineMultiStyleConfig:IN}=ve(gI.keys),mo=H("form-control-color"),LN={marginStart:"1",[mo.variable]:"colors.red.500",_dark:{[mo.variable]:"colors.red.300"},color:mo.reference},MN={mt:"2",[mo.variable]:"colors.gray.600",_dark:{[mo.variable]:"colors.whiteAlpha.600"},color:mo.reference,lineHeight:"normal",fontSize:"sm"},ON=$N({container:{width:"100%",position:"relative"},requiredIndicator:LN,helperText:MN}),NN=IN({baseStyle:ON}),{definePartsStyle:DN,defineMultiStyleConfig:BN}=ve(vI.keys),go=H("form-error-color"),zN={[go.variable]:"colors.red.500",_dark:{[go.variable]:"colors.red.300"},color:go.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},FN={marginEnd:"0.5em",[go.variable]:"colors.red.500",_dark:{[go.variable]:"colors.red.300"},color:go.reference},jN=DN({text:zN,icon:FN}),VN=BN({baseStyle:jN}),HN={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},UN={baseStyle:HN},WN={fontFamily:"heading",fontWeight:"bold"},GN={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},XN={baseStyle:WN,sizes:GN,defaultProps:{size:"xl"}},{defineMultiStyleConfig:qN,definePartsStyle:YN}=ve(dI.keys),ad=H("breadcrumb-link-decor"),KN={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:ad.reference,[ad.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[ad.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},QN=YN({link:KN}),ZN=qN({baseStyle:QN}),JN={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},rw=e=>{const{colorScheme:t,theme:r}=e;if(t==="gray")return{color:F("gray.800","whiteAlpha.900")(e),_hover:{bg:F("gray.100","whiteAlpha.200")(e)},_active:{bg:F("gray.200","whiteAlpha.300")(e)}};const n=Po(`${t}.200`,.12)(r),i=Po(`${t}.200`,.24)(r);return{color:F(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:F(`${t}.50`,n)(e)},_active:{bg:F(`${t}.100`,i)(e)}}},eD=e=>{const{colorScheme:t}=e,r=F("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?r:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...mt(rw,e)}},tD={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},rD=e=>{var t;const{colorScheme:r}=e;if(r==="gray"){const l=F("gray.100","whiteAlpha.200")(e);return{bg:l,color:F("gray.800","whiteAlpha.900")(e),_hover:{bg:F("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:F("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${r}.500`,color:i="white",hoverBg:o=`${r}.600`,activeBg:a=`${r}.700`}=(t=tD[r])!=null?t:{},s=F(n,`${r}.200`)(e);return{bg:s,color:F(i,"gray.800")(e),_hover:{bg:F(o,`${r}.300`)(e),_disabled:{bg:s}},_active:{bg:F(a,`${r}.400`)(e)}}},nD=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:F(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:F(`${t}.700`,`${t}.500`)(e)}}},iD={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},oD={ghost:rw,outline:eD,solid:rD,link:nD,unstyled:iD},aD={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},sD={baseStyle:JN,variants:oD,sizes:aD,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:gi,defineMultiStyleConfig:lD}=ve(LI.keys),Wu=H("card-bg"),Kr=H("card-padding"),nw=H("card-shadow"),au=H("card-radius"),iw=H("card-border-width","0"),ow=H("card-border-color"),uD=gi({container:{[Wu.variable]:"colors.chakra-body-bg",backgroundColor:Wu.reference,boxShadow:nw.reference,borderRadius:au.reference,color:"chakra-body-text",borderWidth:iw.reference,borderColor:ow.reference},body:{padding:Kr.reference,flex:"1 1 0%"},header:{padding:Kr.reference},footer:{padding:Kr.reference}}),cD={sm:gi({container:{[au.variable]:"radii.base",[Kr.variable]:"space.3"}}),md:gi({container:{[au.variable]:"radii.md",[Kr.variable]:"space.5"}}),lg:gi({container:{[au.variable]:"radii.xl",[Kr.variable]:"space.7"}})},fD={elevated:gi({container:{[nw.variable]:"shadows.base",_dark:{[Wu.variable]:"colors.gray.700"}}}),outline:gi({container:{[iw.variable]:"1px",[ow.variable]:"colors.chakra-border-color"}}),filled:gi({container:{[Wu.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[Kr.variable]:0},header:{[Kr.variable]:0},footer:{[Kr.variable]:0}}},dD=lD({baseStyle:uD,variants:fD,sizes:cD,defaultProps:{variant:"elevated",size:"md"}}),Oa=He("close-button-size"),aa=He("close-button-bg"),hD={w:[Oa.reference],h:[Oa.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[aa.variable]:"colors.blackAlpha.100",_dark:{[aa.variable]:"colors.whiteAlpha.100"}},_active:{[aa.variable]:"colors.blackAlpha.200",_dark:{[aa.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:aa.reference},pD={lg:{[Oa.variable]:"sizes.10",fontSize:"md"},md:{[Oa.variable]:"sizes.8",fontSize:"xs"},sm:{[Oa.variable]:"sizes.6",fontSize:"2xs"}},mD={baseStyle:hD,sizes:pD,defaultProps:{size:"md"}},{variants:gD,defaultProps:vD}=La,yD={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:De.bg.reference,color:De.color.reference,boxShadow:De.shadow.reference},bD={baseStyle:yD,variants:gD,defaultProps:vD},SD={w:"100%",mx:"auto",maxW:"prose",px:"4"},xD={baseStyle:SD},wD={opacity:.6,borderColor:"inherit"},ED={borderStyle:"solid"},kD={borderStyle:"dashed"},CD={solid:ED,dashed:kD},TD={baseStyle:wD,variants:CD,defaultProps:{variant:"solid"}},{definePartsStyle:_D,defineMultiStyleConfig:PD}=ve(uI.keys),AD={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},RD={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},$D={pt:"2",px:"4",pb:"5"},ID={fontSize:"1.25em"},LD=_D({container:AD,button:RD,panel:$D,icon:ID}),MD=PD({baseStyle:LD}),{definePartsStyle:Ns,defineMultiStyleConfig:OD}=ve(cI.keys),Mt=H("alert-fg"),sn=H("alert-bg"),ND=Ns({container:{bg:sn.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Mt.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Mt.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function Em(e){const{theme:t,colorScheme:r}=e,n=Po(`${r}.200`,.16)(t);return{light:`colors.${r}.100`,dark:n}}var DD=Ns(e=>{const{colorScheme:t}=e,r=Em(e);return{container:{[Mt.variable]:`colors.${t}.600`,[sn.variable]:r.light,_dark:{[Mt.variable]:`colors.${t}.200`,[sn.variable]:r.dark}}}}),BD=Ns(e=>{const{colorScheme:t}=e,r=Em(e);return{container:{[Mt.variable]:`colors.${t}.600`,[sn.variable]:r.light,_dark:{[Mt.variable]:`colors.${t}.200`,[sn.variable]:r.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Mt.reference}}}),zD=Ns(e=>{const{colorScheme:t}=e,r=Em(e);return{container:{[Mt.variable]:`colors.${t}.600`,[sn.variable]:r.light,_dark:{[Mt.variable]:`colors.${t}.200`,[sn.variable]:r.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Mt.reference}}}),FD=Ns(e=>{const{colorScheme:t}=e;return{container:{[Mt.variable]:"colors.white",[sn.variable]:`colors.${t}.600`,_dark:{[Mt.variable]:"colors.gray.900",[sn.variable]:`colors.${t}.200`},color:Mt.reference}}}),jD={subtle:DD,"left-accent":BD,"top-accent":zD,solid:FD},VD=OD({baseStyle:ND,variants:jD,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:aw,defineMultiStyleConfig:HD}=ve(fI.keys),vo=H("avatar-border-color"),Na=H("avatar-bg"),ds=H("avatar-font-size"),Ao=H("avatar-size"),UD={borderRadius:"full",border:"0.2em solid",borderColor:vo.reference,[vo.variable]:"white",_dark:{[vo.variable]:"colors.gray.800"}},WD={bg:Na.reference,fontSize:ds.reference,width:Ao.reference,height:Ao.reference,lineHeight:"1",[Na.variable]:"colors.gray.200",_dark:{[Na.variable]:"colors.whiteAlpha.400"}},GD=e=>{const{name:t,theme:r}=e,n=t?JI({string:t}):"colors.gray.400",i=QI(n)(r);let o="white";return i||(o="gray.800"),{bg:Na.reference,fontSize:ds.reference,color:o,borderColor:vo.reference,verticalAlign:"top",width:Ao.reference,height:Ao.reference,"&:not([data-loaded])":{[Na.variable]:n},[vo.variable]:"colors.white",_dark:{[vo.variable]:"colors.gray.800"}}},XD={fontSize:ds.reference,lineHeight:"1"},qD=aw(e=>({badge:mt(UD,e),excessLabel:mt(WD,e),container:mt(GD,e),label:XD}));function vn(e){const t=e!=="100%"?Kx[e]:void 0;return aw({container:{[Ao.variable]:t??e,[ds.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[Ao.variable]:t??e,[ds.variable]:`calc(${t??e} / 2.5)`}})}var YD={"2xs":vn(4),xs:vn(6),sm:vn(8),md:vn(12),lg:vn(16),xl:vn(24),"2xl":vn(32),full:vn("100%")},KD=HD({baseStyle:qD,sizes:YD,defaultProps:{size:"md"}}),QD={Accordion:MD,Alert:VD,Avatar:KD,Badge:La,Breadcrumb:ZN,Button:sD,Checkbox:Uu,CloseButton:mD,Code:bD,Container:xD,Divider:TD,Drawer:EN,Editable:RN,Form:NN,FormError:VN,FormLabel:UN,Heading:XN,Input:ae,Kbd:hO,Link:mO,List:SO,Menu:$O,Modal:VO,NumberInput:QO,PinInput:tN,Popover:dN,Progress:bM,Radio:IM,Select:zM,Skeleton:jM,SkipLink:HM,Slider:eO,Spinner:nO,Stat:fO,Switch:mL,Table:wL,Tabs:DL,Tag:KL,Textarea:lM,Tooltip:fM,Card:dD,Stepper:lI},ZD={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},JD={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},e5="ltr",t5={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Gu={semanticTokens:ZD,direction:e5,...oI,components:QD,styles:JD,config:t5};function ba(e){return typeof e=="function"}function r5(...e){return t=>e.reduce((r,n)=>n(r),t)}var n5=e=>function(...r){let n=[...r],i=r[r.length-1];return O$(i)&&n.length>1?n=n.slice(0,n.length-1):i=e,r5(...n.map(o=>a=>ba(o)?o(a):sw(a,o)))(i)},km=n5(Gu);function sw(...e){return Kt({},...e,lw)}function lw(e,t,r,n){if((ba(e)||ba(t))&&Object.prototype.hasOwnProperty.call(n,r))return(...i)=>{const o=ba(e)?e(...i):e,a=ba(t)?t(...i):t;return Kt({},o,a,lw)}}function i5({colorScheme:e,components:t}){return r=>{let n=Object.keys(r.components||{});return Array.isArray(t)?n=t:Zt(t)&&(n=Object.keys(t)),sw(r,{components:Object.fromEntries(n.map(i=>[i,{defaultProps:{colorScheme:e}}]))})}}function o5(e,t){const r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}function a5(e,t,r,n){const i=typeof t=="string"?t.split("."):[t];for(n=0;n{const t=new WeakMap;return(n,i,o,a)=>{if(typeof n>"u")return e(n,i,o);t.has(n)||t.set(n,new Map);const s=t.get(n);if(s.has(i))return s.get(i);const l=e(n,i,o,a);return s.set(i,l),l}},uw=s5(a5);function cw(e,t){const r={};return Object.keys(e).forEach(n=>{const i=e[n];t(i,n,e)&&(r[n]=i)}),r}var fw=e=>cw(e,t=>t!=null);function l5(e){return typeof e=="function"}function dw(e,...t){return l5(e)?e(...t):e}var u5=typeof Element<"u",c5=typeof Map=="function",f5=typeof Set=="function",d5=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function su(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!su(e[n],t[n]))return!1;return!0}var o;if(c5&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(n=o.next()).done;)if(!t.has(n.value[0]))return!1;for(o=e.entries();!(n=o.next()).done;)if(!su(n.value[1],t.get(n.value[0])))return!1;return!0}if(f5&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(n=o.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(d5&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;if(u5&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((i[n]==="_owner"||i[n]==="__v"||i[n]==="__o")&&e.$$typeof)&&!su(e[i[n]],t[i[n]]))return!1;return!0}return e!==e&&t!==t}var h5=function(t,r){try{return su(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const p5=sp(h5);function hw(e,t={}){var r;const{styleConfig:n,...i}=t,{theme:o,colorMode:a}=hR(),s=e?uw(o,`components.${e}`):void 0,l=n||s,u=Kt({theme:o,colorMode:a},(r=l?.defaultProps)!=null?r:{},fw(o5(i,["children"]))),c=k.useRef({});if(l){const d=I$(l)(u);p5(c.current,d)||(c.current=d)}return c.current}function jo(e,t={}){return hw(e,t)}function m5(e,t={}){return hw(e,t)}var g5=new Set([...S$,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),v5=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function y5(e){return v5.has(e)||!g5.has(e)}function b5(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const r={...e};for(const n of t)if(n!=null)for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(i in r&&delete r[i],r[i]=n[i]);return r}function S5(e){const t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}var x5=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,w5=Cx(function(e){return x5.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),E5=w5,k5=function(t){return t!=="theme"},q0=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?E5:k5},Y0=function(t,r,n){var i;if(r){var o=r.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&n&&(i=t.__emotion_forwardProp),i},C5=!1,T5=function(t){var r=t.cache,n=t.serialized,i=t.isStringTag;return cm(r,n,i),Ox(function(){return fm(r,n,i)}),null},_5=function e(t,r){var n=t.__emotion_real===t,i=n&&t.__emotion_base||t,o,a;r!==void 0&&(o=r.label,a=r.target);var s=Y0(t,r,n),l=s||q0(i),u=!l("as");return function(){var c=arguments,f=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)f.push.apply(f,c);else{f.push(c[0][0]);for(var d=c.length,m=1;mt=>{const{theme:r,css:n,__css:i,sx:o,...a}=t,s=cw(a,(f,d)=>w$(d)),l=dw(e,t),u=b5({},i,l,fw(s),o),c=Xx(u)(t.theme);return n?[c,n]:c};function sd(e,t){const{baseStyle:r,...n}=t??{};n.shouldForwardProp||(n.shouldForwardProp=y5);const i=R5({baseStyle:r}),o=A5(e,n)(i);return Rd.forwardRef(function(l,u){const{colorMode:c,forced:f}=zc();return Rd.createElement(o,{ref:u,"data-theme":f?c:void 0,...l})})}function $5(){const e=new Map;return new Proxy(sd,{apply(t,r,n){return sd(...n)},get(t,r){return e.has(r)||e.set(r,sd(r)),e.get(r)}})}var Fe=$5();function vr(e){return k.forwardRef(e)}function I5(e={}){const{strict:t=!0,errorMessage:r="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:n}=e,i=k.createContext(void 0);i.displayName=n;function o(){var a;const s=k.useContext(i);if(!s&&t){const l=new Error(r);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}function L5(e){const{cssVarsRoot:t,theme:r,children:n}=e,i=k.useMemo(()=>y$(r),[r]);return $.jsxs(QA,{theme:i,children:[$.jsx(M5,{root:t}),n]})}function M5({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return $.jsx(Dc,{styles:r=>({[t]:r.__cssVars})})}I5({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function O5(){const{colorMode:e}=zc();return $.jsx(Dc,{styles:t=>{const r=uw(t,"styles.global"),n=dw(r,{theme:t,colorMode:e});return n?Xx(n)(t):void 0}})}var Cm=k.createContext({getDocument(){return document},getWindow(){return window}});Cm.displayName="EnvironmentContext";function WV({defer:e}={}){const[,t]=k.useReducer(r=>r+1,0);return zu(()=>{e&&t()},[e]),k.useContext(Cm)}function pw(e){const{children:t,environment:r,disabled:n}=e,i=k.useRef(null),o=k.useMemo(()=>r||{getDocument:()=>{var s,l;return(l=(s=i.current)==null?void 0:s.ownerDocument)!=null?l:document},getWindow:()=>{var s,l;return(l=(s=i.current)==null?void 0:s.ownerDocument.defaultView)!=null?l:window}},[r]),a=!n||!r;return $.jsxs(Cm.Provider,{value:o,children:[t,a&&$.jsx("span",{id:"__chakra_env",hidden:!0,ref:i})]})}pw.displayName="EnvironmentProvider";var N5=(e,t)=>e.find(r=>r.id===t);function Q0(e,t){const r=mw(e,t),n=r?e[r].findIndex(i=>i.id===t):-1;return{position:r,index:n}}function mw(e,t){for(const[r,n]of Object.entries(e))if(N5(n,t))return r}function D5(e){const t=e.includes("right"),r=e.includes("left");let n="center";return t&&(n="flex-end"),r&&(n="flex-start"),{display:"flex",flexDirection:"column",alignItems:n}}function B5(e){const r=e==="top"||e==="bottom"?"0 auto":void 0,n=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:r,top:n,bottom:i,right:o,left:a}}function qu(e,t=[]){const r=k.useRef(e);return k.useEffect(()=>{r.current=e}),k.useCallback((...n)=>{var i;return(i=r.current)==null?void 0:i.call(r,...n)},t)}function z5(e,t){const r=qu(e);k.useEffect(()=>{if(t==null)return;let n=null;return n=window.setTimeout(()=>{r()},t),()=>{n&&window.clearTimeout(n)}},[t,r])}function Z0(e,t){const r=k.useRef(!1),n=k.useRef(!1);k.useEffect(()=>{if(r.current&&n.current)return e();n.current=!0},t),k.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])}const Tm=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Uc=k.createContext({}),Ds=k.createContext(null),_m=typeof window<"u",gw=_m?k.useLayoutEffect:k.useEffect,vw=k.createContext({strict:!1}),Wc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),F5="framerAppearId",yw="data-"+Wc(F5),j5={skipAnimations:!1,useManualTiming:!1};function V5(e){let t=new Set,r=new Set,n=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(u){o.has(u)&&(l.schedule(u),e()),u(a)}const l={schedule:(u,c=!1,f=!1)=>{const m=f&&n?t:r;return c&&o.add(u),m.has(u)||m.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,n){i=!0;return}n=!0,[t,r]=[r,t],r.clear(),t.forEach(s),n=!1,i&&(i=!1,l.process(u))}};return l}const $l=["read","resolveKeyframes","update","preRender","render","postRender"],H5=40;function bw(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>r=!0,a=$l.reduce((p,h)=>(p[h]=V5(o),p),{}),{read:s,resolveKeyframes:l,update:u,preRender:c,render:f,postRender:d}=a,m=()=>{const p=performance.now();r=!1,i.delta=n?1e3/60:Math.max(Math.min(p-i.timestamp,H5),1),i.timestamp=p,i.isProcessing=!0,s.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(m))},v=()=>{r=!0,n=!0,i.isProcessing||e(m)};return{schedule:$l.reduce((p,h)=>{const g=a[h];return p[h]=(x,C=!1,_=!1)=>(r||v(),g.schedule(x,C,_)),p},{}),cancel:p=>{for(let h=0;h<$l.length;h++)a[$l[h]].cancel(p)},state:i,steps:a}}const{schedule:Pm,cancel:GV}=bw(queueMicrotask,!1);function eo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const Sw=k.createContext({});let J0=!1;function U5(e,t,r,n,i){var o;const{visualElement:a}=k.useContext(Uc),s=k.useContext(vw),l=k.useContext(Ds),u=k.useContext(Tm).reducedMotion,c=k.useRef();n=n||s.renderer,!c.current&&n&&(c.current=n(e,{visualState:t,parent:a,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const f=c.current,d=k.useContext(Sw);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&G5(c.current,r,i,d),k.useInsertionEffect(()=>{f&&f.update(r,l)});const m=r[yw],v=k.useRef(!!m&&!window.MotionHandoffIsComplete&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return gw(()=>{f&&(f.updateFeatures(),Pm.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),k.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current=!1,J0||(J0=!0,queueMicrotask(W5)))}),f}function W5(){window.MotionHandoffIsComplete=!0}function G5(e,t,r,n){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:xw(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&eo(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:u})}function xw(e){if(e)return e.options.allowProjection!==!1?e.projection:xw(e.parent)}function X5(e,t,r){return k.useCallback(n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):eo(r)&&(r.current=n))},[t])}function hs(e){return typeof e=="string"||Array.isArray(e)}function ps(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Am=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Rm=["initial",...Am];function Gc(e){return ps(e.animate)||Rm.some(t=>hs(e[t]))}function ww(e){return!!(Gc(e)||e.variants)}function q5(e,t){if(Gc(e)){const{initial:r,animate:n}=e;return{initial:r===!1||hs(r)?r:void 0,animate:hs(n)?n:void 0}}return e.inherit!==!1?t:{}}function Y5(e){const{initial:t,animate:r}=q5(e,k.useContext(Uc));return k.useMemo(()=>({initial:t,animate:r}),[ey(t),ey(r)])}function ey(e){return Array.isArray(e)?e.join(" "):e}const ty={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"]},Ro={};for(const e in ty)Ro[e]={isEnabled:t=>ty[e].some(r=>!!t[r])};function K5(e){for(const t in e)Ro[t]={...Ro[t],...e[t]}}const $m=k.createContext({}),Q5=Symbol.for("motionComponentSymbol"),st=e=>e;let Nh=st;function Z5({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){e&&K5(e);function o(s,l){let u;const c={...k.useContext(Tm),...s,layoutId:J5(s)},{isStatic:f}=c,d=Y5(s),m=n(s,f);if(!f&&_m){e3();const v=t3(c);u=v.MeasureLayout,d.visualElement=U5(i,m,c,t,v.ProjectionNode)}return $.jsxs(Uc.Provider,{value:d,children:[u&&d.visualElement?$.jsx(u,{visualElement:d.visualElement,...c}):null,r(i,s,X5(m,d.visualElement,l),m,f,d.visualElement)]})}const a=k.forwardRef(o);return a[Q5]=i,a}function J5({layoutId:e}){const t=k.useContext($m).id;return t&&e!==void 0?t+"-"+e:e}function e3(e,t){k.useContext(vw).strict}function t3(e){const{drag:t,layout:r}=Ro;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function r3(e){function t(n,i={}){return Z5(e(n,i))}if(typeof Proxy>"u")return t;const r=new Map;return new Proxy(t,{get:(n,i)=>(r.has(i)||r.set(i,t(i)),r.get(i))})}const n3=["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 Im(e){return typeof e!="string"||e.includes("-")?!1:!!(n3.indexOf(e)>-1||/[A-Z]/u.test(e))}const Yu={};function i3(e){Object.assign(Yu,e)}const Bs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hn=new Set(Bs);function Ew(e,{layout:t,layoutId:r}){return Hn.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Yu[e]||e==="opacity")}const at=e=>!!(e&&e.getVelocity),kw=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Nn=(e,t,r)=>r>t?t:rtypeof e=="number",parse:parseFloat,transform:e=>e},Da={...Vo,transform:e=>Nn(0,1,e)},Il={...Vo,default:1},Ba=e=>Math.round(e*1e5)/1e5,Lm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,o3=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,a3=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function zs(e){return typeof e=="string"}function s3(e){return e==null}const Fs=e=>({test:t=>zs(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),yn=Fs("deg"),Lr=Fs("%"),W=Fs("px"),l3=Fs("vh"),u3=Fs("vw"),ry={...Lr,parse:e=>Lr.parse(e)/100,transform:e=>Lr.transform(e*100)},ny={...Vo,transform:Math.round},Mm={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,size:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,rotate:yn,rotateX:yn,rotateY:yn,rotateZ:yn,scale:Il,scaleX:Il,scaleY:Il,scaleZ:Il,skew:yn,skewX:yn,skewY:yn,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:Da,originX:ry,originY:ry,originZ:W,zIndex:ny,backgroundPositionX:W,backgroundPositionY:W,fillOpacity:Da,strokeOpacity:Da,numOctaves:ny},c3={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},f3=Bs.length;function d3(e,t,r){let n="",i=!0;for(let o=0;ot=>typeof t=="string"&&t.startsWith(e),Tw=Cw("--"),h3=Cw("var(--"),Om=e=>h3(e)?p3.test(e.split("/*")[0].trim()):!1,p3=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Nm(e,t,r){const{style:n,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const l in t){const u=t[l];if(Hn.has(l)){a=!0;continue}else if(Tw(l)){i[l]=u;continue}else{const c=kw(u,Mm[l]);l.startsWith("origin")?(s=!0,o[l]=c):n[l]=c}}if(t.transform||(a||r?n.transform=d3(t,e.transform,r):n.transform&&(n.transform="none")),s){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;n.transformOrigin=`${l} ${u} ${c}`}}const Dm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _w(e,t,r){for(const n in t)!at(t[n])&&!Ew(n,r)&&(e[n]=t[n])}function m3({transformTemplate:e},t){return k.useMemo(()=>{const r=Dm();return Nm(r,t,e),Object.assign({},r.vars,r.style)},[t])}function g3(e,t){const r=e.style||{},n={};return _w(n,r,e),Object.assign(n,m3(e,t)),n}function v3(e,t){const r={},n=g3(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const y3=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 Ku(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||y3.has(e)}let Pw=e=>!Ku(e);function b3(e){e&&(Pw=t=>t.startsWith("on")?!Ku(t):e(t))}try{b3(require("@emotion/is-prop-valid").default)}catch{}function S3(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||(Pw(i)||r===!0&&Ku(i)||!t&&!Ku(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}function iy(e,t,r){return typeof e=="string"?e:W.transform(t+r*e)}function x3(e,t,r){const n=iy(t,e.x,e.width),i=iy(r,e.y,e.height);return`${n} ${i}`}const w3={offset:"stroke-dashoffset",array:"stroke-dasharray"},E3={offset:"strokeDashoffset",array:"strokeDasharray"};function k3(e,t,r=1,n=0,i=!0){e.pathLength=1;const o=i?w3:E3;e[o.offset]=W.transform(-n);const a=W.transform(t),s=W.transform(r);e[o.array]=`${a} ${s}`}function Bm(e,{attrX:t,attrY:r,attrScale:n,originX:i,originY:o,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...u},c,f){if(Nm(e,u,f),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:m,dimensions:v}=e;d.transform&&(v&&(m.transform=d.transform),delete d.transform),v&&(i!==void 0||o!==void 0||m.transform)&&(m.transformOrigin=x3(v,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(d.x=t),r!==void 0&&(d.y=r),n!==void 0&&(d.scale=n),a!==void 0&&k3(d,a,s,l,!1)}const Aw=()=>({...Dm(),attrs:{}}),zm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function C3(e,t,r,n){const i=k.useMemo(()=>{const o=Aw();return Bm(o,t,zm(n),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};_w(o,e.style,e),i.style={...o,...i.style}}return i}function T3(e=!1){return(r,n,i,{latestValues:o},a)=>{const l=(Im(r)?C3:v3)(n,o,a,r),u=S3(n,typeof r=="string",e),c=r!==k.Fragment?{...u,...l,ref:i}:{},{children:f}=n,d=k.useMemo(()=>at(f)?f.get():f,[f]);return k.createElement(r,{...c,children:d})}}function Rw(e,{style:t,vars:r},n,i){Object.assign(e.style,t,i&&i.getProjectionStyles(n));for(const o in r)e.style.setProperty(o,r[o])}const $w=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 Iw(e,t,r,n){Rw(e,t,void 0,n);for(const i in t.attrs)e.setAttribute($w.has(i)?i:Wc(i),t.attrs[i])}function Fm(e,t,r){var n;const{style:i}=e,o={};for(const a in i)(at(i[a])||t.style&&at(t.style[a])||Ew(a,e)||((n=r?.getValue(a))===null||n===void 0?void 0:n.liveStyle)!==void 0)&&(o[a]=i[a]);return r&&i&&typeof i.willChange=="string"&&(r.applyWillChange=!1),o}function Lw(e,t,r){const n=Fm(e,t,r);for(const i in e)if(at(e[i])||at(t[i])){const o=Bs.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[o]=e[i]}return n}function oy(e){const t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function jm(e,t,r,n){if(typeof t=="function"){const[i,o]=oy(n);t=t(r!==void 0?r:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=oy(n);t=t(r!==void 0?r:e.custom,i,o)}return t}function Vm(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const Dh=e=>Array.isArray(e),_3=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),P3=e=>Dh(e)?e[e.length-1]||0:e;function lu(e){const t=at(e)?e.get():e;return _3(t)?t.toValue():t}const Mw=new Set(["opacity","clipPath","filter","transform"]);function Ow(e){if(Hn.has(e))return"transform";if(Mw.has(e))return Wc(e)}function Xc(e,t){e.indexOf(t)===-1&&e.push(t)}function qc(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}function A3({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:r,onMount:n},i,o,a,s){const l={latestValues:$3(i,o,a,s?!1:e,t),renderState:r()};return n&&(l.mount=u=>n(i,u,l)),l}const Nw=e=>(t,r)=>{const n=k.useContext(Uc),i=k.useContext(Ds),o=()=>A3(e,t,n,i,r);return r?o():Vm(o)};function R3(e,t){const r=Ow(t);r&&Xc(e,r)}function ay(e,t,r){const n=Array.isArray(t)?t:[t];for(let i=0;i{for(const h in S){let g=S[h];if(Array.isArray(g)){const x=v?g.length-1:0;g=g[x]}g!==null&&(a[h]=g)}for(const h in p)a[h]=p[h]}),l&&(f&&c!==!1&&!ps(f)&&ay(e,f,S=>{for(const p in S)R3(s,p)}),s.length&&(a.willChange=s.join(","))),a}const{schedule:ce,cancel:ln,state:Ke,steps:ld}=bw(typeof requestAnimationFrame<"u"?requestAnimationFrame:st,!0),I3={useVisualState:Nw({scrapeMotionValuesFromProps:Lw,createRenderState:Aw,onMount:(e,t,{renderState:r,latestValues:n})=>{ce.read(()=>{try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),ce.render(()=>{Bm(r,n,zm(t.tagName),e.transformTemplate),Iw(t,r)})}})},L3={useVisualState:Nw({applyWillChange:!0,scrapeMotionValuesFromProps:Fm,createRenderState:Dm})};function M3(e,{forwardMotionProps:t=!1},r,n){return{...Im(e)?I3:L3,preloadedFeatures:r,useRender:T3(t),createVisualElement:n,Component:e}}function qr(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const Dw=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Yc(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const O3=e=>t=>Dw(t)&&e(t,Yc(t));function Qr(e,t,r,n){return qr(e,t,O3(r),n)}const N3=(e,t)=>r=>t(e(r)),Zr=(...e)=>e.reduce(N3);function Bw(e){let t=null;return()=>{const r=()=>{t=null};return t===null?(t=e,r):!1}}const sy=Bw("dragHorizontal"),ly=Bw("dragVertical");function zw(e){let t=!1;if(e==="y")t=ly();else if(e==="x")t=sy();else{const r=sy(),n=ly();r&&n?t=()=>{r(),n()}:(r&&r(),n&&n())}return t}function Fw(){const e=zw(!0);return e?(e(),!1):!0}class Un{constructor(t){this.isMounted=!1,this.node=t}update(){}}function uy(e,t){const r=t?"pointerenter":"pointerleave",n=t?"onHoverStart":"onHoverEnd",i=(o,a)=>{if(o.pointerType==="touch"||Fw())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const l=s[n];l&&ce.postRender(()=>l(o,a))};return Qr(e.current,r,i,{passive:!e.getProps()[n]})}class D3 extends Un{mount(){this.unmount=Zr(uy(this.node,!0),uy(this.node,!1))}unmount(){}}class B3 extends Un{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=Zr(qr(this.node.current,"focus",()=>this.onFocus()),qr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const jw=(e,t)=>t?e===t?!0:jw(e,t.parentElement):!1;function ud(e,t){if(!t)return;const r=new PointerEvent("pointer"+e);t(r,Yc(r))}class z3 extends Un{constructor(){super(...arguments),this.removeStartListeners=st,this.removeEndListeners=st,this.removeAccessibleListeners=st,this.startPointerPress=(t,r)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),o=Qr(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:f}=this.node.getProps(),d=!f&&!jw(this.node.current,s.target)?c:u;d&&ce.update(()=>d(s,l))},{passive:!(n.onTap||n.onPointerUp)}),a=Qr(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Zr(o,a),this.startPress(t,r)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||ud("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&ce.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=qr(this.node.current,"keyup",a),ud("down",(s,l)=>{this.startPress(s,l)})},r=qr(this.node.current,"keydown",t),n=()=>{this.isPressing&&ud("cancel",(o,a)=>this.cancelPress(o,a))},i=qr(this.node.current,"blur",n);this.removeAccessibleListeners=Zr(r,i)}}startPress(t,r){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&ce.postRender(()=>n(t,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Fw()}cancelPress(t,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&ce.postRender(()=>n(t,r))}mount(){const t=this.node.getProps(),r=Qr(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=qr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Zr(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Bh=new WeakMap,cd=new WeakMap,F3=e=>{const t=Bh.get(e.target);t&&t(e)},j3=e=>{e.forEach(F3)};function V3({root:e,...t}){const r=e||document;cd.has(r)||cd.set(r,{});const n=cd.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(j3,{root:e,...t})),n[i]}function H3(e,t,r){const n=V3(t);return Bh.set(e,r),n.observe(e),()=>{Bh.delete(e),n.unobserve(e)}}const U3={some:0,all:1};class W3 extends Un{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:o}=t,a={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:U3[i]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return H3(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(G3(t,r))&&this.startObserver()}unmount(){}}function G3({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const X3={inView:{Feature:W3},tap:{Feature:z3},focus:{Feature:B3},hover:{Feature:D3}};function Vw(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;ne*1e3,en=e=>e/1e3,q3={type:"spring",stiffness:500,damping:25,restSpeed:10},Y3=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),K3={type:"keyframes",duration:.8},Q3={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Z3=(e,{keyframes:t})=>t.length>2?K3:Hn.has(e)?e.startsWith("scale")?Y3(t[1]):q3:Q3;function J3({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function Hm(e,t){return e[t]||e.default||e}const eB=e=>e!==null;function Qc(e,{repeat:t,repeatType:r="loop"},n){const i=e.filter(eB),o=t&&r!=="loop"&&t%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const Hw=e=>/^0[^.\s]+$/u.test(e);function tB(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Hw(e):!0}const Uw=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),rB=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function nB(e){const t=rB.exec(e);if(!t)return[,];const[,r,n,i]=t;return[`--${r??n}`,i]}function Ww(e,t,r=1){const[n,i]=nB(e);if(!n)return;const o=window.getComputedStyle(t).getPropertyValue(n);if(o){const a=o.trim();return Uw(a)?parseFloat(a):a}return Om(i)?Ww(i,t,r+1):i}const iB=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),cy=e=>e===Vo||e===W,fy=(e,t)=>parseFloat(e.split(", ")[t]),dy=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/u);if(i)return fy(i[1],t);{const o=n.match(/^matrix\((.+)\)$/u);return o?fy(o[1],e):0}},oB=new Set(["x","y","z"]),aB=Bs.filter(e=>!oB.has(e));function sB(e){const t=[];return aB.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const $o={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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:dy(4,13),y:dy(5,14)};$o.translateX=$o.x;$o.translateY=$o.y;const Gw=e=>t=>t.test(e),lB={test:e=>e==="auto",parse:e=>e},Xw=[Vo,W,Lr,yn,u3,l3,lB],hy=e=>Xw.find(Gw(e)),vi=new Set;let zh=!1,Fh=!1;function qw(){if(Fh){const e=Array.from(vi).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const i=sB(n);i.length&&(r.set(n,i),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const i=r.get(n);i&&i.forEach(([o,a])=>{var s;(s=n.getValue(o))===null||s===void 0||s.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Fh=!1,zh=!1,vi.forEach(e=>e.complete()),vi.clear()}function Yw(){vi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Fh=!0)})}function uB(){Yw(),qw()}class Um{constructor(t,r,n,i,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(vi.add(this),zh||(zh=!0,ce.read(Yw),ce.resolveKeyframes(qw))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:i}=this;for(let o=0;or=>!!(zs(r)&&a3.test(r)&&r.startsWith(e)||t&&!s3(r)&&Object.prototype.hasOwnProperty.call(r,t)),Kw=(e,t,r)=>n=>{if(!zs(n))return n;const[i,o,a,s]=n.match(Lm);return{[e]:parseFloat(i),[t]:parseFloat(o),[r]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},cB=e=>Nn(0,255,e),fd={...Vo,transform:e=>Math.round(cB(e))},fi={test:Wm("rgb","red"),parse:Kw("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+fd.transform(e)+", "+fd.transform(t)+", "+fd.transform(r)+", "+Ba(Da.transform(n))+")"};function fB(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const jh={test:Wm("#"),parse:fB,transform:fi.transform},to={test:Wm("hsl","hue"),parse:Kw("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Lr.transform(Ba(t))+", "+Lr.transform(Ba(r))+", "+Ba(Da.transform(n))+")"},it={test:e=>fi.test(e)||jh.test(e)||to.test(e),parse:e=>fi.test(e)?fi.parse(e):to.test(e)?to.parse(e):jh.parse(e),transform:e=>zs(e)?e:e.hasOwnProperty("red")?fi.transform(e):to.transform(e)};function dB(e){var t,r;return isNaN(e)&&zs(e)&&(((t=e.match(Lm))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(o3))===null||r===void 0?void 0:r.length)||0)>0}const Qw="number",Zw="color",hB="var",pB="var(",py="${}",mB=/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 ms(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(mB,l=>(it.test(l)?(n.color.push(o),i.push(Zw),r.push(it.parse(l))):l.startsWith(pB)?(n.var.push(o),i.push(hB),r.push(l)):(n.number.push(o),i.push(Qw),r.push(parseFloat(l))),++o,py)).split(py);return{values:r,split:s,indexes:n,types:i}}function Jw(e){return ms(e).values}function eE(e){const{split:t,types:r}=ms(e),n=t.length;return i=>{let o="";for(let a=0;atypeof e=="number"?0:e;function vB(e){const t=Jw(e);return eE(e)(t.map(gB))}const Dn={test:dB,parse:Jw,createTransformer:eE,getAnimatableNone:vB},yB=new Set(["brightness","contrast","saturate","opacity"]);function bB(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Lm)||[];if(!n)return e;const i=r.replace(n,"");let o=yB.has(t)?1:0;return n!==r&&(o*=100),t+"("+o+i+")"}const SB=/\b([a-z-]*)\(.*?\)/gu,Vh={...Dn,getAnimatableNone:e=>{const t=e.match(SB);return t?t.map(bB).join(" "):e}},xB={...Mm,color:it,backgroundColor:it,outlineColor:it,fill:it,stroke:it,borderColor:it,borderTopColor:it,borderRightColor:it,borderBottomColor:it,borderLeftColor:it,filter:Vh,WebkitFilter:Vh},Gm=e=>xB[e];function tE(e,t){let r=Gm(e);return r!==Vh&&(r=Dn),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const wB=new Set(["auto","none","0"]);function EB(e,t,r){let n=0,i;for(;n{r.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function nE(e){let t;return()=>(t===void 0&&(t=e()),t)}let uu;function kB(){uu=void 0}const tn={now:()=>(uu===void 0&&tn.set(Ke.isProcessing||j5.useManualTiming?Ke.timestamp:performance.now()),uu),set:e=>{uu=e,queueMicrotask(kB)}},my=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Dn.test(e)||e==="0")&&!e.startsWith("url("));function CB(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r_B?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&uB(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=tn.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:o,delay:a,onComplete:s,onUpdate:l,isGenerator:u}=this.options;if(!u&&!TB(t,n,i,o))if(a)this.options.duration=0;else{l?.(Qc(t,this.options,r)),s?.(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,r);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...c},this.onPostResolved())}onPostResolved(){}then(t,r){return this.currentFinishedPromise.then(t,r)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function oE(e,t){return t?e*(1e3/t):0}const PB=5;function aE(e,t,r){const n=Math.max(t-PB,0);return oE(r-e(n),t-n)}const dd=.001,AB=.01,RB=10,$B=.05,IB=1;function LB({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,o,a=1-t;a=Nn($B,IB,a),e=Nn(AB,RB,en(e)),a<1?(i=u=>{const c=u*a,f=c*e,d=c-r,m=Hh(u,a),v=Math.exp(-f);return dd-d/m*v},o=u=>{const f=u*a*e,d=f*r+r,m=Math.pow(a,2)*Math.pow(u,2)*e,v=Math.exp(-f),y=Hh(Math.pow(u,2),a);return(-i(u)+dd>0?-1:1)*((d-m)*v)/y}):(i=u=>{const c=Math.exp(-u*e),f=(u-r)*e+1;return-dd+c*f},o=u=>{const c=Math.exp(-u*e),f=(r-u)*(e*e);return c*f});const s=5/e,l=OB(i,o,s);if(e=Jr(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:a*2*Math.sqrt(n*u),duration:e}}}const MB=12;function OB(e,t,r){let n=r;for(let i=1;ie[r]!==void 0)}function BB(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!gy(e,DB)&&gy(e,NB)){const r=LB(e);t={...t,...r,mass:1},t.isResolvedFromDuration=!0}return t}function sE({keyframes:e,restDelta:t,restSpeed:r,...n}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:l,mass:u,duration:c,velocity:f,isResolvedFromDuration:d}=BB({...n,velocity:-en(n.velocity||0)}),m=f||0,v=l/(2*Math.sqrt(s*u)),y=o-i,S=en(Math.sqrt(s/u)),p=Math.abs(y)<5;r||(r=p?.01:2),t||(t=p?.005:.5);let h;if(v<1){const g=Hh(S,v);h=x=>{const C=Math.exp(-v*S*x);return o-C*((m+v*S*y)/g*Math.sin(g*x)+y*Math.cos(g*x))}}else if(v===1)h=g=>o-Math.exp(-S*g)*(y+(m+S*y)*g);else{const g=S*Math.sqrt(v*v-1);h=x=>{const C=Math.exp(-v*S*x),_=Math.min(g*x,300);return o-C*((m+v*S*y)*Math.sinh(_)+g*y*Math.cosh(_))/g}}return{calculatedDuration:d&&c||null,next:g=>{const x=h(g);if(d)a.done=g>=c;else{let C=0;v<1&&(C=g===0?Jr(m):aE(h,g,x));const _=Math.abs(C)<=r,T=Math.abs(o-x)<=t;a.done=_&&T}return a.value=a.done?o:x,a}}}function vy({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},m=A=>s!==void 0&&Al,v=A=>s===void 0?l:l===void 0||Math.abs(s-A)-y*Math.exp(-A/n),g=A=>p+h(A),x=A=>{const M=h(A),R=g(A);d.done=Math.abs(M)<=u,d.value=d.done?p:R};let C,_;const T=A=>{m(d.value)&&(C=A,_=sE({keyframes:[d.value,v(d.value)],velocity:aE(g,A,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:A=>{let M=!1;return!_&&C===void 0&&(M=!0,x(A),T(A)),C!==void 0&&A>=C?_.next(A-C):(!M&&x(A),d)}}}const lE=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,zB=1e-7,FB=12;function jB(e,t,r,n,i){let o,a,s=0;do a=t+(r-t)/2,o=lE(a,n,i)-e,o>0?r=a:t=a;while(Math.abs(o)>zB&&++sjB(o,0,1,e,r);return o=>o===0||o===1?o:lE(i(o),t,n)}const VB=js(.42,0,1,1),HB=js(0,0,.58,1),uE=js(.42,0,.58,1),UB=e=>Array.isArray(e)&&typeof e[0]!="number",cE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,fE=e=>t=>1-e(1-t),Xm=e=>1-Math.sin(Math.acos(e)),dE=fE(Xm),WB=cE(Xm),hE=js(.33,1.53,.69,.99),qm=fE(hE),GB=cE(qm),XB=e=>(e*=2)<1?.5*qm(e):.5*(2-Math.pow(2,-10*(e-1))),yy={linear:st,easeIn:VB,easeInOut:uE,easeOut:HB,circIn:Xm,circInOut:WB,circOut:dE,backIn:qm,backInOut:GB,backOut:hE,anticipate:XB},by=e=>{if(Array.isArray(e)){Nh(e.length===4);const[t,r,n,i]=e;return js(t,r,n,i)}else if(typeof e=="string")return Nh(yy[e]!==void 0),yy[e];return e},gs=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},Pe=(e,t,r)=>e+(t-e)*r;function hd(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function qB({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,o=0,a=0;if(!t)i=o=a=r;else{const s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;i=hd(l,s,e+1/3),o=hd(l,s,e),a=hd(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:n}}function Qu(e,t){return r=>r>0?t:e}const pd=(e,t,r)=>{const n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},YB=[jh,fi,to],KB=e=>YB.find(t=>t.test(e));function Sy(e){const t=KB(e);if(!t)return!1;let r=t.parse(e);return t===to&&(r=qB(r)),r}const xy=(e,t)=>{const r=Sy(e),n=Sy(t);if(!r||!n)return Qu(e,t);const i={...r};return o=>(i.red=pd(r.red,n.red,o),i.green=pd(r.green,n.green,o),i.blue=pd(r.blue,n.blue,o),i.alpha=Pe(r.alpha,n.alpha,o),fi.transform(i))},Uh=new Set(["none","hidden"]);function QB(e,t){return Uh.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function ZB(e,t){return r=>Pe(e,t,r)}function Ym(e){return typeof e=="number"?ZB:typeof e=="string"?Om(e)?Qu:it.test(e)?xy:tz:Array.isArray(e)?pE:typeof e=="object"?it.test(e)?xy:JB:Qu}function pE(e,t){const r=[...e],n=r.length,i=e.map((o,a)=>Ym(o)(o,t[a]));return o=>{for(let a=0;a{for(const o in n)r[o]=n[o](i);return r}}function ez(e,t){var r;const n=[],i={color:0,var:0,number:0};for(let o=0;o{const r=Dn.createTransformer(t),n=ms(e),i=ms(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Uh.has(e)&&!i.values.length||Uh.has(t)&&!n.values.length?QB(e,t):Zr(pE(ez(n,i),i.values),r):Qu(e,t)};function mE(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Pe(e,t,r):Ym(e)(e,t)}function rz(e,t,r){const n=[],i=r||mE,o=e.length-1;for(let a=0;at[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=rz(t,n,i),s=a.length,l=u=>{let c=0;if(s>1)for(;cl(Nn(e[0],e[o-1],u)):l}function iz(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=gs(0,t,n);e.push(Pe(r,1,i))}}function oz(e){const t=[0];return iz(t,e.length-1),t}function az(e,t){return e.map(r=>r*t)}function sz(e,t){return e.map(()=>t||uE).splice(0,e.length-1)}function Zu({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=UB(n)?n.map(by):by(n),o={done:!1,value:t[0]},a=az(r&&r.length===t.length?r:oz(t),e),s=nz(a,t,{ease:Array.isArray(i)?i:sz(t,i)});return{calculatedDuration:e,next:l=>(o.value=s(l),o.done=l>=e,o)}}const wy=2e4;function lz(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t=wy?1/0:t}const uz=e=>{const t=({timestamp:r})=>e(r);return{start:()=>ce.update(t,!0),stop:()=>ln(t),now:()=>Ke.isProcessing?Ke.timestamp:tn.now()}},cz={decay:vy,inertia:vy,tween:Zu,keyframes:Zu,spring:sE},fz=e=>e/100;class Km extends iE{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:l}=this.options;l&&l()};const{name:r,motionValue:n,element:i,keyframes:o}=this.options,a=i?.KeyframeResolver||Um,s=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new a(o,s,r,n,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:r="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,s=cz[r]||Zu;let l,u;s!==Zu&&typeof t[0]!="number"&&(l=Zr(fz,mE(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});o==="mirror"&&(u=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=lz(c));const{calculatedDuration:f}=c,d=f+i,m=d*(n+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,r=!1){const{resolved:n}=this;if(!n){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=n;if(this.startTime===null)return o.next(0);const{delay:d,repeat:m,repeatType:v,repeatDelay:y,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),r?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const p=this.currentTime-d*(this.speed>=0?1:-1),h=this.speed>=0?p<0:p>c;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let g=this.currentTime,x=o;if(m){const A=Math.min(this.currentTime,c)/f;let M=Math.floor(A),R=A%1;!R&&A>=1&&(R=1),R===1&&M--,M=Math.min(M,m+1),!!(M%2)&&(v==="reverse"?(R=1-R,y&&(R-=y/f)):v==="mirror"&&(x=a)),g=Nn(0,1,R)*f}const C=h?{done:!1,value:l[0]}:x.next(g);s&&(C.value=s(C.value));let{done:_}=C;!h&&u!==null&&(_=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return T&&i!==void 0&&(C.value=Qc(l,this.options,i)),S&&S(C.value),T&&this.finish(),C}get duration(){const{resolved:t}=this;return t?en(t.calculatedDuration):0}get time(){return en(this.currentTime)}set time(t){t=Jr(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 r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=en(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=uz,onPlay:r,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),r&&r();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=n??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 gE=e=>Array.isArray(e)&&typeof e[0]=="number";function vE(e){return!!(!e||typeof e=="string"&&e in Qm||gE(e)||Array.isArray(e)&&e.every(vE))}const Sa=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,Qm={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Sa([0,.65,.55,1]),circOut:Sa([.55,0,1,.45]),backIn:Sa([.31,.01,.66,-.59]),backOut:Sa([.33,1.53,.69,.99])};function dz(e){return yE(e)||Qm.easeOut}function yE(e){if(e)return gE(e)?Sa(e):Array.isArray(e)?e.map(dz):Qm[e]}function hz(e,t,r,{delay:n=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s,times:l}={}){const u={[t]:r};l&&(u.offset=l);const c=yE(s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:n,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const pz=nE(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ju=10,mz=2e4;function gz(e){return e.type==="spring"||!vE(e.ease)}function vz(e,t){const r=new Km({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let n={done:!1,value:e[0]};const i=[];let o=0;for(;!n.done&&othis.onKeyframesResolved(a,s),r,n,i),this.resolver.scheduleResolve()}initPlayback(t,r){var n;let{duration:i=300,times:o,ease:a,type:s,motionValue:l,name:u,startTime:c}=this.options;if(!(!((n=l.owner)===null||n===void 0)&&n.current))return!1;if(gz(this.options)){const{onComplete:d,onUpdate:m,motionValue:v,element:y,...S}=this.options,p=vz(t,S);t=p.keyframes,t.length===1&&(t[1]=t[0]),i=p.duration,o=p.times,a=p.ease,s="keyframes"}const f=hz(l.owner.current,u,t,{...this.options,duration:i,times:o,ease:a});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(f.timeline=this.pendingTimeline,this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:d}=this.options;l.set(Qc(t,this.options,r)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:i,times:o,type:s,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:r}=t;return en(r)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:r}=t;return en(r.currentTime||0)}set time(t){const{resolved:r}=this;if(!r)return;const{animation:n}=r;n.currentTime=Jr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:r}=t;return r.playbackRate}set speed(t){const{resolved:r}=this;if(!r)return;const{animation:n}=r;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:r}=t;return r.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:r}=t;return r.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:r}=this;if(!r)return st;const{animation:n}=r;n.timeline=t,n.onfinish=null}return st}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:r}=t;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:r}=t;r.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:r,keyframes:n,duration:i,type:o,ease:a,times:s}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:f,element:d,...m}=this.options,v=new Km({...m,keyframes:n,duration:i,type:o,ease:a,times:s,isGenerator:!0}),y=Jr(this.time);u.setWithVelocity(v.sample(y-Ju).value,v.sample(y).value,Ju)}const{onStop:l}=this.options;l&&l(),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:r,name:n,repeatDelay:i,repeatType:o,damping:a,type:s}=t;return pz()&&n&&Mw.has(n)&&r&&r.owner&&r.owner.current instanceof HTMLElement&&!r.owner.getProps().onUpdate&&!i&&o!=="mirror"&&a!==0&&s!=="inertia"}}function yz(e,t){let r;const n=()=>{const{currentTime:i}=t,a=(i===null?0:i.value)/100;r!==a&&e(a),r=a};return ce.update(n,!0),()=>ln(n)}const bz=nE(()=>window.ScrollTimeline!==void 0);class Sz{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,r){return Promise.all(this.animations).then(t).catch(r)}getAll(t){return this.animations[0][t]}setAll(t,r){for(let n=0;n{if(bz()&&n.attachTimeline)n.attachTimeline(t);else return n.pause(),yz(i=>{n.time=n.duration*i},t)});return()=>{r.forEach((n,i)=>{n&&n(),this.animations[i].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 r=0;rr[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Zm=(e,t,r,n={},i,o,a)=>s=>{const l=Hm(n,e)||{},u=l.delay||n.delay||0;let{elapsed:c=0}=n;c=c-Jr(u);let f={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{s(),l.onComplete&&l.onComplete(),a&&a()},onStop:a,name:e,motionValue:t,element:o?void 0:i};J3(l)||(f={...f,...Z3(e,f)}),f.duration&&(f.duration=Jr(f.duration)),f.repeatDelay&&(f.repeatDelay=Jr(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!o&&t.get()!==void 0){const m=Qc(f.keyframes,l);if(m!==void 0)return ce.update(()=>{f.onUpdate(m),f.onComplete()}),new Sz([])}return!o&&Ey.supports(f)?new Ey(f):new Km(f)};class Jm{constructor(){this.subscriptions=[]}add(t){return Xc(this.subscriptions,t),()=>qc(this.subscriptions,t)}notify(t,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let o=0;o!isNaN(parseFloat(e));class bE{constructor(t,r={}){this.version="11.3.31",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,i=!0)=>{const o=tn.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),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=r.owner}setCurrent(t){this.current=t,this.updatedAt=tn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=xz(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Jm);const n=this.events[t].add(r);return t==="change"?()=>{n(),ce.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=tn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ky)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,ky);return oE(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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 vs(e,t){return new bE(e,t)}function wz(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,vs(r))}function Ez(e,t){const r=Kc(e,t);let{transitionEnd:n={},transition:i={},...o}=r||{};o={...o,...n};for(const a in o){const s=P3(o[a]);wz(e,a,s)}}function SE(e){return e.props[yw]}class kz extends bE{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const r=Ow(t);if(!r)return;const n=this.counts.get(r)||0;this.counts.set(r,n+1),n===0&&(this.output.push(r),this.update());let i=!1;return()=>{if(i)return;i=!0;const o=this.counts.get(r)-1;this.counts.set(r,o),o===0&&(qc(this.output,r),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function Cz(e){return!!(at(e)&&e.add)}function Wh(e,t){var r;if(!e.applyWillChange)return;let n=e.getValue("willChange");if(!n&&!(!((r=e.props.style)===null||r===void 0)&&r.willChange)&&(n=new kz("auto"),e.addValue("willChange",n)),Cz(n))return n.add(t)}function Tz({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function xE(e,t,{delay:r=0,transitionOverride:n,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;n&&(a=n);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const f in l){const d=e.getValue(f,(o=e.latestValues[f])!==null&&o!==void 0?o:null),m=l[f];if(m===void 0||c&&Tz(c,f))continue;const v={delay:r,...Hm(a||{},f)};let y=!1;if(window.MotionHandoffAnimation){const p=SE(e);if(p){const h=window.MotionHandoffAnimation(p,f,ce);h!==null&&(v.startTime=h,y=!0)}}d.start(Zm(f,d,m,e.shouldReduceMotion&&Hn.has(f)?{type:!1}:v,e,y,Wh(e,f)));const S=d.animation;S&&u.push(S)}return s&&Promise.all(u).then(()=>{ce.update(()=>{s&&Ez(e,s)})}),u}function Gh(e,t,r={}){var n;const i=Kc(e,t,r.type==="exit"?(n=e.presenceContext)===null||n===void 0?void 0:n.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(o=r.transitionOverride);const a=i?()=>Promise.all(xE(e,i,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=o;return _z(e,t,c+u,f,d,r)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,c]=l==="beforeChildren"?[a,s]:[s,a];return u().then(()=>c())}else return Promise.all([a(),s(r.delay)])}function _z(e,t,r=0,n=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*n,l=i===1?(u=0)=>u*n:(u=0)=>s-u*n;return Array.from(e.variantChildren).sort(Pz).forEach((u,c)=>{u.notify("AnimationStart",t),a.push(Gh(u,t,{...o,delay:r+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Pz(e,t){return e.sortNodePosition(t)}function Az(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(o=>Gh(e,o,r));n=Promise.all(i)}else if(typeof t=="string")n=Gh(e,t,r);else{const i=typeof t=="function"?Kc(e,t,r.custom):t;n=Promise.all(xE(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}const Rz=[...Am].reverse(),$z=Am.length;function Iz(e){return t=>Promise.all(t.map(({animation:r,options:n})=>Az(e,r,n)))}function Lz(e){let t=Iz(e),r=Cy(),n=!0;const i=l=>(u,c)=>{var f;const d=Kc(e,c,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:m,transitionEnd:v,...y}=d;u={...u,...y,...v}}return u};function o(l){t=l(e)}function a(l){const u=e.getProps(),c=e.getVariantContext(!0)||{},f=[],d=new Set;let m={},v=1/0;for(let S=0;S<$z;S++){const p=Rz[S],h=r[p],g=u[p]!==void 0?u[p]:c[p],x=hs(g),C=p===l?h.isActive:null;C===!1&&(v=S);let _=g===c[p]&&g!==u[p]&&x;if(_&&n&&e.manuallyAnimateOnMount&&(_=!1),h.protectedKeys={...m},!h.isActive&&C===null||!g&&!h.prevProp||ps(g)||typeof g=="boolean")continue;let A=Mz(h.prevProp,g)||p===l&&h.isActive&&!_&&x||S>v&&x,M=!1;const R=Array.isArray(g)?g:[g];let B=R.reduce(i(p),{});C===!1&&(B={});const{prevResolvedValues:ye={}}=h,he={...ye,...B},Ue=ue=>{A=!0,d.has(ue)&&(M=!0,d.delete(ue)),h.needsAnimating[ue]=!0;const q=e.getValue(ue);q&&(q.liveStyle=!1)};for(const ue in he){const q=B[ue],le=ye[ue];if(m.hasOwnProperty(ue))continue;let L=!1;Dh(q)&&Dh(le)?L=!Vw(q,le):L=q!==le,L?q!=null?Ue(ue):d.add(ue):q!==void 0&&d.has(ue)?Ue(ue):h.protectedKeys[ue]=!0}h.prevProp=g,h.prevResolvedValues=B,h.isActive&&(m={...m,...B}),n&&e.blockInitialAnimation&&(A=!1),A&&(!_||M)&&f.push(...R.map(ue=>({animation:ue,options:{type:p}})))}if(d.size){const S={};d.forEach(p=>{const h=e.getBaseTarget(p),g=e.getValue(p);g&&(g.liveStyle=!0),S[p]=h??null}),f.push({animation:S})}let y=!!f.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),n=!1,y?t(f):Promise.resolve()}function s(l,u){var c;if(r[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(d=>{var m;return(m=d.animationState)===null||m===void 0?void 0:m.setActive(l,u)}),r[l].isActive=u;const f=a(l);for(const d in r)r[d].protectedKeys={};return f}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>r,reset:()=>{r=Cy(),n=!0}}}function Mz(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Vw(t,e):!1}function Jn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cy(){return{animate:Jn(!0),whileInView:Jn(),whileHover:Jn(),whileTap:Jn(),whileDrag:Jn(),whileFocus:Jn(),exit:Jn()}}class Oz extends Un{constructor(t){super(t),t.animationState||(t.animationState=Lz(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ps(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Nz=0;class Dz extends Un{constructor(){super(...arguments),this.id=Nz++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);r&&!t&&i.then(()=>r(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Bz={animation:{Feature:Oz},exit:{Feature:Dz}},Ty=(e,t)=>Math.abs(e-t);function zz(e,t){const r=Ty(e.x,t.x),n=Ty(e.y,t.y);return Math.sqrt(r**2+n**2)}class wE{constructor(t,r,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:o=!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 f=gd(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,m=zz(f.offset,{x:0,y:0})>=3;if(!d&&!m)return;const{point:v}=f,{timestamp:y}=Ke;this.history.push({...v,timestamp:y});const{onStart:S,onMove:p}=this.handlers;d||(S&&S(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=md(d,this.transformPagePoint),ce.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:m,onSessionEnd:v,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=gd(f.type==="pointercancel"?this.lastMoveEventInfo:md(d,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,S),v&&v(f,S)},!Dw(t))return;this.dragSnapToOrigin=o,this.handlers=r,this.transformPagePoint=n,this.contextWindow=i||window;const a=Yc(t),s=md(a,this.transformPagePoint),{point:l}=s,{timestamp:u}=Ke;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=r;c&&c(t,gd(s,this.history)),this.removeListeners=Zr(Qr(this.contextWindow,"pointermove",this.handlePointerMove),Qr(this.contextWindow,"pointerup",this.handlePointerUp),Qr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ln(this.updatePoint)}}function md(e,t){return t?{point:t(e.point)}:e}function _y(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gd({point:e},t){return{point:e,delta:_y(e,EE(t)),offset:_y(e,Fz(t)),velocity:jz(t,.1)}}function Fz(e){return e[0]}function EE(e){return e[e.length-1]}function jz(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=EE(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>Jr(t)));)r--;if(!n)return{x:0,y:0};const o=en(i.timestamp-n.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const kE=1e-4,Vz=1-kE,Hz=1+kE,CE=.01,Uz=0-CE,Wz=0+CE;function Nt(e){return e.max-e.min}function Gz(e,t,r){return Math.abs(e-t)<=r}function Py(e,t,r,n=.5){e.origin=n,e.originPoint=Pe(t.min,t.max,e.origin),e.scale=Nt(r)/Nt(t),e.translate=Pe(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Vz&&e.scale<=Hz||isNaN(e.scale))&&(e.scale=1),(e.translate>=Uz&&e.translate<=Wz||isNaN(e.translate))&&(e.translate=0)}function za(e,t,r,n){Py(e.x,t.x,r.x,n?n.originX:void 0),Py(e.y,t.y,r.y,n?n.originY:void 0)}function Ay(e,t,r){e.min=r.min+t.min,e.max=e.min+Nt(t)}function Xz(e,t,r){Ay(e.x,t.x,r.x),Ay(e.y,t.y,r.y)}function Ry(e,t,r){e.min=t.min-r.min,e.max=e.min+Nt(t)}function Fa(e,t,r){Ry(e.x,t.x,r.x),Ry(e.y,t.y,r.y)}function qz(e,{min:t,max:r},n){return t!==void 0&&er&&(e=n?Pe(r,e,n.max):Math.min(e,r)),e}function $y(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Yz(e,{top:t,left:r,bottom:n,right:i}){return{x:$y(e.x,r,i),y:$y(e.y,t,n)}}function Iy(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.minn?r=gs(t.min,t.max-n,e.min):n>i&&(r=gs(e.min,e.max-i,t.min)),Nn(0,1,r)}function Zz(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const Xh=.35;function Jz(e=Xh){return e===!1?e=0:e===!0&&(e=Xh),{x:Ly(e,"left","right"),y:Ly(e,"top","bottom")}}function Ly(e,t,r){return{min:My(e,t),max:My(e,r)}}function My(e,t){return typeof e=="number"?e:e[t]||0}const Oy=()=>({translate:0,scale:1,origin:0,originPoint:0}),ro=()=>({x:Oy(),y:Oy()}),Ny=()=>({min:0,max:0}),Oe=()=>({x:Ny(),y:Ny()});function Gt(e){return[e("x"),e("y")]}function TE({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function e4({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function t4(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function vd(e){return e===void 0||e===1}function qh({scale:e,scaleX:t,scaleY:r}){return!vd(e)||!vd(t)||!vd(r)}function ni(e){return qh(e)||_E(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function _E(e){return Dy(e.x)||Dy(e.y)}function Dy(e){return e&&e!=="0%"}function ec(e,t,r){const n=e-r,i=t*n;return r+i}function By(e,t,r,n,i){return i!==void 0&&(e=ec(e,i,n)),ec(e,r,n)+t}function Yh(e,t=0,r=1,n,i){e.min=By(e.min,t,r,n,i),e.max=By(e.max,t,r,n,i)}function PE(e,{x:t,y:r}){Yh(e.x,t.translate,t.scale,t.originPoint),Yh(e.y,r.translate,r.scale,r.originPoint)}const zy=.999999999999,Fy=1.0000000000001;function r4(e,t,r,n=!1){const i=r.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;szy&&(t.x=1),t.yzy&&(t.y=1)}function no(e,t){e.min=e.min+t,e.max=e.max+t}function jy(e,t,r,n,i=.5){const o=Pe(e.min,e.max,i);Yh(e,t,r,o,n)}function io(e,t){jy(e.x,t.x,t.scaleX,t.scale,t.originX),jy(e.y,t.y,t.scaleY,t.scale,t.originY)}function AE(e,t){return TE(t4(e.getBoundingClientRect(),t))}function n4(e,t,r){const n=AE(e,r),{scroll:i}=t;return i&&(no(n.x,i.offset.x),no(n.y,i.offset.y)),n}const RE=({current:e})=>e?e.ownerDocument.defaultView:null,i4=new WeakMap;class o4{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Oe(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Yc(c,"page").point)},o=(c,f)=>{var d;const{drag:m,dragPropagation:v,onDragStart:y}=this.getProps();if(m&&!v&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=zw(m),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Gt(p=>{let h=this.getAxisMotionValue(p).get()||0;if(Lr.test(h)){const{projection:g}=this.visualElement;if(g&&g.layout){const x=g.layout.layoutBox[p];x&&(h=Nt(x)*(parseFloat(h)/100))}}this.originPoint[p]=h}),y&&ce.postRender(()=>y(c,f)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=Wh(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},a=(c,f)=>{const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:v,onDrag:y}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:S}=f;if(m&&this.currentDirection===null){this.currentDirection=a4(S),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,S),this.updateAxis("y",f.point,S),this.visualElement.render(),y&&y(c,f)},s=(c,f)=>this.stop(c,f),l=()=>Gt(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new wE(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:RE(this.visualElement)})}stop(t,r){var n;(n=this.removeWillChange)===null||n===void 0||n.call(this);const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ce.postRender(()=>a(t,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:i}=this.getProps();if(!n||!Ll(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=qz(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:r,dragElastic:n}=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,o=this.constraints;r&&eo(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&i?this.constraints=Yz(i.layoutBox,r):this.constraints=!1,this.elastic=Jz(n),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Gt(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=Zz(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!eo(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=n4(n,i.root,this.visualElement.getTransformPagePoint());let a=Kz(i.layout.layoutBox,o);if(r){const s=r(e4(a));this.hasMutatedConstraints=!!s,s&&(a=TE(s))}return a}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Gt(c=>{if(!Ll(c,r,this.currentDirection))return;let f=l&&l[c]||{};a&&(f={min:0,max:0});const d=i?200:1e6,m=i?40:1e7,v={type:"inertia",velocity:n?t[c]:0,bounceStiffness:d,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(s)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return n.start(Zm(t,n,0,r,this.visualElement,!1,Wh(this.visualElement,t)))}stopAnimation(){Gt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Gt(t=>{var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[r];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Gt(r=>{const{drag:n}=this.getProps();if(!Ll(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(r);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[r];o.set(t[r]-Pe(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!eo(r)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Gt(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();i[a]=Qz({min:l,max:l},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Gt(a=>{if(!Ll(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];s.set(Pe(l,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;i4.set(this.visualElement,this);const t=this.visualElement.current,r=Qr(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),n=()=>{const{dragConstraints:l}=this.getProps();eo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ce.read(n);const a=qr(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Gt(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{a(),r(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=Xh,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Ll(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function a4(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class s4 extends Un{constructor(t){super(t),this.removeGroupControls=st,this.removeListeners=st,this.controls=new o4(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||st}unmount(){this.removeGroupControls(),this.removeListeners()}}const Vy=e=>(t,r)=>{e&&ce.postRender(()=>e(t,r))};class l4 extends Un{constructor(){super(...arguments),this.removePointerDownListener=st}onPointerDown(t){this.session=new wE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:RE(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Vy(t),onStart:Vy(r),onMove:n,onEnd:(o,a)=>{delete this.session,i&&ce.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=Qr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function u4(){const e=k.useContext(Ds);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:r,register:n}=e,i=k.useId();k.useEffect(()=>n(i),[]);const o=k.useCallback(()=>r&&r(i),[i,r]);return!t&&r?[!1,o]:[!0]}function c4(){return f4(k.useContext(Ds))}function f4(e){return e===null?!0:e.isPresent}const cu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Hy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const sa={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(W.test(e))e=parseFloat(e);else return e;const r=Hy(e,t.target.x),n=Hy(e,t.target.y);return`${r}% ${n}%`}},d4={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=Dn.parse(e);if(i.length>5)return n;const o=Dn.createTransformer(e),a=typeof i[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;i[0+a]/=s,i[1+a]/=l;const u=Pe(s,l,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),o(i)}};class h4 extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=t;i3(p4),o&&(r.group&&r.group.add(o),n&&n.register&&i&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),cu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:i,isPresent:o}=this.props,a=n.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==r||r===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ce.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Pm.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function $E(e){const[t,r]=u4(),n=k.useContext($m);return $.jsx(h4,{...e,layoutGroup:n,switchLayoutGroup:k.useContext(Sw),isPresent:t,safeToRemove:r})}const p4={borderRadius:{...sa,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sa,borderTopRightRadius:sa,borderBottomLeftRadius:sa,borderBottomRightRadius:sa,boxShadow:d4},IE=["TopLeft","TopRight","BottomLeft","BottomRight"],m4=IE.length,Uy=e=>typeof e=="string"?parseFloat(e):e,Wy=e=>typeof e=="number"||W.test(e);function g4(e,t,r,n,i,o){i?(e.opacity=Pe(0,r.opacity!==void 0?r.opacity:1,v4(n)),e.opacityExit=Pe(t.opacity!==void 0?t.opacity:1,0,y4(n))):o&&(e.opacity=Pe(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let a=0;ant?1:r(gs(e,t,n))}function Xy(e,t){e.min=t.min,e.max=t.max}function Ut(e,t){Xy(e.x,t.x),Xy(e.y,t.y)}function qy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Yy(e,t,r,n,i){return e-=t,e=ec(e,1/r,n),i!==void 0&&(e=ec(e,1/i,n)),e}function b4(e,t=0,r=1,n=.5,i,o=e,a=e){if(Lr.test(t)&&(t=parseFloat(t),t=Pe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Pe(o.min,o.max,n);e===o&&(s-=t),e.min=Yy(e.min,t,r,s,i),e.max=Yy(e.max,t,r,s,i)}function Ky(e,t,[r,n,i],o,a){b4(e,t[r],t[n],t[i],t.scale,o,a)}const S4=["x","scaleX","originX"],x4=["y","scaleY","originY"];function Qy(e,t,r,n){Ky(e.x,t,S4,r?r.x:void 0,n?n.x:void 0),Ky(e.y,t,x4,r?r.y:void 0,n?n.y:void 0)}function Zy(e){return e.translate===0&&e.scale===1}function ME(e){return Zy(e.x)&&Zy(e.y)}function Jy(e,t){return e.min===t.min&&e.max===t.max}function w4(e,t){return Jy(e.x,t.x)&&Jy(e.y,t.y)}function eb(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function OE(e,t){return eb(e.x,t.x)&&eb(e.y,t.y)}function tb(e){return Nt(e.x)/Nt(e.y)}function rb(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class E4{constructor(){this.members=[]}add(t){Xc(this.members,t),t.scheduleRender()}remove(t){if(qc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(i=>t===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){n=o;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function k4(e,t,r){let n="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=r?.z||0;if((i||o||a)&&(n=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:m,skewY:v}=r;u&&(n=`perspective(${u}px) ${n}`),c&&(n+=`rotate(${c}deg) `),f&&(n+=`rotateX(${f}deg) `),d&&(n+=`rotateY(${d}deg) `),m&&(n+=`skewX(${m}deg) `),v&&(n+=`skewY(${v}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}const C4=(e,t)=>e.depth-t.depth;class T4{constructor(){this.children=[],this.isDirty=!1}add(t){Xc(this.children,t),this.isDirty=!0}remove(t){qc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(C4),this.isDirty=!1,this.children.forEach(t)}}function _4(e,t){const r=tn.now(),n=({timestamp:i})=>{const o=i-r;o>=t&&(ln(n),e(o-t))};return ce.read(n,!0),()=>ln(n)}function P4(e){return e instanceof SVGElement&&e.tagName!=="svg"}function A4(e,t,r){const n=at(e)?e:vs(e);return n.start(Zm("",n,t,r)),n.animation}const ii={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},xa=typeof window<"u"&&window.MotionDebug!==void 0,yd=["","X","Y","Z"],R4={visibility:"hidden"},nb=1e3;let $4=0;function bd(e,t,r,n){const{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function NE(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=SE(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",ce,!(i||o))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&NE(n)}function DE({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(a={},s=t?.()){this.id=$4++,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,xa&&(ii.totalNodes=ii.resolvedTargetDeltas=ii.recalculatedProjection=0),this.nodes.forEach(M4),this.nodes.forEach(z4),this.nodes.forEach(F4),this.nodes.forEach(O4),xa&&window.MotionDebug.record(ii)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=_4(d,250),cu.hasAnimatedSinceResize&&(cu.hasAnimatedSinceResize=!1,this.nodes.forEach(ob))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:m,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||W4,{onLayoutAnimationStart:S,onLayoutAnimationComplete:p}=c.getProps(),h=!this.targetLayout||!OE(this.targetLayout,v)||m,g=!d&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const x={...Hm(y,"layout"),onPlay:S,onComplete:p};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x)}else d||ob(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ln(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(j4),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&NE(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{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 l=0;l{const C=x/1e3;ab(f.x,a.x,C),ab(f.y,a.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fa(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),H4(this.relativeTarget,this.relativeTargetOrigin,d,C),g&&w4(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=Oe()),Ut(g,this.relativeTarget)),y&&(this.animationValues=c,g4(c,u,this.latestValues,C,h,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ln(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ce.update(()=>{cu.hasAnimatedSinceResize=!0,this.currentAnimation=A4(0,nb,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(nb),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:c}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&BE(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Oe();const f=Nt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+f;const d=Nt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+d}Ut(s,l),io(s,c),za(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new E4),this.sharedNodes.get(a).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const u={};l.z&&bd("z",a,u,this.animationValues);for(let c=0;c{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(ib),this.root.sharedNodes.clear()}}}function I4(e){e.updateLayout()}function L4(e){var t;const r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:o}=e.options,a=r.source!==e.layout.source;o==="size"?Gt(f=>{const d=a?r.measuredBox[f]:r.layoutBox[f],m=Nt(d);d.min=n[f].min,d.max=d.min+m}):BE(o,r.layoutBox,n)&&Gt(f=>{const d=a?r.measuredBox[f]:r.layoutBox[f],m=Nt(n[f]);d.max=d.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const s=ro();za(s,n,r.layoutBox);const l=ro();a?za(l,e.applyTransform(i,!0),r.measuredBox):za(l,n,r.layoutBox);const u=!ME(s);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:m}=f;if(d&&m){const v=Oe();Fa(v,r.layoutBox,d.layoutBox);const y=Oe();Fa(y,n,m.layoutBox),OE(v,y)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function M4(e){xa&&ii.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 O4(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function N4(e){e.clearSnapshot()}function ib(e){e.clearMeasurements()}function D4(e){e.isLayoutDirty=!1}function B4(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ob(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function z4(e){e.resolveTargetDelta()}function F4(e){e.calcProjection()}function j4(e){e.resetSkewAndRotation()}function V4(e){e.removeLeadSnapshot()}function ab(e,t,r){e.translate=Pe(t.translate,0,r),e.scale=Pe(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function sb(e,t,r,n){e.min=Pe(t.min,r.min,n),e.max=Pe(t.max,r.max,n)}function H4(e,t,r,n){sb(e.x,t.x,r.x,n),sb(e.y,t.y,r.y,n)}function U4(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const W4={duration:.45,ease:[.4,0,.1,1]},lb=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ub=lb("applewebkit/")&&!lb("chrome/")?Math.round:st;function cb(e){e.min=ub(e.min),e.max=ub(e.max)}function G4(e){cb(e.x),cb(e.y)}function BE(e,t,r){return e==="position"||e==="preserve-aspect"&&!Gz(tb(t),tb(r),.2)}function X4(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const q4=DE({attachResizeListener:(e,t)=>qr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Sd={current:void 0},zE=DE({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Sd.current){const e=new q4({});e.mount(window),e.setOptions({layoutScroll:!0}),Sd.current=e}return Sd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Y4={pan:{Feature:l4},drag:{Feature:s4,ProjectionNode:zE,MeasureLayout:$E}},Kh={current:null},FE={current:!1};function K4(){if(FE.current=!0,!!_m)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Kh.current=e.matches;e.addListener(t),t()}else Kh.current=!1}function Q4(e,t,r){for(const n in t){const i=t[n],o=r[n];if(at(i))e.addValue(n,i);else if(at(o))e.addValue(n,vs(i,{owner:e}));else if(o!==i)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(n);e.addValue(n,vs(a!==void 0?a:i,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const fb=new WeakMap,Z4=[...Xw,it,Dn],J4=e=>Z4.find(Gw(e)),db=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],eF=Rm.length;class tF{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Um,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,ce.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=Gc(r),this.isVariantNode=ww(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(const d in f){const m=f[d];l[d]!==void 0&&at(m)&&m.set(l[d],!1)}}mount(t){this.current=t,fb.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((r,n)=>this.bindToMotionValue(n,r)),FE.current||K4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){fb.delete(this.current),this.projection&&this.projection.unmount(),ln(this.notifyUpdate),ln(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 r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Hn.has(t),i=r.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ce.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=r.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{i(),o(),a&&a(),r.owner&&r.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 Ro){const r=Ro[t];if(!r)continue;const{isEnabled:n,Feature:i}=r;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Oe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;nr.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=vs(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var n;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Uw(i)||Hw(i))?i=parseFloat(i):!J4(i)&&Dn.test(r)&&(i=tE(t,r)),this.setBaseTarget(t,at(i)?i.get():i)),at(i)?i.get():i}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const a=jm(this.props,n,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);a&&(i=a[t])}if(n&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!at(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Jm),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class jE extends tF{constructor(){super(...arguments),this.KeyframeResolver=rE}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}}function rF(e){return window.getComputedStyle(e)}class nF extends jE{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Rw}readValueFromInstance(t,r){if(Hn.has(r)){const n=Gm(r);return n&&n.default||0}else{const n=rF(t),i=(Tw(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:r}){return AE(t,r)}build(t,r,n){Nm(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return Fm(t,r,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;at(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class iF extends jE{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Oe}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Hn.has(r)){const n=Gm(r);return n&&n.default||0}return r=$w.has(r)?r:Wc(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return Lw(t,r,n)}build(t,r,n){Bm(t,r,this.isSVGTag,n.transformTemplate)}renderInstance(t,r,n,i){Iw(t,r,n,i)}mount(t){this.isSVGTag=zm(t.tagName),super.mount(t)}}const oF=(e,t)=>Im(e)?new iF(t):new nF(t,{allowProjection:e!==k.Fragment}),aF={layout:{ProjectionNode:zE,MeasureLayout:$E}},sF={...Bz,...X3,...Y4,...aF},VE=r3((e,t)=>M3(e,t,sF,oF));class lF extends k.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function uF({children:e,isPresent:t}){const r=k.useId(),n=k.useRef(null),i=k.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=k.useContext(Tm);return k.useInsertionEffect(()=>{const{width:a,height:s,top:l,left:u}=i.current;if(t||!n.current||!a||!s)return;n.current.dataset.motionPopId=r;const c=document.createElement("style");return o&&(c.nonce=o),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` - [data-motion-pop-id="${r}"] { - position: absolute !important; - width: ${a}px !important; - height: ${s}px !important; - top: ${l}px !important; - left: ${u}px !important; - } - `),()=>{document.head.removeChild(c)}},[t]),$.jsx(lF,{isPresent:t,childRef:n,sizeRef:i,children:k.cloneElement(e,{ref:n})})}const cF=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=Vm(fF),l=k.useId(),u=k.useMemo(()=>({id:l,initial:t,isPresent:r,custom:i,onExitComplete:c=>{s.set(c,!0);for(const f of s.values())if(!f)return;n&&n()},register:c=>(s.set(c,!1),()=>s.delete(c))}),o?[Math.random()]:[r]);return k.useMemo(()=>{s.forEach((c,f)=>s.set(f,!1))},[r]),k.useEffect(()=>{!r&&!s.size&&n&&n()},[r]),a==="popLayout"&&(e=$.jsx(uF,{isPresent:r,children:e})),$.jsx(Ds.Provider,{value:u,children:e})};function fF(){return new Map}const Ml=e=>e.key||"";function hb(e){const t=[];return k.Children.forEach(e,r=>{k.isValidElement(r)&&t.push(r)}),t}const HE=({children:e,exitBeforeEnter:t,custom:r,initial:n=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{const s=k.useMemo(()=>hb(e),[e]),l=s.map(Ml),u=k.useRef(!0),c=k.useRef(s),f=Vm(()=>new Map),[d,m]=k.useState(s),[v,y]=k.useState(s);gw(()=>{u.current=!1,c.current=s;for(let h=0;h{const g=Ml(h),x=s===v||l.includes(g),C=()=>{if(f.has(g))f.set(g,!0);else return;let _=!0;f.forEach(T=>{T||(_=!1)}),_&&(p?.(),y(c.current),i&&i())};return $.jsx(cF,{isPresent:x,initial:!u.current||n?void 0:!1,custom:x?void 0:r,presenceAffectsLayout:o,mode:a,onExitComplete:x?void 0:C,children:h},g)})})};var dF={initial:e=>{const{position:t}=e,r=["top","bottom"].includes(t)?"y":"x";let n=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(n=1),{opacity:0,[r]:n*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},UE=k.memo(e=>{const{id:t,message:r,onCloseComplete:n,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=dF,toastSpacing:c="0.5rem"}=e,[f,d]=k.useState(s),m=c4();Z0(()=>{m||n?.()},[m]),Z0(()=>{d(s)},[s]);const v=()=>d(null),y=()=>d(s),S=()=>{m&&i()};k.useEffect(()=>{m&&o&&i()},[m,o,i]),z5(S,f);const p=k.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:c,...l}),[l,c]),h=k.useMemo(()=>D5(a),[a]);return $.jsx(VE.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:v,onHoverEnd:y,custom:{position:a},style:h,children:$.jsx(Fe.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:p,children:Pr(r,{id:t,onClose:S})})})});UE.displayName="ToastComponent";function hF(e,t){var r;const n=e??"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return(r=o?.[t])!=null?r:n}var pb={path:$.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[$.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),$.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),$.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Vs=vr((e,t)=>{const{as:r,viewBox:n,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,c=Vn("chakra-icon",s),f=jo("Icon",e),d={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l,...f},m={ref:t,focusable:o,className:c,__css:d},v=n??pb.viewBox;if(r&&typeof r!="string")return $.jsx(Fe.svg,{as:r,...m,...u});const y=a??pb.path;return $.jsx(Fe.svg,{verticalAlign:"middle",viewBox:v,...m,...u,children:y})});Vs.displayName="Icon";function pF(e){return $.jsx(Vs,{viewBox:"0 0 24 24",...e,children:$.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function mF(e){return $.jsx(Vs,{viewBox:"0 0 24 24",...e,children:$.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function mb(e){return $.jsx(Vs,{viewBox:"0 0 24 24",...e,children:$.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var gF=nR({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),WE=vr((e,t)=>{const r=jo("Spinner",e),{label:n="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=Fo(e),u=Vn("chakra-spinner",s),c={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${gF} ${o} linear infinite`,...r};return $.jsx(Fe.div,{ref:t,__css:c,className:u,...l,children:n&&$.jsx(Fe.span,{srOnly:!0,children:n})})});WE.displayName="Spinner";var[vF,eg]=Ms({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[yF,tg]=Ms({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),GE={info:{icon:mF,colorScheme:"blue"},warning:{icon:mb,colorScheme:"orange"},success:{icon:pF,colorScheme:"green"},error:{icon:mb,colorScheme:"red"},loading:{icon:WE,colorScheme:"blue"}};function bF(e){return GE[e].colorScheme}function SF(e){return GE[e].icon}var XE=vr(function(t,r){const n=tg(),{status:i}=eg(),o={display:"inline",...n.description};return $.jsx(Fe.div,{ref:r,"data-status":i,...t,className:Vn("chakra-alert__desc",t.className),__css:o})});XE.displayName="AlertDescription";function qE(e){const{status:t}=eg(),r=SF(t),n=tg(),i=t==="loading"?n.spinner:n.icon;return $.jsx(Fe.span,{display:"inherit","data-status":t,...e,className:Vn("chakra-alert__icon",e.className),__css:i,children:e.children||$.jsx(r,{h:"100%",w:"100%"})})}qE.displayName="AlertIcon";var YE=vr(function(t,r){const n=tg(),{status:i}=eg();return $.jsx(Fe.div,{ref:r,"data-status":i,...t,className:Vn("chakra-alert__title",t.className),__css:n.title})});YE.displayName="AlertTitle";var KE=vr(function(t,r){var n;const{status:i="info",addRole:o=!0,...a}=Fo(t),s=(n=t.colorScheme)!=null?n:bF(i),l=m5("Alert",{...t,colorScheme:s}),u={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...l.container};return $.jsx(vF,{value:{status:i},children:$.jsx(yF,{value:l,children:$.jsx(Fe.div,{"data-status":i,role:o?"alert":void 0,ref:r,...a,className:Vn("chakra-alert",t.className),__css:u})})})});KE.displayName="Alert";function xF(e){return $.jsx(Vs,{focusable:"false","aria-hidden":!0,...e,children:$.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var QE=vr(function(t,r){const n=jo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=Fo(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return $.jsx(Fe.button,{type:"button","aria-label":"Close",ref:r,disabled:o,__css:{...l,...n,...a},...s,children:i||$.jsx(xF,{width:"1em",height:"1em"})})});QE.displayName="CloseButton";var wF={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},_r=EF(wF);function EF(e){let t=e;const r=new Set,n=i=>{t=i(t),r.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(r.add(i),()=>{n(()=>e),r.delete(i)}),removeToast:(i,o)=>{n(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=kF(i,o),{position:s,id:l}=a;return n(u=>{var c,f;const m=s.includes("top")?[a,...(c=u[s])!=null?c:[]]:[...(f=u[s])!=null?f:[],a];return{...u,[s]:m}}),l},update:(i,o)=>{i&&n(a=>{const s={...a},{position:l,index:u}=Q0(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:ZE(o)}),s})},closeAll:({positions:i}={})=>{n(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(c=>({...c,requestClose:!0})),l),{...o}))},close:i=>{n(o=>{const a=mw(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>!!Q0(_r.getState(),i).position}}var gb=0;function kF(e,t={}){var r,n;gb+=1;const i=(r=t.id)!=null?r:gb,o=(n=t.position)!=null?n:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>_r.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var CF=e=>{const{status:t,variant:r="solid",id:n,title:i,isClosable:o,onClose:a,description:s,colorScheme:l,icon:u}=e,c=n?{root:`toast-${n}`,title:`toast-${n}-title`,description:`toast-${n}-description`}:void 0;return $.jsxs(KE,{addRole:!1,status:t,variant:r,id:c?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[$.jsx(qE,{children:u}),$.jsxs(Fe.div,{flex:"1",maxWidth:"100%",children:[i&&$.jsx(YE,{id:c?.title,children:i}),s&&$.jsx(XE,{id:c?.description,display:"block",children:s})]}),o&&$.jsx(QE,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1})]})};function ZE(e={}){const{render:t,toastComponent:r=CF}=e;return i=>typeof t=="function"?t({...i,...e}):$.jsx(r,{...i,...e})}function qV(e,t){const r=i=>{var o;return{...t,...i,position:hF((o=i?.position)!=null?o:t?.position,e)}},n=i=>{const o=r(i),a=ZE(o);return _r.notify(a,o)};return n.update=(i,o)=>{_r.update(i,r(o))},n.promise=(i,o)=>{const a=n({...o.loading,status:"loading",duration:null});i.then(s=>n.update(a,{status:"success",duration:5e3,...Pr(o.success,s)})).catch(s=>n.update(a,{status:"error",duration:5e3,...Pr(o.error,s)}))},n.closeAll=_r.closeAll,n.close=_r.close,n.isActive=_r.isActive,n}var[TF,YV]=Ms({name:"ToastOptionsContext",strict:!1}),_F=e=>{const t=k.useSyncExternalStore(_r.subscribe,_r.getState,_r.getState),{motionVariants:r,component:n=UE,portalProps:i}=e,a=Object.keys(t).map(s=>{const l=t[s];return $.jsx("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${s}`,id:`chakra-toast-manager-${s}`,style:B5(s),children:$.jsx(HE,{initial:!1,children:l.map(u=>$.jsx(n,{motionVariants:r,...u},u.id))})},s)});return $.jsx(Os,{...i,children:a})};function PF(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function tc(...e){return t=>{e.forEach(r=>{PF(r,t)})}}function KV(...e){return k.useMemo(()=>tc(...e),e)}function xd(e,t,r,n){const i=qu(r);return k.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!r||!o))return o.addEventListener(t,i,n),()=>{o.removeEventListener(t,i,n)}},[t,e,n,i,r]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,n)}}function JE(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function AF(e){var t;if(!JE(e))return!1;const r=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof r.HTMLElement}function QV(e){var t,r;return(r=(t=ek(e))==null?void 0:t.defaultView)!=null?r:window}function ek(e){return JE(e)?e.ownerDocument:document}function ZV(e){return ek(e).activeElement}function RF(e){const t=e.ownerDocument.defaultView||window,{overflow:r,overflowX:n,overflowY:i}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(r+i+n)}function $F(e){return e.localName==="html"?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}function tk(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:AF(e)&&RF(e)?e:tk($F(e))}var IF=vr(function(t,r){const n=jo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=Fo(t),u=S5({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return $.jsx(Fe.p,{ref:r,className:Vn("chakra-text",t.className),...u,...l,__css:n})});IF.displayName="Text";var LF=vr(function(t,r){const n=jo("Heading",t),{className:i,...o}=Fo(t);return $.jsx(Fe.h2,{ref:r,className:Vn("chakra-heading",t.className),...o,__css:n})});LF.displayName="Heading";var rk=Fe("div");rk.displayName="Box";var nk=vr(function(t,r){const{size:n,centerContent:i=!0,...o}=t,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return $.jsx(rk,{ref:r,boxSize:n,__css:{...a,flexShrink:0,flexGrow:0},...o})});nk.displayName="Square";var MF=vr(function(t,r){const{size:n,...i}=t;return $.jsx(nk,{size:n,ref:r,borderRadius:"9999px",...i})});MF.displayName="Circle";var Oi=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Ze={arrowShadowColor:Oi("--popper-arrow-shadow-color"),arrowSize:Oi("--popper-arrow-size","8px"),arrowSizeHalf:Oi("--popper-arrow-size-half"),arrowBg:Oi("--popper-arrow-bg"),transformOrigin:Oi("--popper-transform-origin"),arrowOffset:Oi("--popper-arrow-offset")};function OF(e){if(e.includes("top"))return"1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 0px 0 var(--popper-arrow-shadow-color)"}var NF={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},DF=e=>NF[e],vb={scroll:!0,resize:!0};function BF(e){let t;return typeof e=="object"?t={enabled:!0,options:{...vb,...e}}:t={enabled:e,options:vb},t}var zF={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},FF={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{yb(e)},effect:({state:e})=>()=>{yb(e)}},yb=e=>{e.elements.popper.style.setProperty(Ze.transformOrigin.var,DF(e.placement))},jF={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{VF(e)}},VF=e=>{var t;if(!e.placement)return;const r=HF(e.placement);if((t=e.elements)!=null&&t.arrow&&r){Object.assign(e.elements.arrow.style,{[r.property]:r.value,width:Ze.arrowSize.varRef,height:Ze.arrowSize.varRef,zIndex:-1});const n={[Ze.arrowSizeHalf.var]:`calc(${Ze.arrowSize.varRef} / 2 - 1px)`,[Ze.arrowOffset.var]:`calc(${Ze.arrowSizeHalf.varRef} * -1)`};for(const i in n)e.elements.arrow.style.setProperty(i,n[i])}},HF=e=>{if(e.startsWith("top"))return{property:"bottom",value:Ze.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Ze.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Ze.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Ze.arrowOffset.varRef}},UF={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{bb(e)},effect:({state:e})=>()=>{bb(e)}},bb=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const r=OF(e.placement);r&&t.style.setProperty("--popper-arrow-default-shadow",r),Object.assign(t.style,{transform:"rotate(45deg)",background:Ze.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},WF={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},GF={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function XF(e,t="ltr"){var r,n;const i=((r=WF[e])==null?void 0:r[t])||e;return t==="ltr"?i:(n=GF[e])!=null?n:i}var kt="top",rr="bottom",nr="right",Ct="left",rg="auto",Hs=[kt,rr,nr,Ct],Io="start",ys="end",qF="clippingParents",ik="viewport",la="popper",YF="reference",Sb=Hs.reduce(function(e,t){return e.concat([t+"-"+Io,t+"-"+ys])},[]),ok=[].concat(Hs,[rg]).reduce(function(e,t){return e.concat([t,t+"-"+Io,t+"-"+ys])},[]),KF="beforeRead",QF="read",ZF="afterRead",JF="beforeMain",ej="main",tj="afterMain",rj="beforeWrite",nj="write",ij="afterWrite",oj=[KF,QF,ZF,JF,ej,tj,rj,nj,ij];function Nr(e){return e?(e.nodeName||"").toLowerCase():null}function Dt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ci(e){var t=Dt(e).Element;return e instanceof t||e instanceof Element}function Jt(e){var t=Dt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ng(e){if(typeof ShadowRoot>"u")return!1;var t=Dt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function aj(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!Jt(o)||!Nr(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function sj(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},a=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=a.reduce(function(l,u){return l[u]="",l},{});!Jt(i)||!Nr(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const lj={name:"applyStyles",enabled:!0,phase:"write",fn:aj,effect:sj,requires:["computeStyles"]};function Mr(e){return e.split("-")[0]}var yi=Math.max,rc=Math.min,Lo=Math.round;function Qh(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function ak(){return!/^((?!chrome|android).)*safari/i.test(Qh())}function Mo(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&Jt(e)&&(i=e.offsetWidth>0&&Lo(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Lo(n.height)/e.offsetHeight||1);var a=Ci(e)?Dt(e):window,s=a.visualViewport,l=!ak()&&r,u=(n.left+(l&&s?s.offsetLeft:0))/i,c=(n.top+(l&&s?s.offsetTop:0))/o,f=n.width/i,d=n.height/o;return{width:f,height:d,top:c,right:u+f,bottom:c+d,left:u,x:u,y:c}}function ig(e){var t=Mo(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function sk(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&ng(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function un(e){return Dt(e).getComputedStyle(e)}function uj(e){return["table","td","th"].indexOf(Nr(e))>=0}function Wn(e){return((Ci(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zc(e){return Nr(e)==="html"?e:e.assignedSlot||e.parentNode||(ng(e)?e.host:null)||Wn(e)}function xb(e){return!Jt(e)||un(e).position==="fixed"?null:e.offsetParent}function cj(e){var t=/firefox/i.test(Qh()),r=/Trident/i.test(Qh());if(r&&Jt(e)){var n=un(e);if(n.position==="fixed")return null}var i=Zc(e);for(ng(i)&&(i=i.host);Jt(i)&&["html","body"].indexOf(Nr(i))<0;){var o=un(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Us(e){for(var t=Dt(e),r=xb(e);r&&uj(r)&&un(r).position==="static";)r=xb(r);return r&&(Nr(r)==="html"||Nr(r)==="body"&&un(r).position==="static")?t:r||cj(e)||t}function og(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ja(e,t,r){return yi(e,rc(t,r))}function fj(e,t,r){var n=ja(e,t,r);return n>r?r:n}function lk(){return{top:0,right:0,bottom:0,left:0}}function uk(e){return Object.assign({},lk(),e)}function ck(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var dj=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,uk(typeof t!="number"?t:ck(t,Hs))};function hj(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=Mr(r.placement),l=og(s),u=[Ct,nr].indexOf(s)>=0,c=u?"height":"width";if(!(!o||!a)){var f=dj(i.padding,r),d=ig(o),m=l==="y"?kt:Ct,v=l==="y"?rr:nr,y=r.rects.reference[c]+r.rects.reference[l]-a[l]-r.rects.popper[c],S=a[l]-r.rects.reference[l],p=Us(o),h=p?l==="y"?p.clientHeight||0:p.clientWidth||0:0,g=y/2-S/2,x=f[m],C=h-d[c]-f[v],_=h/2-d[c]/2+g,T=ja(x,_,C),A=l;r.modifiersData[n]=(t={},t[A]=T,t.centerOffset=T-_,t)}}function pj(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||sk(t.elements.popper,i)&&(t.elements.arrow=i))}const mj={name:"arrow",enabled:!0,phase:"main",fn:hj,effect:pj,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Oo(e){return e.split("-")[1]}var gj={top:"auto",right:"auto",bottom:"auto",left:"auto"};function vj(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:Lo(r*i)/i||0,y:Lo(n*i)/i||0}}function wb(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=a.x,m=d===void 0?0:d,v=a.y,y=v===void 0?0:v,S=typeof c=="function"?c({x:m,y}):{x:m,y};m=S.x,y=S.y;var p=a.hasOwnProperty("x"),h=a.hasOwnProperty("y"),g=Ct,x=kt,C=window;if(u){var _=Us(r),T="clientHeight",A="clientWidth";if(_===Dt(r)&&(_=Wn(r),un(_).position!=="static"&&s==="absolute"&&(T="scrollHeight",A="scrollWidth")),_=_,i===kt||(i===Ct||i===nr)&&o===ys){x=rr;var M=f&&_===C&&C.visualViewport?C.visualViewport.height:_[T];y-=M-n.height,y*=l?1:-1}if(i===Ct||(i===kt||i===rr)&&o===ys){g=nr;var R=f&&_===C&&C.visualViewport?C.visualViewport.width:_[A];m-=R-n.width,m*=l?1:-1}}var B=Object.assign({position:s},u&&gj),ye=c===!0?vj({x:m,y},Dt(r)):{x:m,y};if(m=ye.x,y=ye.y,l){var he;return Object.assign({},B,(he={},he[x]=h?"0":"",he[g]=p?"0":"",he.transform=(C.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",he))}return Object.assign({},B,(t={},t[x]=h?y+"px":"",t[g]=p?m+"px":"",t.transform="",t))}function yj(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,s=r.roundOffsets,l=s===void 0?!0:s,u={placement:Mr(t.placement),variation:Oo(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,wb(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,wb(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const bj={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:yj,data:{}};var Ol={passive:!0};function Sj(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,s=a===void 0?!0:a,l=Dt(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",r.update,Ol)}),s&&l.addEventListener("resize",r.update,Ol),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",r.update,Ol)}),s&&l.removeEventListener("resize",r.update,Ol)}}const xj={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Sj,data:{}};var wj={left:"right",right:"left",bottom:"top",top:"bottom"};function fu(e){return e.replace(/left|right|bottom|top/g,function(t){return wj[t]})}var Ej={start:"end",end:"start"};function Eb(e){return e.replace(/start|end/g,function(t){return Ej[t]})}function ag(e){var t=Dt(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function sg(e){return Mo(Wn(e)).left+ag(e).scrollLeft}function kj(e,t){var r=Dt(e),n=Wn(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=ak();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+sg(e),y:l}}function Cj(e){var t,r=Wn(e),n=ag(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=yi(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=yi(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+sg(e),l=-n.scrollTop;return un(i||r).direction==="rtl"&&(s+=yi(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function lg(e){var t=un(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function fk(e){return["html","body","#document"].indexOf(Nr(e))>=0?e.ownerDocument.body:Jt(e)&&lg(e)?e:fk(Zc(e))}function Va(e,t){var r;t===void 0&&(t=[]);var n=fk(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Dt(n),a=i?[o].concat(o.visualViewport||[],lg(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(Va(Zc(a)))}function Zh(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Tj(e,t){var r=Mo(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function kb(e,t,r){return t===ik?Zh(kj(e,r)):Ci(t)?Tj(t,r):Zh(Cj(Wn(e)))}function _j(e){var t=Va(Zc(e)),r=["absolute","fixed"].indexOf(un(e).position)>=0,n=r&&Jt(e)?Us(e):e;return Ci(n)?t.filter(function(i){return Ci(i)&&sk(i,n)&&Nr(i)!=="body"}):[]}function Pj(e,t,r,n){var i=t==="clippingParents"?_j(e):[].concat(t),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(l,u){var c=kb(e,u,n);return l.top=yi(c.top,l.top),l.right=rc(c.right,l.right),l.bottom=rc(c.bottom,l.bottom),l.left=yi(c.left,l.left),l},kb(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function dk(e){var t=e.reference,r=e.element,n=e.placement,i=n?Mr(n):null,o=n?Oo(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(i){case kt:l={x:a,y:t.y-r.height};break;case rr:l={x:a,y:t.y+t.height};break;case nr:l={x:t.x+t.width,y:s};break;case Ct:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?og(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case Io:l[u]=l[u]-(t[c]/2-r[c]/2);break;case ys:l[u]=l[u]+(t[c]/2-r[c]/2);break}}return l}function bs(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,a=o===void 0?e.strategy:o,s=r.boundary,l=s===void 0?qF:s,u=r.rootBoundary,c=u===void 0?ik:u,f=r.elementContext,d=f===void 0?la:f,m=r.altBoundary,v=m===void 0?!1:m,y=r.padding,S=y===void 0?0:y,p=uk(typeof S!="number"?S:ck(S,Hs)),h=d===la?YF:la,g=e.rects.popper,x=e.elements[v?h:d],C=Pj(Ci(x)?x:x.contextElement||Wn(e.elements.popper),l,c,a),_=Mo(e.elements.reference),T=dk({reference:_,element:g,strategy:"absolute",placement:i}),A=Zh(Object.assign({},g,T)),M=d===la?A:_,R={top:C.top-M.top+p.top,bottom:M.bottom-C.bottom+p.bottom,left:C.left-M.left+p.left,right:M.right-C.right+p.right},B=e.modifiersData.offset;if(d===la&&B){var ye=B[i];Object.keys(R).forEach(function(he){var Ue=[nr,rr].indexOf(he)>=0?1:-1,ue=[kt,rr].indexOf(he)>=0?"y":"x";R[he]+=ye[ue]*Ue})}return R}function Aj(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?ok:l,c=Oo(n),f=c?s?Sb:Sb.filter(function(v){return Oo(v)===c}):Hs,d=f.filter(function(v){return u.indexOf(v)>=0});d.length===0&&(d=f);var m=d.reduce(function(v,y){return v[y]=bs(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[Mr(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function Rj(e){if(Mr(e)===rg)return[];var t=fu(e);return[Eb(e),t,Eb(t)]}function $j(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!0:a,l=r.fallbackPlacements,u=r.padding,c=r.boundary,f=r.rootBoundary,d=r.altBoundary,m=r.flipVariations,v=m===void 0?!0:m,y=r.allowedAutoPlacements,S=t.options.placement,p=Mr(S),h=p===S,g=l||(h||!v?[fu(S)]:Rj(S)),x=[S].concat(g).reduce(function($e,be){return $e.concat(Mr(be)===rg?Aj(t,{placement:be,boundary:c,rootBoundary:f,padding:u,flipVariations:v,allowedAutoPlacements:y}):be)},[]),C=t.rects.reference,_=t.rects.popper,T=new Map,A=!0,M=x[0],R=0;R=0,ue=Ue?"width":"height",q=bs(t,{placement:B,boundary:c,rootBoundary:f,altBoundary:d,padding:u}),le=Ue?he?nr:Ct:he?rr:kt;C[ue]>_[ue]&&(le=fu(le));var L=fu(le),D=[];if(o&&D.push(q[ye]<=0),s&&D.push(q[le]<=0,q[L]<=0),D.every(function($e){return $e})){M=B,A=!1;break}T.set(B,D)}if(A)for(var U=v?3:1,ee=function(be){var Ie=x.find(function(ut){var ct=T.get(ut);if(ct)return ct.slice(0,be).every(function(fn){return fn})});if(Ie)return M=Ie,"break"},te=U;te>0;te--){var G=ee(te);if(G==="break")break}t.placement!==M&&(t.modifiersData[n]._skip=!0,t.placement=M,t.reset=!0)}}const Ij={name:"flip",enabled:!0,phase:"main",fn:$j,requiresIfExists:["offset"],data:{_skip:!1}};function Cb(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Tb(e){return[kt,nr,rr,Ct].some(function(t){return e[t]>=0})}function Lj(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=bs(t,{elementContext:"reference"}),s=bs(t,{altBoundary:!0}),l=Cb(a,n),u=Cb(s,i,o),c=Tb(l),f=Tb(u);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}const Mj={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Lj};function Oj(e,t,r){var n=Mr(e),i=[Ct,kt].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Ct,nr].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function Nj(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=ok.reduce(function(c,f){return c[f]=Oj(f,t.rects,o),c},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=a}const Dj={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Nj};function Bj(e){var t=e.state,r=e.name;t.modifiersData[r]=dk({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const zj={name:"popperOffsets",enabled:!0,phase:"read",fn:Bj,data:{}};function Fj(e){return e==="x"?"y":"x"}function jj(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!1:a,l=r.boundary,u=r.rootBoundary,c=r.altBoundary,f=r.padding,d=r.tether,m=d===void 0?!0:d,v=r.tetherOffset,y=v===void 0?0:v,S=bs(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),p=Mr(t.placement),h=Oo(t.placement),g=!h,x=og(p),C=Fj(x),_=t.modifiersData.popperOffsets,T=t.rects.reference,A=t.rects.popper,M=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ye={x:0,y:0};if(_){if(o){var he,Ue=x==="y"?kt:Ct,ue=x==="y"?rr:nr,q=x==="y"?"height":"width",le=_[x],L=le+S[Ue],D=le-S[ue],U=m?-A[q]/2:0,ee=h===Io?T[q]:A[q],te=h===Io?-A[q]:-T[q],G=t.elements.arrow,$e=m&&G?ig(G):{width:0,height:0},be=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:lk(),Ie=be[Ue],ut=be[ue],ct=ja(0,T[q],$e[q]),fn=g?T[q]/2-U-ct-Ie-R.mainAxis:ee-ct-Ie-R.mainAxis,Gn=g?-T[q]/2+U+ct+ut+R.mainAxis:te+ct+ut+R.mainAxis,dn=t.elements.arrow&&Us(t.elements.arrow),me=dn?x==="y"?dn.clientTop||0:dn.clientLeft||0:0,_t=(he=B?.[x])!=null?he:0,Ai=le+fn-_t-me,Ho=le+Gn-_t,Ws=ja(m?rc(L,Ai):L,le,m?yi(D,Ho):D);_[x]=Ws,ye[x]=Ws-le}if(s){var Gs,Jc=x==="x"?kt:Ct,ef=x==="x"?rr:nr,jt=_[C],hn=C==="y"?"height":"width",Xn=jt+S[Jc],or=jt-S[ef],Ri=[kt,Ct].indexOf(p)!==-1,Uo=(Gs=B?.[C])!=null?Gs:0,Xs=Ri?Xn:jt-T[hn]-A[hn]-Uo+R.altAxis,qs=Ri?jt+T[hn]+A[hn]-Uo-R.altAxis:or,qn=m&&Ri?fj(Xs,jt,qs):ja(m?Xs:Xn,jt,m?qs:or);_[C]=qn,ye[C]=qn-jt}t.modifiersData[n]=ye}}const Vj={name:"preventOverflow",enabled:!0,phase:"main",fn:jj,requiresIfExists:["offset"]};function Hj(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Uj(e){return e===Dt(e)||!Jt(e)?ag(e):Hj(e)}function Wj(e){var t=e.getBoundingClientRect(),r=Lo(t.width)/e.offsetWidth||1,n=Lo(t.height)/e.offsetHeight||1;return r!==1||n!==1}function Gj(e,t,r){r===void 0&&(r=!1);var n=Jt(t),i=Jt(t)&&Wj(t),o=Wn(t),a=Mo(e,i,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((Nr(t)!=="body"||lg(o))&&(s=Uj(t)),Jt(t)?(l=Mo(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=sg(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Xj(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&i(l)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function qj(e){var t=Xj(e);return oj.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function Yj(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Kj(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var _b={placement:"bottom",modifiers:[],strategy:"absolute"};function Pb(){for(var e=arguments.length,t=new Array(e),r=0;r{}),g=k.useCallback(()=>{var R;!t||!v.current||!y.current||((R=h.current)==null||R.call(h),S.current=Jj(v.current,y.current,{placement:p,modifiers:[UF,jF,FF,{...zF,enabled:!!d},{name:"eventListeners",...BF(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!f,options:{boundary:c}},...r??[]],strategy:i}),S.current.forceUpdate(),h.current=S.current.destroy)},[p,t,r,d,a,o,s,l,u,f,c,i]);k.useEffect(()=>()=>{var R;!v.current&&!y.current&&((R=S.current)==null||R.destroy(),S.current=null)},[]);const x=k.useCallback(R=>{v.current=R,g()},[g]),C=k.useCallback((R={},B=null)=>({...R,ref:tc(x,B)}),[x]),_=k.useCallback(R=>{y.current=R,g()},[g]),T=k.useCallback((R={},B=null)=>({...R,ref:tc(_,B),style:{...R.style,position:i,minWidth:d?void 0:"max-content",inset:"0 auto auto 0"}}),[i,_,d]),A=k.useCallback((R={},B=null)=>{const{size:ye,shadowColor:he,bg:Ue,style:ue,...q}=R;return{...q,ref:B,"data-popper-arrow":"",style:tV(R)}},[]),M=k.useCallback((R={},B=null)=>({...R,ref:B,"data-popper-arrow-inner":""}),[]);return{update(){var R;(R=S.current)==null||R.update()},forceUpdate(){var R;(R=S.current)==null||R.forceUpdate()},transformOrigin:Ze.transformOrigin.varRef,referenceRef:x,popperRef:_,getPopperProps:T,getArrowProps:A,getArrowInnerProps:M,getReferenceProps:C}}function tV(e){const{size:t,shadowColor:r,bg:n,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),r&&(o["--popper-arrow-shadow-color"]=r),n&&(o["--popper-arrow-bg"]=n),o}function rV(e={}){const{onClose:t,onOpen:r,isOpen:n,id:i}=e,o=qu(r),a=qu(t),[s,l]=k.useState(e.defaultIsOpen||!1),u=n!==void 0?n:s,c=n!==void 0,f=k.useId(),d=i??`disclosure-${f}`,m=k.useCallback(()=>{c||l(!1),a?.()},[c,a]),v=k.useCallback(()=>{c||l(!0),o?.()},[c,o]),y=k.useCallback(()=>{u?m():v()},[u,v,m]);function S(h={}){return{...h,"aria-expanded":u,"aria-controls":d,onClick(g){var x;(x=h.onClick)==null||x.call(h,g),y()}}}function p(h={}){return{...h,hidden:!u,id:d}}return{isOpen:u,onOpen:v,onClose:m,onToggle:y,isControlled:c,getButtonProps:S,getDisclosureProps:p}}var nV={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},Jh=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},du=e=>{var t,r;return((r=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:r.defaultView)||window};function iV(e={}){const{openDelay:t=0,closeDelay:r=0,closeOnClick:n=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:c,id:f,isOpen:d,defaultIsOpen:m,arrowSize:v=10,arrowShadowColor:y,arrowPadding:S,modifiers:p,isDisabled:h,gutter:g,offset:x,direction:C,..._}=e,{isOpen:T,onOpen:A,onClose:M}=rV({isOpen:d,defaultIsOpen:m,onOpen:l,onClose:u}),{referenceRef:R,getPopperProps:B,getArrowInnerProps:ye,getArrowProps:he}=eV({enabled:T,placement:c,arrowPadding:S,modifiers:p,gutter:g,offset:x,direction:C}),Ue=k.useId(),q=`tooltip-${f??Ue}`,le=k.useRef(null),L=k.useRef(),D=k.useCallback(()=>{L.current&&(clearTimeout(L.current),L.current=void 0)},[]),U=k.useRef(),ee=k.useCallback(()=>{U.current&&(clearTimeout(U.current),U.current=void 0)},[]),te=k.useCallback(()=>{ee(),M()},[M,ee]),G=oV(le,te),$e=k.useCallback(()=>{if(!h&&!L.current){T&&G();const me=du(le);L.current=me.setTimeout(A,t)}},[G,h,T,A,t]),be=k.useCallback(()=>{D();const me=du(le);U.current=me.setTimeout(te,r)},[r,te,D]),Ie=k.useCallback(()=>{T&&n&&be()},[n,be,T]),ut=k.useCallback(()=>{T&&a&&be()},[a,be,T]),ct=k.useCallback(me=>{T&&me.key==="Escape"&&be()},[T,be]);xd(()=>Jh(le),"keydown",s?ct:void 0),xd(()=>{if(!o)return null;const me=le.current;if(!me)return null;const _t=tk(me);return _t.localName==="body"?du(le):_t},"scroll",()=>{T&&o&&te()},{passive:!0,capture:!0}),k.useEffect(()=>{h&&(D(),T&&M())},[h,T,M,D]),k.useEffect(()=>()=>{D(),ee()},[D,ee]),xd(()=>le.current,"pointerleave",be);const fn=k.useCallback((me={},_t=null)=>({...me,ref:tc(le,_t,R),onPointerEnter:na(me.onPointerEnter,Ho=>{Ho.pointerType!=="touch"&&$e()}),onClick:na(me.onClick,Ie),onPointerDown:na(me.onPointerDown,ut),onFocus:na(me.onFocus,$e),onBlur:na(me.onBlur,be),"aria-describedby":T?q:void 0}),[$e,be,ut,T,q,Ie,R]),Gn=k.useCallback((me={},_t=null)=>B({...me,style:{...me.style,[Ze.arrowSize.var]:v?`${v}px`:void 0,[Ze.arrowShadowColor.var]:y}},_t),[B,v,y]),dn=k.useCallback((me={},_t=null)=>{const Ai={...me.style,position:"relative",transformOrigin:Ze.transformOrigin.varRef};return{ref:_t,..._,...me,id:q,role:"tooltip",style:Ai}},[_,q]);return{isOpen:T,show:$e,hide:be,getTriggerProps:fn,getTooltipProps:dn,getTooltipPositionerProps:Gn,getArrowProps:he,getArrowInnerProps:ye}}var wd="chakra-ui:close-tooltip";function oV(e,t){return k.useEffect(()=>{const r=Jh(e);return r.addEventListener(wd,t),()=>r.removeEventListener(wd,t)},[t,e]),()=>{const r=Jh(e),n=du(e);r.dispatchEvent(new n.CustomEvent(wd))}}function aV(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}function sV(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}var lV=Fe(VE.div),hk=vr((e,t)=>{var r,n;const i=jo("Tooltip",e),o=Fo(e),a=mm(),{children:s,label:l,shouldWrapChildren:u,"aria-label":c,hasArrow:f,bg:d,portalProps:m,background:v,backgroundColor:y,bgColor:S,motionProps:p,...h}=o,g=(n=(r=v??y)!=null?r:d)!=null?n:S;if(g){i.bg=g;const B=L$(a,"colors",g);i[Ze.arrowBg.var]=B}const x=iV({...h,direction:a.direction}),C=typeof s=="string"||u;let _;if(C)_=$.jsx(Fe.span,{display:"inline-block",tabIndex:0,...x.getTriggerProps(),children:s});else{const B=k.Children.only(s);_=k.cloneElement(B,x.getTriggerProps(B.props,B.ref))}const T=!!c,A=x.getTooltipProps({},t),M=T?aV(A,["role","id"]):A,R=sV(A,["role","id"]);return l?$.jsxs($.Fragment,{children:[_,$.jsx(HE,{children:x.isOpen&&$.jsx(Os,{...m,children:$.jsx(Fe.div,{...x.getTooltipPositionerProps(),__css:{zIndex:i.zIndex,pointerEvents:"none"},children:$.jsxs(lV,{variants:nV,initial:"exit",animate:"enter",exit:"exit",...p,...M,__css:i,children:[l,T&&$.jsx(Fe.span,{srOnly:!0,...R,children:c}),f&&$.jsx(Fe.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:$.jsx(Fe.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:i.bg}})})]})})})})]}):$.jsx($.Fragment,{children:s})});hk.displayName="Tooltip";const pk=k.createContext(void 0),uV=pk.Provider,JV=cV(hk);function cV(e){function t(r){const n=fV(),i={...r};return i.portalProps={containerRef:n,...r.portalProps},$.jsx(e,{...i})}return t.displayName=`FixPortalLocation(${dV(e)})`,t}function fV(){const e=k.useContext(pk);if(!e)throw new Error("Failed to find portal container: chakra-ui integration was not set up correctly.");return e}function dV(e){return e.displayName||e.name||"Component"}const hV=` -.chakra-host { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - position: relative; - min-height: 100%; - height: 100%; - font-feature-settings: 'kern'; -}`,pV={light:"chakra-ui-light",dark:"chakra-ui-dark"},mV=({container:e,colorMode:t,children:r,theme:n})=>{const i=yV(e),o=k.useMemo(()=>vV(n),[n]),a=k.useRef(null),s={portalProps:{containerRef:a}},l=gV(a,t);return $.jsx("div",{className:"chakra-host",ref:a,children:$.jsx(qA,{value:i,children:$.jsx(L5,{theme:o,children:$.jsx(pw,{children:$.jsxs(l,{children:[$.jsx(oR,{}),$.jsx(Dc,{styles:hV}),$.jsx(O5,{}),$.jsx(TF,{value:s?.defaultOptions,children:$.jsx(uV,{value:a,children:r})}),$.jsx(_F,{...s})]})})})})})};function gV(e,t){const r=t??"light";return k.useEffect(()=>{const i=e.current;if(!i)return;const o=pV[r];return i.classList.add(o),i.dataset.theme=r,()=>{i.classList.remove(o),i.dataset.theme=void 0}},[e,r]),r==="light"?Fx:zx}function vV(e=Gu){return km({styles:{global:{".chakra-host":Gu.styles.global.body}}},e)}function yV(e){const t=k.useRef();return t.current||(t.current=_x({key:"css",container:e})),t.current}const bV={},SV={trails:{50:"#eaf2f5",100:"#d5e5ec",200:"#abcbd9",300:"#81b1c5",400:"#5797b2",500:"#2d7d9f",600:"#24647f",700:"#1b4b5f",800:"#123240",900:"#091920"}},xV={colors:{background_body:"white",background_primary:"trails.500",background_light:"trails.50",placeholder:"gray.500",font_primary:"black",font_inverse:"white",font_link:"trails.600",border:"gray.300","chakra-body-text":"font_primary","chakra-body-bg":"background_body","chakra-border-color":"border","chakra-placeholder-color":"placeholder"}},wV=km({fonts:bV,colors:SV,semanticTokens:xV},Gu),ei=(e,t)=>{const r=t.semanticTokens.colors[e];if(r&&r.includes(".")){const n=r.split("."),i=n[0],o=n[1];return t.colors[i][o]}return r},EV=km(i5({colorScheme:"trails"}),{styles:{global({theme:e}){return{".chakra-host":{"--trails-theme-shadow-color":`${ei("background_primary",e)}99`}}}},shadows:{outline:"0 0 0 3px var(--trails-theme-shadow-color)"},components:{Button:{defaultProps:{}},Checkbox:{defaultProps:{}},Divider:{baseStyle:{borderColor:"background_primary"}},Input:{defaultProps:{},variants:{outline({theme:e}){return{field:{borderColor:"border",_focusVisible:{borderColor:"background_primary",boxShadow:`0 0 0 1px ${ei("background_primary",e)}`}},addon:{borderColor:"border",bg:"background_primary"}}},filled:{field:{_focusVisible:{borderColor:"background_primary"}},addon:{bg:"background_primary"}},flushed({theme:e}){return{field:{_focusVisible:{borderColor:"background_primary",boxShadow:`0px 1px 0px 0px ${ei("background_primary",e)}`}}}}}},Link:{baseStyle:{color:"font_link"}},Radio:{defaultProps:{}},Select:{defaultProps:{},variants:{outline({theme:e}){return{field:{borderColor:"border",_focusVisible:{borderColor:"background_primary",boxShadow:`0 0 0 1px ${ei("background_primary",e)}`}}}},filled:{field:{_focusVisible:{borderColor:"background_primary"}},addon:{bg:"background_primary"}},flushed({theme:e}){return{field:{_focusVisible:{borderColor:"background_primary",boxShadow:`0px 1px 0px 0px ${ei("background_primary",e)}`}}}}}},Slider:{defaultProps:{},baseStyle:{thumb:{borderColor:"background_primary",_hover:{bg:"background_primary"}}}},Switch:{defaultProps:{}},Textarea:{defaultProps:{},variants:{outline({theme:e}){return{borderColor:"border",_focusVisible:{borderColor:"background_primary",boxShadow:`0 0 0 1px ${ei("background_primary",e)}`}}},filled:{_focusVisible:{borderColor:"background_primary"}},flushed({theme:e}){return{_focusVisible:{borderColor:"background_primary",boxShadow:`0px 1px 0px 0px ${ei("background_primary",e)}`}}}}},Tooltip:{baseStyle:{borderRadius:"md"}}}},wV);class kV{containerNode;theme;packages;serviceLayer;root;packageContext;constructor(t){this.containerNode=t.container,this.theme=t.theme,this.packages=t.packages,this.serviceLayer=t.serviceLayer,this.root=yx(t.rootNode),this.packageContext={getService:(r,n,i)=>{const o={interfaceName:n,...i},a=this.serviceLayer.getService(r,o);if(a.type==="found")return a.value.getInstanceOrThrow();const s=ic(o);switch(a.type){case"unimplemented":throw new j(V.INTERFACE_NOT_FOUND,`The UI of package '${r}' requested the unimplemented interface ${s}.`);case"undeclared":throw new j(V.UNDECLARED_DEPENDENCY,`Package '${r}' did not declare an UI dependency on interface ${s}. Add the dependency to the package configuration or remove the usage.`);case"ambiguous":{const l=Db(a.choices);throw new j(V.AMBIGUOUS_DEPENDENCY,`The UI of package '${r}' requires the ambiguous interface ${s}. Possible choices are: ${l}.`)}case"unknown-package":throw new j(V.MISSING_PACKAGE,Ab(r,n))}},getServices:(r,n)=>{const i=this.serviceLayer.getServices(r,n);if(i.type==="found")return i.value.map(o=>o.getInstanceOrThrow());switch(i.type){case"undeclared":throw new j(V.UNDECLARED_DEPENDENCY,`Package '${r}' did not declare an UI dependency on all services implementing interface '${n}'. Add the dependency ("all": true) to the package configuration or remove the usage.`);case"unknown-package":throw new j(V.MISSING_PACKAGE,Ab(r,n))}},getProperties:r=>this.getPackage(r).properties,getIntl:r=>this.getPackage(r).intl}}render(t){this.root.render($.jsx(k.StrictMode,{children:$.jsx(mV,{container:this.containerNode,colorMode:"light",theme:this.theme??EV,children:$.jsx(nm.Provider,{value:this.packageContext,children:$.jsx(t,{})})})}))}destroy(){this.root.unmount()}getPackage(t){const r=this.packages.get(t);if(!r)throw new j(V.INTERNAL,`Package '${t}' was not found in application.`);return r}}function Ab(e,t){return`Package '${e}' was not found in the application's metadata while it attempted to reference the interface '${t}'. Check that the dependency is declared correctly in the packages that use '${e}'.`}const Ur=nc("runtime:CustomElement");function e6(e){var r,n,i,o,mk,ep;class t extends HTMLElement{constructor(){super();Vt(this,o);Vt(this,r);Vt(this,n);Vt(this,i);At(this,r,this.attachShadow({mode:"open"}))}static get observedAttributes(){return[]}connectedCallback(){Ur.debug("Launching application"),Le(this,n)&&Le(this,n).destroy(),At(this,n,el(this,o,ep).call(this)),Le(this,n).start()}disconnectedCallback(){Ur.debug("Shutting down application"),Le(this,i)&&clearTimeout(Le(this,i)),Le(this,n)?.destroy(),At(this,n,void 0),Ur.debug("Application destroyed")}when(){return Le(this,n)?Le(this,n).whenAPI():Promise.reject(new j(V.NOT_MOUNTED,"Cannot use the application's API because the HTML element has not yet been mounted into the DOM."))}}return r=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakSet,mk=function(c){Le(this,i)&&clearTimeout(Le(this,i)),At(this,i,setTimeout(()=>{Le(this,n)&&(Ur.debug("Restarting application with new options",c),Le(this,n).destroy(),At(this,n,el(this,o,ep).call(this,c)),Le(this,n).start())},1))},ep=function(c){return new CV({hostElement:this,shadowRoot:Le(this,r),elementOptions:e,overrides:c,restart:el(this,o,mk).bind(this)})},t}class CV{options;apiPromise;api;state="not-started";locale;container;config;serviceLayer;lifecycleEvents;reactIntegration;stylesWatch;constructor(t){this.options=t}start(){if(this.state!=="not-started")throw new j(V.INTERNAL,`Cannot start element in state '${this.state}'`);this.state="starting",this.startImpl().catch(t=>{this.destroy(),Mb(t)||RV(t)})}destroy(){if(this.state!=="destroyed"){if(this.state==="started")try{this.triggerApplicationLifecycleEvent("before-stop")}catch{}this.state="destroyed",this.apiPromise?.reject(Ob()),this.reactIntegration=hf(this.reactIntegration),this.options.shadowRoot.replaceChildren(),this.container=void 0,this.lifecycleEvents=void 0,this.serviceLayer=hf(this.serviceLayer),this.stylesWatch=hf(this.stylesWatch)}}whenAPI(){return this.api?Promise.resolve(this.api):(this.apiPromise??=RC()).promise}async startImpl(){const{shadowRoot:t,hostElement:r,elementOptions:n,overrides:i}=this.options,o=this.config=await PV(r,n,i);this.checkAbort(),Ur.debug("Application config is",o);const a=await p_(n.appMetadata,o.locale);this.checkAbort();const s=this.container=TV(a.locale),l=this.initStyles();t.replaceChildren(s,...l);const{serviceLayer:u,packages:c}=this.initServiceLayer({container:s,properties:o.properties,i18n:a});this.lifecycleEvents=Rb(u,ap),await this.initAPI(u),this.checkAbort(),this.reactIntegration=new kV({rootNode:s,container:t,theme:n.theme,serviceLayer:u,packages:c}),this.render(),this.state="started",this.triggerApplicationLifecycleEvent("after-start"),Ur.debug("Application started")}render(){const t=this.options.elementOptions.component??$V;this.reactIntegration?.render(t)}initStyles(){const t=":host { all: initial; display: block; }",r=document.createElement("style");$b(r,{value:t});const n=this.options.elementOptions.appMetadata?.styles,i=document.createElement("style");return $b(i,n),[r,i]}initServiceLayer(t){const{hostElement:r,shadowRoot:n,elementOptions:i,restart:o}=this.options,{container:a,properties:s,i18n:l}=t,u=i.appMetadata?.packages??{},c=C_({host:r,shadowRoot:n,container:a,locale:l.locale,supportedLocales:l.supportedMessageLocales,changeLocale(m){const v=l.supportedMessageLocales;if(m!=null&&!l.supportsLocale(m))throw new j(V.UNSUPPORTED_LOCALE,`Unsupported locale '${m}' (supported locales: ${v.join(", ")}).`);o({locale:m})}}),{serviceLayer:f,packages:d}=_V({packageMetadata:u,builtinPackage:c,properties:s,i18n:l});return this.serviceLayer=f,Ur.isDebug()&&Ur.debug("Launching service layer with packages",Object.fromEntries(d)),f.start(),{serviceLayer:f,packages:d}}async initAPI(t){const r=Rb(t,op);try{const n=this.api=await r.getApi();Ur.debug("Application API initialized to",n),this.apiPromise?.resolve(n)}catch(n){throw new j(V.INTERNAL,"Failed to gather the application's API methods.",{cause:n})}}triggerApplicationLifecycleEvent(t){this.lifecycleEvents?.emitLifecycleEvent(t)}checkAbort(){this.state==="destroyed"&&EC()}}function TV(e){const t=document.createElement("div");return t.classList.add("pioneer-root"),t.style.minHeight="100%",t.style.height="100%",e&&(t.lang=e),t}function _V(e){const{packageMetadata:t,properties:r,builtinPackage:n,i18n:i}=e;let o;try{o=NC(t??{},i,r)}catch(l){throw new j(V.INVALID_METADATA,"Failed to parse package metadata.",{cause:l})}{const l=o.findIndex(u=>u.name===n.name);l>=0&&o.splice(l,1),o.push(n)}const a=[{interfaceName:op},{interfaceName:ap},{interfaceName:k_,all:!0}],s=new __(o,a);return{packages:new Map(o.map(l=>[l.name,l])),serviceLayer:s}}function Rb(e,t){const r=e.getService("@open-pioneer/runtime",{interfaceName:t},{ignoreDeclarationCheck:!0});if(r.type!=="found")throw new j(V.INTERNAL,`Failed to find instance of '${t}' (result type '${r.type}'). This is a builtin service that must be present exactly once.`);return r.value.getInstanceOrThrow()}async function PV(e,t,r){let n;try{const o=t.config??{},a=await t.resolveConfig?.({hostElement:e,getAttribute(s){return e.getAttribute(s)??void 0}})??{};n=[o,a]}catch(o){throw new j(V.CONFIG_RESOLUTION_FAILED,"Failed to resolve application properties.",{cause:o})}const i=AV(n);return r?.locale&&(i.locale=r.locale),i}function AV(e){const t=Object.assign({locale:void 0,properties:{}},...e),r=t.properties={};for(const n of e)for(const[i,o]of Object.entries(n.properties??{})){const a=r[i]??={};Object.assign(a,o)}return t}function $b(e,t){let r=t?.value??"";r=r.replace(/\/\*# sourceMappingURL=.*$/,"");const n=document.createTextNode(r);e.replaceChildren(n)}function RV(e){if(e instanceof j){const t=wC(e).reverse();if(t.length===1){console.error(e);return}let r=1;for(const n of t)console.error(`#${r}`,n),++r}else console.error("Unexpected error",e)}function $V(){return null}function t6(e){return{value:e}}const IV="modulepreload",LV=function(e,t){return new URL(e,t).href},Ib={},r6=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){const a=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),l=s?.nonce||s?.getAttribute("nonce");i=Promise.allSettled(r.map(u=>{if(u=LV(u,n),u in Ib)return;Ib[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!n)for(let v=a.length-1;v>=0;v--){const y=a[v];if(y.href===u&&(!c||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${f}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":IV,c||(m.as="script"),m.crossOrigin="",m.href=u,l&&m.setAttribute("nonce",l),document.head.appendChild(m),c)return new Promise((v,y)=>{m.addEventListener("load",v),m.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return i.then(a=>{for(const s of a||[])s.status==="rejected"&&o(s.reason);return t().catch(o)})};function n6(e,t,r){const n=k.useContext(nm);return k.useMemo(()=>gk("useService",n).getService(e,t,r??{}),[n,e,t,r])}function i6(e){const t=k.useContext(nm);return gk("useIntl",t).getIntl(e)}function gk(e,t){if(!t)throw new j(V.INTERNAL,`"Failed to access package context from '${e}': react integration was not set up properly.`);return t}export{rR as $,eV as A,rk as B,m5 as C,Pr as D,jV as E,UV as F,km as G,LF as H,Vs as I,EV as J,nc as K,sp as L,rm as M,z as N,Mb as O,RC as P,Ob as Q,NV as R,EC as S,IF as T,JV as U,Rd as V,hf as W,nR as X,DV as Y,Bu as Z,r6 as _,i6 as a,WE as a0,zV as a1,FV as a2,zu as a3,na as a4,VV as a5,HV as a6,KV as a7,Fe as b,t6 as c,e6 as d,hR as e,vr as f,YV as g,qV as h,Ms as i,$ as j,jo as k,Vn as l,tc as m,AF as n,Fo as o,WV as p,mm as q,k as r,Zt as s,Z0 as t,n6 as u,ZV as v,qu as w,xd as x,QV as y,rV as z}; diff --git a/starter/assets/DOkIEgc2QT0S.js b/starter/assets/DOkIEgc2QT0S.js deleted file mode 100644 index 35a29a4cf..000000000 --- a/starter/assets/DOkIEgc2QT0S.js +++ /dev/null @@ -1 +0,0 @@ -import{r as i,i as O,l as B,j as l,b as k,a0 as G,f as T,k as V,o as q,a7 as U,E as y,C as J,m as D,a5 as R,a4 as E,s as K}from"./CZJiGrdGqn8U.js";function Q(n){return i.Children.toArray(n).filter(t=>i.isValidElement(t))}var[me,X]=O({strict:!1,name:"ButtonGroupContext"});function Y(n){const[t,r]=i.useState(!n);return{ref:i.useCallback(a=>{a&&r(a.tagName==="BUTTON")},[]),type:t?"button":void 0}}function H(n){const{children:t,className:r,...s}=n,e=i.isValidElement(t)?i.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,a=B("chakra-button__icon",r);return l.jsx(k.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...s,className:a,children:e})}H.displayName="ButtonIcon";function w(n){const{label:t,placement:r,spacing:s="0.5rem",children:e=l.jsx(G,{color:"currentColor",width:"1em",height:"1em"}),className:a,__css:c,...p}=n,o=B("chakra-button__spinner",a),m=r==="start"?"marginEnd":"marginStart",f=i.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[m]:t?s:0,fontSize:"1em",lineHeight:"normal",...c}),[c,t,m,s]);return l.jsx(k.div,{className:o,...p,__css:f,children:e})}w.displayName="ButtonSpinner";var Z=T((n,t)=>{const r=X(),s=V("Button",{...r,...n}),{isDisabled:e=r?.isDisabled,isLoading:a,isActive:c,children:p,leftIcon:o,rightIcon:m,loadingText:f,iconSpacing:h="0.5rem",type:C,spinner:b,spinnerPlacement:g="start",className:x,as:u,...j}=q(n),P=i.useMemo(()=>{const I={...s?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...s,...!!r&&{_focus:I}}},[s,r]),{ref:S,type:_}=Y(u),F={rightIcon:m,leftIcon:o,iconSpacing:h,children:p};return l.jsxs(k.button,{ref:U(t,S),as:u,type:C??_,"data-active":y(c),"data-loading":y(a),__css:P,className:B("chakra-button",x),...j,disabled:e||a,children:[a&&g==="start"&&l.jsx(w,{className:"chakra-button__spinner--start",label:f,placement:"start",spacing:h,children:b}),a?f||l.jsx(k.span,{opacity:0,children:l.jsx(W,{...F})}):l.jsx(W,{...F}),a&&g==="end"&&l.jsx(w,{className:"chakra-button__spinner--end",label:f,placement:"end",spacing:h,children:b})]})});Z.displayName="Button";function W(n){const{leftIcon:t,rightIcon:r,children:s,iconSpacing:e}=n;return l.jsxs(l.Fragment,{children:[t&&l.jsx(H,{marginEnd:e,children:t}),s,r&&l.jsx(H,{marginStart:e,children:r})]})}var[ee,te]=O({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[ne,A]=O({strict:!1,name:"FormControlContext"});function se(n){const{id:t,isRequired:r,isInvalid:s,isDisabled:e,isReadOnly:a,...c}=n,p=i.useId(),o=t||`field-${p}`,m=`${o}-label`,f=`${o}-feedback`,h=`${o}-helptext`,[C,b]=i.useState(!1),[g,x]=i.useState(!1),[u,j]=i.useState(!1),P=i.useCallback((d={},v=null)=>({id:h,...d,ref:D(v,N=>{N&&x(!0)})}),[h]),S=i.useCallback((d={},v=null)=>({...d,ref:v,"data-focus":y(u),"data-disabled":y(e),"data-invalid":y(s),"data-readonly":y(a),id:d.id!==void 0?d.id:m,htmlFor:d.htmlFor!==void 0?d.htmlFor:o}),[o,e,u,s,a,m]),_=i.useCallback((d={},v=null)=>({id:f,...d,ref:D(v,N=>{N&&b(!0)}),"aria-live":"polite"}),[f]),F=i.useCallback((d={},v=null)=>({...d,...c,ref:v,role:"group","data-focus":y(u),"data-disabled":y(e),"data-invalid":y(s),"data-readonly":y(a)}),[c,e,u,s,a]),I=i.useCallback((d={},v=null)=>({...d,ref:v,role:"presentation","aria-hidden":!0,children:d.children||"*"}),[]);return{isRequired:!!r,isInvalid:!!s,isReadOnly:!!a,isDisabled:!!e,isFocused:!!u,onFocus:()=>j(!0),onBlur:()=>j(!1),hasFeedbackText:C,setHasFeedbackText:b,hasHelpText:g,setHasHelpText:x,id:o,labelId:m,feedbackId:f,helpTextId:h,htmlProps:c,getHelpTextProps:P,getErrorMessageProps:_,getRootProps:F,getLabelProps:S,getRequiredIndicatorProps:I}}var re=T(function(t,r){const s=J("Form",t),e=q(t),{getRootProps:a,htmlProps:c,...p}=se(e),o=B("chakra-form-control",t.className);return l.jsx(ne,{value:p,children:l.jsx(ee,{value:s,children:l.jsx(k.div,{...a({},r),className:o,__css:s.container})})})});re.displayName="FormControl";var ae=T(function(t,r){const s=A(),e=te(),a=B("chakra-form__helper-text",t.className);return l.jsx(k.div,{...s?.getHelpTextProps(t,r),__css:e.helperText,className:a})});ae.displayName="FormHelperText";function fe(n){const{isDisabled:t,isInvalid:r,isReadOnly:s,isRequired:e,...a}=le(n);return{...a,disabled:t,readOnly:s,required:e,"aria-invalid":R(r),"aria-required":R(e),"aria-readonly":R(s)}}function le(n){var t,r,s;const e=A(),{id:a,disabled:c,readOnly:p,required:o,isRequired:m,isInvalid:f,isReadOnly:h,isDisabled:C,onFocus:b,onBlur:g,...x}=n,u=n["aria-describedby"]?[n["aria-describedby"]]:[];return e?.hasFeedbackText&&e?.isInvalid&&u.push(e.feedbackId),e?.hasHelpText&&u.push(e.helpTextId),{...x,"aria-describedby":u.join(" ")||void 0,id:a??e?.id,isDisabled:(t=c??C)!=null?t:e?.isDisabled,isReadOnly:(r=p??h)!=null?r:e?.isReadOnly,isRequired:(s=o??m)!=null?s:e?.isRequired,isInvalid:f??e?.isInvalid,onFocus:E(e?.onFocus,b),onBlur:E(e?.onBlur,g)}}var ie=Object.freeze(["base","sm","md","lg","xl","2xl"]);function oe(n,t){return Array.isArray(n)?n.map(r=>r===null?null:t(r)):K(n)?Object.keys(n).reduce((r,s)=>(r[s]=t(n[s]),r),{}):n!=null?t(n):null}function he(n,t=ie){const r={};return n.forEach((s,e)=>{const a=t[e];s!=null&&(r[a]=s)}),r}var M=n=>l.jsx(k.div,{className:"chakra-stack__item",...n,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...n.__css}});M.displayName="StackItem";function ce(n){const{spacing:t,direction:r}=n,s={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":oe(r,e=>s[e])}}var L=T((n,t)=>{const{isInline:r,direction:s,align:e,justify:a,spacing:c="0.5rem",wrap:p,children:o,divider:m,className:f,shouldWrapChildren:h,...C}=n,b=r?"row":s??"column",g=i.useMemo(()=>ce({spacing:c,direction:b}),[c,b]),x=!!m,u=!h&&!x,j=i.useMemo(()=>{const S=Q(o);return u?S:S.map((_,F)=>{const I=typeof _.key<"u"?_.key:F,d=F+1===S.length,N=h?l.jsx(M,{children:_},I):_;if(!x)return N;const $=i.cloneElement(m,{__css:g}),z=d?null:$;return l.jsxs(i.Fragment,{children:[N,z]},I)})},[m,g,x,u,h,o]),P=B("chakra-stack",f);return l.jsx(k.div,{ref:t,display:"flex",alignItems:e,justifyContent:a,flexDirection:b,flexWrap:p,gap:x?void 0:c,className:P,...C,children:j})});L.displayName="Stack";var de=T((n,t)=>l.jsx(L,{align:"center",...n,direction:"row",ref:t}));de.displayName="HStack";export{Z as B,re as F,de as H,L as S,te as a,ie as b,he as c,fe as d,le as e,A as u}; diff --git a/starter/assets/C3lYQNvj0qtw.js b/starter/assets/D_NXjk9T_0pm.js similarity index 88% rename from starter/assets/C3lYQNvj0qtw.js rename to starter/assets/D_NXjk9T_0pm.js index 9fd5b3947..985295361 100644 --- a/starter/assets/C3lYQNvj0qtw.js +++ b/starter/assets/D_NXjk9T_0pm.js @@ -1,5 +1,5 @@ -import{r as f,j as c,H as p,L as d}from"./CZJiGrdGqn8U.js";const m=1,u=f.createContext(m);u.displayName="LevelContext";function y(n){const{title:s,sectionHeadingProps:r,children:a}=n,o=f.useContext(u),t=typeof s=="string"?c.jsx(x,{...r,children:s}):s;return c.jsxs(c.Fragment,{children:[t,c.jsx(u.Provider,{value:o+1,children:a})]})}const x=f.forwardRef(function(s,r){const{children:a,...o}=s,t=v(),e=g(t);return c.jsx(p,{as:e,ref:r,...o,children:a})});function v(){const n=f.useContext(u);return Math.min(n,6)}function g(n){return`h${n}`}var l={exports:{}};/*! +import{r as f,j as c,H as p,P as d}from"./BUVr5rEhM7JP.js";const m=1,u=f.createContext(m);u.displayName="LevelContext";function y(n){const{title:s,sectionHeadingProps:r,children:a}=n,o=f.useContext(u),t=typeof s=="string"?c.jsx(x,{...r,children:s}):s;return c.jsxs(c.Fragment,{children:[t,c.jsx(u.Provider,{value:o+1,children:a})]})}const x=f.forwardRef(function(s,r){const{children:a,...o}=s,t=v(),e=g(t);return c.jsx(p,{as:e,ref:r,...o,children:a})});function v(){const n=f.useContext(u);return Math.min(n,6)}function g(n){return`h${n}`}var l={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(n){(function(){var s={}.hasOwnProperty;function r(){for(var t="",e=0;eo==null?"":Ne(o,i,r)??""),S=typeof l<"u",g=S?l:w,_=Ze(W(g),i),R=r??_,x=a.useCallback(v=>{v!==g&&(S||N(v.toString()),k?.(v.toString(),W(v)))},[k,S,g]),I=a.useCallback(v=>{let b=v;return m&&(b=Et(b,u,d)),Qe(b,R)},[R,m,d,u]),A=a.useCallback((v=i)=>{let b;g===""?b=W(v):b=W(g)+v,b=I(b),x(b)},[I,i,x,g]),G=a.useCallback((v=i)=>{let b;g===""?b=W(-v):b=W(g)-v,b=I(b),x(b)},[I,i,x,g]),E=a.useCallback(()=>{let v;o==null?v="":v=Ne(o,i,r)??u,x(v)},[o,r,i,x,u]),h=a.useCallback(v=>{const b=Ne(v,i,R)??u;x(b)},[R,i,x,u]),f=W(g);return{isOutOfRange:f>d||f{let o=null;const l=()=>r();return t!==null&&(o=window.setInterval(l,t)),()=>{o&&window.clearInterval(o)}},[t,r])}var Rt=()=>typeof document<"u",We=!1,he=null,ee=!1,we=!1,Ie=new Set;function _e(e,t){Ie.forEach(r=>r(e,t))}var Ft=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Dt(e){return!(e.metaKey||!Ft&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function He(e){ee=!0,Dt(e)&&(he="keyboard",_e("keyboard",e))}function ie(e){if(he="pointer",e.type==="mousedown"||e.type==="pointerdown"){ee=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let r=!1;try{r=t.matches(":focus-visible")}catch{}if(r)return;_e("pointer",e)}}function At(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function Tt(e){At(e)&&(ee=!0,he="virtual")}function Vt(e){e.target===window||e.target===document||e.target instanceof Element&&e.target.hasAttribute("tabindex")||(!ee&&!we&&(he="virtual",_e("virtual",e)),ee=!1,we=!1)}function Ot(){ee=!1,we=!0}function $e(){return he!=="pointer"}function Lt(){if(!Rt()||We)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...r){ee=!0,e.apply(this,r)},document.addEventListener("keydown",He,!0),document.addEventListener("keyup",He,!0),document.addEventListener("click",Tt,!0),window.addEventListener("focus",Vt,!0),window.addEventListener("blur",Ot,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",ie,!0),document.addEventListener("pointermove",ie,!0),document.addEventListener("pointerup",ie,!0)):(document.addEventListener("mousedown",ie,!0),document.addEventListener("mousemove",ie,!0),document.addEventListener("mouseup",ie,!0)),We=!0}function zt(e){Lt(),e($e());const t=()=>e($e());return Ie.add(t),()=>{Ie.delete(t)}}const Bt={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},ue=$(function(t,r){const{htmlSize:o,...l}=t,i=Pe("Input",l),u=je(l),d=Ct(u),m=Ce("chakra-input",t.className);return n.jsx(B.input,{size:o,...d,__css:i.field,ref:r,className:m})});ue.displayName="Input";ue.id="Input";const Gt=e=>n.jsx(Je,{viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),Kt=e=>n.jsx(Je,{viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function Xe(e,t,r,o){a.useEffect(()=>{if(!e.current||!o)return;const l=e.current.ownerDocument.defaultView??window,i=Array.isArray(t)?t:[t],u=new l.MutationObserver(d=>{for(const m of d)m.type==="attributes"&&m.attributeName&&i.includes(m.attributeName)&&r(m)});return u.observe(e.current,{attributes:!0,attributeFilter:i}),()=>u.disconnect()})}const Ut=50,Ye=300;function qt(e,t){const[r,o]=a.useState(!1),[l,i]=a.useState(null),[u,d]=a.useState(!0),m=a.useRef(null),k=()=>clearTimeout(m.current);_t(()=>{l==="increment"&&e(),l==="decrement"&&t()},r?Ut:null);const w=a.useCallback(()=>{u&&e(),m.current=setTimeout(()=>{d(!1),o(!0),i("increment")},Ye)},[e,u]),N=a.useCallback(()=>{u&&t(),m.current=setTimeout(()=>{d(!1),o(!0),i("decrement")},Ye)},[t,u]),S=a.useCallback(()=>{d(!0),o(!1),k()},[]);return a.useEffect(()=>()=>k(),[]),{up:w,down:N,stop:S,isSpinning:r}}const Wt=/^[Ee0-9+\-.]$/;function Ht(e){return Wt.test(e)}function $t(e,t){if(e.key==null)return!0;const r=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||r?!0:t(e.key)}function Xt(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:r=!0,keepWithinRange:o=!0,min:l=Number.MIN_SAFE_INTEGER,max:i=Number.MAX_SAFE_INTEGER,step:u=1,isReadOnly:d,isDisabled:m,isRequired:k,isInvalid:w,pattern:N="[0-9]*(.[0-9]+)?",inputMode:S="decimal",allowMouseWheel:g,id:_,onChange:R,precision:x,name:I,"aria-describedby":A,"aria-label":G,"aria-labelledby":E,onFocus:h,onBlur:f,onInvalid:F,getAriaValueText:P,isValidCharacter:X,format:v,parse:b,...re}=e,q=Z(h),ce=Z(f),Y=Z(F),V=Z(X??Ht),be=Z(P),c=Mt(e),{update:K,increment:z,decrement:de}=c,[ge,se]=a.useState(!1),ae=!(d||m),O=a.useRef(null),J=a.useRef(null),ve=a.useRef(null),ke=a.useRef(null),me=a.useCallback(s=>s.split("").filter(V).join(""),[V]),pe=a.useCallback(s=>b?.(s)??s,[b]),p=a.useCallback(s=>(v?.(s)??s).toString(),[v]);mt(()=>{(c.valueAsNumber>i||c.valueAsNumber{if(!O.current)return;if(O.current.value!=c.value){const y=pe(O.current.value);c.setValue(me(y))}},[pe,me]);const T=a.useCallback((s=u)=>{ae&&z(s)},[z,ae,u]),Q=a.useCallback((s=u)=>{ae&&de(s)},[de,ae,u]),M=qt(T,Q);Xe(ve,"disabled",M.stop,M.isSpinning),Xe(ke,"disabled",M.stop,M.isSpinning);const De=a.useCallback(s=>{if(s.nativeEvent.isComposing)return;const D=pe(s.currentTarget.value);K(me(D)),J.current={start:s.currentTarget.selectionStart,end:s.currentTarget.selectionEnd}},[K,me,pe]),Ae=a.useCallback(s=>{q?.(s),J.current&&(s.currentTarget.selectionStart=J.current.start??s.currentTarget.value?.length,s.currentTarget.selectionEnd=J.current.end??s.currentTarget.selectionStart)},[q]),Te=a.useCallback(s=>{if(s.nativeEvent.isComposing)return;$t(s,V)||s.preventDefault();const y=Ve(s)*u,D=s.key,fe={ArrowUp:()=>T(y),ArrowDown:()=>Q(y),Home:()=>K(l),End:()=>K(i)}[D];fe&&(s.preventDefault(),fe(s))},[V,u,T,Q,K,l,i]),Ve=s=>{let y=1;return(s.metaKey||s.ctrlKey)&&(y=.1),s.shiftKey&&(y=10),y},Oe=a.useMemo(()=>{const s=be?.(c.value);if(s!=null)return s;const y=c.value.toString();return y||void 0},[c.value,be]),Le=a.useCallback(()=>{let s=c.value;if(c.value==="")return;/^[eE]/.test(c.value.toString())?c.setValue(""):(c.valueAsNumberi&&(s=i),c.cast(s))},[c,i,l]),ze=a.useCallback(()=>{se(!1),r&&Le()},[r,se,Le]),xe=a.useCallback(()=>{t&&requestAnimationFrame(()=>{O.current?.focus()})},[t]),Be=a.useCallback(s=>{s.preventDefault(),M.up(),xe()},[xe,M]),Ge=a.useCallback(s=>{s.preventDefault(),M.down(),xe()},[xe,M]);ft(()=>O.current,"wheel",s=>{const D=(O.current?.ownerDocument??document).activeElement===O.current;if(!g||!D)return;s.preventDefault();const U=Ve(s)*u,fe=Math.sign(s.deltaY);fe===-1?T(U):fe===1&&Q(U)},{passive:!1});const ut=a.useCallback((s={},y=null)=>{const D=m||o&&c.isAtMax;return{...s,ref:ye(y,ve),role:"button",tabIndex:-1,onPointerDown:C(s.onPointerDown,U=>{U.button!==0||D||Be(U)}),onPointerLeave:C(s.onPointerLeave,M.stop),onPointerUp:C(s.onPointerUp,M.stop),disabled:D,"aria-disabled":le(D)}},[c.isAtMax,o,Be,M.stop,m]),ct=a.useCallback((s={},y=null)=>{const D=m||o&&c.isAtMin;return{...s,ref:ye(y,ke),role:"button",tabIndex:-1,onPointerDown:C(s.onPointerDown,U=>{U.button!==0||D||Ge(U)}),onPointerLeave:C(s.onPointerLeave,M.stop),onPointerUp:C(s.onPointerUp,M.stop),disabled:D,"aria-disabled":le(D)}},[c.isAtMin,o,Ge,M.stop,m]),dt=a.useCallback((s={},y=null)=>({name:I,inputMode:S,type:"text",pattern:N,"aria-labelledby":E,"aria-label":G,"aria-describedby":A,id:_,disabled:m,...s,readOnly:s.readOnly??d,"aria-readonly":s.readOnly??d,"aria-required":s.required??k,required:s.required??k,ref:ye(O,y),value:p(c.value),role:"spinbutton","aria-valuemin":l,"aria-valuemax":i,"aria-valuenow":Number.isNaN(c.valueAsNumber)?void 0:c.valueAsNumber,"aria-invalid":le(w??c.isOutOfRange),"aria-valuetext":Oe,autoComplete:"off",autoCorrect:"off",onChange:C(s.onChange,De),onKeyDown:C(s.onKeyDown,Te),onFocus:C(s.onFocus,Ae,()=>se(!0)),onBlur:C(s.onBlur,ce,ze)}),[I,S,N,E,G,p,A,_,m,k,d,w,c.value,c.valueAsNumber,c.isOutOfRange,l,i,Oe,De,Te,Ae,ce,ze]);return{value:p(c.value),valueAsNumber:c.valueAsNumber,isFocused:ge,isDisabled:m,isReadOnly:d,getIncrementButtonProps:ut,getDecrementButtonProps:ct,getInputProps:dt,htmlProps:re}}const[Yt,Se]=Ee({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Jt,Re]=Ee({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),et=$(function(t,r){const o=Pe("NumberInput",t),l=je(t),i=St(l),{htmlProps:u,...d}=Xt(i),m=a.useMemo(()=>d,[d]);return n.jsx(Jt,{value:m,children:n.jsx(Yt,{value:o,children:n.jsx(B.div,{...u,ref:r,className:Ce("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...o.root}})})})});et.displayName="NumberInput";const tt=$(function(t,r){const o=Se();return n.jsx(B.div,{"aria-hidden":!0,ref:r,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...o.stepperGroup}})});tt.displayName="NumberInputStepper";const nt=$(function(t,r){const{getInputProps:o}=Re(),l=o(t,r),i=Se();return n.jsx(B.input,{...l,className:Ce("chakra-numberinput__field",t.className),__css:{width:"100%",...i.field}})});nt.displayName="NumberInputField";const rt=B("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),st=$(function(t,r){const o=Se(),{getDecrementButtonProps:l}=Re(),i=l(t,r);return n.jsx(rt,{...i,__css:o.stepper,children:t.children??n.jsx(Gt,{})})});st.displayName="NumberDecrementStepper";const at=$(function(t,r){const{getIncrementButtonProps:o}=Re(),l=o(t,r),i=Se();return n.jsx(rt,{...l,__css:i.stepper,children:t.children??n.jsx(Kt,{})})});at.displayName="NumberIncrementStepper";function Qt(e){return e&&Ke(e)&&Ke(e.target)}function Zt(e={}){const{onChange:t,value:r,defaultValue:o,name:l,isDisabled:i,isFocusable:u,isNative:d,...m}=e,[k,w]=a.useState(o||""),N=typeof r<"u",S=N?r:k,g=a.useRef(null),_=a.useCallback(()=>{const h=g.current;if(!h)return;let f="input:not(:disabled):checked";const F=h.querySelector(f);if(F){F.focus();return}f="input:not(:disabled)",h.querySelector(f)?.focus()},[]),x=`radio-${a.useId()}`,I=l||x,A=a.useCallback(h=>{const f=Qt(h)?h.target.value:h;N||w(f),t?.(String(f))},[t,N]),G=a.useCallback((h={},f=null)=>({...h,ref:ye(f,g),role:"radiogroup"}),[]),E=a.useCallback((h={},f=null)=>({...h,ref:f,name:I,[d?"checked":"isChecked"]:S!=null?h.value===S:void 0,onChange(P){A(P)},"data-radiogroup":!0}),[d,I,A,S]);return{getRootProps:G,getRadioProps:E,name:I,ref:g,focus:_,setValue:w,value:S,onChange:A,isDisabled:i,isFocusable:u,htmlProps:m}}const[en,ot]=Ee({name:"RadioGroupContext",strict:!1}),Fe=$((e,t)=>{const{colorScheme:r,size:o,variant:l,children:i,className:u,isDisabled:d,isFocusable:m,...k}=e,{value:w,onChange:N,getRootProps:S,name:g,htmlProps:_}=Zt(k),R=a.useMemo(()=>({name:g,size:o,onChange:N,colorScheme:r,value:w,variant:l,isDisabled:d,isFocusable:m}),[g,o,N,r,w,l,d,m]);return n.jsx(en,{value:R,children:n.jsx(B.div,{...S(_,t),className:Ce("chakra-radio-group",u),children:i})})});Fe.displayName="RadioGroup";function tn(e={}){const{defaultChecked:t,isChecked:r,isFocusable:o,isDisabled:l,isReadOnly:i,isRequired:u,onChange:d,isInvalid:m,name:k,value:w,id:N,"data-radiogroup":S,"aria-describedby":g,..._}=e,R=`radio-${a.useId()}`,x=kt(),A=!!ot()||!!S;let E=!!x&&!A?x.id:R;E=N??E;const h=l??x?.isDisabled,f=i??x?.isReadOnly,F=u??x?.isRequired,P=m??x?.isInvalid,[X,v]=a.useState(!1),[b,re]=a.useState(!1),[q,ce]=a.useState(!1),[Y,V]=a.useState(!1),[be,c]=a.useState(!!t),K=typeof r<"u",z=K?r:be;a.useEffect(()=>zt(v),[]);const de=a.useCallback(p=>{if(f||h){p.preventDefault();return}K||c(p.currentTarget.checked),d?.(p)},[K,h,f,d]),ge=a.useCallback(p=>{p.key===" "&&V(!0)},[V]),se=a.useCallback(p=>{p.key===" "&&V(!1)},[V]),ae=a.useCallback((p={},T=null)=>({...p,ref:T,"data-active":j(Y),"data-hover":j(q),"data-disabled":j(h),"data-invalid":j(P),"data-checked":j(z),"data-focus":j(b),"data-focus-visible":j(b&&X),"data-readonly":j(f),"aria-hidden":!0,onMouseDown:C(p.onMouseDown,()=>V(!0)),onMouseUp:C(p.onMouseUp,()=>V(!1)),onMouseEnter:C(p.onMouseEnter,()=>ce(!0)),onMouseLeave:C(p.onMouseLeave,()=>ce(!1))}),[Y,q,h,P,z,b,f,X]),{onFocus:O,onBlur:J}=x??{},ve=a.useCallback((p={},T=null)=>{const Q=h&&!o;return{...p,id:E,ref:T,type:"radio",name:k,value:w,onChange:C(p.onChange,de),onBlur:C(J,p.onBlur,()=>re(!1)),onFocus:C(O,p.onFocus,()=>re(!0)),onKeyDown:C(p.onKeyDown,ge),onKeyUp:C(p.onKeyUp,se),checked:z,disabled:Q,readOnly:f,required:F,"aria-invalid":le(P),"aria-disabled":le(Q),"aria-required":le(F),"data-readonly":j(f),"aria-describedby":g,style:Bt}},[h,o,E,k,w,de,J,O,ge,se,z,f,F,P,g]);return{state:{isInvalid:P,isFocused:b,isChecked:z,isActive:Y,isHovered:q,isDisabled:h,isReadOnly:f,isRequired:F},getRadioProps:ae,getInputProps:ve,getLabelProps:(p={},T=null)=>({...p,ref:T,onMouseDown:C(p.onMouseDown,nn),"data-disabled":j(h),"data-checked":j(z),"data-invalid":j(P)}),getRootProps:(p,T=null)=>({htmlFor:E,...p,ref:T,"data-disabled":j(h),"data-checked":j(z),"data-invalid":j(P)}),htmlProps:_}}function nn(e){e.preventDefault(),e.stopPropagation()}const H=$((e,t)=>{const r=ot(),{onChange:o,value:l}=e,i=Pe("Radio",{...r,...e}),u=je(e),{spacing:d="0.5rem",children:m,isDisabled:k=r?.isDisabled,isFocusable:w=r?.isFocusable,inputProps:N,...S}=u;let g=e.isChecked;r?.value!=null&&l!=null&&(g=r.value===l);let _=o;r?.onChange&&l!=null&&(_=ht(r.onChange,o));const R=e?.name??r?.name,{getInputProps:x,getRadioProps:I,getLabelProps:A,getRootProps:G,htmlProps:E}=tn({...S,isChecked:g,isFocusable:w,isDisabled:k,onChange:_,name:R}),[h,f]=Nt(E,bt),F=I(f),P=x(N,t),X=A(),v=Object.assign({},h,G()),b={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...i.container},re={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...i.control},q={userSelect:"none",marginStart:d,...i.label};return n.jsxs(B.label,{className:"chakra-radio",...v,__css:b,children:[n.jsx("input",{className:"chakra-radio__input",...P}),n.jsx(B.span,{className:"chakra-radio__control",...F,__css:re}),m&&n.jsx(B.span,{className:"chakra-radio__label",...X,__css:q,children:m})]})});H.displayName="Radio";const it=e=>n.jsx(B.div,{className:"chakra-stack__divider",...e,__css:{...e.__css,borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"}});it.displayName="StackDivider";class rn{_intl;constructor(t){this._intl=t.intl}greet(t){return this._intl.formatMessage({id:"greetingService.greeting"},{name:t})}}const sn={"i18n-howto-app":{name:"i18n-howto-app",services:{GreetingService:{name:"GreetingService",clazz:rn,provides:[{name:"i18n-howto-app.GreetingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"i18n-howto-app.GreetingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},an="",on=["de","en"];function ln(e){switch(e){case"de":return Ue(()=>import("./C5d3TNoZsHGp.js"),[],import.meta.url).then(t=>t.default);case"en":return Ue(()=>import("./C0n1onxljylL.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${e}'`)}const un=gt(an),cn=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:ln,locales:on,packages:sn,styles:un},Symbol.toStringTag,{value:"Module"})),lt="i18n-howto-app",dn=vt.bind(void 0,lt),ne=xt.bind(void 0,lt);function mn(){const e=ne();return n.jsxs(Pt,{children:[n.jsx(te,{as:"h1",size:"lg",children:e.formatMessage({id:"heading"})}),n.jsx(L,{children:e.formatMessage({id:"text"})}),n.jsx(pn,{})]})}function pn(){return n.jsxs(Me,{mb:5,mt:5,divider:n.jsx(it,{borderColor:"gray.200"}),spacing:"24px",align:"stretch",children:[n.jsx(oe,{bg:"white",w:"100%",p:4,color:"black",borderWidth:"1px",borderColor:"black",children:n.jsx(fn,{})}),n.jsx(oe,{bg:"white",w:"100%",p:4,color:"black",borderWidth:"1px",borderColor:"black",children:n.jsx(hn,{})}),n.jsx(oe,{bg:"white",w:"100%",p:4,color:"black",borderWidth:"1px",borderColor:"black",children:n.jsx(bn,{})}),n.jsx(oe,{bg:"white",w:"100%",p:4,color:"black",borderWidth:"1px",borderColor:"black",children:n.jsx(gn,{})}),n.jsx(oe,{bg:"white",w:"100%",p:4,color:"black",borderWidth:"1px",borderColor:"black",children:n.jsx(vn,{})}),n.jsx(oe,{bg:"white",w:"100%",p:4,color:"black",borderWidth:"1px",borderColor:"black",children:n.jsx(xn,{})})]})}function fn(){const e=ne(),[t,r]=a.useState("");return n.jsxs(n.Fragment,{children:[n.jsx(te,{as:"h4",size:"md",children:e.formatMessage({id:"interpolation.heading"})}),n.jsx(ue,{value:t,onChange:o=>r(o.target.value),placeholder:e.formatMessage({id:"interpolation.placeholder"}),size:"sm"}),n.jsx(L,{mb:"8px",children:e.formatMessage({id:"interpolation.value"},{name:t})})]})}function hn(){const e=ne(),[t,r]=a.useState("1");return n.jsxs(n.Fragment,{children:[n.jsx(te,{as:"h4",size:"md",children:e.formatMessage({id:"plurals.heading"})}),n.jsx(Fe,{onChange:r,value:t,children:n.jsxs(Me,{spacing:4,direction:"row",children:[n.jsx(H,{size:"md",value:"0",children:"0"}),n.jsx(H,{size:"md",value:"1",children:"1"}),n.jsx(H,{size:"md",value:"42",children:"42"}),n.jsx(H,{size:"md",value:"99",children:"99"})]})}),n.jsx(L,{mb:"8px",children:e.formatMessage({id:"plurals.value"},{n:t})})]})}function bn(){const e=ne(),[t,r]=a.useState(""),[o,l]=a.useState("male");return n.jsxs(n.Fragment,{children:[n.jsx(te,{as:"h4",size:"md",children:e.formatMessage({id:"selection.heading"})}),n.jsx(ue,{value:t,onChange:i=>r(i.target.value),placeholder:e.formatMessage({id:"interpolation.placeholder"}),size:"sm"}),n.jsx(Fe,{onChange:l,value:o,children:n.jsxs(Me,{spacing:4,direction:"row",children:[n.jsx(H,{size:"md",value:"female",children:e.formatMessage({id:"selection.gender.female"})}),n.jsx(H,{size:"md",value:"male",children:e.formatMessage({id:"selection.gender.male"})}),n.jsx(H,{size:"md",value:"other",children:e.formatMessage({id:"selection.gender.other"})})]})}),n.jsx(L,{mb:"8px",children:e.formatMessage({id:"selection.value"},{name:t,gender:o})})]})}function gn(){const e=ne(),[t,r]=a.useState("424224.24");return n.jsxs(n.Fragment,{children:[n.jsx(te,{as:"h4",size:"md",children:e.formatMessage({id:"numberformat.heading"})}),n.jsxs(et,{onChange:o=>r(o),value:t,precision:2,step:.25,children:[n.jsx(nt,{}),n.jsxs(tt,{children:[n.jsx(at,{}),n.jsx(st,{})]})]}),n.jsxs(L,{mb:"8px",children:[e.formatMessage({id:"numberformat.example.currency1"}),e.formatNumber(+t,{style:"currency",currency:"EUR"})]}),n.jsxs(L,{mb:"8px",children:[e.formatMessage({id:"numberformat.example.currency2"}),e.formatNumber(+t,{style:"currency",currency:"EUR",currencyDisplay:"name"})]}),n.jsxs(L,{mb:"8px",children:[e.formatMessage({id:"numberformat.example.unit1"}),e.formatNumber(+t,{style:"unit",unit:"terabyte-per-second"})]}),n.jsxs(L,{mb:"8px",children:[e.formatMessage({id:"numberformat.example.unit2"}),e.formatNumber(+t,{style:"unit",unit:"terabyte-per-second",unitDisplay:"long"})]})]})}function vn(){const e=ne(),[t,r]=a.useState("2023-02-19T19:02");return n.jsxs(n.Fragment,{children:[n.jsx(te,{as:"h4",size:"md",children:e.formatMessage({id:"datetimeformat.heading"})}),n.jsx(ue,{value:t,onChange:o=>r(o.target.value),size:"md",type:"datetime-local"}),n.jsxs(L,{mb:"8px",children:[e.formatMessage({id:"datetimeformat.timelabel"}),e.formatDate(t,{dateStyle:"full",timeStyle:"short"})]}),n.jsxs(L,{mb:"8px",children:[e.formatMessage({id:"datetimeformat.relativetimelabel"}),e.formatRelativeTime(yn(t),"minute",{numeric:"auto",style:"long"})]})]})}function xn(){const e=ne(),t=dn("i18n-howto-app.GreetingService"),[r,o]=a.useState(""),[l,i]=a.useState("");return n.jsxs(n.Fragment,{children:[n.jsx(te,{as:"h4",size:"md",children:e.formatMessage({id:"serviceI18n.heading"})}),n.jsxs(wt,{as:"form",onSubmit:u=>{u.preventDefault();const d=r.trim();i(d?t.greet(d):"")},children:[n.jsx(ue,{placeholder:e.formatMessage({id:"serviceI18n.placeholder"}),value:r,onChange:u=>o(u.target.value),size:"md"}),n.jsx(It,{type:"submit",flexShrink:0,children:e.formatMessage({id:"serviceI18n.showGreeting"})})]}),l&&n.jsxs(L,{children:[e.formatMessage({id:"serviceI18n.serviceResponse"})," ",l]})]})}function yn(e){const t=new Date(e).getTime()-new Date().getTime();return Math.round(t/6e4)}const Cn=new URLSearchParams(window.location.search),Sn=Cn.get("lang")||void 0,kn=yt({component:mn,appMetadata:cn,config:{locale:Sn}});customElements.define("i18n-howto",kn); diff --git a/starter/docs/functions/SimpleUiComponent.html b/starter/docs/functions/SimpleUiComponent.html index f57b3968b..622312106 100644 --- a/starter/docs/functions/SimpleUiComponent.html +++ b/starter/docs/functions/SimpleUiComponent.html @@ -1,2 +1,2 @@ SimpleUiComponent | sample-package - v0.0.0

Function SimpleUiComponent

+

Returns ReactNode

diff --git a/starter/docs/interfaces/Greeter.html b/starter/docs/interfaces/Greeter.html index 37788aa89..090133e5b 100644 --- a/starter/docs/interfaces/Greeter.html +++ b/starter/docs/interfaces/Greeter.html @@ -1,4 +1,4 @@ Greeter | sample-package - v0.0.0

Interface Greeter

The greeter produces a greeting message.

-
interface Greeter {
    greet(): string;
}

Hierarchy

  • DeclaredService<"sample-package.Greeter">
    • Greeter

Methods

interface Greeter {
    greet(): string;
}

Hierarchy

  • DeclaredService<"sample-package.Greeter">
    • Greeter

Methods

Methods

+

Returns string

diff --git a/starter/docs/interfaces/SimpleUiComponentProps.html b/starter/docs/interfaces/SimpleUiComponentProps.html index c11dfd1a5..9f2c2b4dc 100644 --- a/starter/docs/interfaces/SimpleUiComponentProps.html +++ b/starter/docs/interfaces/SimpleUiComponentProps.html @@ -1,2 +1,2 @@ -SimpleUiComponentProps | sample-package - v0.0.0

Interface SimpleUiComponentProps

interface SimpleUiComponentProps {
    textToShow: string;
}

Hierarchy

  • CommonComponentProps
    • SimpleUiComponentProps

Properties

Properties

textToShow: string
+SimpleUiComponentProps | sample-package - v0.0.0

Interface SimpleUiComponentProps

interface SimpleUiComponentProps {
    textToShow: string;
}

Hierarchy

  • CommonComponentProps
    • SimpleUiComponentProps

Properties

Properties

textToShow: string
diff --git a/starter/samples/i18n-howto/index.html b/starter/samples/i18n-howto/index.html index 3277a8da0..1e9309904 100644 --- a/starter/samples/i18n-howto/index.html +++ b/starter/samples/i18n-howto/index.html @@ -4,10 +4,10 @@ I18n HowTo - - - - + + + + diff --git a/starter/samples/map-sample/index.html b/starter/samples/map-sample/index.html index 81ff4090e..6cd258288 100644 --- a/starter/samples/map-sample/index.html +++ b/starter/samples/map-sample/index.html @@ -15,10 +15,10 @@ max-height: 100%; } - - - - + + + + diff --git a/starter/sites/empty/index.html b/starter/sites/empty/index.html index 623e4b342..d7ca7d837 100644 --- a/starter/sites/empty/index.html +++ b/starter/sites/empty/index.html @@ -4,10 +4,10 @@ Empty Site - - - - + + + +