diff --git a/assets/index-DTi1mb9q.js b/assets/index-DECkXyx6.js similarity index 99% rename from assets/index-DTi1mb9q.js rename to assets/index-DECkXyx6.js index 6ece104..3cb1741 100644 --- a/assets/index-DTi1mb9q.js +++ b/assets/index-DECkXyx6.js @@ -37,4 +37,4 @@ `+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{Pl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Sn(e):""}function Zc(e){switch(e.tag){case 5:return Sn(e.type);case 16:return Sn("Lazy");case 13:return Sn("Suspense");case 19:return Sn("SuspenseList");case 0:case 2:case 15:return e=Ll(e.type,!1),e;case 11:return e=Ll(e.type.render,!1),e;case 1:return e=Ll(e.type,!0),e;default:return""}}function no(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 Ft:return"Fragment";case Dt:return"Portal";case bl:return"Profiler";case qo:return"StrictMode";case eo:return"Suspense";case to:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _s:return(e.displayName||"Context")+".Consumer";case ks:return(e._context.displayName||"Context")+".Provider";case bo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ei:return t=e.displayName||null,t!==null?t:no(e.type)||"Memo";case Je:t=e._payload,e=e._init;try{return no(e(t))}catch{}}return null}function Gc(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 no(t);case 8:return t===qo?"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 ft(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Cs(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xc(e){var t=Cs(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ir(e){e._valueTracker||(e._valueTracker=Xc(e))}function xs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Cs(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Dr(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 ro(e,t){var n=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ft(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ps(e,t){t=t.checked,t!=null&&Jo(e,"checked",t,!1)}function lo(e,t){Ps(e,t);var n=ft(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?oo(e,t.type,n):t.hasOwnProperty("defaultValue")&&oo(e,t.type,ft(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function oo(e,t,n){(t!=="number"||Dr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var kn=Array.isArray;function Kt(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=ur.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Dn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cn={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},Jc=["Webkit","ms","Moz","O"];Object.keys(Cn).forEach(function(e){Jc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cn[t]=Cn[e]})});function Ts(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cn.hasOwnProperty(e)&&Cn[e]?(""+t).trim():t+"px"}function Rs(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Ts(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var qc=V({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 so(e,t){if(t){if(qc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(y(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(y(61))}if(t.style!=null&&typeof t.style!="object")throw Error(y(62))}}function ao(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 co=null;function ti(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fo=null,Yt=null,Zt=null;function Ji(e){if(e=bn(e)){if(typeof fo!="function")throw Error(y(280));var t=e.stateNode;t&&(t=al(t),fo(e.stateNode,e.type,t))}}function Ms(e){Yt?Zt?Zt.push(e):Zt=[e]:Yt=e}function Os(){if(Yt){var e=Yt,t=Zt;if(Zt=Yt=null,Ji(e),t)for(e=0;e>>=0,e===0?32:31-(cf(e)/ff|0)|0}var sr=64,ar=4194304;function _n(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 Ur(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var u=i&~l;u!==0?r=_n(u):(o&=i,o!==0&&(r=_n(o)))}else i=n&~l,i!==0?r=_n(i):o!==0&&(r=_n(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Jn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Re(t),e[t]=n}function hf(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0=Pn),iu=" ",uu=!1;function bs(e,t){switch(e){case"keyup":return Hf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ea(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var It=!1;function Qf(e,t){switch(e){case"compositionend":return ea(t);case"keypress":return t.which!==32?null:(uu=!0,iu);case"textInput":return e=t.data,e===iu&&uu?null:e;default:return null}}function Kf(e,t){if(It)return e==="compositionend"||!ai&&bs(e,t)?(e=Js(),Cr=ii=tt=null,It=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=fu(n)}}function la(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?la(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function oa(){for(var e=window,t=Dr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Dr(e.document)}return t}function ci(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 td(e){var t=oa(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&la(n.ownerDocument.documentElement,n)){if(r!==null&&ci(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=du(n,o);var i=du(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,jt=null,go=null,Nn=null,wo=!1;function pu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wo||jt==null||jt!==Dr(r)||(r=jt,"selectionStart"in r&&ci(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nn&&$n(Nn,r)||(Nn=r,r=Vr(go,"onSelect"),0$t||(e.current=xo[$t],xo[$t]=null,$t--)}function F(e,t){$t++,xo[$t]=e.current,e.current=t}var dt={},le=mt(dt),fe=mt(!1),xt=dt;function bt(e,t){var n=e.type.contextTypes;if(!n)return dt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function de(e){return e=e.childContextTypes,e!=null}function Hr(){j(fe),j(le)}function Su(e,t,n){if(le.current!==dt)throw Error(y(168));F(le,t),F(fe,n)}function ma(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(y(108,Gc(e)||"Unknown",l));return V({},n,r)}function Wr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||dt,xt=le.current,F(le,e),F(fe,fe.current),!0}function ku(e,t,n){var r=e.stateNode;if(!r)throw Error(y(169));n?(e=ma(e,t,xt),r.__reactInternalMemoizedMergedChildContext=e,j(fe),j(le),F(le,e)):j(fe),F(fe,n)}var $e=null,cl=!1,Vl=!1;function ha(e){$e===null?$e=[e]:$e.push(e)}function pd(e){cl=!0,ha(e)}function ht(){if(!Vl&&$e!==null){Vl=!0;var e=0,t=O;try{var n=$e;for(O=1;e>=i,l-=i,Be=1<<32-Re(t)+l|n<L?(H=x,x=null):H=x.sibling;var R=p(f,x,d[L],v);if(R===null){x===null&&(x=H);break}e&&x&&R.alternate===null&&t(f,x),c=o(R,c,L),C===null?S=R:C.sibling=R,C=R,x=H}if(L===d.length)return n(f,x),U&>(f,L),S;if(x===null){for(;LL?(H=x,x=null):H=x.sibling;var Pe=p(f,x,R.value,v);if(Pe===null){x===null&&(x=H);break}e&&x&&Pe.alternate===null&&t(f,x),c=o(Pe,c,L),C===null?S=Pe:C.sibling=Pe,C=Pe,x=H}if(R.done)return n(f,x),U&>(f,L),S;if(x===null){for(;!R.done;L++,R=d.next())R=h(f,R.value,v),R!==null&&(c=o(R,c,L),C===null?S=R:C.sibling=R,C=R);return U&>(f,L),S}for(x=r(f,x);!R.done;L++,R=d.next())R=g(x,f,L,R.value,v),R!==null&&(e&&R.alternate!==null&&x.delete(R.key===null?L:R.key),c=o(R,c,L),C===null?S=R:C.sibling=R,C=R);return e&&x.forEach(function(cn){return t(f,cn)}),U&>(f,L),S}function D(f,c,d,v){if(typeof d=="object"&&d!==null&&d.type===Ft&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case or:e:{for(var S=d.key,C=c;C!==null;){if(C.key===S){if(S=d.type,S===Ft){if(C.tag===7){n(f,C.sibling),c=l(C,d.props.children),c.return=f,f=c;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Je&&Cu(S)===C.type){n(f,C.sibling),c=l(C,d.props),c.ref=yn(f,C,d),c.return=f,f=c;break e}n(f,C);break}else t(f,C);C=C.sibling}d.type===Ft?(c=Ct(d.props.children,f.mode,v,d.key),c.return=f,f=c):(v=Mr(d.type,d.key,d.props,null,f.mode,v),v.ref=yn(f,c,d),v.return=f,f=v)}return i(f);case Dt:e:{for(C=d.key;c!==null;){if(c.key===C)if(c.tag===4&&c.stateNode.containerInfo===d.containerInfo&&c.stateNode.implementation===d.implementation){n(f,c.sibling),c=l(c,d.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else t(f,c);c=c.sibling}c=Gl(d,f.mode,v),c.return=f,f=c}return i(f);case Je:return C=d._init,D(f,c,C(d._payload),v)}if(kn(d))return w(f,c,d,v);if(dn(d))return k(f,c,d,v);vr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,c!==null&&c.tag===6?(n(f,c.sibling),c=l(c,d),c.return=f,f=c):(n(f,c),c=Zl(d,f.mode,v),c.return=f,f=c),i(f)):n(f,c)}return D}var tn=wa(!0),Sa=wa(!1),Yr=mt(null),Zr=null,Ht=null,mi=null;function hi(){mi=Ht=Zr=null}function vi(e){var t=Yr.current;j(Yr),e._currentValue=t}function No(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Xt(e,t){Zr=e,mi=Ht=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ce=!0),e.firstContext=null)}function Ce(e){var t=e._currentValue;if(mi!==e)if(e={context:e,memoizedValue:t,next:null},Ht===null){if(Zr===null)throw Error(y(308));Ht=e,Zr.dependencies={lanes:0,firstContext:e}}else Ht=Ht.next=e;return t}var kt=null;function yi(e){kt===null?kt=[e]:kt.push(e)}function ka(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,yi(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ye(e,r)}function Ye(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var qe=!1;function gi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _a(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 We(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ut(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,M&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ye(e,n)}return l=r.interleaved,l===null?(t.next=t,yi(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ye(e,n)}function Pr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ri(e,n)}}function xu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Gr(e,t,n,r){var l=e.updateQueue;qe=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var s=u,a=s.next;s.next=null,i===null?o=a:i.next=a,i=s;var m=e.alternate;m!==null&&(m=m.updateQueue,u=m.lastBaseUpdate,u!==i&&(u===null?m.firstBaseUpdate=a:u.next=a,m.lastBaseUpdate=s))}if(o!==null){var h=l.baseState;i=0,m=a=s=null,u=o;do{var p=u.lane,g=u.eventTime;if((r&p)===p){m!==null&&(m=m.next={eventTime:g,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var w=e,k=u;switch(p=t,g=n,k.tag){case 1:if(w=k.payload,typeof w=="function"){h=w.call(g,h,p);break e}h=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=k.payload,p=typeof w=="function"?w.call(g,h,p):w,p==null)break e;h=V({},h,p);break e;case 2:qe=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[u]:p.push(u))}else g={eventTime:g,lane:p,tag:u.tag,payload:u.payload,callback:u.callback,next:null},m===null?(a=m=g,s=h):m=m.next=g,i|=p;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;p=u,u=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(m===null&&(s=h),l.baseState=s,l.firstBaseUpdate=a,l.lastBaseUpdate=m,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);Nt|=i,e.lanes=i,e.memoizedState=h}}function Pu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Hl.transition;Hl.transition={};try{e(!1),t()}finally{O=n,Hl.transition=r}}function Aa(){return xe().memoizedState}function yd(e,t,n){var r=at(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},$a(e))Va(t,n);else if(n=ka(e,t,n,r),n!==null){var l=ie();Me(n,e,r,l),Ba(n,t,r)}}function gd(e,t,n){var r=at(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if($a(e))Va(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,u=o(i,n);if(l.hasEagerState=!0,l.eagerState=u,Oe(u,i)){var s=t.interleaved;s===null?(l.next=l,yi(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=ka(e,t,l,r),n!==null&&(l=ie(),Me(n,e,r,l),Ba(n,t,r))}}function $a(e){var t=e.alternate;return e===$||t!==null&&t===$}function Va(e,t){zn=Jr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ba(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ri(e,n)}}var qr={readContext:Ce,useCallback:te,useContext:te,useEffect:te,useImperativeHandle:te,useInsertionEffect:te,useLayoutEffect:te,useMemo:te,useReducer:te,useRef:te,useState:te,useDebugValue:te,useDeferredValue:te,useTransition:te,useMutableSource:te,useSyncExternalStore:te,useId:te,unstable_isNewReconciler:!1},wd={readContext:Ce,useCallback:function(e,t){return Fe().memoizedState=[e,t===void 0?null:t],e},useContext:Ce,useEffect:Nu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Nr(4194308,4,Da.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Nr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Nr(4,2,e,t)},useMemo:function(e,t){var n=Fe();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Fe();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=yd.bind(null,$,e),[r.memoizedState,e]},useRef:function(e){var t=Fe();return e={current:e},t.memoizedState=e},useState:Lu,useDebugValue:Pi,useDeferredValue:function(e){return Fe().memoizedState=e},useTransition:function(){var e=Lu(!1),t=e[0];return e=vd.bind(null,e[1]),Fe().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=$,l=Fe();if(U){if(n===void 0)throw Error(y(407));n=n()}else{if(n=t(),J===null)throw Error(y(349));Lt&30||Pa(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Nu(Na.bind(null,r,o,e),[e]),r.flags|=2048,Zn(9,La.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Fe(),t=J.identifierPrefix;if(U){var n=He,r=Be;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Kn++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Ie]=t,e[Hn]=r,qa(e,t,!1,!1),t.stateNode=e;e:{switch(i=ao(n,r),n){case"dialog":I("cancel",e),I("close",e),l=r;break;case"iframe":case"object":case"embed":I("load",e),l=r;break;case"video":case"audio":for(l=0;lln&&(t.flags|=128,r=!0,gn(o,!1),t.lanes=4194304)}else{if(!r)if(e=Xr(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),gn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!U)return ne(t),null}else 2*Q()-o.renderingStartTime>ln&&n!==1073741824&&(t.flags|=128,r=!0,gn(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Q(),t.sibling=null,n=A.current,F(A,r?n&1|2:n&1),t):(ne(t),null);case 22:case 23:return Mi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?me&1073741824&&(ne(t),t.subtreeFlags&6&&(t.flags|=8192)):ne(t),null;case 24:return null;case 25:return null}throw Error(y(156,t.tag))}function Ld(e,t){switch(di(t),t.tag){case 1:return de(t.type)&&Hr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nn(),j(fe),j(le),ki(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Si(t),null;case 13:if(j(A),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(y(340));en()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(A),null;case 4:return nn(),null;case 10:return vi(t.type._context),null;case 22:case 23:return Mi(),null;case 24:return null;default:return null}}var gr=!1,re=!1,Nd=typeof WeakSet=="function"?WeakSet:Set,_=null;function Wt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){B(e,t,r)}else n.current=null}function jo(e,t,n){try{n()}catch(r){B(e,t,r)}}var Au=!1;function zd(e,t){if(So=Ar,e=oa(),ci(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,u=-1,s=-1,a=0,m=0,h=e,p=null;t:for(;;){for(var g;h!==n||l!==0&&h.nodeType!==3||(u=i+l),h!==o||r!==0&&h.nodeType!==3||(s=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(g=h.firstChild)!==null;)p=h,h=g;for(;;){if(h===e)break t;if(p===n&&++a===l&&(u=i),p===o&&++m===r&&(s=i),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=g}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(ko={focusedElem:e,selectionRange:n},Ar=!1,_=t;_!==null;)if(t=_,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_=e;else for(;_!==null;){t=_;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var k=w.memoizedProps,D=w.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?k:Ne(t.type,k),D);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(v){B(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,_=e;break}_=t.return}return w=Au,Au=!1,w}function Tn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&jo(t,n,o)}l=l.next}while(l!==r)}}function pl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Uo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function tc(e){var t=e.alternate;t!==null&&(e.alternate=null,tc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ie],delete t[Hn],delete t[Co],delete t[fd],delete t[dd])),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 nc(e){return e.tag===5||e.tag===3||e.tag===4}function $u(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nc(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 Ao(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Br));else if(r!==4&&(e=e.child,e!==null))for(Ao(e,t,n),e=e.sibling;e!==null;)Ao(e,t,n),e=e.sibling}function $o(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($o(e,t,n),e=e.sibling;e!==null;)$o(e,t,n),e=e.sibling}var q=null,ze=!1;function Xe(e,t,n){for(n=n.child;n!==null;)rc(e,t,n),n=n.sibling}function rc(e,t,n){if(je&&typeof je.onCommitFiberUnmount=="function")try{je.onCommitFiberUnmount(ol,n)}catch{}switch(n.tag){case 5:re||Wt(n,t);case 6:var r=q,l=ze;q=null,Xe(e,t,n),q=r,ze=l,q!==null&&(ze?(e=q,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):q.removeChild(n.stateNode));break;case 18:q!==null&&(ze?(e=q,n=n.stateNode,e.nodeType===8?$l(e.parentNode,n):e.nodeType===1&&$l(e,n),Un(e)):$l(q,n.stateNode));break;case 4:r=q,l=ze,q=n.stateNode.containerInfo,ze=!0,Xe(e,t,n),q=r,ze=l;break;case 0:case 11:case 14:case 15:if(!re&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&jo(n,t,i),l=l.next}while(l!==r)}Xe(e,t,n);break;case 1:if(!re&&(Wt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){B(n,t,u)}Xe(e,t,n);break;case 21:Xe(e,t,n);break;case 22:n.mode&1?(re=(r=re)||n.memoizedState!==null,Xe(e,t,n),re=r):Xe(e,t,n);break;default:Xe(e,t,n)}}function Vu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Nd),t.forEach(function(r){var l=Ud.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Le(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=Q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Rd(r/1960))-r,10e?16:e,nt===null)var r=!1;else{if(e=nt,nt=null,tl=0,M&6)throw Error(y(331));var l=M;for(M|=4,_=e.current;_!==null;){var o=_,i=o.child;if(_.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sQ()-Ti?Et(e,0):zi|=n),pe(e,t)}function fc(e,t){t===0&&(e.mode&1?(t=ar,ar<<=1,!(ar&130023424)&&(ar=4194304)):t=1);var n=ie();e=Ye(e,t),e!==null&&(Jn(e,t,n),pe(e,n))}function jd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),fc(e,n)}function Ud(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(t),fc(e,n)}var dc;dc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fe.current)ce=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ce=!1,xd(e,t,n);ce=!!(e.flags&131072)}else ce=!1,U&&t.flags&1048576&&va(t,Kr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zr(e,t),e=t.pendingProps;var l=bt(t,le.current);Xt(t,n),l=Ei(null,t,r,e,l,n);var o=Ci();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,de(r)?(o=!0,Wr(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,gi(t),l.updater=dl,t.stateNode=l,l._reactInternals=t,To(t,r,e,n),t=Oo(null,t,r,!0,o,n)):(t.tag=0,U&&o&&fi(t),oe(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=$d(r),e=Ne(r,e),l){case 0:t=Mo(null,t,r,e,n);break e;case 1:t=Iu(null,t,r,e,n);break e;case 11:t=Du(null,t,r,e,n);break e;case 14:t=Fu(null,t,r,Ne(r.type,e),n);break e}throw Error(y(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ne(r,l),Mo(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ne(r,l),Iu(e,t,r,l,n);case 3:e:{if(Ga(t),e===null)throw Error(y(387));r=t.pendingProps,o=t.memoizedState,l=o.element,_a(e,t),Gr(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=rn(Error(y(423)),t),t=ju(e,t,r,n,l);break e}else if(r!==l){l=rn(Error(y(424)),t),t=ju(e,t,r,n,l);break e}else for(he=it(t.stateNode.containerInfo.firstChild),ve=t,U=!0,Te=null,n=Sa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(en(),r===l){t=Ze(e,t,n);break e}oe(e,t,r,n)}t=t.child}return t;case 5:return Ea(t),e===null&&Lo(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,_o(r,l)?i=null:o!==null&&_o(r,o)&&(t.flags|=32),Za(e,t),oe(e,t,i,n),t.child;case 6:return e===null&&Lo(t),null;case 13:return Xa(e,t,n);case 4:return wi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tn(t,null,r,n):oe(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ne(r,l),Du(e,t,r,l,n);case 7:return oe(e,t,t.pendingProps,n),t.child;case 8:return oe(e,t,t.pendingProps.children,n),t.child;case 12:return oe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,F(Yr,r._currentValue),r._currentValue=i,o!==null)if(Oe(o.value,i)){if(o.children===l.children&&!fe.current){t=Ze(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=We(-1,n&-n),s.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var m=a.pending;m===null?s.next=s:(s.next=m.next,m.next=s),a.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),No(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(y(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),No(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}oe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Xt(t,n),l=Ce(l),r=r(l),t.flags|=1,oe(e,t,r,n),t.child;case 14:return r=t.type,l=Ne(r,t.pendingProps),l=Ne(r.type,l),Fu(e,t,r,l,n);case 15:return Ka(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ne(r,l),zr(e,t),t.tag=1,de(r)?(e=!0,Wr(t)):e=!1,Xt(t,n),Ha(t,r,l),To(t,r,l,n),Oo(null,t,r,!0,e,n);case 19:return Ja(e,t,n);case 22:return Ya(e,t,n)}throw Error(y(156,t.tag))};function pc(e,t){return $s(e,t)}function Ad(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _e(e,t,n,r){return new Ad(e,t,n,r)}function Di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $d(e){if(typeof e=="function")return Di(e)?1:0;if(e!=null){if(e=e.$$typeof,e===bo)return 11;if(e===ei)return 14}return 2}function ct(e,t){var n=e.alternate;return n===null?(n=_e(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Mr(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Di(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ft:return Ct(n.children,l,o,t);case qo:i=8,l|=8;break;case bl:return e=_e(12,n,t,l|2),e.elementType=bl,e.lanes=o,e;case eo:return e=_e(13,n,t,l),e.elementType=eo,e.lanes=o,e;case to:return e=_e(19,n,t,l),e.elementType=to,e.lanes=o,e;case Es:return hl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ks:i=10;break e;case _s:i=9;break e;case bo:i=11;break e;case ei:i=14;break e;case Je:i=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return t=_e(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Ct(e,t,n,r){return e=_e(7,e,r,t),e.lanes=n,e}function hl(e,t,n,r){return e=_e(22,e,r,t),e.elementType=Es,e.lanes=n,e.stateNode={isHidden:!1},e}function Zl(e,t,n){return e=_e(6,e,null,t),e.lanes=n,e}function Gl(e,t,n){return t=_e(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vd(e,t,n,r,l){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=zl(0),this.expirationTimes=zl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Fi(e,t,n,r,l,o,i,u,s){return e=new Vd(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=_e(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gi(o),e}function Bd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yc)}catch(e){console.error(e)}}yc(),ys.exports=ge;var Ai=ys.exports,Gu=Ai;Jl.createRoot=Gu.createRoot,Jl.hydrateRoot=Gu.hydrateRoot;const Yd="modulepreload",Zd=function(e){return"/charites-ai/"+e},Xu={},Gd=function(t,n,r){let l=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),u=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));l=Promise.all(n.map(s=>{if(s=Zd(s),s in Xu)return;Xu[s]=!0;const a=s.endsWith(".css"),m=a?'[rel="stylesheet"]':"";if(!!r)for(let g=o.length-1;g>=0;g--){const w=o[g];if(w.href===s&&(!a||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${m}`))return;const p=document.createElement("link");if(p.rel=a?"stylesheet":Yd,a||(p.as="script",p.crossOrigin=""),p.href=s,u&&p.setAttribute("nonce",u),document.head.appendChild(p),a)return new Promise((g,w)=>{p.addEventListener("load",g),p.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${s}`)))})}))}return l.then(()=>t()).catch(o=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o})},Xd=P.createContext(null);function Jd(e,t){const n=Array.isArray(e)?e[0]:e?e.x:0,r=Array.isArray(e)?e[1]:e?e.y:0,l=Array.isArray(t)?t[0]:t?t.x:0,o=Array.isArray(t)?t[1]:t?t.y:0;return n===l&&r===o}function Ve(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n{let l=null;"interactive"in r&&(l=Object.assign({},r),delete l.interactive);const o=t[r.ref];if(o){l=l||Object.assign({},r),delete l.ref;for(const i of bd)i in o&&(l[i]=o[i])}return l||r});return{...e,layers:n}}var ts={};const ns={version:8,sources:{},layers:[]},rs={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},Xl={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},ls={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},ep=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],tp=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class on{constructor(t,n,r){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=l=>{const o=this.props[ls[l.type]];o?o(l):l.type==="error"&&console.error(l.error)},this._onPointerEvent=l=>{(l.type==="mousemove"||l.type==="mouseout")&&this._updateHover(l);const o=this.props[rs[l.type]];o&&(this.props.interactiveLayerIds&&l.type!=="mouseover"&&l.type!=="mouseout"&&(l.features=this._hoveredFeatures||this._queryRenderedFeatures(l.point)),o(l),delete l.features)},this._onCameraEvent=l=>{if(!this._internalUpdate){const o=this.props[Xl[l.type]];o&&o(l)}l.type in this._deferredEvents&&(this._deferredEvents[l.type]=!1)},this._MapClass=t,this.props=n,this._initialize(r)}get map(){return this._map}get transform(){return this._renderTransform}setProps(t){const n=this.props;this.props=t;const r=this._updateSettings(t,n);r&&this._createShadowTransform(this._map);const l=this._updateSize(t),o=this._updateViewState(t,!0);this._updateStyle(t,n),this._updateStyleComponents(t,n),this._updateHandlers(t,n),(r||l||o&&!this._map.isMoving())&&this.redraw()}static reuse(t,n){const r=on.savedMaps.pop();if(!r)return null;const l=r.map,o=l.getContainer();for(n.className=o.className;o.childNodes.length>0;)n.appendChild(o.childNodes[0]);l._container=n;const i=l._resizeObserver;i&&(i.disconnect(),i.observe(n)),r.setProps({...t,styleDiffing:!1}),l.resize();const{initialViewState:u}=t;return u&&(u.bounds?l.fitBounds(u.bounds,{...u.fitBoundsOptions,duration:0}):r._updateViewState(u,!1)),l.isStyleLoaded()?l.fire("load"):l.once("styledata",()=>l.fire("load")),l._update(),r}_initialize(t){const{props:n}=this,{mapStyle:r=ns}=n,l={...n,...n.initialViewState,accessToken:n.mapboxAccessToken||np()||null,container:t,style:es(r)},o=l.initialViewState||l.viewState||l;if(Object.assign(l,{center:[o.longitude||0,o.latitude||0],zoom:o.zoom||0,pitch:o.pitch||0,bearing:o.bearing||0}),n.gl){const m=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=m,n.gl)}const i=new this._MapClass(l);o.padding&&i.setPadding(o.padding),n.cursor&&(i.getCanvas().style.cursor=n.cursor),this._createShadowTransform(i);const u=i._render;i._render=m=>{this._inRender=!0,u.call(i,m),this._inRender=!1};const s=i._renderTaskQueue.run;i._renderTaskQueue.run=m=>{s.call(i._renderTaskQueue,m),this._onBeforeRepaint()},i.on("render",()=>this._onAfterRepaint());const a=i.fire;i.fire=this._fireEvent.bind(this,a),i.on("resize",()=>{this._renderTransform.resize(i.transform.width,i.transform.height)}),i.on("styledata",()=>{this._updateStyleComponents(this.props,{}),Ju(i.transform,this._renderTransform)}),i.on("sourcedata",()=>this._updateStyleComponents(this.props,{}));for(const m in rs)i.on(m,this._onPointerEvent);for(const m in Xl)i.on(m,this._onCameraEvent);for(const m in ls)i.on(m,this._onEvent);this._map=i}recycle(){const n=this.map.getContainer().querySelector("[mapboxgl-children]");n==null||n.remove(),on.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;!this._inRender&&t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_createShadowTransform(t){const n=qd(t.transform);t.painter.transform=n,this._renderTransform=n}_updateSize(t){const{viewState:n}=t;if(n){const r=this._map;if(n.width!==r.transform.width||n.height!==r.transform.height)return r.resize(),!0}return!1}_updateViewState(t,n){if(this._internalUpdate)return!1;const r=this._map,l=this._renderTransform,{zoom:o,pitch:i,bearing:u}=l,s=r.isMoving();s&&(l.cameraElevationReference="sea");const a=bu(l,{...qu(r.transform),...t});if(s&&(l.cameraElevationReference="ground"),a&&n){const m=this._deferredEvents;m.move=!0,m.zoom||(m.zoom=o!==l.zoom),m.rotate||(m.rotate=u!==l.bearing),m.pitch||(m.pitch=i!==l.pitch)}return s||bu(r.transform,t),a}_updateSettings(t,n){const r=this._map;let l=!1;for(const o of ep)if(o in t&&!Ve(t[o],n[o])){l=!0;const i=r[`set${o[0].toUpperCase()}${o.slice(1)}`];i==null||i.call(r,t[o])}return l}_updateStyle(t,n){if(t.cursor!==n.cursor&&(this._map.getCanvas().style.cursor=t.cursor||""),t.mapStyle!==n.mapStyle){const{mapStyle:r=ns,styleDiffing:l=!0}=t,o={diff:l};return"localIdeographFontFamily"in t&&(o.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(es(r),o),!0}return!1}_updateStyleComponents(t,n){const r=this._map;let l=!1;return r.isStyleLoaded()&&("light"in t&&r.setLight&&!Ve(t.light,n.light)&&(l=!0,r.setLight(t.light)),"fog"in t&&r.setFog&&!Ve(t.fog,n.fog)&&(l=!0,r.setFog(t.fog)),"terrain"in t&&r.setTerrain&&!Ve(t.terrain,n.terrain)&&(!t.terrain||r.getSource(t.terrain.source))&&(l=!0,r.setTerrain(t.terrain))),l}_updateHandlers(t,n){var r,l;const o=this._map;let i=!1;for(const u of tp){const s=(r=t[u])!==null&&r!==void 0?r:!0,a=(l=n[u])!==null&&l!==void 0?l:!0;Ve(s,a)||(i=!0,s?o[u].enable(s):o[u].disable())}return i}_queryRenderedFeatures(t){const n=this._map,r=n.transform,{interactiveLayerIds:l=[]}=this.props;try{return n.transform=this._renderTransform,n.queryRenderedFeatures(t,{layers:l.filter(n.getLayer.bind(n))})}catch{return[]}finally{n.transform=r}}_updateHover(t){var n;const{props:r}=this;if(r.interactiveLayerIds&&(r.onMouseMove||r.onMouseEnter||r.onMouseLeave)){const o=t.type,i=((n=this._hoveredFeatures)===null||n===void 0?void 0:n.length)>0,u=this._queryRenderedFeatures(t.point),s=u.length>0;!s&&i&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=u,s&&!i&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=o}else this._hoveredFeatures=null}_fireEvent(t,n,r){const l=this._map,o=l.transform,i=typeof n=="string"?n:n.type;return i==="move"&&this._updateViewState(this.props,!1),i in Xl&&(typeof n=="object"&&(n.viewState=qu(o)),this._map.isMoving())?(l.transform=this._renderTransform,t.call(l,n,r),l.transform=o,l):(t.call(l,n,r),l)}_onBeforeRepaint(){const t=this._map;this._internalUpdate=!0;for(const r in this._deferredEvents)this._deferredEvents[r]&&t.fire(r);this._internalUpdate=!1;const n=this._map.transform;t.transform=this._renderTransform,this._onAfterRepaint=()=>{Ju(this._renderTransform,n),t.transform=n}}}on.savedMaps=[];function np(){let e=null;if(typeof location<"u"){const t=/access_token=([^&\/]*)/.exec(location.search);e=t&&t[1]}try{e=e||ts.MapboxAccessToken}catch{}try{e=e||ts.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return e}const rp=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function lp(e){if(!e)return null;const t=e.map,n={getMap:()=>t,getCenter:()=>e.transform.center,getZoom:()=>e.transform.zoom,getBearing:()=>e.transform.bearing,getPitch:()=>e.transform.pitch,getPadding:()=>e.transform.padding,getBounds:()=>e.transform.getBounds(),project:r=>{const l=t.transform;t.transform=e.transform;const o=t.project(r);return t.transform=l,o},unproject:r=>{const l=t.transform;t.transform=e.transform;const o=t.unproject(r);return t.transform=l,o},queryTerrainElevation:(r,l)=>{const o=t.transform;t.transform=e.transform;const i=t.queryTerrainElevation(r,l);return t.transform=o,i},queryRenderedFeatures:(r,l)=>{const o=t.transform;t.transform=e.transform;const i=t.queryRenderedFeatures(r,l);return t.transform=o,i}};for(const r of op(t))!(r in n)&&!rp.includes(r)&&(n[r]=t[r].bind(t));return n}function op(e){const t=new Set;let n=e;for(;n;){for(const r of Object.getOwnPropertyNames(n))r[0]!=="_"&&typeof e[r]=="function"&&r!=="fire"&&r!=="setEventedParent"&&t.add(r);n=Object.getPrototypeOf(n)}return Array.from(t)}const ip=typeof document<"u"?P.useLayoutEffect:P.useEffect,up=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function sp(e,t){for(const r of up)r in t&&(e[r]=t[r]);const{RTLTextPlugin:n="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"}=t;n&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"&&e.setRTLTextPlugin(n,r=>{r&&console.error(r)},!0)}const Sl=P.createContext(null);function ap(e,t,n){const r=P.useContext(Xd),[l,o]=P.useState(null),i=P.useRef(),{current:u}=P.useRef({mapLib:null,map:null});P.useEffect(()=>{const m=e.mapLib;let h=!0,p;return Promise.resolve(m||n).then(g=>{if(!h)return;if(!g)throw new Error("Invalid mapLib");const w="Map"in g?g:g.default;if(!w.Map)throw new Error("Invalid mapLib");if(sp(w,e),!w.supported||w.supported(e))e.reuseMaps&&(p=on.reuse(e,i.current)),p||(p=new on(w.Map,e,i.current)),u.map=lp(p),u.mapLib=w,o(p),r==null||r.onMapMount(u.map,e.id);else throw new Error("Map is not supported by this browser")}).catch(g=>{const{onError:w}=e;w?w({type:"error",target:null,originalEvent:null,error:g}):console.error(g)}),()=>{h=!1,p&&(r==null||r.onMapUnmount(e.id),e.reuseMaps?p.recycle():p.destroy())}},[]),ip(()=>{l&&l.setProps(e)}),P.useImperativeHandle(t,()=>u.map,[l]);const s=P.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),a={height:"100%"};return P.createElement("div",{id:e.id,ref:i,style:s},l&&P.createElement(Sl.Provider,{value:u},P.createElement("div",{"mapboxgl-children":"",style:a},e.children)))}const cp=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function Mt(e,t){if(!e||!t)return;const n=e.style;for(const r in t){const l=t[r];Number.isFinite(l)&&!cp.test(r)?n[r]=`${l}px`:n[r]=l}}function fp(e,t){const{map:n,mapLib:r}=P.useContext(Sl),l=P.useRef({props:e});l.current.props=e;const o=P.useMemo(()=>{let k=!1;P.Children.forEach(e.children,c=>{c&&(k=!0)});const D={...e,element:k?document.createElement("div"):null},f=new r.Marker(D);return f.setLngLat([e.longitude,e.latitude]),f.getElement().addEventListener("click",c=>{var d,v;(v=(d=l.current.props).onClick)===null||v===void 0||v.call(d,{type:"click",target:f,originalEvent:c})}),f.on("dragstart",c=>{var d,v;const S=c;S.lngLat=o.getLngLat(),(v=(d=l.current.props).onDragStart)===null||v===void 0||v.call(d,S)}),f.on("drag",c=>{var d,v;const S=c;S.lngLat=o.getLngLat(),(v=(d=l.current.props).onDrag)===null||v===void 0||v.call(d,S)}),f.on("dragend",c=>{var d,v;const S=c;S.lngLat=o.getLngLat(),(v=(d=l.current.props).onDragEnd)===null||v===void 0||v.call(d,S)}),f},[]);P.useEffect(()=>(o.addTo(n.getMap()),()=>{o.remove()}),[]);const{longitude:i,latitude:u,offset:s,style:a,draggable:m=!1,popup:h=null,rotation:p=0,rotationAlignment:g="auto",pitchAlignment:w="auto"}=e;return P.useEffect(()=>{Mt(o.getElement(),a)},[a]),P.useImperativeHandle(t,()=>o,[]),(o.getLngLat().lng!==i||o.getLngLat().lat!==u)&&o.setLngLat([i,u]),s&&!Jd(o.getOffset(),s)&&o.setOffset(s),o.isDraggable()!==m&&o.setDraggable(m),o.getRotation()!==p&&o.setRotation(p),o.getRotationAlignment()!==g&&o.setRotationAlignment(g),o.getPitchAlignment()!==w&&o.setPitchAlignment(w),o.getPopup()!==h&&o.setPopup(h),Ai.createPortal(e.children,o.getElement())}P.memo(P.forwardRef(fp));function os(e){return new Set(e?e.trim().split(/\s+/):[])}function dp(e,t){const{map:n,mapLib:r}=P.useContext(Sl),l=P.useMemo(()=>document.createElement("div"),[]),o=P.useRef({props:e});o.current.props=e;const i=P.useMemo(()=>{const u={...e},s=new r.Popup(u);return s.setLngLat([e.longitude,e.latitude]),s.once("open",a=>{var m,h;(h=(m=o.current.props).onOpen)===null||h===void 0||h.call(m,a)}),s},[]);if(P.useEffect(()=>{const u=s=>{var a,m;(m=(a=o.current.props).onClose)===null||m===void 0||m.call(a,s)};return i.on("close",u),i.setDOMContent(l).addTo(n.getMap()),()=>{i.off("close",u),i.isOpen()&&i.remove()}},[]),P.useEffect(()=>{Mt(i.getElement(),e.style)},[e.style]),P.useImperativeHandle(t,()=>i,[]),i.isOpen()&&((i.getLngLat().lng!==e.longitude||i.getLngLat().lat!==e.latitude)&&i.setLngLat([e.longitude,e.latitude]),e.offset&&!Ve(i.options.offset,e.offset)&&i.setOffset(e.offset),(i.options.anchor!==e.anchor||i.options.maxWidth!==e.maxWidth)&&(i.options.anchor=e.anchor,i.setMaxWidth(e.maxWidth)),i.options.className!==e.className)){const u=os(i.options.className),s=os(e.className);for(const a of u)s.has(a)||i.removeClassName(a);for(const a of s)u.has(a)||i.addClassName(a);i.options.className=e.className}return Ai.createPortal(e.children,l)}P.memo(P.forwardRef(dp));function tr(e,t,n,r){const l=P.useContext(Sl),o=P.useMemo(()=>e(l),[]);return P.useEffect(()=>{const i=r||n||t,u=typeof t=="function"&&typeof n=="function"?t:null,s=typeof n=="function"?n:typeof t=="function"?t:null,{map:a}=l;return a.hasControl(o)||(a.addControl(o,i==null?void 0:i.position),u&&u(l)),()=>{s&&s(l),a.hasControl(o)&&a.removeControl(o)}},[]),o}function pp(e){const t=tr(({mapLib:n})=>new n.AttributionControl(e),{position:e.position});return P.useEffect(()=>{Mt(t._container,e.style)},[e.style]),null}P.memo(pp);function mp(e){const t=tr(({mapLib:n})=>new n.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return P.useEffect(()=>{Mt(t._controlContainer,e.style)},[e.style]),null}P.memo(mp);function hp(e,t){const n=P.useRef({props:e}),r=tr(({mapLib:l})=>{const o=new l.GeolocateControl(e),i=o._setupUI;return o._setupUI=u=>{o._container.hasChildNodes()||i(u)},o.on("geolocate",u=>{var s,a;(a=(s=n.current.props).onGeolocate)===null||a===void 0||a.call(s,u)}),o.on("error",u=>{var s,a;(a=(s=n.current.props).onError)===null||a===void 0||a.call(s,u)}),o.on("outofmaxbounds",u=>{var s,a;(a=(s=n.current.props).onOutOfMaxBounds)===null||a===void 0||a.call(s,u)}),o.on("trackuserlocationstart",u=>{var s,a;(a=(s=n.current.props).onTrackUserLocationStart)===null||a===void 0||a.call(s,u)}),o.on("trackuserlocationend",u=>{var s,a;(a=(s=n.current.props).onTrackUserLocationEnd)===null||a===void 0||a.call(s,u)}),o},{position:e.position});return n.current.props=e,P.useImperativeHandle(t,()=>r,[]),P.useEffect(()=>{Mt(r._container,e.style)},[e.style]),null}P.memo(P.forwardRef(hp));function vp(e){const t=tr(({mapLib:n})=>new n.NavigationControl(e),{position:e.position});return P.useEffect(()=>{Mt(t._container,e.style)},[e.style]),null}P.memo(vp);function yp(e){const t=tr(({mapLib:o})=>new o.ScaleControl(e),{position:e.position}),n=P.useRef(e),r=n.current;n.current=e;const{style:l}=e;return e.maxWidth!==void 0&&e.maxWidth!==r.maxWidth&&(t.options.maxWidth=e.maxWidth),e.unit!==void 0&&e.unit!==r.unit&&t.setUnit(e.unit),P.useEffect(()=>{Mt(t._container,l)},[l]),null}P.memo(yp);const gp=Gd(()=>import("./maplibre-gl-BSHRu-X0.js").then(e=>e.m),[]),wp=P.forwardRef(function(t,n){return ap(t,n,gp)});function Sp(){const[e,t]=P.useState();return P.useEffect(()=>{const n=setInterval(()=>{fetch("./style.json").then(r=>r.json()).then(r=>{JSON.stringify(e)!==JSON.stringify(r)&&t(r)})},1e3);return()=>clearInterval(n)},[e]),Or.jsx("div",{style:{width:"100vw",height:"100vh"},children:Or.jsx(wp,{initialViewState:{longitude:139.7673068,latitude:35.6809591,zoom:6},style:{position:"absolute",width:"100%",height:"100%"},hash:!1,mapStyle:e})})}Jl.createRoot(document.getElementById("root")).render(Or.jsx(Fc.StrictMode,{children:Or.jsx(Sp,{})}));export{kp as c,wc as g}; +`+o.stack}return{value:e,source:t,stack:l,digest:null}}function Kl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ro(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var _d=typeof WeakMap=="function"?WeakMap:Map;function Wa(e,t,n){n=We(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){el||(el=!0,Vo=r),Ro(e,t)},n}function Qa(e,t,n){n=We(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Ro(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Ro(e,t),typeof r!="function"&&(st===null?st=new Set([this]):st.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Ru(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new _d;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Id.bind(null,e,t,n),t.then(e,e))}function Mu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ou(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=We(-1,1),t.tag=2,ut(n,t,1))),n.lanes|=1),e)}var Ed=Ge.ReactCurrentOwner,ce=!1;function oe(e,t,n,r){t.child=e===null?Sa(t,null,n,r):tn(t,e.child,n,r)}function Du(e,t,n,r,l){n=n.render;var o=t.ref;return Xt(t,l),r=Ei(e,t,n,r,o,l),n=Ci(),e!==null&&!ce?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ze(e,t,l)):(U&&n&&fi(t),t.flags|=1,oe(e,t,r,l),t.child)}function Fu(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!Di(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Ka(e,t,o,r,l)):(e=Mr(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:$n,n(i,r)&&e.ref===t.ref)return Ze(e,t,l)}return t.flags|=1,e=ct(o,r),e.ref=t.ref,e.return=t,t.child=e}function Ka(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if($n(o,r)&&e.ref===t.ref)if(ce=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(ce=!0);else return t.lanes=e.lanes,Ze(e,t,l)}return Mo(e,t,n,r,l)}function Ya(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},F(Qt,me),me|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,F(Qt,me),me|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,F(Qt,me),me|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,F(Qt,me),me|=r;return oe(e,t,l,n),t.child}function Za(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Mo(e,t,n,r,l){var o=de(n)?xt:le.current;return o=bt(t,o),Xt(t,l),n=Ei(e,t,n,r,o,l),r=Ci(),e!==null&&!ce?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ze(e,t,l)):(U&&r&&fi(t),t.flags|=1,oe(e,t,n,l),t.child)}function Iu(e,t,n,r,l){if(de(n)){var o=!0;Wr(t)}else o=!1;if(Xt(t,l),t.stateNode===null)zr(e,t),Ha(t,n,r),To(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,u=t.memoizedProps;i.props=u;var s=i.context,a=n.contextType;typeof a=="object"&&a!==null?a=Ce(a):(a=de(n)?xt:le.current,a=bt(t,a));var m=n.getDerivedStateFromProps,h=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==r||s!==a)&&Tu(t,i,r,a),qe=!1;var p=t.memoizedState;i.state=p,Gr(t,r,i,l),s=t.memoizedState,u!==r||p!==s||fe.current||qe?(typeof m=="function"&&(zo(t,n,m,r),s=t.memoizedState),(u=qe||zu(t,n,u,r,p,s,a))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=a,r=u):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,_a(e,t),u=t.memoizedProps,a=t.type===t.elementType?u:Ne(t.type,u),i.props=a,h=t.pendingProps,p=i.context,s=n.contextType,typeof s=="object"&&s!==null?s=Ce(s):(s=de(n)?xt:le.current,s=bt(t,s));var g=n.getDerivedStateFromProps;(m=typeof g=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==h||p!==s)&&Tu(t,i,r,s),qe=!1,p=t.memoizedState,i.state=p,Gr(t,r,i,l);var w=t.memoizedState;u!==h||p!==w||fe.current||qe?(typeof g=="function"&&(zo(t,n,g,r),w=t.memoizedState),(a=qe||zu(t,n,a,r,p,w,s)||!1)?(m||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,w,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,w,s)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),i.props=r,i.state=w,i.context=s,r=a):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Oo(e,t,n,r,o,l)}function Oo(e,t,n,r,l,o){Za(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&ku(t,n,!1),Ze(e,t,o);r=t.stateNode,Ed.current=t;var u=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=tn(t,e.child,null,o),t.child=tn(t,null,u,o)):oe(e,t,u,o),t.memoizedState=r.state,l&&ku(t,n,!0),t.child}function Ga(e){var t=e.stateNode;t.pendingContext?Su(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Su(e,t.context,!1),wi(e,t.containerInfo)}function ju(e,t,n,r,l){return en(),pi(l),t.flags|=256,oe(e,t,n,r),t.child}var Do={dehydrated:null,treeContext:null,retryLane:0};function Fo(e){return{baseLanes:e,cachePool:null,transitions:null}}function Xa(e,t,n){var r=t.pendingProps,l=A.current,o=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(l&2)!==0),u?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),F(A,l&1),e===null)return Lo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=hl(i,r,0,null),e=Ct(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Fo(n),t.memoizedState=Do,e):Li(t,i));if(l=e.memoizedState,l!==null&&(u=l.dehydrated,u!==null))return Cd(e,t,i,r,u,l,n);if(o){o=r.fallback,i=t.mode,l=e.child,u=l.sibling;var s={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=ct(l,s),r.subtreeFlags=l.subtreeFlags&14680064),u!==null?o=ct(u,o):(o=Ct(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?Fo(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Do,r}return o=e.child,e=o.sibling,r=ct(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Li(e,t){return t=hl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function yr(e,t,n,r){return r!==null&&pi(r),tn(t,e.child,null,n),e=Li(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cd(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Kl(Error(y(422))),yr(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=hl({mode:"visible",children:r.children},l,0,null),o=Ct(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&tn(t,e.child,null,i),t.child.memoizedState=Fo(i),t.memoizedState=Do,o);if(!(t.mode&1))return yr(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var u=r.dgst;return r=u,o=Error(y(419)),r=Kl(o,r,void 0),yr(e,t,i,r)}if(u=(i&e.childLanes)!==0,ce||u){if(r=J,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,Ye(e,l),Me(r,e,l,-1))}return Oi(),r=Kl(Error(y(421))),yr(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=jd.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,he=it(l.nextSibling),ve=t,U=!0,Te=null,e!==null&&(Se[ke++]=Be,Se[ke++]=He,Se[ke++]=Pt,Be=e.id,He=e.overflow,Pt=t),t=Li(t,r.children),t.flags|=4096,t)}function Uu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),No(e.return,t,n)}function Yl(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function Ja(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(oe(e,t,r.children,n),r=A.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Uu(e,n,t);else if(e.tag===19)Uu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(F(A,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Xr(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Yl(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Xr(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Yl(t,!0,n,null,o);break;case"together":Yl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function zr(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ze(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Nt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(y(153));if(t.child!==null){for(e=t.child,n=ct(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ct(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xd(e,t,n){switch(t.tag){case 3:Ga(t),en();break;case 5:Ea(t);break;case 1:de(t.type)&&Wr(t);break;case 4:wi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;F(Yr,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(F(A,A.current&1),t.flags|=128,null):n&t.child.childLanes?Xa(e,t,n):(F(A,A.current&1),e=Ze(e,t,n),e!==null?e.sibling:null);F(A,A.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ja(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),F(A,A.current),r)break;return null;case 22:case 23:return t.lanes=0,Ya(e,t,n)}return Ze(e,t,n)}var qa,Io,ba,ec;qa=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Io=function(){};ba=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,_t(Ue.current);var o=null;switch(n){case"input":l=ro(e,l),r=ro(e,r),o=[];break;case"select":l=V({},l,{value:void 0}),r=V({},r,{value:void 0}),o=[];break;case"textarea":l=io(e,l),r=io(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Br)}so(n,r);var i;n=null;for(a in l)if(!r.hasOwnProperty(a)&&l.hasOwnProperty(a)&&l[a]!=null)if(a==="style"){var u=l[a];for(i in u)u.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(On.hasOwnProperty(a)?o||(o=[]):(o=o||[]).push(a,null));for(a in r){var s=r[a];if(u=l!=null?l[a]:void 0,r.hasOwnProperty(a)&&s!==u&&(s!=null||u!=null))if(a==="style")if(u){for(i in u)!u.hasOwnProperty(i)||s&&s.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in s)s.hasOwnProperty(i)&&u[i]!==s[i]&&(n||(n={}),n[i]=s[i])}else n||(o||(o=[]),o.push(a,n)),n=s;else a==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(o=o||[]).push(a,s)):a==="children"?typeof s!="string"&&typeof s!="number"||(o=o||[]).push(a,""+s):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(On.hasOwnProperty(a)?(s!=null&&a==="onScroll"&&I("scroll",e),o||u===s||(o=[])):(o=o||[]).push(a,s))}n&&(o=o||[]).push("style",n);var a=o;(t.updateQueue=a)&&(t.flags|=4)}};ec=function(e,t,n,r){n!==r&&(t.flags|=4)};function gn(e,t){if(!U)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ne(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pd(e,t,n){var r=t.pendingProps;switch(di(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ne(t),null;case 1:return de(t.type)&&Hr(),ne(t),null;case 3:return r=t.stateNode,nn(),j(fe),j(le),ki(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(hr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Te!==null&&(Wo(Te),Te=null))),Io(e,t),ne(t),null;case 5:Si(t);var l=_t(Qn.current);if(n=t.type,e!==null&&t.stateNode!=null)ba(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(y(166));return ne(t),null}if(e=_t(Ue.current),hr(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Ie]=t,r[Hn]=o,e=(t.mode&1)!==0,n){case"dialog":I("cancel",r),I("close",r);break;case"iframe":case"object":case"embed":I("load",r);break;case"video":case"audio":for(l=0;l<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Ie]=t,e[Hn]=r,qa(e,t,!1,!1),t.stateNode=e;e:{switch(i=ao(n,r),n){case"dialog":I("cancel",e),I("close",e),l=r;break;case"iframe":case"object":case"embed":I("load",e),l=r;break;case"video":case"audio":for(l=0;lln&&(t.flags|=128,r=!0,gn(o,!1),t.lanes=4194304)}else{if(!r)if(e=Xr(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),gn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!U)return ne(t),null}else 2*Q()-o.renderingStartTime>ln&&n!==1073741824&&(t.flags|=128,r=!0,gn(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Q(),t.sibling=null,n=A.current,F(A,r?n&1|2:n&1),t):(ne(t),null);case 22:case 23:return Mi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?me&1073741824&&(ne(t),t.subtreeFlags&6&&(t.flags|=8192)):ne(t),null;case 24:return null;case 25:return null}throw Error(y(156,t.tag))}function Ld(e,t){switch(di(t),t.tag){case 1:return de(t.type)&&Hr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nn(),j(fe),j(le),ki(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Si(t),null;case 13:if(j(A),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(y(340));en()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(A),null;case 4:return nn(),null;case 10:return vi(t.type._context),null;case 22:case 23:return Mi(),null;case 24:return null;default:return null}}var gr=!1,re=!1,Nd=typeof WeakSet=="function"?WeakSet:Set,_=null;function Wt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){B(e,t,r)}else n.current=null}function jo(e,t,n){try{n()}catch(r){B(e,t,r)}}var Au=!1;function zd(e,t){if(So=Ar,e=oa(),ci(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,u=-1,s=-1,a=0,m=0,h=e,p=null;t:for(;;){for(var g;h!==n||l!==0&&h.nodeType!==3||(u=i+l),h!==o||r!==0&&h.nodeType!==3||(s=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(g=h.firstChild)!==null;)p=h,h=g;for(;;){if(h===e)break t;if(p===n&&++a===l&&(u=i),p===o&&++m===r&&(s=i),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=g}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(ko={focusedElem:e,selectionRange:n},Ar=!1,_=t;_!==null;)if(t=_,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_=e;else for(;_!==null;){t=_;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var k=w.memoizedProps,D=w.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?k:Ne(t.type,k),D);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(v){B(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,_=e;break}_=t.return}return w=Au,Au=!1,w}function Tn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&jo(t,n,o)}l=l.next}while(l!==r)}}function pl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Uo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function tc(e){var t=e.alternate;t!==null&&(e.alternate=null,tc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ie],delete t[Hn],delete t[Co],delete t[fd],delete t[dd])),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 nc(e){return e.tag===5||e.tag===3||e.tag===4}function $u(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nc(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 Ao(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Br));else if(r!==4&&(e=e.child,e!==null))for(Ao(e,t,n),e=e.sibling;e!==null;)Ao(e,t,n),e=e.sibling}function $o(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($o(e,t,n),e=e.sibling;e!==null;)$o(e,t,n),e=e.sibling}var q=null,ze=!1;function Xe(e,t,n){for(n=n.child;n!==null;)rc(e,t,n),n=n.sibling}function rc(e,t,n){if(je&&typeof je.onCommitFiberUnmount=="function")try{je.onCommitFiberUnmount(ol,n)}catch{}switch(n.tag){case 5:re||Wt(n,t);case 6:var r=q,l=ze;q=null,Xe(e,t,n),q=r,ze=l,q!==null&&(ze?(e=q,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):q.removeChild(n.stateNode));break;case 18:q!==null&&(ze?(e=q,n=n.stateNode,e.nodeType===8?$l(e.parentNode,n):e.nodeType===1&&$l(e,n),Un(e)):$l(q,n.stateNode));break;case 4:r=q,l=ze,q=n.stateNode.containerInfo,ze=!0,Xe(e,t,n),q=r,ze=l;break;case 0:case 11:case 14:case 15:if(!re&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&jo(n,t,i),l=l.next}while(l!==r)}Xe(e,t,n);break;case 1:if(!re&&(Wt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){B(n,t,u)}Xe(e,t,n);break;case 21:Xe(e,t,n);break;case 22:n.mode&1?(re=(r=re)||n.memoizedState!==null,Xe(e,t,n),re=r):Xe(e,t,n);break;default:Xe(e,t,n)}}function Vu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Nd),t.forEach(function(r){var l=Ud.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Le(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=Q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Rd(r/1960))-r,10e?16:e,nt===null)var r=!1;else{if(e=nt,nt=null,tl=0,M&6)throw Error(y(331));var l=M;for(M|=4,_=e.current;_!==null;){var o=_,i=o.child;if(_.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sQ()-Ti?Et(e,0):zi|=n),pe(e,t)}function fc(e,t){t===0&&(e.mode&1?(t=ar,ar<<=1,!(ar&130023424)&&(ar=4194304)):t=1);var n=ie();e=Ye(e,t),e!==null&&(Jn(e,t,n),pe(e,n))}function jd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),fc(e,n)}function Ud(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(t),fc(e,n)}var dc;dc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fe.current)ce=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ce=!1,xd(e,t,n);ce=!!(e.flags&131072)}else ce=!1,U&&t.flags&1048576&&va(t,Kr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zr(e,t),e=t.pendingProps;var l=bt(t,le.current);Xt(t,n),l=Ei(null,t,r,e,l,n);var o=Ci();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,de(r)?(o=!0,Wr(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,gi(t),l.updater=dl,t.stateNode=l,l._reactInternals=t,To(t,r,e,n),t=Oo(null,t,r,!0,o,n)):(t.tag=0,U&&o&&fi(t),oe(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=$d(r),e=Ne(r,e),l){case 0:t=Mo(null,t,r,e,n);break e;case 1:t=Iu(null,t,r,e,n);break e;case 11:t=Du(null,t,r,e,n);break e;case 14:t=Fu(null,t,r,Ne(r.type,e),n);break e}throw Error(y(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ne(r,l),Mo(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ne(r,l),Iu(e,t,r,l,n);case 3:e:{if(Ga(t),e===null)throw Error(y(387));r=t.pendingProps,o=t.memoizedState,l=o.element,_a(e,t),Gr(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=rn(Error(y(423)),t),t=ju(e,t,r,n,l);break e}else if(r!==l){l=rn(Error(y(424)),t),t=ju(e,t,r,n,l);break e}else for(he=it(t.stateNode.containerInfo.firstChild),ve=t,U=!0,Te=null,n=Sa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(en(),r===l){t=Ze(e,t,n);break e}oe(e,t,r,n)}t=t.child}return t;case 5:return Ea(t),e===null&&Lo(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,_o(r,l)?i=null:o!==null&&_o(r,o)&&(t.flags|=32),Za(e,t),oe(e,t,i,n),t.child;case 6:return e===null&&Lo(t),null;case 13:return Xa(e,t,n);case 4:return wi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tn(t,null,r,n):oe(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ne(r,l),Du(e,t,r,l,n);case 7:return oe(e,t,t.pendingProps,n),t.child;case 8:return oe(e,t,t.pendingProps.children,n),t.child;case 12:return oe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,F(Yr,r._currentValue),r._currentValue=i,o!==null)if(Oe(o.value,i)){if(o.children===l.children&&!fe.current){t=Ze(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=We(-1,n&-n),s.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var m=a.pending;m===null?s.next=s:(s.next=m.next,m.next=s),a.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),No(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(y(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),No(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}oe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Xt(t,n),l=Ce(l),r=r(l),t.flags|=1,oe(e,t,r,n),t.child;case 14:return r=t.type,l=Ne(r,t.pendingProps),l=Ne(r.type,l),Fu(e,t,r,l,n);case 15:return Ka(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ne(r,l),zr(e,t),t.tag=1,de(r)?(e=!0,Wr(t)):e=!1,Xt(t,n),Ha(t,r,l),To(t,r,l,n),Oo(null,t,r,!0,e,n);case 19:return Ja(e,t,n);case 22:return Ya(e,t,n)}throw Error(y(156,t.tag))};function pc(e,t){return $s(e,t)}function Ad(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _e(e,t,n,r){return new Ad(e,t,n,r)}function Di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $d(e){if(typeof e=="function")return Di(e)?1:0;if(e!=null){if(e=e.$$typeof,e===bo)return 11;if(e===ei)return 14}return 2}function ct(e,t){var n=e.alternate;return n===null?(n=_e(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Mr(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Di(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ft:return Ct(n.children,l,o,t);case qo:i=8,l|=8;break;case bl:return e=_e(12,n,t,l|2),e.elementType=bl,e.lanes=o,e;case eo:return e=_e(13,n,t,l),e.elementType=eo,e.lanes=o,e;case to:return e=_e(19,n,t,l),e.elementType=to,e.lanes=o,e;case Es:return hl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ks:i=10;break e;case _s:i=9;break e;case bo:i=11;break e;case ei:i=14;break e;case Je:i=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return t=_e(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Ct(e,t,n,r){return e=_e(7,e,r,t),e.lanes=n,e}function hl(e,t,n,r){return e=_e(22,e,r,t),e.elementType=Es,e.lanes=n,e.stateNode={isHidden:!1},e}function Zl(e,t,n){return e=_e(6,e,null,t),e.lanes=n,e}function Gl(e,t,n){return t=_e(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vd(e,t,n,r,l){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=zl(0),this.expirationTimes=zl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Fi(e,t,n,r,l,o,i,u,s){return e=new Vd(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=_e(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gi(o),e}function Bd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yc)}catch(e){console.error(e)}}yc(),ys.exports=ge;var Ai=ys.exports,Gu=Ai;Jl.createRoot=Gu.createRoot,Jl.hydrateRoot=Gu.hydrateRoot;const Yd="modulepreload",Zd=function(e){return"/charites-ai/"+e},Xu={},Gd=function(t,n,r){let l=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),u=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));l=Promise.all(n.map(s=>{if(s=Zd(s),s in Xu)return;Xu[s]=!0;const a=s.endsWith(".css"),m=a?'[rel="stylesheet"]':"";if(!!r)for(let g=o.length-1;g>=0;g--){const w=o[g];if(w.href===s&&(!a||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${m}`))return;const p=document.createElement("link");if(p.rel=a?"stylesheet":Yd,a||(p.as="script",p.crossOrigin=""),p.href=s,u&&p.setAttribute("nonce",u),document.head.appendChild(p),a)return new Promise((g,w)=>{p.addEventListener("load",g),p.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${s}`)))})}))}return l.then(()=>t()).catch(o=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o})},Xd=P.createContext(null);function Jd(e,t){const n=Array.isArray(e)?e[0]:e?e.x:0,r=Array.isArray(e)?e[1]:e?e.y:0,l=Array.isArray(t)?t[0]:t?t.x:0,o=Array.isArray(t)?t[1]:t?t.y:0;return n===l&&r===o}function Ve(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n{let l=null;"interactive"in r&&(l=Object.assign({},r),delete l.interactive);const o=t[r.ref];if(o){l=l||Object.assign({},r),delete l.ref;for(const i of bd)i in o&&(l[i]=o[i])}return l||r});return{...e,layers:n}}var ts={};const ns={version:8,sources:{},layers:[]},rs={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},Xl={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},ls={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},ep=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],tp=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class on{constructor(t,n,r){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=l=>{const o=this.props[ls[l.type]];o?o(l):l.type==="error"&&console.error(l.error)},this._onPointerEvent=l=>{(l.type==="mousemove"||l.type==="mouseout")&&this._updateHover(l);const o=this.props[rs[l.type]];o&&(this.props.interactiveLayerIds&&l.type!=="mouseover"&&l.type!=="mouseout"&&(l.features=this._hoveredFeatures||this._queryRenderedFeatures(l.point)),o(l),delete l.features)},this._onCameraEvent=l=>{if(!this._internalUpdate){const o=this.props[Xl[l.type]];o&&o(l)}l.type in this._deferredEvents&&(this._deferredEvents[l.type]=!1)},this._MapClass=t,this.props=n,this._initialize(r)}get map(){return this._map}get transform(){return this._renderTransform}setProps(t){const n=this.props;this.props=t;const r=this._updateSettings(t,n);r&&this._createShadowTransform(this._map);const l=this._updateSize(t),o=this._updateViewState(t,!0);this._updateStyle(t,n),this._updateStyleComponents(t,n),this._updateHandlers(t,n),(r||l||o&&!this._map.isMoving())&&this.redraw()}static reuse(t,n){const r=on.savedMaps.pop();if(!r)return null;const l=r.map,o=l.getContainer();for(n.className=o.className;o.childNodes.length>0;)n.appendChild(o.childNodes[0]);l._container=n;const i=l._resizeObserver;i&&(i.disconnect(),i.observe(n)),r.setProps({...t,styleDiffing:!1}),l.resize();const{initialViewState:u}=t;return u&&(u.bounds?l.fitBounds(u.bounds,{...u.fitBoundsOptions,duration:0}):r._updateViewState(u,!1)),l.isStyleLoaded()?l.fire("load"):l.once("styledata",()=>l.fire("load")),l._update(),r}_initialize(t){const{props:n}=this,{mapStyle:r=ns}=n,l={...n,...n.initialViewState,accessToken:n.mapboxAccessToken||np()||null,container:t,style:es(r)},o=l.initialViewState||l.viewState||l;if(Object.assign(l,{center:[o.longitude||0,o.latitude||0],zoom:o.zoom||0,pitch:o.pitch||0,bearing:o.bearing||0}),n.gl){const m=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=m,n.gl)}const i=new this._MapClass(l);o.padding&&i.setPadding(o.padding),n.cursor&&(i.getCanvas().style.cursor=n.cursor),this._createShadowTransform(i);const u=i._render;i._render=m=>{this._inRender=!0,u.call(i,m),this._inRender=!1};const s=i._renderTaskQueue.run;i._renderTaskQueue.run=m=>{s.call(i._renderTaskQueue,m),this._onBeforeRepaint()},i.on("render",()=>this._onAfterRepaint());const a=i.fire;i.fire=this._fireEvent.bind(this,a),i.on("resize",()=>{this._renderTransform.resize(i.transform.width,i.transform.height)}),i.on("styledata",()=>{this._updateStyleComponents(this.props,{}),Ju(i.transform,this._renderTransform)}),i.on("sourcedata",()=>this._updateStyleComponents(this.props,{}));for(const m in rs)i.on(m,this._onPointerEvent);for(const m in Xl)i.on(m,this._onCameraEvent);for(const m in ls)i.on(m,this._onEvent);this._map=i}recycle(){const n=this.map.getContainer().querySelector("[mapboxgl-children]");n==null||n.remove(),on.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;!this._inRender&&t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_createShadowTransform(t){const n=qd(t.transform);t.painter.transform=n,this._renderTransform=n}_updateSize(t){const{viewState:n}=t;if(n){const r=this._map;if(n.width!==r.transform.width||n.height!==r.transform.height)return r.resize(),!0}return!1}_updateViewState(t,n){if(this._internalUpdate)return!1;const r=this._map,l=this._renderTransform,{zoom:o,pitch:i,bearing:u}=l,s=r.isMoving();s&&(l.cameraElevationReference="sea");const a=bu(l,{...qu(r.transform),...t});if(s&&(l.cameraElevationReference="ground"),a&&n){const m=this._deferredEvents;m.move=!0,m.zoom||(m.zoom=o!==l.zoom),m.rotate||(m.rotate=u!==l.bearing),m.pitch||(m.pitch=i!==l.pitch)}return s||bu(r.transform,t),a}_updateSettings(t,n){const r=this._map;let l=!1;for(const o of ep)if(o in t&&!Ve(t[o],n[o])){l=!0;const i=r[`set${o[0].toUpperCase()}${o.slice(1)}`];i==null||i.call(r,t[o])}return l}_updateStyle(t,n){if(t.cursor!==n.cursor&&(this._map.getCanvas().style.cursor=t.cursor||""),t.mapStyle!==n.mapStyle){const{mapStyle:r=ns,styleDiffing:l=!0}=t,o={diff:l};return"localIdeographFontFamily"in t&&(o.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(es(r),o),!0}return!1}_updateStyleComponents(t,n){const r=this._map;let l=!1;return r.isStyleLoaded()&&("light"in t&&r.setLight&&!Ve(t.light,n.light)&&(l=!0,r.setLight(t.light)),"fog"in t&&r.setFog&&!Ve(t.fog,n.fog)&&(l=!0,r.setFog(t.fog)),"terrain"in t&&r.setTerrain&&!Ve(t.terrain,n.terrain)&&(!t.terrain||r.getSource(t.terrain.source))&&(l=!0,r.setTerrain(t.terrain))),l}_updateHandlers(t,n){var r,l;const o=this._map;let i=!1;for(const u of tp){const s=(r=t[u])!==null&&r!==void 0?r:!0,a=(l=n[u])!==null&&l!==void 0?l:!0;Ve(s,a)||(i=!0,s?o[u].enable(s):o[u].disable())}return i}_queryRenderedFeatures(t){const n=this._map,r=n.transform,{interactiveLayerIds:l=[]}=this.props;try{return n.transform=this._renderTransform,n.queryRenderedFeatures(t,{layers:l.filter(n.getLayer.bind(n))})}catch{return[]}finally{n.transform=r}}_updateHover(t){var n;const{props:r}=this;if(r.interactiveLayerIds&&(r.onMouseMove||r.onMouseEnter||r.onMouseLeave)){const o=t.type,i=((n=this._hoveredFeatures)===null||n===void 0?void 0:n.length)>0,u=this._queryRenderedFeatures(t.point),s=u.length>0;!s&&i&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=u,s&&!i&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=o}else this._hoveredFeatures=null}_fireEvent(t,n,r){const l=this._map,o=l.transform,i=typeof n=="string"?n:n.type;return i==="move"&&this._updateViewState(this.props,!1),i in Xl&&(typeof n=="object"&&(n.viewState=qu(o)),this._map.isMoving())?(l.transform=this._renderTransform,t.call(l,n,r),l.transform=o,l):(t.call(l,n,r),l)}_onBeforeRepaint(){const t=this._map;this._internalUpdate=!0;for(const r in this._deferredEvents)this._deferredEvents[r]&&t.fire(r);this._internalUpdate=!1;const n=this._map.transform;t.transform=this._renderTransform,this._onAfterRepaint=()=>{Ju(this._renderTransform,n),t.transform=n}}}on.savedMaps=[];function np(){let e=null;if(typeof location<"u"){const t=/access_token=([^&\/]*)/.exec(location.search);e=t&&t[1]}try{e=e||ts.MapboxAccessToken}catch{}try{e=e||ts.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return e}const rp=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function lp(e){if(!e)return null;const t=e.map,n={getMap:()=>t,getCenter:()=>e.transform.center,getZoom:()=>e.transform.zoom,getBearing:()=>e.transform.bearing,getPitch:()=>e.transform.pitch,getPadding:()=>e.transform.padding,getBounds:()=>e.transform.getBounds(),project:r=>{const l=t.transform;t.transform=e.transform;const o=t.project(r);return t.transform=l,o},unproject:r=>{const l=t.transform;t.transform=e.transform;const o=t.unproject(r);return t.transform=l,o},queryTerrainElevation:(r,l)=>{const o=t.transform;t.transform=e.transform;const i=t.queryTerrainElevation(r,l);return t.transform=o,i},queryRenderedFeatures:(r,l)=>{const o=t.transform;t.transform=e.transform;const i=t.queryRenderedFeatures(r,l);return t.transform=o,i}};for(const r of op(t))!(r in n)&&!rp.includes(r)&&(n[r]=t[r].bind(t));return n}function op(e){const t=new Set;let n=e;for(;n;){for(const r of Object.getOwnPropertyNames(n))r[0]!=="_"&&typeof e[r]=="function"&&r!=="fire"&&r!=="setEventedParent"&&t.add(r);n=Object.getPrototypeOf(n)}return Array.from(t)}const ip=typeof document<"u"?P.useLayoutEffect:P.useEffect,up=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function sp(e,t){for(const r of up)r in t&&(e[r]=t[r]);const{RTLTextPlugin:n="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"}=t;n&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"&&e.setRTLTextPlugin(n,r=>{r&&console.error(r)},!0)}const Sl=P.createContext(null);function ap(e,t,n){const r=P.useContext(Xd),[l,o]=P.useState(null),i=P.useRef(),{current:u}=P.useRef({mapLib:null,map:null});P.useEffect(()=>{const m=e.mapLib;let h=!0,p;return Promise.resolve(m||n).then(g=>{if(!h)return;if(!g)throw new Error("Invalid mapLib");const w="Map"in g?g:g.default;if(!w.Map)throw new Error("Invalid mapLib");if(sp(w,e),!w.supported||w.supported(e))e.reuseMaps&&(p=on.reuse(e,i.current)),p||(p=new on(w.Map,e,i.current)),u.map=lp(p),u.mapLib=w,o(p),r==null||r.onMapMount(u.map,e.id);else throw new Error("Map is not supported by this browser")}).catch(g=>{const{onError:w}=e;w?w({type:"error",target:null,originalEvent:null,error:g}):console.error(g)}),()=>{h=!1,p&&(r==null||r.onMapUnmount(e.id),e.reuseMaps?p.recycle():p.destroy())}},[]),ip(()=>{l&&l.setProps(e)}),P.useImperativeHandle(t,()=>u.map,[l]);const s=P.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),a={height:"100%"};return P.createElement("div",{id:e.id,ref:i,style:s},l&&P.createElement(Sl.Provider,{value:u},P.createElement("div",{"mapboxgl-children":"",style:a},e.children)))}const cp=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function Mt(e,t){if(!e||!t)return;const n=e.style;for(const r in t){const l=t[r];Number.isFinite(l)&&!cp.test(r)?n[r]=`${l}px`:n[r]=l}}function fp(e,t){const{map:n,mapLib:r}=P.useContext(Sl),l=P.useRef({props:e});l.current.props=e;const o=P.useMemo(()=>{let k=!1;P.Children.forEach(e.children,c=>{c&&(k=!0)});const D={...e,element:k?document.createElement("div"):null},f=new r.Marker(D);return f.setLngLat([e.longitude,e.latitude]),f.getElement().addEventListener("click",c=>{var d,v;(v=(d=l.current.props).onClick)===null||v===void 0||v.call(d,{type:"click",target:f,originalEvent:c})}),f.on("dragstart",c=>{var d,v;const S=c;S.lngLat=o.getLngLat(),(v=(d=l.current.props).onDragStart)===null||v===void 0||v.call(d,S)}),f.on("drag",c=>{var d,v;const S=c;S.lngLat=o.getLngLat(),(v=(d=l.current.props).onDrag)===null||v===void 0||v.call(d,S)}),f.on("dragend",c=>{var d,v;const S=c;S.lngLat=o.getLngLat(),(v=(d=l.current.props).onDragEnd)===null||v===void 0||v.call(d,S)}),f},[]);P.useEffect(()=>(o.addTo(n.getMap()),()=>{o.remove()}),[]);const{longitude:i,latitude:u,offset:s,style:a,draggable:m=!1,popup:h=null,rotation:p=0,rotationAlignment:g="auto",pitchAlignment:w="auto"}=e;return P.useEffect(()=>{Mt(o.getElement(),a)},[a]),P.useImperativeHandle(t,()=>o,[]),(o.getLngLat().lng!==i||o.getLngLat().lat!==u)&&o.setLngLat([i,u]),s&&!Jd(o.getOffset(),s)&&o.setOffset(s),o.isDraggable()!==m&&o.setDraggable(m),o.getRotation()!==p&&o.setRotation(p),o.getRotationAlignment()!==g&&o.setRotationAlignment(g),o.getPitchAlignment()!==w&&o.setPitchAlignment(w),o.getPopup()!==h&&o.setPopup(h),Ai.createPortal(e.children,o.getElement())}P.memo(P.forwardRef(fp));function os(e){return new Set(e?e.trim().split(/\s+/):[])}function dp(e,t){const{map:n,mapLib:r}=P.useContext(Sl),l=P.useMemo(()=>document.createElement("div"),[]),o=P.useRef({props:e});o.current.props=e;const i=P.useMemo(()=>{const u={...e},s=new r.Popup(u);return s.setLngLat([e.longitude,e.latitude]),s.once("open",a=>{var m,h;(h=(m=o.current.props).onOpen)===null||h===void 0||h.call(m,a)}),s},[]);if(P.useEffect(()=>{const u=s=>{var a,m;(m=(a=o.current.props).onClose)===null||m===void 0||m.call(a,s)};return i.on("close",u),i.setDOMContent(l).addTo(n.getMap()),()=>{i.off("close",u),i.isOpen()&&i.remove()}},[]),P.useEffect(()=>{Mt(i.getElement(),e.style)},[e.style]),P.useImperativeHandle(t,()=>i,[]),i.isOpen()&&((i.getLngLat().lng!==e.longitude||i.getLngLat().lat!==e.latitude)&&i.setLngLat([e.longitude,e.latitude]),e.offset&&!Ve(i.options.offset,e.offset)&&i.setOffset(e.offset),(i.options.anchor!==e.anchor||i.options.maxWidth!==e.maxWidth)&&(i.options.anchor=e.anchor,i.setMaxWidth(e.maxWidth)),i.options.className!==e.className)){const u=os(i.options.className),s=os(e.className);for(const a of u)s.has(a)||i.removeClassName(a);for(const a of s)u.has(a)||i.addClassName(a);i.options.className=e.className}return Ai.createPortal(e.children,l)}P.memo(P.forwardRef(dp));function tr(e,t,n,r){const l=P.useContext(Sl),o=P.useMemo(()=>e(l),[]);return P.useEffect(()=>{const i=r||n||t,u=typeof t=="function"&&typeof n=="function"?t:null,s=typeof n=="function"?n:typeof t=="function"?t:null,{map:a}=l;return a.hasControl(o)||(a.addControl(o,i==null?void 0:i.position),u&&u(l)),()=>{s&&s(l),a.hasControl(o)&&a.removeControl(o)}},[]),o}function pp(e){const t=tr(({mapLib:n})=>new n.AttributionControl(e),{position:e.position});return P.useEffect(()=>{Mt(t._container,e.style)},[e.style]),null}P.memo(pp);function mp(e){const t=tr(({mapLib:n})=>new n.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return P.useEffect(()=>{Mt(t._controlContainer,e.style)},[e.style]),null}P.memo(mp);function hp(e,t){const n=P.useRef({props:e}),r=tr(({mapLib:l})=>{const o=new l.GeolocateControl(e),i=o._setupUI;return o._setupUI=u=>{o._container.hasChildNodes()||i(u)},o.on("geolocate",u=>{var s,a;(a=(s=n.current.props).onGeolocate)===null||a===void 0||a.call(s,u)}),o.on("error",u=>{var s,a;(a=(s=n.current.props).onError)===null||a===void 0||a.call(s,u)}),o.on("outofmaxbounds",u=>{var s,a;(a=(s=n.current.props).onOutOfMaxBounds)===null||a===void 0||a.call(s,u)}),o.on("trackuserlocationstart",u=>{var s,a;(a=(s=n.current.props).onTrackUserLocationStart)===null||a===void 0||a.call(s,u)}),o.on("trackuserlocationend",u=>{var s,a;(a=(s=n.current.props).onTrackUserLocationEnd)===null||a===void 0||a.call(s,u)}),o},{position:e.position});return n.current.props=e,P.useImperativeHandle(t,()=>r,[]),P.useEffect(()=>{Mt(r._container,e.style)},[e.style]),null}P.memo(P.forwardRef(hp));function vp(e){const t=tr(({mapLib:n})=>new n.NavigationControl(e),{position:e.position});return P.useEffect(()=>{Mt(t._container,e.style)},[e.style]),null}P.memo(vp);function yp(e){const t=tr(({mapLib:o})=>new o.ScaleControl(e),{position:e.position}),n=P.useRef(e),r=n.current;n.current=e;const{style:l}=e;return e.maxWidth!==void 0&&e.maxWidth!==r.maxWidth&&(t.options.maxWidth=e.maxWidth),e.unit!==void 0&&e.unit!==r.unit&&t.setUnit(e.unit),P.useEffect(()=>{Mt(t._container,l)},[l]),null}P.memo(yp);const gp=Gd(()=>import("./maplibre-gl-D5cREOYy.js").then(e=>e.m),[]),wp=P.forwardRef(function(t,n){return ap(t,n,gp)});function Sp(){const[e,t]=P.useState();return P.useEffect(()=>{const n=setInterval(()=>{fetch("./style.json").then(r=>r.json()).then(r=>{JSON.stringify(e)!==JSON.stringify(r)&&t(r)})},1e3);return()=>clearInterval(n)},[e]),Or.jsx("div",{style:{width:"100vw",height:"100vh"},children:Or.jsx(wp,{initialViewState:{longitude:139.7673068,latitude:35.6809591,zoom:6},style:{position:"absolute",width:"100%",height:"100%"},hash:!1,mapStyle:e})})}Jl.createRoot(document.getElementById("root")).render(Or.jsx(Fc.StrictMode,{children:Or.jsx(Sp,{})}));export{kp as c,wc as g}; diff --git a/assets/maplibre-gl-BSHRu-X0.js b/assets/maplibre-gl-D5cREOYy.js similarity index 99% rename from assets/maplibre-gl-BSHRu-X0.js rename to assets/maplibre-gl-D5cREOYy.js index 2b1eb5f..e9dcac0 100644 --- a/assets/maplibre-gl-BSHRu-X0.js +++ b/assets/maplibre-gl-D5cREOYy.js @@ -1,4 +1,4 @@ -import{g as Pp,c as Mp}from"./index-DTi1mb9q.js";function Cp(ga,Fl){for(var Or=0;OrLi[Vr]})}}}return Object.freeze(Object.defineProperty(ga,Symbol.toStringTag,{value:"Module"}))}var zu={exports:{}};/** +import{g as Pp,c as Mp}from"./index-DECkXyx6.js";function Cp(ga,Fl){for(var Or=0;OrLi[Vr]})}}}return Object.freeze(Object.defineProperty(ga,Symbol.toStringTag,{value:"Module"}))}var zu={exports:{}};/** * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.3.2/LICENSE.txt */(function(ga,Fl){(function(Or,Li){ga.exports=Li()})(Mp,function(){var Or={},Li={};function Vr(D,p,Ci){if(Li[D]=Ci,D==="index"){var Hi="var sharedModule = {}; ("+Li.shared+")(sharedModule); ("+Li.worker+")(sharedModule);",Kt={};return Li.shared(Kt),Li.index(Or,Kt),typeof window<"u"&&Or.setWorkerUrl(window.URL.createObjectURL(new Blob([Hi],{type:"text/javascript"}))),Or}}Vr("shared",["exports"],function(D){function p(i,e,r,s){return new(r||(r=Promise))(function(o,h){function d(x){try{g(s.next(x))}catch(b){h(b)}}function f(x){try{g(s.throw(x))}catch(b){h(b)}}function g(x){var b;x.done?o(x.value):(b=x.value,b instanceof r?b:new r(function(w){w(b)})).then(d,f)}g((s=s.apply(i,e||[])).next())})}function Ci(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}typeof SuppressedError=="function"&&SuppressedError;var Hi=Kt;function Kt(i,e){this.x=i,this.y=e}Kt.prototype={clone:function(){return new Kt(this.x,this.y)},add:function(i){return this.clone()._add(i)},sub:function(i){return this.clone()._sub(i)},multByPoint:function(i){return this.clone()._multByPoint(i)},divByPoint:function(i){return this.clone()._divByPoint(i)},mult:function(i){return this.clone()._mult(i)},div:function(i){return this.clone()._div(i)},rotate:function(i){return this.clone()._rotate(i)},rotateAround:function(i,e){return this.clone()._rotateAround(i,e)},matMult:function(i){return this.clone()._matMult(i)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(i){return this.x===i.x&&this.y===i.y},dist:function(i){return Math.sqrt(this.distSqr(i))},distSqr:function(i){var e=i.x-this.x,r=i.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(i){return Math.atan2(this.y-i.y,this.x-i.x)},angleWith:function(i){return this.angleWithSep(i.x,i.y)},angleWithSep:function(i,e){return Math.atan2(this.x*e-this.y*i,this.x*i+this.y*e)},_matMult:function(i){var e=i[2]*this.x+i[3]*this.y;return this.x=i[0]*this.x+i[1]*this.y,this.y=e,this},_add:function(i){return this.x+=i.x,this.y+=i.y,this},_sub:function(i){return this.x-=i.x,this.y-=i.y,this},_mult:function(i){return this.x*=i,this.y*=i,this},_div:function(i){return this.x/=i,this.y/=i,this},_multByPoint:function(i){return this.x*=i.x,this.y*=i.y,this},_divByPoint:function(i){return this.x/=i.x,this.y/=i.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var i=this.y;return this.y=this.x,this.x=-i,this},_rotate:function(i){var e=Math.cos(i),r=Math.sin(i),s=r*this.x+e*this.y;return this.x=e*this.x-r*this.y,this.y=s,this},_rotateAround:function(i,e){var r=Math.cos(i),s=Math.sin(i),o=e.y+s*(this.x-e.x)+r*(this.y-e.y);return this.x=e.x+r*(this.x-e.x)-s*(this.y-e.y),this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Kt.convert=function(i){return i instanceof Kt?i:Array.isArray(i)?new Kt(i[0],i[1]):i};var ye=Ci(Hi),ie=Nr;function Nr(i,e,r,s){this.cx=3*i,this.bx=3*(r-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(s-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=e,this.p2x=r,this.p2y=s}Nr.prototype={sampleCurveX:function(i){return((this.ax*i+this.bx)*i+this.cx)*i},sampleCurveY:function(i){return((this.ay*i+this.by)*i+this.cy)*i},sampleCurveDerivativeX:function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},solveCurveX:function(i,e){if(e===void 0&&(e=1e-6),i<0)return 0;if(i>1)return 1;for(var r=i,s=0;s<8;s++){var o=this.sampleCurveX(r)-i;if(Math.abs(o)o?d=r:f=r,r=.5*(f-d)+d;return r},solve:function(i,e){return this.sampleCurveY(this.solveCurveX(i,e))}};var Ir=Ci(ie);let Xi,Ar;function sr(){return Xi==null&&(Xi=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Xi}function Nn(){if(Ar==null&&(Ar=!1,sr())){const e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let s=0;s<5*5;s++){const o=4*s;e.fillStyle=`rgb(${o},${o+1},${o+2})`,e.fillRect(s%5,Math.floor(s/5),1,1)}const r=e.getImageData(0,0,5,5).data;for(let s=0;s<5*5*4;s++)if(s%4!=3&&r[s]!==s){Ar=!0;break}}}return Ar||!1}function _i(i,e,r,s){const o=new Ir(i,e,r,s);return h=>o.solve(h)}const ya=_i(.25,.1,.25,1);function Ri(i,e,r){return Math.min(r,Math.max(e,i))}function Ki(i,e,r){const s=r-e,o=((i-e)%s+s)%s+e;return o===e?r:o}function Ei(i,...e){for(const r of e)for(const s in r)i[s]=r[s];return i}let _s=1;function Ji(i,e,r){const s={};for(const o in i)s[o]=e.call(this,i[o],o,i);return s}function jn(i,e,r){const s={};for(const o in i)e.call(this,i[o],o,i)&&(s[o]=i[o]);return s}function it(i){return Array.isArray(i)?i.map(it):typeof i=="object"&&i?Ji(i,it):i}const ys={};function Nt(i){ys[i]||(typeof console<"u"&&console.warn(i),ys[i]=!0)}function Jt(i,e,r){return(r.y-i.y)*(e.x-i.x)>(e.y-i.y)*(r.x-i.x)}function ar(i){return typeof WorkerGlobalScope<"u"&&i!==void 0&&i instanceof WorkerGlobalScope}let on=null;function Yi(i){return typeof ImageBitmap<"u"&&i instanceof ImageBitmap}const xs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function jr(i,e,r,s,o){return p(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const h=new VideoFrame(i,{timestamp:0});try{const d=h==null?void 0:h.format;if(!d||!d.startsWith("BGR")&&!d.startsWith("RGB"))throw new Error(`Unrecognized format ${d}`);const f=d.startsWith("BGR"),g=new Uint8ClampedArray(s*o*4);if(yield h.copyTo(g,function(x,b,w,I,P){const E=4*Math.max(-b,0),L=(Math.max(0,w)-w)*I*4+E,F=4*I,U=Math.max(0,b),Y=Math.max(0,w);return{rect:{x:U,y:Y,width:Math.min(x.width,b+I)-U,height:Math.min(x.height,w+P)-Y},layout:[{offset:L,stride:F}]}}(i,e,r,s,o)),f)for(let x=0;xar(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,cn=function(i,e){if(/:\/\//.test(i.url)&&!/^https?:|^file:/.test(i.url)){const s=lr(i.url);if(s)return s(i,e);if(ar(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:i,targetMapId:cr},e)}if(!(/^file:/.test(r=i.url)||/^file:/.test(hr())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(s,o){return p(this,void 0,void 0,function*(){const h=new Request(s.url,{method:s.method||"GET",body:s.body,credentials:s.credentials,headers:s.headers,cache:s.cache,referrer:hr(),signal:o.signal});s.type==="json"&&h.headers.set("Accept","application/json");const d=yield fetch(h);if(!d.ok){const x=yield d.blob();throw new Fi(d.status,d.statusText,s.url,x)}let f;f=s.type==="arrayBuffer"||s.type==="image"?d.arrayBuffer():s.type==="json"?d.json():d.text();const g=yield f;if(o.signal.aborted)throw Bi();return{data:g,cacheControl:d.headers.get("Cache-Control"),expires:d.headers.get("Expires")}})}(i,e);if(ar(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:i,mustQueue:!0,targetMapId:cr},e)}var r;return function(s,o){return new Promise((h,d)=>{const f=new XMLHttpRequest;f.open(s.method||"GET",s.url,!0),s.type!=="arrayBuffer"&&s.type!=="image"||(f.responseType="arraybuffer");for(const g in s.headers)f.setRequestHeader(g,s.headers[g]);s.type==="json"&&(f.responseType="text",f.setRequestHeader("Accept","application/json")),f.withCredentials=s.credentials==="include",f.onerror=()=>{d(new Error(f.statusText))},f.onload=()=>{if(!o.signal.aborted)if((f.status>=200&&f.status<300||f.status===0)&&f.response!==null){let g=f.response;if(s.type==="json")try{g=JSON.parse(f.response)}catch(x){return void d(x)}h({data:g,cacheControl:f.getResponseHeader("Cache-Control"),expires:f.getResponseHeader("Expires")})}else{const g=new Blob([f.response],{type:f.getResponseHeader("Content-Type")});d(new Fi(f.status,f.statusText,s.url,g))}},o.signal.addEventListener("abort",()=>{f.abort(),d(Bi())}),f.send(s.body)})}(i,e)};function hn(i){if(!i||i.indexOf("://")<=0||i.indexOf("data:image/")===0||i.indexOf("blob:")===0)return!0;const e=new URL(i),r=window.location;return e.protocol===r.protocol&&e.host===r.host}function vs(i,e,r){r[i]&&r[i].indexOf(e)!==-1||(r[i]=r[i]||[],r[i].push(e))}function Qi(i,e,r){if(r&&r[i]){const s=r[i].indexOf(e);s!==-1&&r[i].splice(s,1)}}class Pr{constructor(e,r={}){Ei(this,r),this.type=e}}class wt extends Pr{constructor(e,r={}){super("error",Ei({error:e},r))}}class un{on(e,r){return this._listeners=this._listeners||{},vs(e,r,this._listeners),this}off(e,r){return Qi(e,r,this._listeners),Qi(e,r,this._oneTimeListeners),this}once(e,r){return r?(this._oneTimeListeners=this._oneTimeListeners||{},vs(e,r,this._oneTimeListeners),this):new Promise(s=>this.once(e,s))}fire(e,r){typeof e=="string"&&(e=new Pr(e,r||{}));const s=e.type;if(this.listens(s)){e.target=this;const o=this._listeners&&this._listeners[s]?this._listeners[s].slice():[];for(const f of o)f.call(this,e);const h=this._oneTimeListeners&&this._oneTimeListeners[s]?this._oneTimeListeners[s].slice():[];for(const f of h)Qi(s,f,this._oneTimeListeners),f.call(this,e);const d=this._eventedParent;d&&(Ei(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),d.fire(e))}else e instanceof wt&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,r){return this._eventedParent=e,this._eventedParentData=r,this}}var re={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const Mr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Un(i,e){const r={};for(const s in i)s!=="ref"&&(r[s]=i[s]);return Mr.forEach(s=>{s in e&&(r[s]=e[s])}),r}function et(i,e){if(Array.isArray(i)){if(!Array.isArray(e)||i.length!==e.length)return!1;for(let r=0;r`:i.itemType.kind==="value"?"array":`array<${e}>`}return i.kind}const N=[Ur,pe,qe,Ne,Yt,fr,Qt,M(Ue),Rt,O,A];function G(i,e){if(e.kind==="error")return null;if(i.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!G(i.itemType,e.itemType))&&(typeof i.N!="number"||i.N===e.N))return null}else{if(i.kind===e.kind)return null;if(i.kind==="value"){for(const r of N)if(!G(r,e))return null}}return`Expected ${k(i)} but found ${k(e)} instead.`}function H(i,e){return e.some(r=>r.kind===i.kind)}function J(i,e){return e.some(r=>r==="null"?i===null:r==="array"?Array.isArray(i):r==="object"?i&&!Array.isArray(i)&&typeof i=="object":r===typeof i)}function q(i,e){return i.kind==="array"&&e.kind==="array"?i.itemType.kind===e.itemType.kind&&typeof i.N=="number":i.kind===e.kind}const ee=.96422,he=.82521,se=4/29,ne=6/29,Re=3*ne*ne,Le=ne*ne*ne,He=Math.PI/180,Oe=180/Math.PI;function Ke(i){return(i%=360)<0&&(i+=360),i}function rt([i,e,r,s]){let o,h;const d=Tt((.2225045*(i=lt(i))+.7168786*(e=lt(e))+.0606169*(r=lt(r)))/1);i===e&&e===r?o=h=d:(o=Tt((.4360747*i+.3850649*e+.1430804*r)/ee),h=Tt((.0139322*i+.0971045*e+.7141733*r)/he));const f=116*d-16;return[f<0?0:f,500*(o-d),200*(d-h),s]}function lt(i){return i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Tt(i){return i>Le?Math.pow(i,1/3):i/Re+se}function $e([i,e,r,s]){let o=(i+16)/116,h=isNaN(e)?o:o+e/500,d=isNaN(r)?o:o-r/200;return o=1*Ct(o),h=ee*Ct(h),d=he*Ct(d),[ft(3.1338561*h-1.6168667*o-.4906146*d),ft(-.9787684*h+1.9161415*o+.033454*d),ft(.0719453*h-.2289914*o+1.4052427*d),s]}function ft(i){return(i=i<=.00304?12.92*i:1.055*Math.pow(i,1/2.4)-.055)<0?0:i>1?1:i}function Ct(i){return i>ne?i*i*i:Re*(i-se)}function ci(i){return parseInt(i.padEnd(2,i),16)/255}function xi(i,e){return Et(e?i/100:i,0,1)}function Et(i,e,r){return Math.min(Math.max(e,i),r)}function gn(i){return!i.some(Number.isNaN)}const Ol={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]};class tt{constructor(e,r,s,o=1,h=!0){this.r=e,this.g=r,this.b=s,this.a=o,h||(this.r*=o,this.g*=o,this.b*=o,o||this.overwriteGetter("rgb",[e,r,s,o]))}static parse(e){if(e instanceof tt)return e;if(typeof e!="string")return;const r=function(s){if((s=s.toLowerCase().trim())==="transparent")return[0,0,0,0];const o=Ol[s];if(o){const[d,f,g]=o;return[d/255,f/255,g/255,1]}if(s.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(s)){const d=s.length<6?1:2;let f=1;return[ci(s.slice(f,f+=d)),ci(s.slice(f,f+=d)),ci(s.slice(f,f+=d)),ci(s.slice(f,f+d)||"ff")]}if(s.startsWith("rgb")){const d=s.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(d){const[f,g,x,b,w,I,P,E,L,F,U,Y]=d,Z=[b||" ",P||" ",F].join("");if(Z===" "||Z===" /"||Z===",,"||Z===",,,"){const K=[x,I,L].join(""),ae=K==="%%%"?100:K===""?255:0;if(ae){const le=[Et(+g/ae,0,1),Et(+w/ae,0,1),Et(+E/ae,0,1),U?xi(+U,Y):1];if(gn(le))return le}}return}}const h=s.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(h){const[d,f,g,x,b,w,I,P,E]=h,L=[g||" ",b||" ",I].join("");if(L===" "||L===" /"||L===",,"||L===",,,"){const F=[+f,Et(+x,0,100),Et(+w,0,100),P?xi(+P,E):1];if(gn(F))return function([U,Y,Z,K]){function ae(le){const Te=(le+U/30)%12,ke=Y*Math.min(Z,1-Z);return Z-ke*Math.max(-1,Math.min(Te-3,9-Te,1))}return U=Ke(U),Y/=100,Z/=100,[ae(0),ae(8),ae(4),K]}(F)}}}(e);return r?new tt(...r,!1):void 0}get rgb(){const{r:e,g:r,b:s,a:o}=this,h=o||1/0;return this.overwriteGetter("rgb",[e/h,r/h,s/h,o])}get hcl(){return this.overwriteGetter("hcl",function(e){const[r,s,o,h]=rt(e),d=Math.sqrt(s*s+o*o);return[Math.round(1e4*d)?Ke(Math.atan2(o,s)*Oe):NaN,d,r,h]}(this.rgb))}get lab(){return this.overwriteGetter("lab",rt(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){const[e,r,s,o]=this.rgb;return`rgba(${[e,r,s].map(h=>Math.round(255*h)).join(",")},${o})`}}tt.black=new tt(0,0,0,1),tt.white=new tt(1,1,1,1),tt.transparent=new tt(0,0,0,0),tt.red=new tt(1,0,0,1);class xa{constructor(e,r,s){this.sensitivity=e?r?"variant":"case":r?"accent":"base",this.locale=s,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,r){return this.collator.compare(e,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class va{constructor(e,r,s,o,h){this.text=e,this.image=r,this.scale=s,this.fontStack=o,this.textColor=h}}class vi{constructor(e){this.sections=e}static fromString(e){return new vi([new va(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof vi?e:vi.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}}class hi{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof hi)return e;if(typeof e=="number")return new hi([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const r of e)if(typeof r!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new hi(e)}}toString(){return JSON.stringify(this.values)}}const qn=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class ui{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof ui)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let r=0;r=0&&i<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?s===void 0||typeof s=="number"&&s>=0&&s<=1?null:`Invalid rgba value [${[i,e,r,s].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof s=="number"?[i,e,r,s]:[i,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function mr(i){if(i===null||typeof i=="string"||typeof i=="boolean"||typeof i=="number"||i instanceof tt||i instanceof xa||i instanceof vi||i instanceof hi||i instanceof ui||i instanceof ki)return!0;if(Array.isArray(i)){for(const e of i)if(!mr(e))return!1;return!0}if(typeof i=="object"){for(const e in i)if(!mr(i[e]))return!1;return!0}return!1}function St(i){if(i===null)return Ur;if(typeof i=="string")return qe;if(typeof i=="boolean")return Ne;if(typeof i=="number")return pe;if(i instanceof tt)return Yt;if(i instanceof xa)return pr;if(i instanceof vi)return fr;if(i instanceof hi)return Rt;if(i instanceof ui)return A;if(i instanceof ki)return O;if(Array.isArray(i)){const e=i.length;let r;for(const s of i){const o=St(s);if(r){if(r===o)continue;r=Ue;break}r=o}return M(r||Ue,e)}return Qt}function Zn(i){const e=typeof i;return i===null?"":e==="string"||e==="number"||e==="boolean"?String(i):i instanceof tt||i instanceof vi||i instanceof hi||i instanceof ui||i instanceof ki?i.toString():JSON.stringify(i)}class $r{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!mr(e[1]))return r.error("invalid value");const s=e[1];let o=St(s);const h=r.expectedType;return o.kind!=="array"||o.N!==0||!h||h.kind!=="array"||typeof h.N=="number"&&h.N!==0||(o=h),new $r(o,s)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class yt{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const qr={string:qe,number:pe,boolean:Ne,object:Qt};class Oi{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let s,o=1;const h=e[0];if(h==="array"){let f,g;if(e.length>2){const x=e[1];if(typeof x!="string"||!(x in qr)||x==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);f=qr[x],o++}else f=Ue;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error('The length argument to "array" must be a positive integer literal',2);g=e[2],o++}s=M(f,g)}else{if(!qr[h])throw new Error(`Types doesn't contain name = ${h}`);s=qr[h]}const d=[];for(;oe.outputDefined())}}const ws={"to-boolean":Ne,"to-color":Yt,"to-number":pe,"to-string":qe};class er{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const s=e[0];if(!ws[s])throw new Error(`Can't parse ${s} as it is not part of the known types`);if((s==="to-boolean"||s==="to-string")&&e.length!==2)return r.error("Expected one argument.");const o=ws[s],h=[];for(let d=1;d4?`Invalid rbga value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:Co(r[0],r[1],r[2],r[3]),!s))return new tt(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new yt(s||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"padding":{let r;for(const s of this.args){r=s.evaluate(e);const o=hi.parse(r);if(o)return o}throw new yt(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"variableAnchorOffsetCollection":{let r;for(const s of this.args){r=s.evaluate(e);const o=ui.parse(r);if(o)return o}throw new yt(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"number":{let r=null;for(const s of this.args){if(r=s.evaluate(e),r===null)return 0;const o=Number(r);if(!isNaN(o))return o}throw new yt(`Could not convert ${JSON.stringify(r)} to number.`)}case"formatted":return vi.fromString(Zn(this.args[0].evaluate(e)));case"resolvedImage":return ki.fromString(Zn(this.args[0].evaluate(e)));default:return Zn(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}const ba=["Unknown","Point","LineString","Polygon"];class _n{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ba[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let r=this._parseColorCache[e];return r||(r=this._parseColorCache[e]=tt.parse(e)),r}}class Ye{constructor(e,r,s=[],o,h=new mn,d=[]){this.registry=e,this.path=s,this.key=s.map(f=>`[${f}]`).join(""),this.scope=h,this.errors=d,this.expectedType=o,this._isConstant=r}parse(e,r,s,o,h={}){return r?this.concat(r,s,o)._parse(e,h):this._parse(e,h)}_parse(e,r){function s(o,h,d){return d==="assert"?new Oi(h,[o]):d==="coerce"?new er(h,[o]):o}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const o=e[0];if(typeof o!="string")return this.error(`Expression name must be a string, but found ${typeof o} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const h=this.registry[o];if(h){let d=h.parse(e,this);if(!d)return null;if(this.expectedType){const f=this.expectedType,g=d.type;if(f.kind!=="string"&&f.kind!=="number"&&f.kind!=="boolean"&&f.kind!=="object"&&f.kind!=="array"||g.kind!=="value")if(f.kind!=="color"&&f.kind!=="formatted"&&f.kind!=="resolvedImage"||g.kind!=="value"&&g.kind!=="string")if(f.kind!=="padding"||g.kind!=="value"&&g.kind!=="number"&&g.kind!=="array")if(f.kind!=="variableAnchorOffsetCollection"||g.kind!=="value"&&g.kind!=="array"){if(this.checkSubtype(f,g))return null}else d=s(d,f,r.typeAnnotation||"coerce");else d=s(d,f,r.typeAnnotation||"coerce");else d=s(d,f,r.typeAnnotation||"coerce");else d=s(d,f,r.typeAnnotation||"assert")}if(!(d instanceof $r)&&d.type.kind!=="resolvedImage"&&this._isConstant(d)){const f=new _n;try{d=new $r(d.type,d.evaluate(f))}catch(g){return this.error(g.message),null}}return d}return this.error(`Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,r,s){const o=typeof e=="number"?this.path.concat(e):this.path,h=s?this.scope.concat(s):this.scope;return new Ye(this.registry,this._isConstant,o,r||null,h,this.errors)}error(e,...r){const s=`${this.key}${r.map(o=>`[${o}]`).join("")}`;this.errors.push(new li(s,e))}checkSubtype(e,r){const s=G(e,r);return s&&this.error(s),s}}class Ts{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const s=[];for(let h=1;h=s.length)throw new yt(`Array index out of bounds: ${r} > ${s.length-1}.`);if(r!==Math.floor(r))throw new yt(`Array index must be an integer, but found ${r} instead.`);return s[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class Ss{constructor(e,r){this.type=Ne,this.needle=e,this.haystack=r}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const s=r.parse(e[1],1,Ue),o=r.parse(e[2],2,Ue);return s&&o?H(s.type,[Ne,qe,pe,Ur,Ue])?new Ss(s,o):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${k(s.type)} instead`):null}evaluate(e){const r=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(!s)return!1;if(!J(r,["boolean","string","number","null"]))throw new yt(`Expected first argument to be of type boolean, string, number or null, but found ${k(St(r))} instead.`);if(!J(s,["string","array"]))throw new yt(`Expected second argument to be of type array or string, but found ${k(St(s))} instead.`);return s.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class Gn{constructor(e,r,s){this.type=pe,this.needle=e,this.haystack=r,this.fromIndex=s}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const s=r.parse(e[1],1,Ue),o=r.parse(e[2],2,Ue);if(!s||!o)return null;if(!H(s.type,[Ne,qe,pe,Ur,Ue]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${k(s.type)} instead`);if(e.length===4){const h=r.parse(e[3],3,pe);return h?new Gn(s,o,h):null}return new Gn(s,o)}evaluate(e){const r=this.needle.evaluate(e),s=this.haystack.evaluate(e);if(!J(r,["boolean","string","number","null"]))throw new yt(`Expected first argument to be of type boolean, string, number or null, but found ${k(St(r))} instead.`);if(!J(s,["string","array"]))throw new yt(`Expected second argument to be of type array or string, but found ${k(St(s))} instead.`);if(this.fromIndex){const o=this.fromIndex.evaluate(e);return s.indexOf(r,o)}return s.indexOf(r)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class Ta{constructor(e,r,s,o,h,d){this.inputType=e,this.type=r,this.input=s,this.cases=o,this.outputs=h,this.otherwise=d}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return r.error("Expected an even number of arguments.");let s,o;r.expectedType&&r.expectedType.kind!=="value"&&(o=r.expectedType);const h={},d=[];for(let x=2;xNumber.MAX_SAFE_INTEGER)return I.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof E=="number"&&Math.floor(E)!==E)return I.error("Numeric branch labels must be integer values.");if(s){if(I.checkSubtype(s,St(E)))return null}else s=St(E);if(h[String(E)]!==void 0)return I.error("Branch labels must be unique.");h[String(E)]=d.length}const P=r.parse(w,x,o);if(!P)return null;o=o||P.type,d.push(P)}const f=r.parse(e[1],1,Ue);if(!f)return null;const g=r.parse(e[e.length-1],e.length-1,o);return g?f.type.kind!=="value"&&r.concat(1).checkSubtype(s,f.type)?null:new Ta(s,o,f,h,d,g):null}evaluate(e){const r=this.input.evaluate(e);return(St(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}}class Is{constructor(e,r,s){this.type=e,this.branches=r,this.otherwise=s}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return r.error("Expected an odd number of arguments.");let s;r.expectedType&&r.expectedType.kind!=="value"&&(s=r.expectedType);const o=[];for(let d=1;dr.outputDefined())&&this.otherwise.outputDefined()}}class Wn{constructor(e,r,s,o){this.type=e,this.input=r,this.beginIndex=s,this.endIndex=o}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const s=r.parse(e[1],1,Ue),o=r.parse(e[2],2,pe);if(!s||!o)return null;if(!H(s.type,[M(Ue),qe,Ue]))return r.error(`Expected first argument to be of type array or string, but found ${k(s.type)} instead`);if(e.length===4){const h=r.parse(e[3],3,pe);return h?new Wn(s.type,s,o,h):null}return new Wn(s.type,s,o)}evaluate(e){const r=this.input.evaluate(e),s=this.beginIndex.evaluate(e);if(!J(r,["string","array"]))throw new yt(`Expected first argument to be of type array or string, but found ${k(St(r))} instead.`);if(this.endIndex){const o=this.endIndex.evaluate(e);return r.slice(s,o)}return r.slice(s)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function As(i,e){const r=i.length-1;let s,o,h=0,d=r,f=0;for(;h<=d;)if(f=Math.floor((h+d)/2),s=i[f],o=i[f+1],s<=e){if(f===r||ee))throw new yt("Input is not a number.");d=f-1}return 0}class Hn{constructor(e,r,s){this.type=e,this.input=r,this.labels=[],this.outputs=[];for(const[o,h]of s)this.labels.push(o),this.outputs.push(h)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");const s=r.parse(e[1],1,pe);if(!s)return null;const o=[];let h=null;r.expectedType&&r.expectedType.kind!=="value"&&(h=r.expectedType);for(let d=1;d=f)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',x);const w=r.parse(g,b,h);if(!w)return null;h=h||w.type,o.push([f,w])}return new Hn(h,s,o)}evaluate(e){const r=this.labels,s=this.outputs;if(r.length===1)return s[0].evaluate(e);const o=this.input.evaluate(e);if(o<=r[0])return s[0].evaluate(e);const h=r.length;return o>=r[h-1]?s[h-1].evaluate(e):s[As(r,o)].evaluate(e)}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function Vl(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Nl=Sa;function Sa(i,e,r,s){this.cx=3*i,this.bx=3*(r-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(s-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=e,this.p2x=r,this.p2y=s}Sa.prototype={sampleCurveX:function(i){return((this.ax*i+this.bx)*i+this.cx)*i},sampleCurveY:function(i){return((this.ay*i+this.by)*i+this.cy)*i},sampleCurveDerivativeX:function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},solveCurveX:function(i,e){if(e===void 0&&(e=1e-6),i<0)return 0;if(i>1)return 1;for(var r=i,s=0;s<8;s++){var o=this.sampleCurveX(r)-i;if(Math.abs(o)o?d=r:f=r,r=.5*(f-d)+d;return r},solve:function(i,e){return this.sampleCurveY(this.solveCurveX(i,e))}};var Eo=Vl(Nl);function Zr(i,e,r){return i+r*(e-i)}function Ps(i,e,r){return i.map((s,o)=>Zr(s,e[o],r))}const ei={number:Zr,color:function(i,e,r,s="rgb"){switch(s){case"rgb":{const[o,h,d,f]=Ps(i.rgb,e.rgb,r);return new tt(o,h,d,f,!1)}case"hcl":{const[o,h,d,f]=i.hcl,[g,x,b,w]=e.hcl;let I,P;if(isNaN(o)||isNaN(g))isNaN(o)?isNaN(g)?I=NaN:(I=g,d!==1&&d!==0||(P=x)):(I=o,b!==1&&b!==0||(P=h));else{let Y=g-o;g>o&&Y>180?Y-=360:g180&&(Y+=360),I=o+r*Y}const[E,L,F,U]=function([Y,Z,K,ae]){return Y=isNaN(Y)?0:Y*He,$e([K,Math.cos(Y)*Z,Math.sin(Y)*Z,ae])}([I,P??Zr(h,x,r),Zr(d,b,r),Zr(f,w,r)]);return new tt(E,L,F,U,!1)}case"lab":{const[o,h,d,f]=$e(Ps(i.lab,e.lab,r));return new tt(o,h,d,f,!1)}}},array:Ps,padding:function(i,e,r){return new hi(Ps(i.values,e.values,r))},variableAnchorOffsetCollection:function(i,e,r){const s=i.values,o=e.values;if(s.length!==o.length)throw new yt(`Cannot interpolate values of different length. from: ${i.toString()}, to: ${e.toString()}`);const h=[];for(let d=0;dtypeof b!="number"||b<0||b>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);o={name:"cubic-bezier",controlPoints:x}}}if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(h=r.parse(h,2,pe),!h)return null;const f=[];let g=null;s==="interpolate-hcl"||s==="interpolate-lab"?g=Yt:r.expectedType&&r.expectedType.kind!=="value"&&(g=r.expectedType);for(let x=0;x=b)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',I);const E=r.parse(w,P,g);if(!E)return null;g=g||E.type,f.push([b,E])}return q(g,pe)||q(g,Yt)||q(g,Rt)||q(g,A)||q(g,M(pe))?new bi(g,s,o,h,f):r.error(`Type ${k(g)} is not interpolatable.`)}evaluate(e){const r=this.labels,s=this.outputs;if(r.length===1)return s[0].evaluate(e);const o=this.input.evaluate(e);if(o<=r[0])return s[0].evaluate(e);const h=r.length;if(o>=r[h-1])return s[h-1].evaluate(e);const d=As(r,o),f=bi.interpolationFactor(this.interpolation,o,r[d],r[d+1]),g=s[d].evaluate(e),x=s[d+1].evaluate(e);switch(this.operator){case"interpolate":return ei[this.type.kind](g,x,f);case"interpolate-hcl":return ei.color(g,x,f,"hcl");case"interpolate-lab":return ei.color(g,x,f,"lab")}}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function Ia(i,e,r,s){const o=s-r,h=i-r;return o===0?0:e===1?h/o:(Math.pow(e,h)-1)/(Math.pow(e,o)-1)}class Ms{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expectected at least one argument.");let s=null;const o=r.expectedType;o&&o.kind!=="value"&&(s=o);const h=[];for(const f of e.slice(1)){const g=r.parse(f,1+h.length,s,void 0,{typeAnnotation:"omit"});if(!g)return null;s=s||g.type,h.push(g)}if(!s)throw new Error("No output type");const d=o&&h.some(f=>G(o,f.type));return new Ms(d?Ue:s,h)}evaluate(e){let r,s=null,o=0;for(const h of this.args)if(o++,s=h.evaluate(e),s&&s instanceof ki&&!s.available&&(r||(r=s.name),s=null,o===this.args.length&&(s=r)),s!==null)break;return s}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}function Aa(i,e){return i==="=="||i==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function Pa(i,e,r,s){return s.compare(e,r)===0}function xn(i,e,r){const s=i!=="=="&&i!=="!=";return class Du{constructor(h,d,f){this.type=Ne,this.lhs=h,this.rhs=d,this.collator=f,this.hasUntypedArgument=h.type.kind==="value"||d.type.kind==="value"}static parse(h,d){if(h.length!==3&&h.length!==4)return d.error("Expected two or three arguments.");const f=h[0];let g=d.parse(h[1],1,Ue);if(!g)return null;if(!Aa(f,g.type))return d.concat(1).error(`"${f}" comparisons are not supported for type '${k(g.type)}'.`);let x=d.parse(h[2],2,Ue);if(!x)return null;if(!Aa(f,x.type))return d.concat(2).error(`"${f}" comparisons are not supported for type '${k(x.type)}'.`);if(g.type.kind!==x.type.kind&&g.type.kind!=="value"&&x.type.kind!=="value")return d.error(`Cannot compare types '${k(g.type)}' and '${k(x.type)}'.`);s&&(g.type.kind==="value"&&x.type.kind!=="value"?g=new Oi(x.type,[g]):g.type.kind!=="value"&&x.type.kind==="value"&&(x=new Oi(g.type,[x])));let b=null;if(h.length===4){if(g.type.kind!=="string"&&x.type.kind!=="string"&&g.type.kind!=="value"&&x.type.kind!=="value")return d.error("Cannot use collator to compare non-string types.");if(b=d.parse(h[3],3,pr),!b)return null}return new Du(g,x,b)}evaluate(h){const d=this.lhs.evaluate(h),f=this.rhs.evaluate(h);if(s&&this.hasUntypedArgument){const g=St(d),x=St(f);if(g.kind!==x.kind||g.kind!=="string"&&g.kind!=="number")throw new yt(`Expected arguments for "${i}" to be (string, string) or (number, number), but found (${g.kind}, ${x.kind}) instead.`)}if(this.collator&&!s&&this.hasUntypedArgument){const g=St(d),x=St(f);if(g.kind!=="string"||x.kind!=="string")return e(h,d,f)}return this.collator?r(h,d,f,this.collator.evaluate(h)):e(h,d,f)}eachChild(h){h(this.lhs),h(this.rhs),this.collator&&h(this.collator)}outputDefined(){return!0}}}const jl=xn("==",function(i,e,r){return e===r},Pa),ko=xn("!=",function(i,e,r){return e!==r},function(i,e,r,s){return!Pa(0,e,r,s)}),zo=xn("<",function(i,e,r){return e",function(i,e,r){return e>r},function(i,e,r,s){return s.compare(e,r)>0}),$l=xn("<=",function(i,e,r){return e<=r},function(i,e,r,s){return s.compare(e,r)<=0}),ql=xn(">=",function(i,e,r){return e>=r},function(i,e,r,s){return s.compare(e,r)>=0});class Cs{constructor(e,r,s){this.type=pr,this.locale=s,this.caseSensitive=e,this.diacriticSensitive=r}static parse(e,r){if(e.length!==2)return r.error("Expected one argument.");const s=e[1];if(typeof s!="object"||Array.isArray(s))return r.error("Collator options argument must be an object.");const o=r.parse(s["case-sensitive"]!==void 0&&s["case-sensitive"],1,Ne);if(!o)return null;const h=r.parse(s["diacritic-sensitive"]!==void 0&&s["diacritic-sensitive"],1,Ne);if(!h)return null;let d=null;return s.locale&&(d=r.parse(s.locale,1,qe),!d)?null:new Cs(o,h,d)}evaluate(e){return new xa(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}class Ma{constructor(e,r,s,o,h){this.type=qe,this.number=e,this.locale=r,this.currency=s,this.minFractionDigits=o,this.maxFractionDigits=h}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");const s=r.parse(e[1],1,pe);if(!s)return null;const o=e[2];if(typeof o!="object"||Array.isArray(o))return r.error("NumberFormat options argument must be an object.");let h=null;if(o.locale&&(h=r.parse(o.locale,1,qe),!h))return null;let d=null;if(o.currency&&(d=r.parse(o.currency,1,qe),!d))return null;let f=null;if(o["min-fraction-digits"]&&(f=r.parse(o["min-fraction-digits"],1,pe),!f))return null;let g=null;return o["max-fraction-digits"]&&(g=r.parse(o["max-fraction-digits"],1,pe),!g)?null:new Ma(s,h,d,f,g)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class Es{constructor(e){this.type=fr,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const s=e[1];if(!Array.isArray(s)&&typeof s=="object")return r.error("First argument must be an image or text section.");const o=[];let h=!1;for(let d=1;d<=e.length-1;++d){const f=e[d];if(h&&typeof f=="object"&&!Array.isArray(f)){h=!1;let g=null;if(f["font-scale"]&&(g=r.parse(f["font-scale"],1,pe),!g))return null;let x=null;if(f["text-font"]&&(x=r.parse(f["text-font"],1,M(qe)),!x))return null;let b=null;if(f["text-color"]&&(b=r.parse(f["text-color"],1,Yt),!b))return null;const w=o[o.length-1];w.scale=g,w.font=x,w.textColor=b}else{const g=r.parse(e[d],1,Ue);if(!g)return null;const x=g.type.kind;if(x!=="string"&&x!=="value"&&x!=="null"&&x!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");h=!0,o.push({content:g,scale:null,font:null,textColor:null})}}return new Es(o)}evaluate(e){return new vi(this.sections.map(r=>{const s=r.content.evaluate(e);return St(s)===O?new va("",s,null,null,null):new va(Zn(s),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null)}))}eachChild(e){for(const r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor)}outputDefined(){return!1}}class Ca{constructor(e){this.type=O,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");const s=r.parse(e[1],1,qe);return s?new Ca(s):r.error("No image name provided.")}evaluate(e){const r=this.input.evaluate(e),s=ki.fromString(r);return s&&e.availableImages&&(s.available=e.availableImages.indexOf(r)>-1),s}eachChild(e){e(this.input)}outputDefined(){return!1}}class Xn{constructor(e){this.type=pe,this.input=e}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);const s=r.parse(e[1],1);return s?s.type.kind!=="array"&&s.type.kind!=="string"&&s.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${k(s.type)} instead.`):new Xn(s):null}evaluate(e){const r=this.input.evaluate(e);if(typeof r=="string"||Array.isArray(r))return r.length;throw new yt(`Expected value to be of type string or array, but found ${k(St(r))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}const wi=8192;function Qe(i,e){const r=(180+i[0])/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i[1]*Math.PI/360)))/360,o=Math.pow(2,e.z);return[Math.round(r*o*wi),Math.round(s*o*wi)]}function Ea(i,e){const r=Math.pow(2,e.z);return[(o=(i[0]/wi+e.x)/r,360*o-180),(s=(i[1]/wi+e.y)/r,360/Math.PI*Math.atan(Math.exp((180-360*s)*Math.PI/180))-90)];var s,o}function Kn(i,e){i[0]=Math.min(i[0],e[0]),i[1]=Math.min(i[1],e[1]),i[2]=Math.max(i[2],e[0]),i[3]=Math.max(i[3],e[1])}function Jn(i,e){return!(i[0]<=e[0]||i[2]>=e[2]||i[1]<=e[1]||i[3]>=e[3])}function Zl(i,e,r){const s=i[0]-e[0],o=i[1]-e[1],h=i[0]-r[0],d=i[1]-r[1];return s*d-h*o==0&&s*h<=0&&o*d<=0}function ks(i,e,r,s){return(o=[s[0]-r[0],s[1]-r[1]])[0]*(h=[e[0]-i[0],e[1]-i[1]])[1]-o[1]*h[0]!=0&&!(!Lo(i,e,r,s)||!Lo(r,s,i,e));var o,h}function Gl(i,e,r){for(const s of r)for(let o=0;o(o=i)[1]!=(d=f[g+1])[1]>o[1]&&o[0]<(d[0]-h[0])*(o[1]-h[1])/(d[1]-h[1])+h[0]&&(s=!s)}var o,h,d;return s}function Wl(i,e){for(const r of e)if(vn(i,r))return!0;return!1}function Do(i,e){for(const r of i)if(!vn(r,e))return!1;for(let r=0;r0&&f<0||d<0&&f>0}function ka(i,e,r){const s=[];for(let o=0;or[2]){const o=.5*s;let h=i[0]-r[0]>o?-s:r[0]-i[0]>o?s:0;h===0&&(h=i[0]-r[2]>o?-s:r[2]-i[0]>o?s:0),i[0]+=h}Kn(e,i)}function Fo(i,e,r,s){const o=Math.pow(2,s.z)*wi,h=[s.x*wi,s.y*wi],d=[];for(const f of i)for(const g of f){const x=[g.x+h[0],g.y+h[1]];Bo(x,e,r,o),d.push(x)}return d}function Oo(i,e,r,s){const o=Math.pow(2,s.z)*wi,h=[s.x*wi,s.y*wi],d=[];for(const g of i){const x=[];for(const b of g){const w=[b.x+h[0],b.y+h[1]];Kn(e,w),x.push(w)}d.push(x)}if(e[2]-e[0]<=o/2){(f=e)[0]=f[1]=1/0,f[2]=f[3]=-1/0;for(const g of d)for(const x of g)Bo(x,e,r,o)}var f;return d}class Gr{constructor(e,r){this.type=Ne,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(mr(e[1])){const s=e[1];if(s.type==="FeatureCollection"){const o=[];for(const h of s.features){const{type:d,coordinates:f}=h.geometry;d==="Polygon"&&o.push(f),d==="MultiPolygon"&&o.push(...f)}if(o.length)return new Gr(s,{type:"MultiPolygon",coordinates:o})}else if(s.type==="Feature"){const o=s.geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new Gr(s,s.geometry)}else if(s.type==="Polygon"||s.type==="MultiPolygon")return new Gr(s,s)}return r.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(r,s){const o=[1/0,1/0,-1/0,-1/0],h=[1/0,1/0,-1/0,-1/0],d=r.canonicalID();if(s.type==="Polygon"){const f=ka(s.coordinates,h,d),g=Fo(r.geometry(),o,h,d);if(!Jn(o,h))return!1;for(const x of g)if(!vn(x,f))return!1}if(s.type==="MultiPolygon"){const f=Ro(s.coordinates,h,d),g=Fo(r.geometry(),o,h,d);if(!Jn(o,h))return!1;for(const x of g)if(!Wl(x,f))return!1}return!0}(e,this.geometries);if(e.geometryType()==="LineString")return function(r,s){const o=[1/0,1/0,-1/0,-1/0],h=[1/0,1/0,-1/0,-1/0],d=r.canonicalID();if(s.type==="Polygon"){const f=ka(s.coordinates,h,d),g=Oo(r.geometry(),o,h,d);if(!Jn(o,h))return!1;for(const x of g)if(!Do(x,f))return!1}if(s.type==="MultiPolygon"){const f=Ro(s.coordinates,h,d),g=Oo(r.geometry(),o,h,d);if(!Jn(o,h))return!1;for(const x of g)if(!Hl(x,f))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Vo=class{constructor(i=[],e=Xl){if(this.data=i,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(i){this.data.push(i),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const i=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),i}peek(){return this.data[0]}_up(i){const{data:e,compare:r}=this,s=e[i];for(;i>0;){const o=i-1>>1,h=e[o];if(r(s,h)>=0)break;e[i]=h,i=o}e[i]=s}_down(i){const{data:e,compare:r}=this,s=this.length>>1,o=e[i];for(;i=0)break;e[i]=d,i=h}e[i]=o}};function Xl(i,e){return ie?1:0}function Kl(i,e,r,s,o){No(i,e,r,s||i.length-1,o||Jl)}function No(i,e,r,s,o){for(;s>r;){if(s-r>600){var h=s-r+1,d=e-r+1,f=Math.log(h),g=.5*Math.exp(2*f/3),x=.5*Math.sqrt(f*g*(h-g)/h)*(d-h/2<0?-1:1);No(i,e,Math.max(r,Math.floor(e-d*g/h+x)),Math.min(s,Math.floor(e+(h-d)*g/h+x)),o)}var b=i[e],w=r,I=s;for(Yn(i,r,e),o(i[s],b)>0&&Yn(i,r,s);w0;)I--}o(i[r],b)===0?Yn(i,r,I):Yn(i,++I,s),I<=e&&(r=I+1),e<=I&&(s=I-1)}}function Yn(i,e,r){var s=i[e];i[e]=i[r],i[r]=s}function Jl(i,e){return ie?1:0}function zs(i,e){if(i.length<=1)return[i];const r=[];let s,o;for(const h of i){const d=Ql(h);d!==0&&(h.area=Math.abs(d),o===void 0&&(o=d<0),o===d<0?(s&&r.push(s),s=[h]):s.push(h))}if(s&&r.push(s),e>1)for(let h=0;h1?(x=e[g+1][0],b=e[g+1][1]):P>0&&(x+=w/this.kx*P,b+=I/this.ky*P)),w=this.wrap(r[0]-x)*this.kx,I=(r[1]-b)*this.ky;const E=w*w+I*I;E180;)e-=360;return e}}function qo(i,e){return e[0]-i[0]}function bn(i){return i[1]-i[0]+1}function gr(i,e){return i[1]>=i[0]&&i[1]i[1])return[null,null];const r=bn(i);if(e){if(r===2)return[i,null];const o=Math.floor(r/2);return[[i[0],i[0]+o],[i[0]+o,i[1]]]}if(r===1)return[i,null];const s=Math.floor(r/2)-1;return[[i[0],i[0]+s],[i[0]+s+1,i[1]]]}function La(i,e){if(!gr(e,i.length))return[1/0,1/0,-1/0,-1/0];const r=[1/0,1/0,-1/0,-1/0];for(let s=e[0];s<=e[1];++s)Kn(r,i[s]);return r}function Ra(i){const e=[1/0,1/0,-1/0,-1/0];for(const r of i)for(const s of r)Kn(e,s);return e}function xt(i){return i[0]!==-1/0&&i[1]!==-1/0&&i[2]!==1/0&&i[3]!==1/0}function Ba(i,e,r){if(!xt(i)||!xt(e))return NaN;let s=0,o=0;return i[2]e[2]&&(s=i[0]-e[2]),i[1]>e[3]&&(o=i[1]-e[3]),i[3]=s)return s;if(Jn(o,h)){if(Fa(i,e))return 0}else if(Fa(e,i))return 0;let d=1/0;for(const f of i)for(let g=0,x=f.length,b=x-1;g0;){const g=d.pop();if(g[0]>=h)continue;const x=g[1],b=e?50:100;if(bn(x)<=b){if(!gr(x,i.length))return NaN;if(e){const w=Zo(i,x,r,s);if(isNaN(w)||w===0)return w;h=Math.min(h,w)}else for(let w=x[0];w<=x[1];++w){const I=Ds(i[w],r,s);if(h=Math.min(h,I),h===0)return 0}}else{const w=Da(x,e);Go(d,h,s,i,f,w[0]),Go(d,h,s,i,f,w[1])}}return h}function es(i,e,r,s,o,h=1/0){let d=Math.min(h,o.distance(i[0],r[0]));if(d===0)return d;const f=new Vo([[0,[0,i.length-1],[0,r.length-1]]],qo);for(;f.length>0;){const g=f.pop();if(g[0]>=d)continue;const x=g[1],b=g[2],w=e?50:100,I=s?50:100;if(bn(x)<=w&&bn(b)<=I){if(!gr(x,i.length)&&gr(b,r.length))return NaN;let P;if(e&&s)P=mt(i,x,r,b,o),d=Math.min(d,P);else if(e&&!s){const E=i.slice(x[0],x[1]+1);for(let L=b[0];L<=b[1];++L)if(P=Ge(r[L],E,o),d=Math.min(d,P),d===0)return d}else if(!e&&s){const E=r.slice(b[0],b[1]+1);for(let L=x[0];L<=x[1];++L)if(P=Ge(i[L],E,o),d=Math.min(d,P),d===0)return d}else P=pt(i,x,r,b,o),d=Math.min(d,P)}else{const P=Da(x,e),E=Da(b,s);Ls(f,d,o,i,r,P[0],E[0]),Ls(f,d,o,i,r,P[0],E[1]),Ls(f,d,o,i,r,P[1],E[0]),Ls(f,d,o,i,r,P[1],E[1])}}return d}function Bs(i){return i.type==="MultiPolygon"?i.coordinates.map(e=>({type:"Polygon",coordinates:e})):i.type==="MultiLineString"?i.coordinates.map(e=>({type:"LineString",coordinates:e})):i.type==="MultiPoint"?i.coordinates.map(e=>({type:"Point",coordinates:e})):[i]}class Cr{constructor(e,r){this.type=pe,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(mr(e[1])){const s=e[1];if(s.type==="FeatureCollection")return new Cr(s,s.features.map(o=>Bs(o.geometry)).flat());if(s.type==="Feature")return new Cr(s,Bs(s.geometry));if("type"in s&&"coordinates"in s)return new Cr(s,Bs(s))}return r.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(r,s){const o=r.geometry(),h=o.flat().map(g=>Ea([g.x,g.y],r.canonical));if(o.length===0)return NaN;const d=new za(h[0][1]);let f=1/0;for(const g of s){switch(g.type){case"Point":f=Math.min(f,es(h,!1,[g.coordinates],!1,d,f));break;case"LineString":f=Math.min(f,es(h,!1,g.coordinates,!0,d,f));break;case"Polygon":f=Math.min(f,Rs(h,!1,g.coordinates,d,f))}if(f===0)return f}return f}(e,this.geometries);if(e.geometryType()==="LineString")return function(r,s){const o=r.geometry(),h=o.flat().map(g=>Ea([g.x,g.y],r.canonical));if(o.length===0)return NaN;const d=new za(h[0][1]);let f=1/0;for(const g of s){switch(g.type){case"Point":f=Math.min(f,es(h,!0,[g.coordinates],!1,d,f));break;case"LineString":f=Math.min(f,es(h,!0,g.coordinates,!0,d,f));break;case"Polygon":f=Math.min(f,Rs(h,!0,g.coordinates,d,f))}if(f===0)return f}return f}(e,this.geometries);if(e.geometryType()==="Polygon")return function(r,s){const o=r.geometry();if(o.length===0||o[0].length===0)return NaN;const h=zs(o,0).map(g=>g.map(x=>x.map(b=>Ea([b.x,b.y],r.canonical)))),d=new za(h[0][0][0][1]);let f=1/0;for(const g of s)for(const x of h){switch(g.type){case"Point":f=Math.min(f,Rs([g.coordinates],!1,x,d,f));break;case"LineString":f=Math.min(f,Rs(g.coordinates,!0,x,d,f));break;case"Polygon":f=Math.min(f,ec(x,g.coordinates,d,f))}if(f===0)return f}return f}(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const Wr={"==":jl,"!=":ko,">":Ul,"<":zo,">=":ql,"<=":$l,array:Oi,at:wa,boolean:Oi,case:Is,coalesce:Ms,collator:Cs,format:Es,image:Ca,in:Ss,"index-of":Gn,interpolate:bi,"interpolate-hcl":bi,"interpolate-lab":bi,length:Xn,let:Ts,literal:$r,match:Ta,number:Oi,"number-format":Ma,object:Oi,slice:Wn,step:Hn,string:Oi,"to-boolean":er,"to-color":er,"to-number":er,"to-string":er,var:yn,within:Gr,distance:Cr};class di{constructor(e,r,s,o){this.name=e,this.type=r,this._evaluate=s,this.args=o}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,r){const s=e[0],o=di.definitions[s];if(!o)return r.error(`Unknown expression "${s}". If you wanted a literal array, use ["literal", [...]].`,0);const h=Array.isArray(o)?o[0]:o.type,d=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,f=d.filter(([x])=>!Array.isArray(x)||x.length===e.length-1);let g=null;for(const[x,b]of f){g=new Ye(r.registry,Fs,r.path,null,r.scope);const w=[];let I=!1;for(let P=1;P{return I=w,Array.isArray(I)?`(${I.map(k).join(", ")})`:`(${k(I.type)}...)`;var I}).join(" | "),b=[];for(let w=1;w{r=e?r&&Fs(s):r&&s instanceof $r}),!!r&&Os(i)&&Vs(i,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Os(i){if(i instanceof di&&(i.name==="get"&&i.args.length===1||i.name==="feature-state"||i.name==="has"&&i.args.length===1||i.name==="properties"||i.name==="geometry-type"||i.name==="id"||/^filter-/.test(i.name))||i instanceof Gr||i instanceof Cr)return!1;let e=!0;return i.eachChild(r=>{e&&!Os(r)&&(e=!1)}),e}function ts(i){if(i instanceof di&&i.name==="feature-state")return!1;let e=!0;return i.eachChild(r=>{e&&!ts(r)&&(e=!1)}),e}function Vs(i,e){if(i instanceof di&&e.indexOf(i.name)>=0)return!1;let r=!0;return i.eachChild(s=>{r&&!Vs(s,e)&&(r=!1)}),r}function Va(i){return{result:"success",value:i}}function Xr(i){return{result:"error",value:i}}function _r(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function Xo(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function Ns(i){return!!i.expression&&i.expression.interpolated}function Je(i){return i instanceof Number?"number":i instanceof String?"string":i instanceof Boolean?"boolean":Array.isArray(i)?"array":i===null?"null":typeof i}function wn(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function js(i){return i}function is(i,e){const r=e.type==="color",s=i.stops&&typeof i.stops[0][0]=="object",o=s||!(s||i.property!==void 0),h=i.type||(Ns(e)?"exponential":"interval");if(r||e.type==="padding"){const b=r?tt.parse:hi.parse;(i=oi({},i)).stops&&(i.stops=i.stops.map(w=>[w[0],b(w[1])])),i.default=b(i.default?i.default:e.default)}if(i.colorSpace&&(d=i.colorSpace)!=="rgb"&&d!=="hcl"&&d!=="lab")throw new Error(`Unknown color space: "${i.colorSpace}"`);var d;let f,g,x;if(h==="exponential")f=ja;else if(h==="interval")f=Ko;else if(h==="categorical"){f=Na,g=Object.create(null);for(const b of i.stops)g[b[0]]=b[1];x=typeof i.stops[0][0]}else{if(h!=="identity")throw new Error(`Unknown function type "${h}"`);f=Us}if(s){const b={},w=[];for(let E=0;EE[0]),evaluate:({zoom:E},L)=>ja({stops:I,base:i.base},e,E).evaluate(E,L)}}if(o){const b=h==="exponential"?{name:"exponential",base:i.base!==void 0?i.base:1}:null;return{kind:"camera",interpolationType:b,interpolationFactor:bi.interpolationFactor.bind(void 0,b),zoomStops:i.stops.map(w=>w[0]),evaluate:({zoom:w})=>f(i,e,w,g,x)}}return{kind:"source",evaluate(b,w){const I=w&&w.properties?w.properties[i.property]:void 0;return I===void 0?Tn(i.default,e.default):f(i,e,I,g,x)}}}function Tn(i,e,r){return i!==void 0?i:e!==void 0?e:r!==void 0?r:void 0}function Na(i,e,r,s,o){return Tn(typeof r===o?s[r]:void 0,i.default,e.default)}function Ko(i,e,r){if(Je(r)!=="number")return Tn(i.default,e.default);const s=i.stops.length;if(s===1||r<=i.stops[0][0])return i.stops[0][1];if(r>=i.stops[s-1][0])return i.stops[s-1][1];const o=As(i.stops.map(h=>h[0]),r);return i.stops[o][1]}function ja(i,e,r){const s=i.base!==void 0?i.base:1;if(Je(r)!=="number")return Tn(i.default,e.default);const o=i.stops.length;if(o===1||r<=i.stops[0][0])return i.stops[0][1];if(r>=i.stops[o-1][0])return i.stops[o-1][1];const h=As(i.stops.map(b=>b[0]),r),d=function(b,w,I,P){const E=P-I,L=b-I;return E===0?0:w===1?L/E:(Math.pow(w,L)-1)/(Math.pow(w,E)-1)}(r,s,i.stops[h][0],i.stops[h+1][0]),f=i.stops[h][1],g=i.stops[h+1][1],x=ei[e.type]||js;return typeof f.evaluate=="function"?{evaluate(...b){const w=f.evaluate.apply(void 0,b),I=g.evaluate.apply(void 0,b);if(w!==void 0&&I!==void 0)return x(w,I,d,i.colorSpace)}}:x(f,g,d,i.colorSpace)}function Us(i,e,r){switch(e.type){case"color":r=tt.parse(r);break;case"formatted":r=vi.fromString(r.toString());break;case"resolvedImage":r=ki.fromString(r.toString());break;case"padding":r=hi.parse(r);break;default:Je(r)===e.type||e.type==="enum"&&e.values[r]||(r=void 0)}return Tn(r,i.default,e.default)}di.register(Wr,{error:[{kind:"error"},[qe],(i,[e])=>{throw new yt(e.evaluate(i))}],typeof:[qe,[Ue],(i,[e])=>k(St(e.evaluate(i)))],"to-rgba":[M(pe,4),[Yt],(i,[e])=>{const[r,s,o,h]=e.evaluate(i).rgb;return[255*r,255*s,255*o,h]}],rgb:[Yt,[pe,pe,pe],Wo],rgba:[Yt,[pe,pe,pe,pe],Wo],has:{type:Ne,overloads:[[[qe],(i,[e])=>Ho(e.evaluate(i),i.properties())],[[qe,Qt],(i,[e,r])=>Ho(e.evaluate(i),r.evaluate(i))]]},get:{type:Ue,overloads:[[[qe],(i,[e])=>Oa(e.evaluate(i),i.properties())],[[qe,Qt],(i,[e,r])=>Oa(e.evaluate(i),r.evaluate(i))]]},"feature-state":[Ue,[qe],(i,[e])=>Oa(e.evaluate(i),i.featureState||{})],properties:[Qt,[],i=>i.properties()],"geometry-type":[qe,[],i=>i.geometryType()],id:[Ue,[],i=>i.id()],zoom:[pe,[],i=>i.globals.zoom],"heatmap-density":[pe,[],i=>i.globals.heatmapDensity||0],"line-progress":[pe,[],i=>i.globals.lineProgress||0],accumulated:[Ue,[],i=>i.globals.accumulated===void 0?null:i.globals.accumulated],"+":[pe,Hr(pe),(i,e)=>{let r=0;for(const s of e)r+=s.evaluate(i);return r}],"*":[pe,Hr(pe),(i,e)=>{let r=1;for(const s of e)r*=s.evaluate(i);return r}],"-":{type:pe,overloads:[[[pe,pe],(i,[e,r])=>e.evaluate(i)-r.evaluate(i)],[[pe],(i,[e])=>-e.evaluate(i)]]},"/":[pe,[pe,pe],(i,[e,r])=>e.evaluate(i)/r.evaluate(i)],"%":[pe,[pe,pe],(i,[e,r])=>e.evaluate(i)%r.evaluate(i)],ln2:[pe,[],()=>Math.LN2],pi:[pe,[],()=>Math.PI],e:[pe,[],()=>Math.E],"^":[pe,[pe,pe],(i,[e,r])=>Math.pow(e.evaluate(i),r.evaluate(i))],sqrt:[pe,[pe],(i,[e])=>Math.sqrt(e.evaluate(i))],log10:[pe,[pe],(i,[e])=>Math.log(e.evaluate(i))/Math.LN10],ln:[pe,[pe],(i,[e])=>Math.log(e.evaluate(i))],log2:[pe,[pe],(i,[e])=>Math.log(e.evaluate(i))/Math.LN2],sin:[pe,[pe],(i,[e])=>Math.sin(e.evaluate(i))],cos:[pe,[pe],(i,[e])=>Math.cos(e.evaluate(i))],tan:[pe,[pe],(i,[e])=>Math.tan(e.evaluate(i))],asin:[pe,[pe],(i,[e])=>Math.asin(e.evaluate(i))],acos:[pe,[pe],(i,[e])=>Math.acos(e.evaluate(i))],atan:[pe,[pe],(i,[e])=>Math.atan(e.evaluate(i))],min:[pe,Hr(pe),(i,e)=>Math.min(...e.map(r=>r.evaluate(i)))],max:[pe,Hr(pe),(i,e)=>Math.max(...e.map(r=>r.evaluate(i)))],abs:[pe,[pe],(i,[e])=>Math.abs(e.evaluate(i))],round:[pe,[pe],(i,[e])=>{const r=e.evaluate(i);return r<0?-Math.round(-r):Math.round(r)}],floor:[pe,[pe],(i,[e])=>Math.floor(e.evaluate(i))],ceil:[pe,[pe],(i,[e])=>Math.ceil(e.evaluate(i))],"filter-==":[Ne,[qe,Ue],(i,[e,r])=>i.properties()[e.value]===r.value],"filter-id-==":[Ne,[Ue],(i,[e])=>i.id()===e.value],"filter-type-==":[Ne,[qe],(i,[e])=>i.geometryType()===e.value],"filter-<":[Ne,[qe,Ue],(i,[e,r])=>{const s=i.properties()[e.value],o=r.value;return typeof s==typeof o&&s{const r=i.id(),s=e.value;return typeof r==typeof s&&r":[Ne,[qe,Ue],(i,[e,r])=>{const s=i.properties()[e.value],o=r.value;return typeof s==typeof o&&s>o}],"filter-id->":[Ne,[Ue],(i,[e])=>{const r=i.id(),s=e.value;return typeof r==typeof s&&r>s}],"filter-<=":[Ne,[qe,Ue],(i,[e,r])=>{const s=i.properties()[e.value],o=r.value;return typeof s==typeof o&&s<=o}],"filter-id-<=":[Ne,[Ue],(i,[e])=>{const r=i.id(),s=e.value;return typeof r==typeof s&&r<=s}],"filter->=":[Ne,[qe,Ue],(i,[e,r])=>{const s=i.properties()[e.value],o=r.value;return typeof s==typeof o&&s>=o}],"filter-id->=":[Ne,[Ue],(i,[e])=>{const r=i.id(),s=e.value;return typeof r==typeof s&&r>=s}],"filter-has":[Ne,[Ue],(i,[e])=>e.value in i.properties()],"filter-has-id":[Ne,[],i=>i.id()!==null&&i.id()!==void 0],"filter-type-in":[Ne,[M(qe)],(i,[e])=>e.value.indexOf(i.geometryType())>=0],"filter-id-in":[Ne,[M(Ue)],(i,[e])=>e.value.indexOf(i.id())>=0],"filter-in-small":[Ne,[qe,M(Ue)],(i,[e,r])=>r.value.indexOf(i.properties()[e.value])>=0],"filter-in-large":[Ne,[qe,M(Ue)],(i,[e,r])=>function(s,o,h,d){for(;h<=d;){const f=h+d>>1;if(o[f]===s)return!0;o[f]>s?d=f-1:h=f+1}return!1}(i.properties()[e.value],r.value,0,r.value.length-1)],all:{type:Ne,overloads:[[[Ne,Ne],(i,[e,r])=>e.evaluate(i)&&r.evaluate(i)],[Hr(Ne),(i,e)=>{for(const r of e)if(!r.evaluate(i))return!1;return!0}]]},any:{type:Ne,overloads:[[[Ne,Ne],(i,[e,r])=>e.evaluate(i)||r.evaluate(i)],[Hr(Ne),(i,e)=>{for(const r of e)if(r.evaluate(i))return!0;return!1}]]},"!":[Ne,[Ne],(i,[e])=>!e.evaluate(i)],"is-supported-script":[Ne,[qe],(i,[e])=>{const r=i.globals&&i.globals.isSupportedScript;return!r||r(e.evaluate(i))}],upcase:[qe,[qe],(i,[e])=>e.evaluate(i).toUpperCase()],downcase:[qe,[qe],(i,[e])=>e.evaluate(i).toLowerCase()],concat:[qe,Hr(Ue),(i,e)=>e.map(r=>Zn(r.evaluate(i))).join("")],"resolved-locale":[qe,[pr],(i,[e])=>e.evaluate(i).resolvedLocale()]});class Ua{constructor(e,r){var s;this.expression=e,this._warningHistory={},this._evaluator=new _n,this._defaultValue=r?(s=r).type==="color"&&wn(s.default)?new tt(0,0,0,0):s.type==="color"?tt.parse(s.default)||null:s.type==="padding"?hi.parse(s.default)||null:s.type==="variableAnchorOffsetCollection"?ui.parse(s.default)||null:s.default===void 0?null:s.default:null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(e,r,s,o,h,d){return this._evaluator.globals=e,this._evaluator.feature=r,this._evaluator.featureState=s,this._evaluator.canonical=o,this._evaluator.availableImages=h||null,this._evaluator.formattedSection=d,this.expression.evaluate(this._evaluator)}evaluate(e,r,s,o,h,d){this._evaluator.globals=e,this._evaluator.feature=r||null,this._evaluator.featureState=s||null,this._evaluator.canonical=o,this._evaluator.availableImages=h||null,this._evaluator.formattedSection=d||null;try{const f=this.expression.evaluate(this._evaluator);if(f==null||typeof f=="number"&&f!=f)return this._defaultValue;if(this._enumValues&&!(f in this._enumValues))throw new yt(`Expected value to be one of ${Object.keys(this._enumValues).map(g=>JSON.stringify(g)).join(", ")}, but found ${JSON.stringify(f)} instead.`);return f}catch(f){return this._warningHistory[f.message]||(this._warningHistory[f.message]=!0,typeof console<"u"&&console.warn(f.message)),this._defaultValue}}}function $s(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Wr}function qs(i,e){const r=new Ye(Wr,Fs,[],e?function(o){const h={color:Yt,string:qe,number:pe,enum:qe,boolean:Ne,formatted:fr,padding:Rt,resolvedImage:O,variableAnchorOffsetCollection:A};return o.type==="array"?M(h[o.value]||Ue,o.length):h[o.type]}(e):void 0),s=r.parse(i,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return s?Va(new Ua(s,e)):Xr(r.errors)}class $a{constructor(e,r){this.kind=e,this._styleExpression=r,this.isStateDependent=e!=="constant"&&!ts(r.expression)}evaluateWithoutErrorHandling(e,r,s,o,h,d){return this._styleExpression.evaluateWithoutErrorHandling(e,r,s,o,h,d)}evaluate(e,r,s,o,h,d){return this._styleExpression.evaluate(e,r,s,o,h,d)}}class qa{constructor(e,r,s,o){this.kind=e,this.zoomStops=s,this._styleExpression=r,this.isStateDependent=e!=="camera"&&!ts(r.expression),this.interpolationType=o}evaluateWithoutErrorHandling(e,r,s,o,h,d){return this._styleExpression.evaluateWithoutErrorHandling(e,r,s,o,h,d)}evaluate(e,r,s,o,h,d){return this._styleExpression.evaluate(e,r,s,o,h,d)}interpolationFactor(e,r,s){return this.interpolationType?bi.interpolationFactor(this.interpolationType,e,r,s):0}}function rs(i,e){const r=qs(i,e);if(r.result==="error")return r;const s=r.value.expression,o=Os(s);if(!o&&!_r(e))return Xr([new li("","data expressions not supported")]);const h=Vs(s,["zoom"]);if(!h&&!Xo(e))return Xr([new li("","zoom expressions not supported")]);const d=jt(s);return d||h?d instanceof li?Xr([d]):d instanceof bi&&!Ns(e)?Xr([new li("",'"interpolate" expressions cannot be used with this property')]):Va(d?new qa(o?"camera":"composite",r.value,d.labels,d instanceof bi?d.interpolation:void 0):new $a(o?"constant":"source",r.value)):Xr([new li("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Kr{constructor(e,r){this._parameters=e,this._specification=r,oi(this,is(this._parameters,this._specification))}static deserialize(e){return new Kr(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function jt(i){let e=null;if(i instanceof Ts)e=jt(i.result);else if(i instanceof Ms){for(const r of i.args)if(e=jt(r),e)break}else(i instanceof Hn||i instanceof bi)&&i.input instanceof di&&i.input.name==="zoom"&&(e=i);return e instanceof li||i.eachChild(r=>{const s=jt(r);s instanceof li?e=s:!e&&s?e=new li("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&s&&e!==s&&(e=new li("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function Jr(i){if(i===!0||i===!1)return!0;if(!Array.isArray(i)||i.length===0)return!1;switch(i[0]){case"has":return i.length>=2&&i[1]!=="$id"&&i[1]!=="$type";case"in":return i.length>=3&&(typeof i[1]!="string"||Array.isArray(i[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return i.length!==3||Array.isArray(i[1])||Array.isArray(i[2]);case"any":case"all":for(const e of i.slice(1))if(!Jr(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}const Jo={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Za(i){if(i==null)return{filter:()=>!0,needGeometry:!1};Jr(i)||(i=ns(i));const e=qs(i,Jo);if(e.result==="error")throw new Error(e.value.map(r=>`${r.key}: ${r.message}`).join(", "));return{filter:(r,s,o)=>e.value.evaluate(r,s,{},o),needGeometry:Sn(i)}}function tc(i,e){return ie?1:0}function Sn(i){if(!Array.isArray(i))return!1;if(i[0]==="within"||i[0]==="distance")return!0;for(let e=1;e"||e==="<="||e===">="?ss(i[1],i[2],e):e==="any"?(r=i.slice(1),["any"].concat(r.map(ns))):e==="all"?["all"].concat(i.slice(1).map(ns)):e==="none"?["all"].concat(i.slice(1).map(ns).map(Gs)):e==="in"?Yo(i[1],i.slice(2)):e==="!in"?Gs(Yo(i[1],i.slice(2))):e==="has"?Zs(i[1]):e!=="!has"||Gs(Zs(i[1]));var r}function ss(i,e,r){switch(i){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,i,e]}}function Yo(i,e){if(e.length===0)return!1;switch(i){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(r=>typeof r!=typeof e[0])?["filter-in-large",i,["literal",e.sort(tc)]]:["filter-in-small",i,["literal",e]]}}function Zs(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function Gs(i){return["!",i]}function Yr(i){const e=typeof i;if(e==="number"||e==="boolean"||e==="string"||i==null)return JSON.stringify(i);if(Array.isArray(i)){let o="[";for(const h of i)o+=`${Yr(h)},`;return`${o}]`}const r=Object.keys(i).sort();let s="{";for(let o=0;os.maximum?[new me(e,r,`${r} is greater than the maximum value ${s.maximum}`)]:[]}function Xs(i){const e=i.valueSpec,r=_t(i.value.type);let s,o,h,d={};const f=r!=="categorical"&&i.value.property===void 0,g=!f,x=Je(i.value.stops)==="array"&&Je(i.value.stops[0])==="array"&&Je(i.value.stops[0][0])==="object",b=Ti({key:i.key,value:i.value,valueSpec:i.styleSpec.function,validateSpec:i.validateSpec,style:i.style,styleSpec:i.styleSpec,objectElementValidators:{stops:function(P){if(r==="identity")return[new me(P.key,P.value,'identity function may not have a "stops" property')];let E=[];const L=P.value;return E=E.concat(Hs({key:P.key,value:L,valueSpec:P.valueSpec,validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec,arrayElementValidator:w})),Je(L)==="array"&&L.length===0&&E.push(new me(P.key,L,"array must have at least one stop")),E},default:function(P){return P.validateSpec({key:P.key,value:P.value,valueSpec:e,validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec})}}});return r==="identity"&&f&&b.push(new me(i.key,i.value,'missing required property "property"')),r==="identity"||i.value.stops||b.push(new me(i.key,i.value,'missing required property "stops"')),r==="exponential"&&i.valueSpec.expression&&!Ns(i.valueSpec)&&b.push(new me(i.key,i.value,"exponential functions not supported")),i.styleSpec.$version>=8&&(g&&!_r(i.valueSpec)?b.push(new me(i.key,i.value,"property functions not supported")):f&&!Xo(i.valueSpec)&&b.push(new me(i.key,i.value,"zoom functions not supported"))),r!=="categorical"&&!x||i.value.property!==void 0||b.push(new me(i.key,i.value,'"property" property is required')),b;function w(P){let E=[];const L=P.value,F=P.key;if(Je(L)!=="array")return[new me(F,L,`array expected, ${Je(L)} found`)];if(L.length!==2)return[new me(F,L,`array length 2 expected, length ${L.length} found`)];if(x){if(Je(L[0])!=="object")return[new me(F,L,`object expected, ${Je(L[0])} found`)];if(L[0].zoom===void 0)return[new me(F,L,"object stop key must have zoom")];if(L[0].value===void 0)return[new me(F,L,"object stop key must have value")];if(h&&h>_t(L[0].zoom))return[new me(F,L[0].zoom,"stop zoom values must appear in ascending order")];_t(L[0].zoom)!==h&&(h=_t(L[0].zoom),o=void 0,d={}),E=E.concat(Ti({key:`${F}[0]`,value:L[0],valueSpec:{zoom:{}},validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec,objectElementValidators:{zoom:Ga,value:I}}))}else E=E.concat(I({key:`${F}[0]`,value:L[0],valueSpec:{},validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec},L));return $s(yr(L[1]))?E.concat([new me(`${F}[1]`,L[1],"expressions are not allowed in function stops.")]):E.concat(P.validateSpec({key:`${F}[1]`,value:L[1],valueSpec:e,validateSpec:P.validateSpec,style:P.style,styleSpec:P.styleSpec}))}function I(P,E){const L=Je(P.value),F=_t(P.value),U=P.value!==null?P.value:E;if(s){if(L!==s)return[new me(P.key,U,`${L} stop domain type must match previous stop domain type ${s}`)]}else s=L;if(L!=="number"&&L!=="string"&&L!=="boolean")return[new me(P.key,U,"stop domain value must be a number, string, or boolean")];if(L!=="number"&&r!=="categorical"){let Y=`number expected, ${L} found`;return _r(e)&&r===void 0&&(Y+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new me(P.key,U,Y)]}return r!=="categorical"||L!=="number"||isFinite(F)&&Math.floor(F)===F?r!=="categorical"&&L==="number"&&o!==void 0&&Fnew me(`${i.key}${s.key}`,i.value,s.message));const r=e.value.expression||e.value._styleExpression.expression;if(i.expressionContext==="property"&&i.propertyKey==="text-font"&&!r.outputDefined())return[new me(i.key,i.value,`Invalid data expression for "${i.propertyKey}". Output values must be contained as literals within the expression.`)];if(i.expressionContext==="property"&&i.propertyType==="layout"&&!ts(r))return[new me(i.key,i.value,'"feature-state" data expressions are not supported with layout properties.')];if(i.expressionContext==="filter"&&!ts(r))return[new me(i.key,i.value,'"feature-state" data expressions are not supported with filters.')];if(i.expressionContext&&i.expressionContext.indexOf("cluster")===0){if(!Vs(r,["zoom","feature-state"]))return[new me(i.key,i.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(i.expressionContext==="cluster-initial"&&!Os(r))return[new me(i.key,i.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function In(i){const e=i.key,r=i.value,s=i.valueSpec,o=[];return Array.isArray(s.values)?s.values.indexOf(_t(r))===-1&&o.push(new me(e,r,`expected one of [${s.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(s.values).indexOf(_t(r))===-1&&o.push(new me(e,r,`expected one of [${Object.keys(s.values).join(", ")}], ${JSON.stringify(r)} found`)),o}function Ks(i){return Jr(yr(i.value))?xr(oi({},i,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Wa(i)}function Wa(i){const e=i.value,r=i.key;if(Je(e)!=="array")return[new me(r,e,`array expected, ${Je(e)} found`)];const s=i.styleSpec;let o,h=[];if(e.length<1)return[new me(r,e,"filter array must have at least 1 element")];switch(h=h.concat(In({key:`${r}[0]`,value:e[0],valueSpec:s.filter_operator,style:i.style,styleSpec:i.styleSpec})),_t(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&_t(e[1])==="$type"&&h.push(new me(r,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&h.push(new me(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(o=Je(e[1]),o!=="string"&&h.push(new me(`${r}[1]`,e[1],`string expected, ${o} found`)));for(let d=2;d